Merge pull request #35 from Joimer/master

Preparing client for triple battles: Team Preview
This commit is contained in:
Guangcong Luo
2013-07-26 13:29:34 -07:00
2 changed files with 7 additions and 0 deletions

View File

@@ -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('<div><small>Variation: <em>' + Tools.escapeHTML(args[1]) + '</em></small></div>');

View File

@@ -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?</div>';
controls += '<div class="switchcontrols"><div class="switchselect"><button name="selectSwitch">Choose Lead</button></div><div class="switchmenu">';
for (var i = 0; i < switchables.length; i++) {