Fixed effect marker not being removed on ship list
This commit is contained in:
parent
a0d4ec6720
commit
f141a705c2
1
TODO
1
TODO
|
@ -6,6 +6,7 @@
|
||||||
* Mobile: display tooltips larger and on the side of screen where the finger is not
|
* Mobile: display tooltips larger and on the side of screen where the finger is not
|
||||||
* Mobile: targetting in two times, using a draggable target indicator
|
* Mobile: targetting in two times, using a draggable target indicator
|
||||||
* AI: apply safety distances to move actions
|
* AI: apply safety distances to move actions
|
||||||
|
* AI: bully AI crashes when winning a battle (trying to move toward null ship!)
|
||||||
* Add a defeat screen (game over for now)
|
* Add a defeat screen (game over for now)
|
||||||
* Add a victory screen, with loot display
|
* Add a victory screen, with loot display
|
||||||
* Add retreat from battle
|
* Add retreat from battle
|
||||||
|
|
|
@ -252,18 +252,20 @@ module SpaceTac.Game {
|
||||||
this.recoverActionPoints();
|
this.recoverActionPoints();
|
||||||
|
|
||||||
// Decrement sticky effects duration
|
// Decrement sticky effects duration
|
||||||
|
let removed_effects: EffectRemovedEvent[] = [];
|
||||||
this.temporary_effects = this.temporary_effects.filter((effect: TemporaryEffect): boolean => {
|
this.temporary_effects = this.temporary_effects.filter((effect: TemporaryEffect): boolean => {
|
||||||
if (effect.duration <= 1) {
|
if (effect.duration <= 1) {
|
||||||
this.addBattleEvent(new EffectRemovedEvent(this, effect));
|
removed_effects.push(new EffectRemovedEvent(this, effect));
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.temporary_effects.forEach((effect: TemporaryEffect) => {
|
this.temporary_effects.forEach(effect => {
|
||||||
effect.duration -= 1;
|
effect.duration -= 1;
|
||||||
this.addBattleEvent(new EffectDurationChangedEvent(this, effect, effect.duration + 1));
|
this.addBattleEvent(new EffectDurationChangedEvent(this, effect, effect.duration + 1));
|
||||||
});
|
});
|
||||||
|
removed_effects.forEach(effect => this.addBattleEvent(effect));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add a temporary effect
|
// Add a temporary effect
|
||||||
|
|
Loading…
Reference in a new issue