Add egg gacha system and various minor changes
Add egg gacha system; remove certain mythical Pokemon from the wild pool as egg exclusive; add egg vouchers with UI; rework Shiny Charm odds; fix trainer Pokemon shiny odds not properly ignoring Shiny Charm modifier
This commit is contained in:
1 parent
50d4858caa
commit
aa94e044ab
71 files changed
+4303
-2241
No files matched your search
@@ -6,7 +6,10 @@ import * as Utils from "../utils";
|
||||
|
||||
export enum MenuOptions {
|
||||
SETTINGS,
|
||||
ACHIEVEMENTS
|
||||
ACHIEVEMENTS,
|
||||
VOUCHERS,
|
||||
EGG_LIST,
|
||||
EGG_GACHA
|
||||
}
|
||||
|
||||
export default class MenuUiHandler extends UiHandler {
|
||||
@@ -62,6 +65,7 @@ export default class MenuUiHandler extends UiHandler {
|
||||
const ui = this.getUi();
|
||||
|
||||
let success = false;
|
||||
let error = false;
|
||||
|
||||
if (button === Button.ACTION) {
|
||||
switch (this.cursor as MenuOptions) {
|
||||
@@ -73,6 +77,24 @@ export default class MenuUiHandler extends UiHandler {
|
||||
this.scene.ui.setOverlayMode(Mode.ACHIEVEMENTS);
|
||||
success = true;
|
||||
break;
|
||||
case MenuOptions.VOUCHERS:
|
||||
this.scene.ui.setOverlayMode(Mode.VOUCHERS);
|
||||
success = true;
|
||||
break;
|
||||
case MenuOptions.EGG_LIST:
|
||||
if (this.scene.gameData.eggs.length) {
|
||||
this.scene.ui.revertMode();
|
||||
this.scene.ui.setOverlayMode(Mode.EGG_LIST);
|
||||
success = true;
|
||||
} else
|
||||
error = true;
|
||||
break;
|
||||
case MenuOptions.EGG_GACHA:
|
||||
this.scene.ui.revertMode();
|
||||
this.scene.ui.setOverlayMode(Mode.EGG_GACHA);
|
||||
success = true;
|
||||
break;
|
||||
|
||||
}
|
||||
} else if (button === Button.CANCEL) {
|
||||
success = true;
|
||||
@@ -93,6 +115,8 @@ export default class MenuUiHandler extends UiHandler {
|
||||
|
||||
if (success)
|
||||
ui.playSelect();
|
||||
else if (error)
|
||||
ui.playError();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user