diff --git a/js/sim.js b/js/sim.js index 9e4f82889..d2c4b13e3 100644 --- a/js/sim.js +++ b/js/sim.js @@ -210,7 +210,11 @@ function BattleRoom(id, elem) { selfR.joinElem.remove(); } selfR.joinElem = null; - selfR.controlsElem.html('

← Your opponent has disconnected. Click this if they don\'t reconnect.

'); + if (selfR.battle.kickingInactive) { + selfR.controlsElem.html('

← Your opponent has disconnected. Click this to delay your victory.

'); + } else { + selfR.controlsElem.html('

← Your opponent has disconnected. Click this if they don\'t reconnect.

'); + } } else { if (selfR.joinElem) { selfR.joinElem.remove(); @@ -491,7 +495,11 @@ function BattleRoom(id, elem) { selfR.me.callbackWaiting = true; var active = selfR.battle.mySide.active[0]; if (!active) active = {}; - selfR.controlsElem.html('
Waiting for opponent...
'); + if (selfR.battle.kickingInactive) { + selfR.controlsElem.html('
Waiting for opponent...
'); + } else { + selfR.controlsElem.html('
Waiting for opponent...
'); + } var act = ''; var switchables = []; @@ -735,6 +743,10 @@ function BattleRoom(id, elem) { selfR.send('/kickinactive'); return false; }; + this.formStopBattleTimer = function () { + selfR.send('/timer off'); + return false; + }; this.formForfeit = function () { selfR.send('/forfeit'); return false; @@ -769,7 +781,11 @@ function BattleRoom(id, elem) { selfR.callback(selfR.battle, 'move2'); return false; } - selfR.controlsElem.html('
Waiting for opponent...

'); + if (selfR.battle.kickingInactive) { + selfR.controlsElem.html('
Waiting for opponent...

'); + } else { + selfR.controlsElem.html('
Waiting for opponent...

'); + } selfR.sendDecision('/choose '+selfR.choices.join(',')); selfR.notifying = false; updateRoomList(); @@ -803,7 +819,11 @@ function BattleRoom(id, elem) { return false; } } - selfR.controlsElem.html('
Waiting for opponent...

'); + if (selfR.battle.kickingInactive) { + selfR.controlsElem.html('
Waiting for opponent...

'); + } else { + selfR.controlsElem.html('
Waiting for opponent...

'); + } selfR.sendDecision('/choose '+selfR.choices.join(',')); selfR.notifying = false; updateRoomList(); @@ -827,7 +847,11 @@ function BattleRoom(id, elem) { } else { pos = pos+1; } - selfR.controlsElem.html('
Waiting for opponent...

'); + if (selfR.battle.kickingInactive) { + selfR.controlsElem.html('
Waiting for opponent...

'); + } else { + selfR.controlsElem.html('
Waiting for opponent...

'); + } selfR.sendDecision('/team '+(pos)); selfR.notifying = false; updateRoomList();