1
0
Fork 0
spacetac/src/core/actions/EndTurnAction.ts

18 lines
435 B
TypeScript
Raw Normal View History

2017-02-09 00:00:35 +00:00
module TS.SpaceTac {
2015-01-06 00:00:00 +00:00
// Action to end the ship's turn
export class EndTurnAction extends BaseAction {
constructor() {
2017-01-08 22:42:53 +00:00
super("endturn", "End ship's turn", false);
2015-01-06 00:00:00 +00:00
}
protected customApply(ship: Ship, target: Target) {
ship.endTurn();
let battle = ship.getBattle();
if (battle) {
battle.advanceToNextShip();
}
2015-01-06 00:00:00 +00:00
}
}
2015-01-07 00:00:00 +00:00
}