mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-04-22 18:47:39 -05:00
Shared Power: Fix bug
This commit is contained in:
parent
e9e58c9f99
commit
284b8f2df0
|
|
@ -1253,7 +1253,7 @@ export const Formats: FormatList = [
|
|||
],
|
||||
getSharedPower(pokemon) {
|
||||
const sharedPower = new Set<string>();
|
||||
for (const ally of pokemon.allies()) {
|
||||
for (const ally of pokemon.side.pokemon) {
|
||||
if (ally.previouslySwitchedIn > 0) {
|
||||
if (pokemon.battle.dex.currentMod !== 'sharedpower' && ['trace', 'mirrorarmor'].includes(ally.baseAbility)) {
|
||||
sharedPower.add('noability');
|
||||
|
|
@ -1262,6 +1262,7 @@ export const Formats: FormatList = [
|
|||
sharedPower.add(ally.baseAbility);
|
||||
}
|
||||
}
|
||||
sharedPower.delete(pokemon.baseAbility);
|
||||
return sharedPower;
|
||||
},
|
||||
onBeforeSwitchIn(pokemon) {
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ export const Scripts: ModdedBattleScriptsData = {
|
|||
(this.battle.gen >= 5 && !this.isActive) ||
|
||||
((this.volatiles['gastroacid'] ||
|
||||
(neutralizinggas && (this.ability !== ('neutralizinggas' as ID) ||
|
||||
this.m.abils?.some((k: string) => k === 'ability:neutralizinggas'))
|
||||
this.m.abils?.includes('ability:neutralizinggas'))
|
||||
)) && !this.getAbility().isPermanent
|
||||
)
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user