mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-06-02 22:08:36 -05:00
Fix Illusion failing to fake trapping abilities
It wouldn't activate the "maybeTrapped" flag.
This commit is contained in:
parent
8afc588e4f
commit
62d5652746
|
|
@ -363,16 +363,17 @@ BattlePokemon = (function () {
|
|||
if (side === this.side) continue;
|
||||
for (var j = 0; j < side.active.length; ++j) {
|
||||
var pokemon = side.active[j];
|
||||
if (!pokemon || pokemon.fainted ||
|
||||
!pokemon.template.abilities) continue;
|
||||
for (var k in pokemon.template.abilities) {
|
||||
var ability = pokemon.template.abilities[k];
|
||||
if (!pokemon || pokemon.fainted) continue;
|
||||
var template = (pokemon.illusion || pokemon).template;
|
||||
if (!template.abilities) continue;
|
||||
for (var k in template.abilities) {
|
||||
var ability = template.abilities[k];
|
||||
if (ability === pokemon.ability) {
|
||||
// This event was already run above so we don't need
|
||||
// to run it again.
|
||||
continue;
|
||||
}
|
||||
if ((k === 'H') && pokemon.template.unreleasedHidden) {
|
||||
if ((k === 'H') && template.unreleasedHidden) {
|
||||
// unreleased hidden ability
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user