Skip to content

Commit

Permalink
Fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
KrisXV committed Apr 10, 2024
1 parent 5ab8a2f commit f7b9e35
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
7 changes: 4 additions & 3 deletions data/mods/gen9ssb/abilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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: {},
Expand Down
9 changes: 5 additions & 4 deletions data/mods/gen9ssb/moves.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]');
},
Expand All @@ -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'];
}
Expand All @@ -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,
Expand Down Expand Up @@ -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.`,
Expand All @@ -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) {
Expand Down

0 comments on commit f7b9e35

Please sign in to comment.