From 2f237eb80cede6162c9a7b47059522e0bff1735e Mon Sep 17 00:00:00 2001 From: Joimer Date: Fri, 26 Jul 2013 22:03:24 +0200 Subject: [PATCH] =?UTF-8?q?Preparing=20client=20for=20triple=20battles:=20?= =?UTF-8?q?Team=20Preview=20Edit=20the=20client=20so=20it=20acts=20correct?= =?UTF-8?q?ly=20in=20triples=20and=20the=20team=20preview=20lets=20you=20c?= =?UTF-8?q?hoose=20three=20Pok=C3=A9mon.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/battle.js | 4 ++++ js/client-battle.js | 3 +++ 2 files changed, 7 insertions(+) diff --git a/js/battle.js b/js/battle.js index 660fda63a..06a190611 100644 --- a/js/battle.js +++ b/js/battle.js @@ -4651,6 +4651,10 @@ function Battle(frame, logFrame, noPreload) { if (self.mySide.active.length < 2) self.mySide.active.push(null); if (self.yourSide.active.length < 2) self.yourSide.active.push(null); } + if (args[1] === 'triples' || args[1] === 'rotation') { + if (self.mySide.active.length < 3) self.mySide.active.push(null); + if (self.yourSide.active.length < 3) self.yourSide.active.push(null); + } break; case 'variation': self.log('
Variation: ' + Tools.escapeHTML(args[1]) + '
'); diff --git a/js/client-battle.js b/js/client-battle.js index bb4c25d78..577665197 100644 --- a/js/client-battle.js +++ b/js/client-battle.js @@ -446,6 +446,9 @@ if (this.battle.gameType === 'doubles') { this.choice.count = 2; } + if (this.battle.gameType === 'triples' || this.battle.gameType === 'rotation') { + this.choice.count = 3; + } controls += 'How will you start the battle?'; controls += '
'; for (var i = 0; i < switchables.length; i++) {