Add confirmation before skipping items
parent
de1ba57421
commit
0d776b5a7a
|
@ -3860,9 +3860,14 @@ export class SelectModifierPhase extends BattlePhase {
|
||||||
|
|
||||||
const modifierSelectCallback = (rowCursor: integer, cursor: integer) => {
|
const modifierSelectCallback = (rowCursor: integer, cursor: integer) => {
|
||||||
if (rowCursor < 0 || cursor < 0) {
|
if (rowCursor < 0 || cursor < 0) {
|
||||||
this.scene.ui.setMode(Mode.MESSAGE);
|
this.scene.ui.showText(`Are you sure you want to skip taking an item?`, null, () => {
|
||||||
super.end();
|
this.scene.ui.setOverlayMode(Mode.CONFIRM, () => {
|
||||||
return true;
|
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 modifierType: ModifierType;
|
||||||
let cost: integer;
|
let cost: integer;
|
||||||
|
|
Loading…
Reference in New Issue