Skip to content

Commit

Permalink
Fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
KrisXV committed Apr 7, 2024
1 parent 89dfc8f commit 5ab8a2f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions data/mods/gen9ssb/moves.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1519,7 +1519,8 @@ export const Moves: {[k: string]: ModdedMoveData} = {
},
onResidualOrder: 5,
onResidualSubOrder: 1,
onResidual(target, source) {
onResidual(target) {
const source = this.effectState.source;
let quotes: string[] = [];
if (this.effectState.sourceSide === source.side) {
quotes = [
Expand All @@ -1539,7 +1540,7 @@ export const Moves: {[k: string]: ModdedMoveData} = {
if (target.hp) {
let amount = 65;
if (this.effectState.duration === 4) amount = 40;
this.heal(amount, target, this.effectState.source || null, this.dex.getActiveMove('bioticorb'));
this.heal(amount, target, source, this.dex.getActiveMove('bioticorb'));
}
} else {
quotes = [
Expand All @@ -1556,7 +1557,7 @@ export const Moves: {[k: string]: ModdedMoveData} = {
`Your pain will be endless.`,
];
if (target.hp) {
this.damage(50, target, this.effectState.source || null, this.dex.getActiveMove('bioticorb'));
this.damage(50, target, source, this.dex.getActiveMove('bioticorb'));
}
if (!target.hp || target.hp <= 0) {
quotes = [
Expand All @@ -1572,7 +1573,7 @@ export const Moves: {[k: string]: ModdedMoveData} = {
}
}
if (quotes.length) {
this.add(`c:|${getName((source ? (source.illusion || source) : this.effectState.source).name)}|${this.sample(quotes)}`);
this.add(`c:|${getName((source.illusion || source).name)}|${this.sample(quotes)}`);
}
},
onSideResidualOrder: 26,
Expand Down

0 comments on commit 5ab8a2f

Please sign in to comment.