removed hasRolled from battlescene and handled in UI

This commit is contained in:
Matthew Kroeger 2024-07-09 18:53:46 -05:00 committed by torranx
parent a87b035815
commit 06d1820ed9
2 changed files with 3 additions and 2 deletions

View File

@ -126,7 +126,6 @@ export default class BattleScene extends SceneBase {
public seVolume: number = 1;
public gameSpeed: integer = 1;
public damageNumbersMode: integer = 0;
public hasRerolled: boolean = false;
public reroll: boolean = false;
public rerollTarget: integer = 1;
public showMovesetFlyout: boolean = true;

View File

@ -250,7 +250,9 @@ export default class ModifierSelectUiHandler extends AwaitableUiHandler {
});
this.setCursor(0);
if (this.scene.hasRerolled) {
const phase = this.scene.getCurrentPhase() as any;
const rerollCount = phase.hasOwnProperty("rerollCount") ? phase.rerollCount : 0;
if (rerollCount) {
this.setRowCursor(this.scene.rerollTarget);
} else {
this.setRowCursor(1);