diff --git a/README.md b/README.md index 60cf88f..3025d90 100644 --- a/README.md +++ b/README.md @@ -136,3 +136,18 @@ They are small and cannot be the direct target of weapons. *Not done yet :* They are not affected by area effects, except for area damage and area effects specifically designed for drones. + +## Keyboard shortcuts + +### Global + +* S - Quick save +* L - Quick load +* M - Toggle sound +* F - Toggle fullscreen + +### Battle (arena) + +* 1,2,3...0 - Select action +* Space - End current ship's turn +* T - Tactical mode for 5 seconds diff --git a/src/core/Cooldown.ts b/src/core/Cooldown.ts index 1d21caa..5985199 100644 --- a/src/core/Cooldown.ts +++ b/src/core/Cooldown.ts @@ -41,7 +41,7 @@ module TS.SpaceTac { * Check the number of uses before overheating */ getRemainingUses(): number { - return this.overheat - this.uses; + return (this.heat > 0) ? 0 : (this.overheat - this.uses); } /** diff --git a/src/ui/battle/ActionTooltip.ts b/src/ui/battle/ActionTooltip.ts index 8e58e2d..e3dd28a 100644 --- a/src/ui/battle/ActionTooltip.ts +++ b/src/ui/battle/ActionTooltip.ts @@ -51,7 +51,9 @@ module TS.SpaceTac.UI { uses_message += ` (for ${cooldown.cooling} turn${cooldown.cooling ? "s" : ""})`; } } - filler.addText(150, 90, uses_message, "#c9604c", 20); + if (uses_message) { + filler.addText(150, 90, uses_message, "#c9604c", 20); + } } let description = action.getEffectsDescription(); diff --git a/src/ui/battle/Arena.ts b/src/ui/battle/Arena.ts index 38a1bd2..8b3507a 100644 --- a/src/ui/battle/Arena.ts +++ b/src/ui/battle/Arena.ts @@ -211,9 +211,9 @@ module TS.SpaceTac.UI { } /** - * Set the HUD mode (shows information on all ships) + * Switch the tactical mode (shows information on all ships, and fades background) */ - setHUDMode(active: boolean): void { + setTacticalMode(active: boolean): void { this.ship_sprites.forEach(sprite => sprite.setHovered(active)); if (this.battleview.background) { this.battleview.animations.setVisible(this.battleview.background, !active, 200); diff --git a/src/ui/battle/BattleView.ts b/src/ui/battle/BattleView.ts index 80184ac..adc2467 100644 --- a/src/ui/battle/BattleView.ts +++ b/src/ui/battle/BattleView.ts @@ -104,6 +104,10 @@ module TS.SpaceTac.UI { this.gameui.audio.startMusic("full-on"); // Key mapping + this.inputs.bind("t", "Show tactical view", () => { + this.arena.setTacticalMode(true); + this.timer.schedule(5000, () => this.arena.setTacticalMode(false)); + }); this.inputs.bindCheat("w", "Win current battle", () => { iforeach(this.battle.iships(), ship => { if (ship.fleet.player != this.player) { diff --git a/src/ui/battle/ShipList.ts b/src/ui/battle/ShipList.ts index 5c65647..2a92f3a 100644 --- a/src/ui/battle/ShipList.ts +++ b/src/ui/battle/ShipList.ts @@ -28,7 +28,10 @@ module TS.SpaceTac.UI { this.info_button = new Phaser.Button(this.game, 0, 0, "battle-shiplist-info-button"); this.info_button.position.set(0, this.height - this.info_button.height); - UITools.setHoverClick(this.info_button, () => this.battleview.arena.setHUDMode(true), () => this.battleview.arena.setHUDMode(false), () => null); + UITools.setHoverClick(this.info_button, + () => this.battleview.arena.setTacticalMode(true), + () => this.battleview.arena.setTacticalMode(false), + () => null); this.addChild(this.info_button); battleview.layer_borders.add(this); diff --git a/src/ui/common/Animations.ts b/src/ui/common/Animations.ts index 9e847ea..5b40582 100644 --- a/src/ui/common/Animations.ts +++ b/src/ui/common/Animations.ts @@ -140,7 +140,7 @@ module TS.SpaceTac.UI { static moveInSpace(obj: PhaserGraphics, x: number, y: number, angle: number, rotated_obj = obj): number { if (x == obj.x && y == obj.y) { let tween = obj.game.tweens.create(rotated_obj); - let duration = Animations.rotationTween(tween, angle, 0.3); + let duration = Animations.rotationTween(tween, angle, 0.5); tween.start(); return duration; } else {