Skip to content

Commit

Permalink
Refactor single-use abilities
Browse files Browse the repository at this point in the history
  • Loading branch information
andrebastosdias committed Jan 7, 2025
1 parent 392ab2d commit 82f9931
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
12 changes: 6 additions & 6 deletions data/abilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -852,8 +852,8 @@ export const Abilities: import('../sim/dex-abilities').AbilityDataTable = {
},
dauntlessshield: {
onStart(pokemon) {
if (pokemon.shieldBoost) return;
pokemon.shieldBoost = true;
if (pokemon.abilityState.shieldBoost) return;
pokemon.abilityState.shieldBoost = true;
this.boost({def: 1}, pokemon);
},
flags: {},
Expand Down Expand Up @@ -2170,8 +2170,8 @@ export const Abilities: import('../sim/dex-abilities').AbilityDataTable = {
},
intrepidsword: {
onStart(pokemon) {
if (pokemon.swordBoost) return;
pokemon.swordBoost = true;
if (pokemon.abilityState.swordBoost) return;
pokemon.abilityState.swordBoost = true;
this.boost({atk: 1}, pokemon);
},
flags: {},
Expand Down Expand Up @@ -4623,8 +4623,8 @@ export const Abilities: import('../sim/dex-abilities').AbilityDataTable = {
},
supersweetsyrup: {
onStart(pokemon) {
if (pokemon.syrupTriggered) return;
pokemon.syrupTriggered = true;
if (pokemon.abilityState.syrupTriggered) return;
pokemon.abilityState.syrupTriggered = true;
this.add('-ability', pokemon, 'Supersweet Syrup');
for (const target of pokemon.adjacentFoes()) {
if (target.volatiles['substitute']) {
Expand Down
3 changes: 0 additions & 3 deletions sim/pokemon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,6 @@ export class Pokemon {
previouslySwitchedIn: number;
truantTurn: boolean;
// Gen 9 only
swordBoost: boolean;
shieldBoost: boolean;
syrupTriggered: boolean;
stellarBoostedTypes: string[];

/** Have this pokemon's Start events run yet? (Start events run every switch-in) */
Expand Down

0 comments on commit 82f9931

Please sign in to comment.