Fix the interaction of Outrage and Protect.

Now it ends with confusion on the last turn of Outrage, and ends without confusion on any other turn. There's still a lot of disagreement on what exactly is supposed to happen, but I'm 90% sure this is right.
This commit is contained in:
Guangcong Luo 2012-01-08 21:42:58 -05:00
parent f3c48d0bd9
commit fd998d4c39

View File

@ -7226,8 +7226,15 @@ exports.BattleMovedex = {
var lockedmove = source.getVolatile('lockedmove');
if (lockedmove)
{
// Outrage counter is reset
source.volatiles['lockedmove'].duration = lockedmove.durationCallback();
// Outrage counter is removed
if (source.volatiles['lockedmove'].duration === 1)
{
source.removeVolatile('lockedmove');
}
else
{
delete source.volatiles['lockedmove'];
}
}
this.singleEvent('MoveFail', effect, null, target, source, effect);
return null;