Fixed drones of dead ship never being destroyed
This commit is contained in:
parent
3fb2cf8e31
commit
962621c231
1
TODO
1
TODO
|
@ -1,4 +1,3 @@
|
|||
* Drones of dead ships are never destroyed
|
||||
* UI: Use a common component class, and a layer abstraction
|
||||
* Character sheet: add initial character creation
|
||||
* Character sheet: disable interaction during battle (except for loot screen)
|
||||
|
|
|
@ -320,6 +320,14 @@ module TS.SpaceTac.Specs {
|
|||
expect(onTurnEnd).toHaveBeenCalledTimes(1);
|
||||
expect(onTurnEnd).toHaveBeenCalledWith(ship);
|
||||
expect(onShipMove).toHaveBeenCalledTimes(1);
|
||||
|
||||
ship.setDead();
|
||||
ship.startTurn();
|
||||
ship.endTurn();
|
||||
|
||||
expect(onTurnStart).toHaveBeenCalledTimes(2);
|
||||
expect(onTurnEnd).toHaveBeenCalledTimes(2);
|
||||
expect(onShipMove).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
it("stores items in cargo space", function () {
|
||||
|
|
|
@ -360,10 +360,10 @@ module TS.SpaceTac {
|
|||
// Apply sticky effects
|
||||
this.sticky_effects.forEach(effect => effect.startTurn(this));
|
||||
this.cleanStickyEffects();
|
||||
|
||||
// Broadcast to drones
|
||||
this.forEachDrone(drone => drone.onTurnStart(this));
|
||||
}
|
||||
|
||||
// Broadcast to drones
|
||||
this.forEachDrone(drone => drone.onTurnStart(this));
|
||||
}
|
||||
|
||||
// Method called at the end of this ship turn
|
||||
|
@ -374,10 +374,10 @@ module TS.SpaceTac {
|
|||
}
|
||||
this.playing = false;
|
||||
|
||||
if (this.alive) {
|
||||
// Broadcast to drones
|
||||
this.forEachDrone(drone => drone.onTurnEnd(this));
|
||||
// Broadcast to drones
|
||||
this.forEachDrone(drone => drone.onTurnEnd(this));
|
||||
|
||||
if (this.alive) {
|
||||
// Recover action points for next turn
|
||||
this.updateAttributes();
|
||||
this.recoverActionPoints();
|
||||
|
|
Loading…
Reference in a new issue