mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-03-06 09:58:10 +00:00
* fix final-boss phase change on status-effect dmg - move final-boss 2nd phase check into battle-scene. - call method at the end of damage phase - call method at the end of PostTurnStatusEffect phase * improve ui.getHandler types * WIP: final_boss.test.ts * add "should spawn Eternatus on wave 200 in END biome" test * add more final_boss tests couldn't cover the form change due to lack of support from current test framework
23 lines
620 B
TypeScript
23 lines
620 B
TypeScript
export default class TextInterceptor {
|
|
private scene;
|
|
public logs = [];
|
|
constructor(scene) {
|
|
this.scene = scene;
|
|
scene.messageWrapper = this;
|
|
}
|
|
|
|
showText(text: string, delay?: integer, callback?: Function, callbackDelay?: integer, prompt?: boolean, promptDelay?: integer): void {
|
|
console.log(text);
|
|
this.logs.push(text);
|
|
}
|
|
|
|
showDialogue(text: string, name: string, delay?: integer, callback?: Function, callbackDelay?: integer, promptDelay?: integer): void {
|
|
console.log(name, text);
|
|
this.logs.push(name, text);
|
|
}
|
|
|
|
getLatestMessage(): string {
|
|
return this.logs.pop();
|
|
}
|
|
}
|