Skip to content

Commit

Permalink
Gen 7: Fix Snatch + Swallow interaction (#10916)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrebastosdias authored Feb 19, 2025
1 parent b83894a commit 6c57d48
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion data/mods/gen7/moves.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1046,8 +1046,9 @@ export const Moves: import('../../../sim/dex-moves').ModdedMoveDataTable = {
swallow: {
inherit: true,
onHit(pokemon) {
const layers = pokemon.volatiles['stockpile']?.layers || 1;
const healAmount = [0.25, 0.5, 1];
const success = !!this.heal(this.modify(pokemon.maxhp, healAmount[(pokemon.volatiles['stockpile'].layers - 1)]));
const success = !!this.heal(this.modify(pokemon.maxhp, healAmount[layers - 1]));
if (!success) this.add('-fail', pokemon, 'heal');
pokemon.removeVolatile('stockpile');
return success || null;
Expand Down

0 comments on commit 6c57d48

Please sign in to comment.