Merge branch 'release/1.11.0' of ssh://git.mnml.gg:40022/~/mnml into release/1.11.0
This commit is contained in:
commit
5b5b8d3740
@ -59,11 +59,16 @@ class GameConstruct extends preact.Component {
|
|||||||
player,
|
player,
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
const ko = construct.green_life.value === 0 ? 'ko' : '';
|
// construct green_life comes from game state and won't update during animations
|
||||||
|
// treat the construct as ko for the remainder of the anims if ko event occurs
|
||||||
|
const ko = construct.green_life.value === 0 || this.ko ? 'ko' : '';
|
||||||
const koEvent = () => {
|
const koEvent = () => {
|
||||||
if (resolution) {
|
if (resolution) {
|
||||||
const [type, variant] = resolution.event;
|
const [type, variant] = resolution.event;
|
||||||
if (variant.construct === construct.id && type === 'Ko') return 'ko-transition';
|
if (variant.construct === construct.id && type === 'Ko') {
|
||||||
|
this.ko = true;
|
||||||
|
return 'ko-transition';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user