Skip to content

Commit

Permalink
Fix Frisk text in Gens 4-5 (smogon#10453)
Browse files Browse the repository at this point in the history
  • Loading branch information
Karthik99999 authored Jul 31, 2024
1 parent 389b03e commit 116664c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion data/abilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1501,7 +1501,7 @@ export const Abilities: import('../sim/dex-abilities').AbilityDataTable = {
onStart(pokemon) {
for (const target of pokemon.foes()) {
if (target.item) {
this.add('-item', target, target.getItem().name, '[from] ability: Frisk', '[of] ' + pokemon, '[identify]');
this.add('-item', target, target.getItem().name, '[from] ability: Frisk', '[of] ' + pokemon);
}
}
},
Expand Down
7 changes: 3 additions & 4 deletions data/mods/gen4/abilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,9 @@ export const Abilities: import('../../../sim/dex-abilities').ModdedAbilityDataTa
frisk: {
inherit: true,
onStart(pokemon) {
for (const target of pokemon.foes()) {
if (target.item && !target.itemState.knockedOff) {
this.add('-item', target, target.getItem().name, '[from] ability: Frisk', '[of] ' + pokemon, '[identify]');
}
const target = pokemon.side.randomFoe();
if (target?.item && !target.itemState.knockedOff) {
this.add('-item', pokemon, target.getItem().name, '[from] ability: Frisk', '[of] ' + pokemon);
}
},
},
Expand Down
2 changes: 1 addition & 1 deletion data/mods/gen5/abilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const Abilities: import('../../../sim/dex-abilities').ModdedAbilityDataTa
onStart(pokemon) {
const target = pokemon.side.randomFoe();
if (target?.item) {
this.add('-item', target, target.getItem().name, '[from] ability: Frisk', '[of] ' + pokemon);
this.add('-item', pokemon, target.getItem().name, '[from] ability: Frisk', '[of] ' + pokemon);
}
},
},
Expand Down

0 comments on commit 116664c

Please sign in to comment.