mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-26 08:46:55 +00:00
Fix move.ts Errors (#1564)
This commit is contained in:
parent
1b7b539d68
commit
8d3c334e50
@ -144,8 +144,8 @@ export default class Move implements Localizable {
|
|||||||
localize(): void {
|
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;
|
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.name = this.id ? `${i18next.t(`move:${i18nKey}.name`)}${this.nameAppend}` : "";
|
||||||
this.effect = this.id ? `${i18next.t(`move:${i18nKey}.effect`).toString()}${this.nameAppend}` : "";
|
this.effect = this.id ? `${i18next.t(`move:${i18nKey}.effect`)}${this.nameAppend}` : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
getAttrs(attrType: { new(...args: any[]): MoveAttr }): MoveAttr[] {
|
getAttrs(attrType: { new(...args: any[]): MoveAttr }): MoveAttr[] {
|
||||||
@ -2011,10 +2011,10 @@ export class PostVictoryStatChangeAttr extends MoveAttr {
|
|||||||
}
|
}
|
||||||
applyPostVictory(user: Pokemon, target: Pokemon, move: Move): void {
|
applyPostVictory(user: Pokemon, target: Pokemon, move: Move): void {
|
||||||
if (this.condition && !this.condition(user, target, move)) {
|
if (this.condition && !this.condition(user, target, move)) {
|
||||||
return false;
|
return;
|
||||||
}
|
}
|
||||||
const statChangeAttr = new StatChangeAttr(this.stats, this.levels, this.showMessage);
|
const statChangeAttr = new StatChangeAttr(this.stats, this.levels, this.showMessage);
|
||||||
statChangeAttr.apply(user, target, move);
|
statChangeAttr.apply(user, target, move, undefined);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user