From d1e9d817aa1f77136e869eae72e32283b21ffa5e Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Thu, 6 Jul 2023 19:47:52 -0400 Subject: [PATCH] Updates to certain modifiers for balance --- src/modifier/modifier-type.ts | 2 +- src/modifier/modifier.ts | 22 ++++++++++++---------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/modifier/modifier-type.ts b/src/modifier/modifier-type.ts index 0e065147c..a09b19e99 100644 --- a/src/modifier/modifier-type.ts +++ b/src/modifier/modifier-type.ts @@ -627,7 +627,7 @@ const modifierTypes = { GRIP_CLAW: () => new ContactHeldItemTransferChanceModifierType('GRIP CLAW', 10), - HEALING_CHARM: () => new ModifierType('HEALING CHARM', 'Doubles the effectiveness of HP restoring moves and items (excludes revives)', + HEALING_CHARM: () => new ModifierType('HEALING CHARM', 'Increases the effectiveness of HP restoring moves and items by 100% (excludes revives)', (type, _args) => new Modifiers.HealingBoosterModifier(type, 2), 'healing_charm'), CANDY_JAR: () => new ModifierType('CANDY JAR', 'Increases the number of levels added by RARE CANDY items by 1', (type, _args) => new Modifiers.LevelIncrementBoosterModifier(type)), diff --git a/src/modifier/modifier.ts b/src/modifier/modifier.ts index 09614f010..0eee70528 100644 --- a/src/modifier/modifier.ts +++ b/src/modifier/modifier.ts @@ -507,7 +507,7 @@ export class FlinchChanceModifier extends PokemonHeldItemModifier { return true; } - getmaxStackCount(): integer { + getMaxStackCount(): integer { return 3; } } @@ -537,7 +537,7 @@ export class TurnHealModifier extends PokemonHeldItemModifier { return true; } - getmaxStackCount(): integer { + getMaxStackCount(): integer { return 4; } } @@ -567,7 +567,7 @@ export class HitHealModifier extends PokemonHeldItemModifier { return true; } - getmaxStackCount(): integer { + getMaxStackCount(): integer { return 4; } } @@ -661,7 +661,7 @@ export class PreserveBerryModifier extends PersistentModifier { return true; } - getmaxStackCount(): integer { + getMaxStackCount(): integer { return 4; } } @@ -904,15 +904,13 @@ export class HealingBoosterModifier extends PersistentModifier { apply(args: any[]): boolean { const healingMultiplier = args[0] as Utils.IntegerHolder; - for (let s = 0; s < this.getStackCount(); s++) - healingMultiplier.value *= this.multiplier; - healingMultiplier.value = Math.floor(healingMultiplier.value); + healingMultiplier.value = Math.floor(healingMultiplier.value * (this.multiplier + (this.getStackCount() - 1))); return true; } - getmaxStackCount(): integer { - return 4; + getMaxStackCount(): integer { + return 3; } } @@ -946,6 +944,10 @@ export class ExpBoosterModifier extends PersistentModifier { return true; } + + getStackCount(): integer { + return this.boostMultiplier < 1 ? super.getStackCount() : 10; + } } export class PokemonExpBoosterModifier extends PokemonHeldItemModifier { @@ -1178,7 +1180,7 @@ export class ContactHeldItemTransferChanceModifier extends HeldItemTransferModif return getPokemonMessage(targetPokemon, `'s ${item.name} was snatched\nby ${pokemon.name}'s ${this.type.name}!`); } - getmaxStackCount(): integer { + getMaxStackCount(): integer { return 5; } }