diff --git a/client/src/components/game.construct.anim.text.jsx b/client/src/components/game.construct.anim.text.jsx
index 1311d744..8b982cd2 100644
--- a/client/src/components/game.construct.anim.text.jsx
+++ b/client/src/components/game.construct.anim.text.jsx
@@ -41,36 +41,38 @@ class AnimText extends preact.Component {
const generateAnimText = () => {
const [type, event] = resolution.event;
- if (type === 'Ko') return
KO!
;
- if (type === 'Disable') {
- const { disable } = event;
- return {disable}
;
- }
- if (type === 'Immunity') return IMMUNE
;
- if (type === 'Damage') {
- const { mitigation, colour } = event;
- let { amount } = event;
- amount *= -1;
+ switch (type) {
+ case 'Damage': {
+ const { amount, mitigation, colour } = event;
const mitigationText = mitigation ? `(${mitigation})` : '';
- return {amount} {mitigationText}
;
+ return -{amount} {mitigationText}
;
}
- if (type === 'Healing') {
+ case 'Healing': {
const { amount, overhealing, colour } = event;
- return {amount} ({overhealing} OH)
;
+ const overHealingText = overhealing ? `(${overhealing} OH)` : '';
+ return +{amount} {overHealingText}
;
}
- if (type === 'Inversion') return INVERT
;
- if (type === 'Reflection') return REFLECT
;
- if (type === 'Effect') {
+ case 'Effect': {
const { effect, duration } = event;
return +{effect} {duration}T
;
}
- if (type === 'Removal') {
+ case 'Removal': {
const { effect } = event;
if (!effect) return Effect Removal
;
- return {effect}
;
+ return -{effect}
;
+ }
+ case 'Ko': return KO!
;
+ case 'Reflection': return REFLECT
;
+ default: return false;
}
- return false;
};
+ // We don't send inversion / disable / immune event text
+ /* case 'Inversion': return INVERT
;
+ case 'Disable': {
+ const { disable } = event;
+ return {disable}
;
+ }
+ case 'Immunity': return IMMUNE
; */
return (