Fix -ability parsing errors

Only Unnerve passes the side in args, so args[3] was undefined for every other ability.
This commit is contained in:
V4Victini 2013-09-29 20:00:34 -04:00
parent a48e096ebd
commit ccae8885bc

View File

@ -3532,7 +3532,6 @@ function Battle(frame, logFrame, noPreload) {
var ability = Tools.getAbility(args[2]);
var effect = Tools.getEffect(kwargs.from);
var ofpoke = this.getPokemon(kwargs.of);
var side = this.getSide(args[3]);
poke.ability = ability.name;
if (kwargs.silent) {
@ -3567,7 +3566,7 @@ function Battle(frame, logFrame, noPreload) {
actions += '' + poke.getName() + ' intimidates ' + ofpoke.getLowerName() + '!';
break;
case 'unnerve':
actions += "" + poke.getName() + "'s Unnerve makes " + side.getLowerTeamName() + " too nervous to eat Berries!";
actions += "" + poke.getName() + "'s Unnerve makes " + this.getSide(args[3]).getLowerTeamName() + " too nervous to eat Berries!";
break;
default:
actions += "" + poke.getName() + " has " + ability.name + "!";