From 6c846f7ff26260c2a55a3384e8483ffb45ea69dd Mon Sep 17 00:00:00 2001 From: AJ Fontaine Date: Mon, 5 Aug 2024 17:16:30 -0400 Subject: [PATCH 1/3] Old Yeller White Herb --- src/modifier/modifier-type.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/modifier/modifier-type.ts b/src/modifier/modifier-type.ts index 235b48067b18..ef6062bf9e6c 100644 --- a/src/modifier/modifier-type.ts +++ b/src/modifier/modifier-type.ts @@ -1563,14 +1563,14 @@ const modifierPool: ModifierPool = { // If a party member doesn't already have one of these two orbs and has one of the above moves or abilities, the orb can appear return party.some(p => !p.getHeldItems().some(i => i instanceof Modifiers.TurnStatusEffectModifier) && (checkedAbilities.some(a => p.hasAbility(a, false, true)) || p.getMoveset(true).some(m => checkedMoves.includes(m.moveId)))) ? 10 : 0; }, 10), - new WeightedModifierType(modifierTypes.WHITE_HERB, (party: Pokemon[]) => { - const checkedAbilities = [Abilities.WEAK_ARMOR, Abilities.CONTRARY, Abilities.MOODY, Abilities.ANGER_SHELL, Abilities.COMPETITIVE, Abilities.DEFIANT]; - const weightMultiplier = party.filter( - p => !p.getHeldItems().some(i => i instanceof Modifiers.PokemonResetNegativeStatStageModifier && i.stackCount >= i.getMaxHeldItemCount(p)) && - (checkedAbilities.some(a => p.hasAbility(a, false, true)) || p.getMoveset(true).some(m => selfStatLowerMoves.includes(m.moveId)))).length; - // If a party member has one of the above moves or abilities and doesn't have max herbs, the herb will appear more frequently - return 2 * (weightMultiplier ? 2 : 1) + (weightMultiplier ? weightMultiplier : 0); - }, 10), + // new WeightedModifierType(modifierTypes.WHITE_HERB, (party: Pokemon[]) => { + // const checkedAbilities = [Abilities.WEAK_ARMOR, Abilities.CONTRARY, Abilities.MOODY, Abilities.ANGER_SHELL, Abilities.COMPETITIVE, Abilities.DEFIANT]; + // const weightMultiplier = party.filter( + // p => !p.getHeldItems().some(i => i instanceof Modifiers.PokemonResetNegativeStatStageModifier && i.stackCount >= i.getMaxHeldItemCount(p)) && + // (checkedAbilities.some(a => p.hasAbility(a, false, true)) || p.getMoveset(true).some(m => selfStatLowerMoves.includes(m.moveId)))).length; + // // If a party member has one of the above moves or abilities and doesn't have max herbs, the herb will appear more frequently + // return 2 * (weightMultiplier ? 2 : 1) + (weightMultiplier ? weightMultiplier : 0); + // }, 10), new WeightedModifierType(modifierTypes.REVIVER_SEED, 4), new WeightedModifierType(modifierTypes.CANDY_JAR, 5), new WeightedModifierType(modifierTypes.ATTACK_TYPE_BOOSTER, 9), @@ -1637,7 +1637,7 @@ const wildModifierPool: ModifierPool = { }), [ModifierTier.ULTRA]: [ new WeightedModifierType(modifierTypes.ATTACK_TYPE_BOOSTER, 10), - new WeightedModifierType(modifierTypes.WHITE_HERB, 1) + //new WeightedModifierType(modifierTypes.WHITE_HERB, 1) ].map(m => { m.setTier(ModifierTier.ULTRA); return m; }), @@ -1667,7 +1667,7 @@ const trainerModifierPool: ModifierPool = { }), [ModifierTier.ULTRA]: [ new WeightedModifierType(modifierTypes.ATTACK_TYPE_BOOSTER, 10), - new WeightedModifierType(modifierTypes.WHITE_HERB, 1), + //new WeightedModifierType(modifierTypes.WHITE_HERB, 1), ].map(m => { m.setTier(ModifierTier.ULTRA); return m; }), From b84791fb43fbeaebdc0fec6a60053ba833565407 Mon Sep 17 00:00:00 2001 From: AJ Fontaine Date: Mon, 5 Aug 2024 17:26:58 -0400 Subject: [PATCH 2/3] ESLint, the accident was 5 years ago, you need to move on --- src/modifier/modifier-type.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modifier/modifier-type.ts b/src/modifier/modifier-type.ts index ef6062bf9e6c..930049baafb9 100644 --- a/src/modifier/modifier-type.ts +++ b/src/modifier/modifier-type.ts @@ -1,5 +1,5 @@ import * as Modifiers from "./modifier"; -import { AttackMove, allMoves, selfStatLowerMoves } from "../data/move"; +import { AttackMove, allMoves } from "../data/move"; import { MAX_PER_TYPE_POKEBALLS, PokeballType, getPokeballCatchMultiplier, getPokeballName } from "../data/pokeball"; import Pokemon, { EnemyPokemon, PlayerPokemon, PokemonMove } from "../field/pokemon"; import { EvolutionItem, pokemonEvolutions } from "../data/pokemon-evolutions"; From c00214a2ead4a2b7dfbfb7b22b3aef90ee59c466 Mon Sep 17 00:00:00 2001 From: AJ Fontaine Date: Mon, 5 Aug 2024 20:41:51 -0400 Subject: [PATCH 3/3] 'It is nothing, it is nothing...' -Archduke Franz Ferdinand --- src/modifier/modifier-type.ts | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/modifier/modifier-type.ts b/src/modifier/modifier-type.ts index 930049baafb9..9c7c3f8949aa 100644 --- a/src/modifier/modifier-type.ts +++ b/src/modifier/modifier-type.ts @@ -1,5 +1,5 @@ import * as Modifiers from "./modifier"; -import { AttackMove, allMoves } from "../data/move"; +import { AttackMove, allMoves, selfStatLowerMoves } from "../data/move"; import { MAX_PER_TYPE_POKEBALLS, PokeballType, getPokeballCatchMultiplier, getPokeballName } from "../data/pokeball"; import Pokemon, { EnemyPokemon, PlayerPokemon, PokemonMove } from "../field/pokemon"; import { EvolutionItem, pokemonEvolutions } from "../data/pokemon-evolutions"; @@ -1563,14 +1563,14 @@ const modifierPool: ModifierPool = { // If a party member doesn't already have one of these two orbs and has one of the above moves or abilities, the orb can appear return party.some(p => !p.getHeldItems().some(i => i instanceof Modifiers.TurnStatusEffectModifier) && (checkedAbilities.some(a => p.hasAbility(a, false, true)) || p.getMoveset(true).some(m => checkedMoves.includes(m.moveId)))) ? 10 : 0; }, 10), - // new WeightedModifierType(modifierTypes.WHITE_HERB, (party: Pokemon[]) => { - // const checkedAbilities = [Abilities.WEAK_ARMOR, Abilities.CONTRARY, Abilities.MOODY, Abilities.ANGER_SHELL, Abilities.COMPETITIVE, Abilities.DEFIANT]; - // const weightMultiplier = party.filter( - // p => !p.getHeldItems().some(i => i instanceof Modifiers.PokemonResetNegativeStatStageModifier && i.stackCount >= i.getMaxHeldItemCount(p)) && - // (checkedAbilities.some(a => p.hasAbility(a, false, true)) || p.getMoveset(true).some(m => selfStatLowerMoves.includes(m.moveId)))).length; - // // If a party member has one of the above moves or abilities and doesn't have max herbs, the herb will appear more frequently - // return 2 * (weightMultiplier ? 2 : 1) + (weightMultiplier ? weightMultiplier : 0); - // }, 10), + new WeightedModifierType(modifierTypes.WHITE_HERB, (party: Pokemon[]) => { + const checkedAbilities = [Abilities.WEAK_ARMOR, Abilities.CONTRARY, Abilities.MOODY, Abilities.ANGER_SHELL, Abilities.COMPETITIVE, Abilities.DEFIANT]; + const weightMultiplier = party.filter( + p => !p.getHeldItems().some(i => i instanceof Modifiers.PokemonResetNegativeStatStageModifier && i.stackCount >= i.getMaxHeldItemCount(p)) && + (checkedAbilities.some(a => p.hasAbility(a, false, true)) || p.getMoveset(true).some(m => selfStatLowerMoves.includes(m.moveId)))).length; + // If a party member has one of the above moves or abilities and doesn't have max herbs, the herb will appear more frequently + return 0 * (weightMultiplier ? 2 : 1) + (weightMultiplier ? weightMultiplier * 0 : 0); + }, 10), new WeightedModifierType(modifierTypes.REVIVER_SEED, 4), new WeightedModifierType(modifierTypes.CANDY_JAR, 5), new WeightedModifierType(modifierTypes.ATTACK_TYPE_BOOSTER, 9), @@ -1637,7 +1637,7 @@ const wildModifierPool: ModifierPool = { }), [ModifierTier.ULTRA]: [ new WeightedModifierType(modifierTypes.ATTACK_TYPE_BOOSTER, 10), - //new WeightedModifierType(modifierTypes.WHITE_HERB, 1) + new WeightedModifierType(modifierTypes.WHITE_HERB, 0) ].map(m => { m.setTier(ModifierTier.ULTRA); return m; }), @@ -1667,7 +1667,7 @@ const trainerModifierPool: ModifierPool = { }), [ModifierTier.ULTRA]: [ new WeightedModifierType(modifierTypes.ATTACK_TYPE_BOOSTER, 10), - //new WeightedModifierType(modifierTypes.WHITE_HERB, 1), + new WeightedModifierType(modifierTypes.WHITE_HERB, 0), ].map(m => { m.setTier(ModifierTier.ULTRA); return m; }),