mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-09-10 18:25:38 -05:00
Fix Travis CI errors
This commit is contained in:
@@ -200,7 +200,8 @@ BattlePokemon = (function () {
|
||||
this.baseAbility = toId(set.ability);
|
||||
this.ability = this.baseAbility;
|
||||
this.item = toId(set.item);
|
||||
if (this.baseTemplate.otherFormes) var forme = this.battle.getTemplate(this.baseTemplate.otherFormes[0]);
|
||||
var forme;
|
||||
if (this.baseTemplate.otherFormes) forme = this.battle.getTemplate(this.baseTemplate.otherFormes[0]);
|
||||
this.canMegaEvo = ((this.battle.getItem(this.item).megaEvolves === this.baseTemplate.baseSpecies) || (forme && forme.isMega && forme.requiredMove && this.set.moves.indexOf(toId(forme.requiredMove)) > -1));
|
||||
this.abilityData = {id: this.ability};
|
||||
this.itemData = {id: this.item};
|
||||
|
||||
@@ -537,14 +537,16 @@ exports.BattleScripts = {
|
||||
var side = pokemon.side;
|
||||
if (side.megaEvo) return false;
|
||||
|
||||
if (pokemon.baseTemplate.otherFormes) var otherForme = this.getTemplate(pokemon.baseTemplate.otherFormes[0]);
|
||||
var otherForme;
|
||||
var template;
|
||||
if (pokemon.baseTemplate.otherFormes) otherForme = this.getTemplate(pokemon.baseTemplate.otherFormes[0]);
|
||||
if (otherForme && otherForme.isMega && otherForme.requiredMove) {
|
||||
if (pokemon.moves.indexOf(toId(otherForme.requiredMove)) < 0) return false;
|
||||
var template = otherForme;
|
||||
template = otherForme;
|
||||
} else {
|
||||
var item = this.getItem(pokemon.item);
|
||||
if (!item.megaStone) return false;
|
||||
var template = this.getTemplate(item.megaStone);
|
||||
template = this.getTemplate(item.megaStone);
|
||||
if (pokemon.baseTemplate.baseSpecies !== template.baseSpecies) return false;
|
||||
}
|
||||
if (!template.isMega) return false;
|
||||
|
||||
Reference in New Issue
Block a user