Merge branch 'release/1.11.0' of ssh://git.mnml.gg:40022/~/mnml into release/1.11.0
This commit is contained in:
commit
883e3c551d
@ -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
|
||||
|
||||
@ -41,36 +41,38 @@ class AnimText extends preact.Component {
|
||||
|
||||
const generateAnimText = () => {
|
||||
const [type, event] = resolution.event;
|
||||
if (type === 'Ko') return <h1><span>KO!</span></h1>;
|
||||
if (type === 'Disable') {
|
||||
const { disable } = event;
|
||||
return <h1><span>{disable}</span></h1>;
|
||||
}
|
||||
if (type === 'Immunity') return <h1><span>IMMUNE</span></h1>;
|
||||
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 <h1><span class={colour.toLowerCase()}>{amount} {mitigationText} </span></h1>;
|
||||
return <h1><span class={colour.toLowerCase()}>-{amount} {mitigationText} </span></h1>;
|
||||
}
|
||||
if (type === 'Healing') {
|
||||
case 'Healing': {
|
||||
const { amount, overhealing, colour } = event;
|
||||
return <h1><span class={colour.toLowerCase()}>{amount} ({overhealing} OH)</span></h1>;
|
||||
const overHealingText = overhealing ? `(${overhealing} OH)` : '';
|
||||
return <h1><span class={colour.toLowerCase()}>+{amount} {overHealingText}</span></h1>;
|
||||
}
|
||||
if (type === 'Inversion') return <h1><span>INVERT</span></h1>;
|
||||
if (type === 'Reflection') return <h1><span>REFLECT</span></h1>;
|
||||
if (type === 'Effect') {
|
||||
case 'Effect': {
|
||||
const { effect, duration } = event;
|
||||
return <h1><span>+{effect} {duration}T</span></h1>;
|
||||
}
|
||||
if (type === 'Removal') {
|
||||
case 'Removal': {
|
||||
const { effect } = event;
|
||||
if (!effect) return <h1><span>Effect Removal</span></h1>;
|
||||
return <h1><span>{effect}</span></h1>;
|
||||
return <h1><span>-{effect}</span></h1>;
|
||||
}
|
||||
case 'Ko': return <h1><span>KO!</span></h1>;
|
||||
case 'Reflection': return <h1><span>REFLECT</span></h1>;
|
||||
default: return false;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
// We don't send inversion / disable / immune event text
|
||||
/* case 'Inversion': return <h1><span>INVERT</span></h1>;
|
||||
case 'Disable': {
|
||||
const { disable } = event;
|
||||
return <h1><span>{disable}</span></h1>;
|
||||
}
|
||||
case 'Immunity': return <h1><span>IMMUNE</span></h1>; */
|
||||
|
||||
return (
|
||||
<div class="combat-text">
|
||||
|
||||
@ -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 ??
|
||||
|
||||
@ -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,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user