Fix move.ts Errors (#1564)

This commit is contained in:
Benjamin Odom 2024-05-29 10:54:33 -05:00 committed by GitHub
parent 1b7b539d68
commit 8d3c334e50
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 4 deletions

View File

@ -144,8 +144,8 @@ export default class Move implements Localizable {
localize(): void {
const i18nKey = Moves[this.id].split("_").filter(f => f).map((f, i) => i ? `${f[0]}${f.slice(1).toLowerCase()}` : f.toLowerCase()).join("") as unknown as string;
this.name = this.id ? `${i18next.t(`move:${i18nKey}.name`).toString()}${this.nameAppend}` : "";
this.effect = this.id ? `${i18next.t(`move:${i18nKey}.effect`).toString()}${this.nameAppend}` : "";
this.name = this.id ? `${i18next.t(`move:${i18nKey}.name`)}${this.nameAppend}` : "";
this.effect = this.id ? `${i18next.t(`move:${i18nKey}.effect`)}${this.nameAppend}` : "";
}
getAttrs(attrType: { new(...args: any[]): MoveAttr }): MoveAttr[] {
@ -2011,10 +2011,10 @@ export class PostVictoryStatChangeAttr extends MoveAttr {
}
applyPostVictory(user: Pokemon, target: Pokemon, move: Move): void {
if (this.condition && !this.condition(user, target, move)) {
return false;
return;
}
const statChangeAttr = new StatChangeAttr(this.stats, this.levels, this.showMessage);
statChangeAttr.apply(user, target, move);
statChangeAttr.apply(user, target, move, undefined);
}
}