From e3f7603f228598ad64e5ce56fce44fd2c0ec7f90 Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Wed, 12 Apr 2023 21:52:23 -0400 Subject: [PATCH] Fix bug with logic for ether and elixir modifier --- src/modifier-type.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modifier-type.ts b/src/modifier-type.ts index ded653d36..7435e3346 100644 --- a/src/modifier-type.ts +++ b/src/modifier-type.ts @@ -228,11 +228,11 @@ const modifierPool = { return Math.ceil(thresholdPartyMemberCount / 3); }), new WeightedModifierType(new PokemonPpRestoreModifierType('ETHER', 10), (party: PlayerPokemon[]) => { - const thresholdPartyMemberCount = party.filter(p => p.moveset.filter(m => m.ppUsed >= 5)).length; + const thresholdPartyMemberCount = party.filter(p => p.moveset.filter(m => m.ppUsed >= 5).length).length; return thresholdPartyMemberCount; }), new WeightedModifierType(new PokemonPpRestoreModifierType('MAX ETHER', -1), (party: PlayerPokemon[]) => { - const thresholdPartyMemberCount = party.filter(p => p.moveset.filter(m => m.ppUsed > 10)).length; + const thresholdPartyMemberCount = party.filter(p => p.moveset.filter(m => m.ppUsed > 10).length).length; return Math.ceil(thresholdPartyMemberCount / 3); }) ].map(m => { m.setTier(ModifierTier.COMMON); return m; }), @@ -255,11 +255,11 @@ const modifierPool = { return Math.ceil(thresholdPartyMemberCount / 3); }), new WeightedModifierType(new PokemonAllMovePpRestoreModifierType('ELIXIR', 10), (party: PlayerPokemon[]) => { - const thresholdPartyMemberCount = party.filter(p => p.moveset.filter(m => m.ppUsed >= 5)).length; + const thresholdPartyMemberCount = party.filter(p => p.moveset.filter(m => m.ppUsed >= 5).length).length; return thresholdPartyMemberCount; }), new WeightedModifierType(new PokemonAllMovePpRestoreModifierType('MAX ELIXIR', -1), (party: PlayerPokemon[]) => { - const thresholdPartyMemberCount = party.filter(p => p.moveset.filter(m => m.ppUsed > 10)).length; + const thresholdPartyMemberCount = party.filter(p => p.moveset.filter(m => m.ppUsed > 10).length).length; return Math.ceil(thresholdPartyMemberCount / 3); }), new WeightedModifierType(new ModifierTypeGenerator((party: PlayerPokemon[]) => {