From 0d776b5a7adf92d706c630d0d127e10e38b18ea2 Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Sat, 23 Mar 2024 21:03:00 -0400 Subject: [PATCH] Add confirmation before skipping items --- src/phases.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/phases.ts b/src/phases.ts index 3a5c11540..579a37635 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -3860,9 +3860,14 @@ export class SelectModifierPhase extends BattlePhase { const modifierSelectCallback = (rowCursor: integer, cursor: integer) => { if (rowCursor < 0 || cursor < 0) { - this.scene.ui.setMode(Mode.MESSAGE); - super.end(); - return true; + this.scene.ui.showText(`Are you sure you want to skip taking an item?`, null, () => { + this.scene.ui.setOverlayMode(Mode.CONFIRM, () => { + this.scene.ui.revertMode(); + this.scene.ui.setMode(Mode.MESSAGE); + super.end(); + }, () => this.scene.ui.setMode(Mode.MODIFIER_SELECT, this.isPlayer(), typeOptions, modifierSelectCallback, this.getRerollCost())); + }); + return false; } let modifierType: ModifierType; let cost: integer;