2015-04-07 00:00:00 +00:00
|
|
|
/// <reference path="../BaseView.ts"/>
|
|
|
|
|
2017-09-24 22:23:22 +00:00
|
|
|
module TK.SpaceTac.UI {
|
2017-10-25 22:45:53 +00:00
|
|
|
/**
|
|
|
|
* Interface for interacting with a ship (hover and click)
|
|
|
|
*/
|
|
|
|
export interface IShipButton {
|
|
|
|
cursorOnShip: (ship: Ship) => void;
|
|
|
|
cursorOffShip: (ship: Ship) => void;
|
|
|
|
cursorClicked: () => void;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Interactive view of a Battle
|
|
|
|
*/
|
|
|
|
export class BattleView extends BaseView implements IShipButton {
|
2017-11-14 00:07:06 +00:00
|
|
|
// Internal battle state
|
2018-01-31 18:19:50 +00:00
|
|
|
actual_battle!: Battle
|
2017-11-14 00:07:06 +00:00
|
|
|
|
|
|
|
// Displayed battle state
|
2018-01-31 18:19:50 +00:00
|
|
|
battle!: Battle
|
2014-12-29 00:00:00 +00:00
|
|
|
|
2014-12-30 00:00:00 +00:00
|
|
|
// Interacting player
|
2018-01-31 18:19:50 +00:00
|
|
|
player!: Player
|
2014-12-30 00:00:00 +00:00
|
|
|
|
2017-07-24 22:02:43 +00:00
|
|
|
// Multiplayer sharing
|
2018-01-31 18:19:50 +00:00
|
|
|
multi!: MultiBattle
|
2017-07-24 18:12:41 +00:00
|
|
|
|
2017-03-15 21:40:19 +00:00
|
|
|
// Layers
|
2018-01-31 18:19:50 +00:00
|
|
|
layer_background!: Phaser.Group
|
|
|
|
layer_arena!: Phaser.Group
|
|
|
|
layer_borders!: Phaser.Group
|
|
|
|
layer_overlay!: Phaser.Group
|
|
|
|
layer_sheets!: Phaser.Group
|
2014-12-30 00:00:00 +00:00
|
|
|
|
|
|
|
// Battleground container
|
2018-01-31 18:19:50 +00:00
|
|
|
arena!: Arena
|
2014-12-30 00:00:00 +00:00
|
|
|
|
2015-02-03 00:00:00 +00:00
|
|
|
// Background image
|
2018-01-31 18:19:50 +00:00
|
|
|
background!: Phaser.Image | null
|
2015-02-03 00:00:00 +00:00
|
|
|
|
2014-12-31 00:00:00 +00:00
|
|
|
// Targetting mode (null if we're not in this mode)
|
2018-01-31 18:19:50 +00:00
|
|
|
targetting!: Targetting
|
2014-12-31 00:00:00 +00:00
|
|
|
|
2015-01-14 00:00:00 +00:00
|
|
|
// Ship list
|
2018-01-31 18:19:50 +00:00
|
|
|
ship_list!: ShipList
|
2015-01-14 00:00:00 +00:00
|
|
|
|
2015-01-02 00:00:00 +00:00
|
|
|
// Action bar
|
2018-01-31 18:19:50 +00:00
|
|
|
action_bar!: ActionBar
|
2015-01-02 00:00:00 +00:00
|
|
|
|
2014-12-31 00:00:00 +00:00
|
|
|
// Currently hovered ship
|
2018-01-31 18:19:50 +00:00
|
|
|
ship_hovered!: Ship | null
|
2014-12-31 00:00:00 +00:00
|
|
|
|
2017-01-09 23:24:33 +00:00
|
|
|
// Ship tooltip
|
2018-01-31 18:19:50 +00:00
|
|
|
ship_tooltip!: ShipTooltip
|
2017-01-09 23:24:33 +00:00
|
|
|
|
2017-02-27 23:36:12 +00:00
|
|
|
// Character sheet
|
2018-01-31 18:19:50 +00:00
|
|
|
character_sheet!: CharacterSheet
|
2017-02-27 23:36:12 +00:00
|
|
|
|
2014-12-31 00:00:00 +00:00
|
|
|
// Subscription to the battle log
|
2018-01-31 18:19:50 +00:00
|
|
|
log_processor!: LogProcessor
|
2014-12-31 00:00:00 +00:00
|
|
|
|
2015-02-16 00:00:00 +00:00
|
|
|
// True if player interaction is allowed
|
2018-01-31 18:19:50 +00:00
|
|
|
interacting!: boolean
|
2015-02-16 00:00:00 +00:00
|
|
|
|
2017-05-21 16:39:02 +00:00
|
|
|
// Tactical mode toggle
|
2018-01-31 18:19:50 +00:00
|
|
|
toggle_tactical_mode!: Toggle
|
2017-05-21 16:39:02 +00:00
|
|
|
|
2017-09-12 22:53:03 +00:00
|
|
|
// Toggle for the splash screen display
|
|
|
|
splash = true
|
|
|
|
|
2014-12-29 00:00:00 +00:00
|
|
|
// Init the view, binding it to a specific battle
|
2017-02-09 00:00:35 +00:00
|
|
|
init(player: Player, battle: Battle) {
|
2015-04-07 00:00:00 +00:00
|
|
|
super.init();
|
|
|
|
|
2014-12-30 00:00:00 +00:00
|
|
|
this.player = player;
|
2017-11-14 00:07:06 +00:00
|
|
|
this.actual_battle = battle;
|
|
|
|
this.battle = duplicate(battle, <any>TK.SpaceTac);
|
2014-12-31 00:00:00 +00:00
|
|
|
this.ship_hovered = null;
|
2015-02-03 00:00:00 +00:00
|
|
|
this.background = null;
|
2017-07-24 22:02:43 +00:00
|
|
|
this.multi = new MultiBattle();
|
2017-02-16 22:59:41 +00:00
|
|
|
|
|
|
|
this.battle.timer = this.timer;
|
2017-02-19 21:33:07 +00:00
|
|
|
|
2017-05-21 16:39:02 +00:00
|
|
|
this.toggle_tactical_mode = new Toggle(
|
|
|
|
() => this.arena.setTacticalMode(true),
|
|
|
|
() => this.arena.setTacticalMode(false)
|
|
|
|
);
|
2014-12-29 00:00:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Create view graphics
|
|
|
|
create() {
|
2015-04-07 00:00:00 +00:00
|
|
|
super.create();
|
|
|
|
|
2014-12-30 00:00:00 +00:00
|
|
|
var game = this.game;
|
2017-09-13 22:26:14 +00:00
|
|
|
this.interacting = false;
|
2017-05-30 16:24:55 +00:00
|
|
|
this.log_processor = new LogProcessor(this);
|
2014-12-30 00:00:00 +00:00
|
|
|
|
2018-03-08 19:16:05 +00:00
|
|
|
let builder = new UIBuilder(this);
|
|
|
|
|
2017-03-15 21:40:19 +00:00
|
|
|
// Add layers
|
2017-10-11 20:58:08 +00:00
|
|
|
this.layer_background = this.getLayer("background");
|
|
|
|
this.layer_arena = this.getLayer("arena");
|
|
|
|
this.layer_borders = this.getLayer("borders");
|
|
|
|
this.layer_overlay = this.getLayer("overlay");
|
|
|
|
this.layer_sheets = this.getLayer("character_sheet");
|
2017-03-15 21:40:19 +00:00
|
|
|
|
2015-02-03 00:00:00 +00:00
|
|
|
// Background
|
2018-03-08 19:16:05 +00:00
|
|
|
this.background = builder.in(this.layer_background).image("battle-background");
|
2015-01-02 00:00:00 +00:00
|
|
|
|
2017-09-19 15:09:06 +00:00
|
|
|
// Add arena (local battlefield map)
|
|
|
|
this.arena = new Arena(this, this.layer_arena);
|
|
|
|
this.arena.callbacks_hover.push(bound(this, "cursorHovered"));
|
|
|
|
this.arena.callbacks_click.push(bound(this, "cursorClicked"));
|
2014-12-30 00:00:00 +00:00
|
|
|
|
2015-01-02 00:00:00 +00:00
|
|
|
// Add UI elements
|
|
|
|
this.action_bar = new ActionBar(this);
|
2017-09-28 23:18:46 +00:00
|
|
|
this.action_bar.position.set(0, this.getHeight() - 132);
|
2017-11-14 00:07:06 +00:00
|
|
|
this.ship_list = new ShipList(this, this.battle, this.player, this.toggle_tactical_mode, this,
|
2017-10-25 22:45:53 +00:00
|
|
|
this.layer_borders, this.getWidth() - 112, 0);
|
2017-12-04 18:12:06 +00:00
|
|
|
this.ship_list.bindToLog(this.log_processor);
|
2017-01-09 23:24:33 +00:00
|
|
|
this.ship_tooltip = new ShipTooltip(this);
|
2018-02-08 15:16:03 +00:00
|
|
|
this.character_sheet = new CharacterSheet(this);
|
2017-03-15 21:40:19 +00:00
|
|
|
this.layer_sheets.add(this.character_sheet);
|
2015-01-08 00:00:00 +00:00
|
|
|
|
2017-06-21 23:32:18 +00:00
|
|
|
// Targetting info
|
2017-09-19 15:09:06 +00:00
|
|
|
this.targetting = new Targetting(this, this.action_bar, this.toggle_tactical_mode, this.arena.range_hint);
|
2017-06-21 23:32:18 +00:00
|
|
|
this.targetting.moveToLayer(this.arena.layer_targetting);
|
|
|
|
|
2015-04-22 21:42:40 +00:00
|
|
|
// BGM
|
2017-07-19 23:22:18 +00:00
|
|
|
this.gameui.audio.startMusic("mechanolith", 0.2);
|
2015-04-22 21:42:40 +00:00
|
|
|
|
2015-03-06 00:00:00 +00:00
|
|
|
// Key mapping
|
2017-09-13 20:56:57 +00:00
|
|
|
this.inputs.bind("t", "Show tactical view", () => this.toggle_tactical_mode.manipulate("keyboard")(3000));
|
2017-10-03 22:25:52 +00:00
|
|
|
this.inputs.bind("Enter", "Validate action", () => this.validationPressed());
|
|
|
|
this.inputs.bind(" ", "Validate action", () => this.validationPressed());
|
|
|
|
this.inputs.bind("Escape", "Cancel action", () => this.action_bar.actionEnded());
|
2017-09-13 22:26:14 +00:00
|
|
|
range(10).forEach(i => this.inputs.bind(`Numpad${i % 10}`, `Action/target ${i}`, () => this.numberPressed(i)));
|
|
|
|
range(10).forEach(i => this.inputs.bind(`Digit${i % 10}`, `Action/target ${i}`, () => this.numberPressed(i)));
|
2018-01-16 00:08:24 +00:00
|
|
|
this.inputs.bindCheat("w", "Win current battle", () => nn(this.player.getCheats()).win());
|
|
|
|
this.inputs.bindCheat("x", "Lose current battle", () => nn(this.player.getCheats()).lose());
|
2017-05-30 18:23:35 +00:00
|
|
|
this.inputs.bindCheat("a", "Use AI to play", () => this.playAI());
|
2017-02-19 21:33:07 +00:00
|
|
|
|
2017-09-12 22:53:03 +00:00
|
|
|
// "Battle" animation, then start processing the log
|
2017-11-14 23:45:09 +00:00
|
|
|
if (this.battle.ended) {
|
|
|
|
this.endBattle();
|
|
|
|
} else if (this.splash) {
|
2017-09-12 22:53:03 +00:00
|
|
|
this.showSplash().then(() => {
|
|
|
|
this.log_processor.start();
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
this.log_processor.start();
|
|
|
|
}
|
2017-07-24 18:12:41 +00:00
|
|
|
|
|
|
|
// If we are on a remote session, start the exchange
|
|
|
|
if (!this.session.primary && this.gameui.session_token) {
|
2017-07-24 22:02:43 +00:00
|
|
|
// TODO handle errors or timeout
|
2017-11-14 00:31:13 +00:00
|
|
|
this.multi.setup(this, this.actual_battle, this.gameui.session_token, false);
|
2017-07-24 18:12:41 +00:00
|
|
|
}
|
2014-12-29 00:00:00 +00:00
|
|
|
}
|
|
|
|
|
2017-10-08 21:26:33 +00:00
|
|
|
shutdown() {
|
|
|
|
super.shutdown();
|
|
|
|
|
|
|
|
this.log_processor.destroy();
|
|
|
|
}
|
|
|
|
|
2017-05-30 18:23:35 +00:00
|
|
|
/**
|
|
|
|
* Make the AI play current ship
|
|
|
|
*
|
|
|
|
* If the AI is already playing, do nothing
|
|
|
|
*/
|
|
|
|
playAI(): void {
|
2017-11-14 22:45:41 +00:00
|
|
|
if (this.session.spectator) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2018-03-01 23:14:09 +00:00
|
|
|
if (this.actual_battle.playAI(this.debug)) {
|
2017-05-30 18:23:35 +00:00
|
|
|
if (this.interacting) {
|
|
|
|
this.action_bar.setShip(new Ship());
|
|
|
|
}
|
|
|
|
this.setInteractionEnabled(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-11-14 00:07:06 +00:00
|
|
|
/**
|
|
|
|
* Apply an action to the actual battle
|
|
|
|
*/
|
|
|
|
applyAction(action: BaseAction, target?: Target): boolean {
|
2017-11-14 22:45:41 +00:00
|
|
|
if (this.session.spectator) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2017-11-14 00:07:06 +00:00
|
|
|
let ship = this.actual_battle.playing_ship;
|
|
|
|
if (ship) {
|
2018-02-08 15:16:03 +00:00
|
|
|
let ship_action = ship.actions.getById(action.id);
|
2017-11-14 00:07:06 +00:00
|
|
|
if (ship_action) {
|
2017-12-21 19:04:54 +00:00
|
|
|
let result = this.actual_battle.applyOneAction(action.id, target);
|
2017-12-04 18:12:06 +00:00
|
|
|
if (result) {
|
|
|
|
this.setInteractionEnabled(false);
|
|
|
|
}
|
|
|
|
return result;
|
2017-11-14 00:07:06 +00:00
|
|
|
} else {
|
2018-02-08 15:16:03 +00:00
|
|
|
console.error("Action not found in available list", action, ship.actions);
|
2017-11-14 00:07:06 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
console.error("Action not applied - ship not playing");
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-07-20 23:09:17 +00:00
|
|
|
/**
|
2017-09-12 22:53:03 +00:00
|
|
|
* Display the splash screen at the start of battle
|
2017-07-20 23:09:17 +00:00
|
|
|
*/
|
2017-09-12 22:53:03 +00:00
|
|
|
showSplash(): Promise<void> {
|
2017-07-20 23:09:17 +00:00
|
|
|
let splash = new BattleSplash(this, this.battle.fleets[0], this.battle.fleets[1]);
|
|
|
|
splash.moveToLayer(this.layer_overlay);
|
2017-09-12 22:53:03 +00:00
|
|
|
return splash.start();
|
2014-12-31 00:00:00 +00:00
|
|
|
}
|
|
|
|
|
2017-09-13 22:26:14 +00:00
|
|
|
/**
|
|
|
|
* Handle the pressing of a number key
|
|
|
|
*
|
|
|
|
* It may first be used to select an action to play, then to select a target
|
|
|
|
*/
|
|
|
|
numberPressed(num: number): void {
|
|
|
|
if (this.interacting) {
|
|
|
|
if (this.targetting.active) {
|
2017-10-25 22:45:53 +00:00
|
|
|
let ship = ifirst(this.battle.iships(true), ship => this.battle.getPlayOrder(ship) == num % 10);
|
2017-09-13 22:26:14 +00:00
|
|
|
if (ship) {
|
|
|
|
this.targetting.setTarget(Target.newFromShip(ship));
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
this.action_bar.keyActionPressed(num - 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-10-03 22:25:52 +00:00
|
|
|
/**
|
|
|
|
* Handle the pression of a validation key (enter or space)
|
|
|
|
*/
|
|
|
|
validationPressed(): void {
|
|
|
|
if (this.targetting.active) {
|
2017-11-14 00:07:06 +00:00
|
|
|
this.targetting.validate((action, target) => this.applyAction(action, target));
|
2017-10-03 22:25:52 +00:00
|
|
|
} else {
|
|
|
|
this.action_bar.keyActionPressed(-1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-09-19 15:09:06 +00:00
|
|
|
/**
|
|
|
|
* Method called when the arena cursor is hovered
|
|
|
|
*/
|
|
|
|
cursorHovered(location: ArenaLocation | null, ship: Ship | null) {
|
|
|
|
if (this.targetting.active) {
|
|
|
|
this.targetting.setTargetFromLocation(location);
|
2017-10-01 21:08:43 +00:00
|
|
|
} else {
|
|
|
|
if (ship && this.ship_hovered != ship) {
|
|
|
|
this.cursorOnShip(ship);
|
|
|
|
} else if (!ship && this.ship_hovered) {
|
|
|
|
this.cursorOffShip(this.ship_hovered);
|
|
|
|
}
|
2017-09-19 15:09:06 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Method called when cursor starts hovering over a ship (or its icon)
|
|
|
|
*/
|
2017-02-09 00:00:35 +00:00
|
|
|
cursorOnShip(ship: Ship): void {
|
2017-09-19 15:09:06 +00:00
|
|
|
if (ship.alive) {
|
2017-02-15 22:34:27 +00:00
|
|
|
this.setShipHovered(ship);
|
|
|
|
}
|
2014-12-31 00:00:00 +00:00
|
|
|
}
|
|
|
|
|
2017-09-19 15:09:06 +00:00
|
|
|
/**
|
|
|
|
* Method called when cursor stops hovering over a ship (or its icon)
|
|
|
|
*/
|
2017-02-09 00:00:35 +00:00
|
|
|
cursorOffShip(ship: Ship): void {
|
2014-12-31 00:00:00 +00:00
|
|
|
if (this.ship_hovered === ship) {
|
|
|
|
this.setShipHovered(null);
|
|
|
|
}
|
|
|
|
}
|
2014-12-30 00:00:00 +00:00
|
|
|
|
2017-09-19 15:09:06 +00:00
|
|
|
/**
|
|
|
|
* Method called when cursor has been clicked (in space or on a ship)
|
|
|
|
*/
|
2015-01-02 00:00:00 +00:00
|
|
|
cursorClicked(): void {
|
2017-06-21 23:32:18 +00:00
|
|
|
if (this.targetting.active) {
|
2017-11-14 00:07:06 +00:00
|
|
|
this.validationPressed();
|
2018-01-16 00:08:24 +00:00
|
|
|
} else if (this.ship_hovered && this.player.is(this.ship_hovered.fleet.player) && this.interacting) {
|
2017-11-14 23:45:09 +00:00
|
|
|
this.character_sheet.show(this.ship_hovered, undefined, undefined, false);
|
2017-03-05 23:29:02 +00:00
|
|
|
this.setShipHovered(null);
|
2014-12-31 00:00:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-09-19 15:09:06 +00:00
|
|
|
/**
|
|
|
|
* Set the currently hovered ship
|
|
|
|
*/
|
2017-03-09 17:11:00 +00:00
|
|
|
setShipHovered(ship: Ship | null): void {
|
2014-12-31 00:00:00 +00:00
|
|
|
this.ship_hovered = ship;
|
2015-01-23 00:00:00 +00:00
|
|
|
this.arena.setShipHovered(ship);
|
2015-02-04 00:00:00 +00:00
|
|
|
this.ship_list.setHovered(ship);
|
2017-05-14 23:00:36 +00:00
|
|
|
|
|
|
|
if (ship) {
|
|
|
|
this.ship_tooltip.setShip(ship);
|
|
|
|
} else {
|
|
|
|
this.ship_tooltip.hide();
|
|
|
|
}
|
2014-12-29 00:00:00 +00:00
|
|
|
}
|
2014-12-31 00:00:00 +00:00
|
|
|
|
2015-02-16 00:00:00 +00:00
|
|
|
// Enable or disable the global player interaction
|
|
|
|
// Disable interaction when it is the AI turn, or when the current ship can't play
|
|
|
|
setInteractionEnabled(enabled: boolean): void {
|
2017-06-08 21:58:23 +00:00
|
|
|
if (this.session.spectator) {
|
|
|
|
enabled = false;
|
|
|
|
}
|
|
|
|
|
2017-06-13 20:48:43 +00:00
|
|
|
if (enabled != this.interacting) {
|
|
|
|
this.action_bar.setInteractive(enabled);
|
|
|
|
this.exitTargettingMode();
|
|
|
|
this.interacting = enabled;
|
2017-10-01 21:08:43 +00:00
|
|
|
|
2017-10-08 21:26:33 +00:00
|
|
|
if (!enabled) {
|
|
|
|
this.setShipHovered(null);
|
|
|
|
}
|
2017-10-01 21:08:43 +00:00
|
|
|
}
|
2015-02-16 00:00:00 +00:00
|
|
|
}
|
|
|
|
|
2014-12-31 00:00:00 +00:00
|
|
|
// Enter targetting mode
|
|
|
|
// While in this mode, the Targetting object will receive hover and click events, and handle them
|
2018-02-08 15:16:03 +00:00
|
|
|
enterTargettingMode(ship: Ship, action: BaseAction, mode: ActionTargettingMode): Targetting | null {
|
2015-02-16 00:00:00 +00:00
|
|
|
if (!this.interacting) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2017-10-01 21:08:43 +00:00
|
|
|
this.setShipHovered(null);
|
|
|
|
|
2018-02-08 15:16:03 +00:00
|
|
|
this.targetting.setAction(ship, action, mode);
|
2014-12-31 00:00:00 +00:00
|
|
|
return this.targetting;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Exit targetting mode
|
|
|
|
exitTargettingMode(): void {
|
2018-02-08 15:16:03 +00:00
|
|
|
this.targetting.setAction(null, null);
|
2014-12-31 00:00:00 +00:00
|
|
|
}
|
2017-03-12 23:32:41 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* End the battle and show the outcome dialog
|
|
|
|
*/
|
|
|
|
endBattle() {
|
2017-11-14 23:45:09 +00:00
|
|
|
let battle = this.actual_battle;
|
|
|
|
if (battle.outcome) {
|
2017-03-12 23:32:41 +00:00
|
|
|
this.setInteractionEnabled(false);
|
|
|
|
|
2018-01-16 00:08:24 +00:00
|
|
|
this.session.setBattleEnded();
|
2017-03-14 22:28:07 +00:00
|
|
|
|
2017-11-14 23:45:09 +00:00
|
|
|
battle.stats.processLog(battle.log, this.player.fleet);
|
2017-05-29 23:15:32 +00:00
|
|
|
|
2017-11-14 23:45:09 +00:00
|
|
|
new OutcomeDialog(this, this.player, battle.outcome, battle.stats);
|
2017-03-12 23:32:41 +00:00
|
|
|
} else {
|
|
|
|
console.error("Battle not ended !");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Exit the battle, and go back to map
|
|
|
|
*/
|
|
|
|
exitBattle() {
|
2018-01-16 00:08:24 +00:00
|
|
|
this.session.exitBattle();
|
2017-03-12 23:32:41 +00:00
|
|
|
this.game.state.start('router');
|
|
|
|
}
|
2017-03-14 22:28:07 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Revert the battle, and go back to map
|
|
|
|
*/
|
|
|
|
revertBattle() {
|
2018-01-16 00:08:24 +00:00
|
|
|
this.session.revertBattle();
|
2017-03-14 22:28:07 +00:00
|
|
|
this.game.state.start('router');
|
|
|
|
}
|
2014-12-29 00:00:00 +00:00
|
|
|
}
|
|
|
|
}
|