Add Soul Dew item and make various minor changes
This commit is contained in:
1 parent
63834858cd
commit
7f1add83c4
11 files changed
+315
-213
No files matched your search
@@ -681,6 +681,8 @@ export const modifierTypes = {
|
||||
|
||||
SOOTHE_BELL: () => new PokemonFriendshipBoosterModifierType('Soothe Bell'),
|
||||
|
||||
SOUL_DEW: () => new PokemonHeldItemModifierType('Soul Dew', 'Increases the influence of a Pokémon\'s nature on its stats by 5% (additive)', (type, args) => new Modifiers.PokemonNatureWeightModifier(type, (args[0] as Pokemon).id)),
|
||||
|
||||
AMULET_COIN: () => new ModifierType('Amulet Coin', 'Increases money rewards by 20%', (type, _args) => new Modifiers.MoneyMultiplierModifier(type)),
|
||||
GOLDEN_PUNCH: () => new PokemonHeldItemModifierType('Golden Punch', 'Grants 20% of damage inflicted as money', (type, args) => new Modifiers.DamageMoneyRewardModifier(type, (args[0] as Pokemon).id)),
|
||||
COIN_CASE: () => new ModifierType('Coin Case', 'After every 10th battle, receive 10% of your money in interest', (type, _args) => new Modifiers.MoneyInterestModifier(type)),
|
||||
@@ -821,6 +823,7 @@ const modifierPool = {
|
||||
const friendshipBenefitPartyMemberCount = Math.min(party.filter(p => (pokemonEvolutions.hasOwnProperty(p.species.speciesId) && pokemonEvolutions[p.species.speciesId].find(e => e.condition && e.condition instanceof SpeciesFriendshipEvolutionCondition)) || p.moveset.find(m => m.moveId === Moves.RETURN)).length, 3);
|
||||
return friendshipBenefitPartyMemberCount * 3;
|
||||
}),
|
||||
new WeightedModifierType(modifierTypes.SOUL_DEW, 3),
|
||||
new WeightedModifierType(modifierTypes.GOLDEN_PUNCH, 2),
|
||||
new WeightedModifierType(modifierTypes.GRIP_CLAW, 2),
|
||||
new WeightedModifierType(modifierTypes.HEALING_CHARM, 1),
|
||||
|
||||
@@ -1232,6 +1232,34 @@ export class PokemonFriendshipBoosterModifier extends PokemonHeldItemModifier {
|
||||
}
|
||||
}
|
||||
|
||||
export class PokemonNatureWeightModifier extends PokemonHeldItemModifier {
|
||||
constructor(type: ModifierTypes.ModifierType, pokemonId: integer, stackCount?: integer) {
|
||||
super(type, pokemonId, stackCount);
|
||||
}
|
||||
|
||||
matchType(modifier: Modifier): boolean {
|
||||
return modifier instanceof PokemonNatureWeightModifier;
|
||||
}
|
||||
|
||||
clone(): PersistentModifier {
|
||||
return new PokemonNatureWeightModifier(this.type, this.pokemonId, this.stackCount);
|
||||
}
|
||||
|
||||
apply(args: any[]): boolean {
|
||||
const multiplier = args[1] as Utils.IntegerHolder;
|
||||
if (multiplier.value !== 1) {
|
||||
multiplier.value += 0.05 * this.getStackCount() * (multiplier.value > 1 ? 1 : -1);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
getMaxHeldItemCount(pokemon: Pokemon): integer {
|
||||
return 5;
|
||||
}
|
||||
}
|
||||
|
||||
export class MoneyMultiplierModifier extends PersistentModifier {
|
||||
constructor(type: ModifierType, stackCount?: integer) {
|
||||
super(type, stackCount);
|
||||
|
||||
Reference in new issue
Block a user