Implement type-boosting abilities

This affects Steelworker, Transistor, Dragon's Maw, and Rocky Payload.
This commit is contained in:
Madmadness65 2023-12-14 11:48:59 -06:00
parent 1a4d51d060
commit fc2665b3f0
2 changed files with 32 additions and 7 deletions

View File

@ -356,6 +356,26 @@ export class VariableMovePowerAbAttr extends PreAttackAbAttr {
}
}
export class MoveTypePowerBoostAbAttr extends VariableMovePowerAbAttr {
private boostedType: Type;
constructor(boostedType: Type) {
super(false);
this.boostedType = boostedType;
}
applyPreAttack(pokemon: Pokemon, defender: Pokemon, move: PokemonMove, args: any[]): boolean {
if (move.getMove().type === this.boostedType) {
(args[0] as Utils.NumberHolder).value *= 1.5;
return true;
}
return false;
}
}
export class LowHpMoveTypePowerBoostAbAttr extends VariableMovePowerAbAttr {
private boostedType: Type;
@ -1753,7 +1773,8 @@ export function initAbilities() {
new Ability(Abilities.SHIELDS_DOWN, "Shields Down (N)", "When its HP becomes half or less, the Pokémon's shell breaks and it becomes aggressive.", 7),
new Ability(Abilities.STAKEOUT, "Stakeout (N)", "Doubles the damage dealt to the target's replacement if the target switches out.", 7),
new Ability(Abilities.WATER_BUBBLE, "Water Bubble (N)", "Lowers the power of Fire-type moves done to the Pokémon and prevents the Pokémon from getting a burn.", 7),
new Ability(Abilities.STEELWORKER, "Steelworker (N)", "Powers up Steel-type moves.", 7),
new Ability(Abilities.STEELWORKER, "Steelworker", "Powers up Steel-type moves.", 7)
.attr(MoveTypePowerBoostAbAttr, Type.STEEL),
new Ability(Abilities.BERSERK, "Berserk (N)", "Boosts the Pokémon's Sp. Atk stat when it takes a hit that causes its HP to become half or less.", 7),
new Ability(Abilities.SLUSH_RUSH, "Slush Rush (N)", "Boosts the Pokémon's Speed stat in a hailstorm.", 7)
.attr(BattleStatMultiplierAbAttr, BattleStat.SPD, 2)
@ -1818,8 +1839,10 @@ export function initAbilities() {
new Ability(Abilities.QUICK_DRAW, "Quick Draw (N)", "Enables the Pokémon to move first occasionally.", 8),
new Ability(Abilities.UNSEEN_FIST, "Unseen Fist (N)", "If the Pokémon uses moves that make direct contact, it can attack the target even if the target protects itself.", 8),
new Ability(Abilities.CURIOUS_MEDICINE, "Curious Medicine (N)", "When the Pokémon enters a battle, it scatters medicine from its shell, which removes all stat changes from allies.", 8),
new Ability(Abilities.TRANSISTOR, "Transistor (N)", "Powers up Electric-type moves.", 8),
new Ability(Abilities.DRAGONS_MAW, "Dragon's Maw (N)", "Powers up Dragon-type moves.", 8),
new Ability(Abilities.TRANSISTOR, "Transistor", "Powers up Electric-type moves.", 8)
.attr(MoveTypePowerBoostAbAttr, Type.ELECTRIC),
new Ability(Abilities.DRAGONS_MAW, "Dragon's Maw", "Powers up Dragon-type moves.", 8)
.attr(MoveTypePowerBoostAbAttr, Type.DRAGON),
new Ability(Abilities.CHILLING_NEIGH, "Chilling Neigh (N)", "When the Pokémon knocks out a target, it utters a chilling neigh, which boosts its Attack stat.", 8),
new Ability(Abilities.GRIM_NEIGH, "Grim Neigh (N)", "When the Pokémon knocks out a target, it utters a terrifying neigh, which boosts its Sp. Atk stat.", 8),
new Ability(Abilities.AS_ONE_GLASTRIER, "As One (N)", "This Ability combines the effects of both Calyrex's Unnerve Ability and Glastrier's Chilling Neigh Ability.", 8),
@ -1829,10 +1852,12 @@ export function initAbilities() {
new Ability(Abilities.THERMAL_EXCHANGE, "Thermal Exchange (N)", "Boosts the Attack stat when the Pokémon is hit by a Fire-type move. The Pokémon also cannot be burned.", 9),
new Ability(Abilities.ANGER_SHELL, "Anger Shell (N)", "When an attack causes its HP to drop to half or less, the Pokémon gets angry. This lowers its Defense and Sp. Def stats but boosts its Attack, Sp. Atk, and Speed stats.", 9),
new Ability(Abilities.PURIFYING_SALT, "Purifying Salt (N)", "The Pokémon's pure salt protects it from status conditions and halves the damage taken from Ghost-type moves.", 9),
new Ability(Abilities.WELL_BAKED_BODY, "Well-Baked Body (N)", "The Pokémon takes no damage when hit by Fire-type moves. Instead, its Defense stat is sharply boosted.", 9),
new Ability(Abilities.WELL_BAKED_BODY, "Well-Baked Body", "The Pokémon takes no damage when hit by Fire-type moves. Instead, its Defense stat is sharply boosted.", 9)
.attr(TypeImmunityStatChangeAbAttr, Type.FIRE, BattleStat.DEF, 2),
new Ability(Abilities.WIND_RIDER, "Wind Rider (N)", "Boosts the Pokémon's Attack stat if Tailwind takes effect or if the Pokémon is hit by a wind move. The Pokémon also takes no damage from wind moves.", 9),
new Ability(Abilities.GUARD_DOG, "Guard Dog (N)", "Boosts the Pokémon's Attack stat if intimidated. Moves and items that would force the Pokémon to switch out also fail to work.", 9),
new Ability(Abilities.ROCKY_PAYLOAD, "Rocky Payload (N)", "Powers up Rock-type moves.", 9),
new Ability(Abilities.ROCKY_PAYLOAD, "Rocky Payload", "Powers up Rock-type moves.", 9)
.attr(MoveTypePowerBoostAbAttr, Type.ROCK),
new Ability(Abilities.WIND_POWER, "Wind Power (N)", "The Pokémon becomes charged when it is hit by a wind move, boosting the power of the next Electric-type move the Pokémon uses.", 9),
new Ability(Abilities.ZERO_TO_HERO, "Zero to Hero (N)", "The Pokémon transforms into its Hero Form when it switches out.", 9),
new Ability(Abilities.COMMANDER, "Commander (N)", "When the Pokémon enters a battle, it goes inside the mouth of an ally Dondozo if one is on the field. The Pokémon then issues commands from there.", 9),

View File

@ -2064,12 +2064,12 @@ export function initSpecies() {
new PokemonSpecies(Species.RAGING_BOLT, "Raging Bolt", 9, false, false, false, "Paradox Pokémon", Type.ELECTRIC, Type.DRAGON, 5.2, 480, Abilities.PROTOSYNTHESIS, Abilities.NONE, Abilities.PROTOSYNTHESIS, 590, 125, 73, 91, 137, 89, 75, 10, 70, null, GrowthRate.SLOW, null, false),
new PokemonSpecies(Species.IRON_BOULDER, "Iron Boulder", 9, false, false, false, "Paradox Pokémon", Type.ROCK, Type.PSYCHIC, 1.5, 162.5, Abilities.QUARK_DRIVE, Abilities.NONE, Abilities.QUARK_DRIVE, 590, 90, 120, 80, 68, 108, 124, 10, 70, null, GrowthRate.SLOW, null, false),
new PokemonSpecies(Species.IRON_CROWN, "Iron Crown", 9, false, false, false, "Paradox Pokémon", Type.STEEL, Type.PSYCHIC, 1.6, 156, Abilities.QUARK_DRIVE, Abilities.NONE, Abilities.QUARK_DRIVE, 590, 90, 72, 100, 122, 108, 98, 10, 70, null, GrowthRate.SLOW, null, false),
new PokemonSpecies(Species.TERAPAGOS, "Terapagos", 9, false, true, false, "Terastal Pokémon", Type.NORMAL, null, 0.2, 6.5, Abilities.TERA_SHIFT, Abilities.NONE, Abilities.NONE, 450, 90, 65, 85, 65, 85, 60, 5, 70, null, GrowthRate.SLOW, 50, false, false,
new PokemonSpecies(Species.TERAPAGOS, "Terapagos", 9, false, true, false, "Tera Pokémon", Type.NORMAL, null, 0.2, 6.5, Abilities.TERA_SHIFT, Abilities.NONE, Abilities.NONE, 450, 90, 65, 85, 65, 85, 60, 5, 70, null, GrowthRate.SLOW, 50, false, false,
new PokemonForm("Normal Form", "normal", Type.NORMAL, null, 0.2, 6.5, Abilities.TERA_SHIFT, Abilities.NONE, Abilities.NONE, 450, 90, 65, 85, 65, 85, 60, 5, 70, null),
new PokemonForm("Terastal Form", "terastal", Type.NORMAL, null, 0.3, 16, Abilities.TERA_SHELL, Abilities.NONE, Abilities.NONE, 600, 95, 95, 110, 105, 110, 85, 5, 70, null),
new PokemonForm("Stellar Form", "stellar", Type.NORMAL, null, 1.7, 77, Abilities.TERAFORM_ZERO, Abilities.NONE, Abilities.NONE, 700, 160, 105, 110, 130, 110, 85, 5, 70, null),
),
new PokemonSpecies(Species.PECHARUNT, "Pecharunt", 9, false, false, true, "Toxic Pokémon", Type.POISON, Type.GHOST, 0.3, 0.3, Abilities.POISON_PUPPETEER, Abilities.NONE, Abilities.NONE, 600, 88, 88, 160, 88, 88, 88, 3, 70, null, GrowthRate.SLOW, null, false),
new PokemonSpecies(Species.PECHARUNT, "Pecharunt", 9, false, false, true, "Subjugation Pokémon", Type.POISON, Type.GHOST, 0.3, 0.3, Abilities.POISON_PUPPETEER, Abilities.NONE, Abilities.NONE, 600, 88, 88, 160, 88, 88, 88, 3, 70, null, GrowthRate.SLOW, null, false),
new PokemonSpecies(Species.ALOLA_RATTATA, "Rattata", 7, false, false, false, "Mouse Pokémon", Type.DARK, null, 0.3, 3.8, Abilities.GLUTTONY, Abilities.HUSTLE, Abilities.THICK_FAT, 253, 30, 56, 35, 25, 35, 72, 255, 70, 51, GrowthRate.MEDIUM_FAST, 50, false),
new PokemonSpecies(Species.ALOLA_RATICATE, "Raticate", 7, false, false, false, "Mouse Pokémon", Type.DARK, null, 0.7, 25.5, Abilities.GLUTTONY, Abilities.HUSTLE, Abilities.THICK_FAT, 413, 75, 71, 70, 40, 80, 77, 127, 70, 145, GrowthRate.MEDIUM_FAST, 50, false),
new PokemonSpecies(Species.ALOLA_RAICHU, "Raichu", 7, false, false, false, "Mouse Pokémon", Type.ELECTRIC, Type.PSYCHIC, 0.7, 21, Abilities.SURGE_SURFER, Abilities.NONE, Abilities.NONE, 485, 60, 85, 50, 95, 85, 110, 75, 50, 243, GrowthRate.MEDIUM_FAST, 50, false),