From d7a81925b054b72367c2bad430693ba2641f35b7 Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Wed, 28 Feb 2024 13:01:38 -0500 Subject: [PATCH] Fix crash on iOS --- src/battle-scene.ts | 2 +- src/modifier/modifier-type.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/battle-scene.ts b/src/battle-scene.ts index 659aa715e06..9acb74b7f33 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -1224,7 +1224,7 @@ export default class BattleScene extends Phaser.Scene { } } else return; - if (inputSuccess && this.enableVibration) + if (inputSuccess && this.enableVibration && typeof navigator.vibrate !== 'undefined') navigator.vibrate(vibrationLength || 10); this.blockInput = true; this.time.delayedCall(Utils.fixedInt(250), () => this.blockInput = false); diff --git a/src/modifier/modifier-type.ts b/src/modifier/modifier-type.ts index 5bfc4a823a8..048cf611409 100644 --- a/src/modifier/modifier-type.ts +++ b/src/modifier/modifier-type.ts @@ -986,7 +986,7 @@ const modifierPool = { new WeightedModifierType(modifierTypes.EXP_BALANCE, 1), new WeightedModifierType(modifierTypes.FORM_CHANGE_ITEM, 1), new WeightedModifierType(modifierTypes.REVERSE_DNA_SPLICERS, (party: Pokemon[]) => party[0].scene.gameMode !== GameMode.SPLICED_ENDLESS && party.filter(p => p.fusionSpecies).length ? 3 : 0), - new WeightedModifierType(modifierTypes.VOUCHER, 1), + new WeightedModifierType(modifierTypes.VOUCHER, 3), ].map(m => { m.setTier(ModifierTier.ULTRA); return m; }), [ModifierTier.MASTER]: [ new WeightedModifierType(modifierTypes.MASTER_BALL, 32),