diff --git a/client/src/components/construct.jsx b/client/src/components/construct.jsx index fba6a9e4..c8ca98a3 100644 --- a/client/src/components/construct.jsx +++ b/client/src/components/construct.jsx @@ -65,7 +65,10 @@ class ConstructAvatar extends Component { const { animSource, animTarget, resolution, construct, account } = this.props; // a different text object and text construct if (resolution && resolution !== prevProps.resolution && resolution.event[1].construct === construct.id) { - return wiggle(construct.id, this.idle); + const type = resolution.event[0]; + // only trigger the wiggle on damage and ko events rather than spam it on everything + // also stops wiggle triggering when invert effect is applied + if (['Damage', 'Ko'].includes(type)) return wiggle(construct.id, this.idle); } // different source object and source construct 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 (
diff --git a/core/fixme.md b/core/fixme.md index ddced70b..b428dc28 100644 --- a/core/fixme.md +++ b/core/fixme.md @@ -1,9 +1,5 @@ # FIXME game ready not auto starting resolve phase -sleep heal -invert animation - too slow slay animation still looks a bit weird -electric / electrocute anim order some issue triaged / decayed / siphoned / electrocute effect removal with purify / purge -inverted green damage ?? diff --git a/core/src/skill.rs b/core/src/skill.rs index 42cf8dd1..0f8c15bd 100644 --- a/core/src/skill.rs +++ b/core/src/skill.rs @@ -1675,12 +1675,6 @@ impl Electrocute { fn electrocute(cast: Cast, game: &mut Game, values: Electrocute) { let amount = game.value(Value::Stat { construct: cast.source, stat: Stat::BluePower }).pct(values.damage_multiplier()); - game.action(cast, - Action::Remove { - construct: cast.source, - effect: Effect::Electric, - } - ); game.action(cast, Action::Effect { construct: cast.target, @@ -1695,6 +1689,13 @@ fn electrocute(cast: Cast, game: &mut Game, values: Electrocute) { amount, }, ); + + game.action(cast, + Action::Remove { + construct: cast.source, + effect: Effect::Electric, + } + ); } fn electrocute_tick(cast: Cast, game: &mut Game) { @@ -1853,7 +1854,7 @@ fn link(cast: Cast, game: &mut Game, values: Link) { Action::Damage { construct: cast.target, colour: Colour::Blue, - amount: amount, + amount, }, ); }