Skip to content

Commit

Permalink
Fixed an issue with desynchronisation in double battles
Browse files Browse the repository at this point in the history
Debugging made pleasant with the `debugger` keyword!
  • Loading branch information
varkor committed Feb 27, 2016
1 parent 5183fd9 commit 9bbc36b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions battle/scripts/objects/general/BattleContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -2144,13 +2144,13 @@ function BattleContext (client) {
return;
foreach(battleContext.effects.near, function (effect, i, deletion) {
if (battleContext.turns >= Math.floor(effect.expiration)) {
if (!battleContext.process) Textbox.state(battleContext.alliedTrainers[0].possessivePronoun(true) + effect.type + " ran out.");
if (!battleContext.process) Textbox.state(battleContext.alliedTrainers[0].possessivePronoun(true) + " " + effect.type + " ran out.");
deletion.push(i);
}
});
foreach(battleContext.effects.far, function (effect, i, deletion) {
if (battleContext.turns >= Math.floor(effect.expiration)) {
if (!battleContext.process) Textbox.state(battleContext.opposingTrainers[0].possessivePronoun(true) + effect.type + " ran out.");
if (!battleContext.process) Textbox.state(battleContext.opposingTrainers[0].possessivePronoun(true) + " " + effect.type + " ran out.");
deletion.push(i);
}
});
Expand Down Expand Up @@ -2506,8 +2506,8 @@ function BattleContext (client) {
} else {
foreach(healthyEligiblePokemon, function (poke, which) {
battleContext.enter(poke, true, emptyPlaces.shift());
battleContext.continueToNextTurn(false);
});
battleContext.continueToNextTurn(false);
}
};
if (battleContext.isWildBattle()) {
Expand Down

0 comments on commit 9bbc36b

Please sign in to comment.