From f7b9e351172d7ab876c4c75b094ab1b96531bd2e Mon Sep 17 00:00:00 2001 From: Kris Johnson <11083252+KrisXV@users.noreply.github.com> Date: Wed, 10 Apr 2024 10:25:54 -0600 Subject: [PATCH] Fix bugs --- data/mods/gen9ssb/abilities.ts | 7 ++++--- data/mods/gen9ssb/moves.ts | 9 +++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/data/mods/gen9ssb/abilities.ts b/data/mods/gen9ssb/abilities.ts index 1570fe304..a6d33127d 100644 --- a/data/mods/gen9ssb/abilities.ts +++ b/data/mods/gen9ssb/abilities.ts @@ -657,7 +657,7 @@ export const Abilities: {[k: string]: ModdedAbilityData} = { shortDesc: "Moves drain 37%. Allies heal 5% HP. <25% HP, moves drain 114%, allies get 10%.", onModifyMove(move, pokemon, target) { if (move.category !== "Status") { - move.flags['heal'] = 1; // For Heal Block + // move.flags['heal'] = 1; // For Heal Block if (pokemon.hp > pokemon.maxhp / 4) { move.drain = [37, 100]; } else { @@ -668,8 +668,9 @@ export const Abilities: {[k: string]: ModdedAbilityData} = { onResidualOrder: 5, onResidualSubOrder: 4, onResidual(pokemon) { - for (const ally of pokemon.allies()) { - ally.heal(ally.baseMaxhp * (pokemon.hp > pokemon.maxhp / 4 ? 5 : 10) / 100); + for (const ally of pokemon.side.pokemon) { + if (!ally.hp || ally === pokemon) continue; + this.heal(ally.baseMaxhp * (pokemon.hp > pokemon.maxhp / 4 ? 5 : 10) / 100, ally, pokemon); } }, flags: {}, diff --git a/data/mods/gen9ssb/moves.ts b/data/mods/gen9ssb/moves.ts index 6ccdbad9d..1ab951547 100644 --- a/data/mods/gen9ssb/moves.ts +++ b/data/mods/gen9ssb/moves.ts @@ -1486,7 +1486,7 @@ export const Moves: {[k: string]: ModdedMoveData} = { pp: 10, priority: 0, flags: {reflectable: 1, mustpressure: 1}, - sideCondition: 'bioticorb', + slotCondition: 'bioticorb', onTryMove() { this.attrLastMove('[still]'); }, @@ -1501,6 +1501,8 @@ export const Moves: {[k: string]: ModdedMoveData} = { if (pokemon.hp < pokemon.maxhp / 2) { move.target = "allySide"; move.flags['heal'] = 1; + delete move.slotCondition; + move.self = {slotCondition: 'bioticorb'}; delete move.flags['reflectable']; delete move.flags['mustpressure']; } @@ -1514,7 +1516,7 @@ export const Moves: {[k: string]: ModdedMoveData} = { duration: 4, onSideStart(side, source) { this.effectState.source = source; - this.effectState.sourceSide = side === source.side; + this.effectState.sourceSide = source.side; this.add('-sidestart', side, 'move: Biotic Orb'); }, onResidualOrder: 5, @@ -1545,7 +1547,7 @@ export const Moves: {[k: string]: ModdedMoveData} = { } else { quotes = [ `A taste of poison.`, - `Misery made manifest`, + `Misery made manifest.`, `Pain is inevitable.`, `You cannot escape me!`, `Your end is within my reach.`, @@ -1569,7 +1571,6 @@ export const Moves: {[k: string]: ModdedMoveData} = { `The darkness will find them.`, `The gloom takes you.`, ]; - source.m.bioticOrbKO = true; } } if (quotes.length) {