Skip to content

Commit

Permalink
Fix Baton Pass displaying base forme for mega evos
Browse files Browse the repository at this point in the history
  • Loading branch information
Slayer95 committed May 11, 2014
1 parent 883b824 commit 452bff4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions js/battle.js
Original file line number Diff line number Diff line change
Expand Up @@ -4977,6 +4977,9 @@ function Battle(frame, logFrame, noPreload) {
case 'detailschange':
if (self.waitForResult()) return;
var poke = self.getPokemon(args[1]);
poke.removeVolatile('formechange');
poke.removeVolatile('typechange');

var newSpecies;
var commaIndex = args[2].indexOf(',');
if (commaIndex === -1) {
Expand All @@ -4987,11 +4990,11 @@ function Battle(frame, logFrame, noPreload) {
var template = Tools.getTemplate(newSpecies);
if (poke.sprite.sp.shiny) template.shiny = true;
poke.sprite.animTransform(template);
poke.removeVolatile('formechange');
poke.removeVolatile('typechange');
poke.sprite.oldsp = null;
poke.side.updateStatbar();
poke.species = newSpecies;
poke.spriteid = template.spriteid;
poke.details = args[2];
poke.searchid = args[1].substr(0, 2) + args[1].substr(3) + '|' + args[2];
break;
case 'teampreview':
Expand Down

0 comments on commit 452bff4

Please sign in to comment.