Skip to content

Commit

Permalink
Add Hydrostatics (#87)
Browse files Browse the repository at this point in the history
Co-authored-by: Hisuian Zoroark <[email protected]>
  • Loading branch information
2 people authored and KrisXV committed Apr 18, 2024
1 parent 76caf27 commit faca6a0
Show file tree
Hide file tree
Showing 6 changed files with 159 additions and 0 deletions.
57 changes: 57 additions & 0 deletions data/mods/gen9ssb/abilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,63 @@ export const Abilities: {[k: string]: ModdedAbilityData} = {
flags: {},
},

// Hydrostatics
hydrostaticpositivity: {
shortDesc: "Sturdy + Storm Drain + Motor Drive + x1.3 accuracy of water & electric moves",
name: "Hydrostatic Positivity",
onTryHit(target, source, move) {
// Storm Drain
if (target !== source && move.type === 'Water') {
if (!this.boost({spa: 1})) {
this.add('-immune', target, '[from] ability: Hydrostatic Positivity');
}
return null;
}

// Motor Drive
if (target !== source && move.type === 'Electric') {
if (!this.boost({spe: 1})) {
this.add('-immune', target, '[from] ability: Hydrostatic Positivity');
}
return null;
}

// Sturdy
if (move.ohko) {
this.add('-immune', target, '[from] ability: Hydrostatic Positivity');
return null;
}
},
onAnyRedirectTarget(target, source, source2, move) {
// Storm Drain
if (move.type !== 'Water' || ['firepledge', 'grasspledge', 'waterpledge'].includes(move.id)) return;
const redirectTarget = ['randomNormal', 'adjacentFoe'].includes(move.target) ? 'normal' : move.target;
if (this.validTarget(this.effectState.target, source, redirectTarget)) {
if (move.smartTarget) move.smartTarget = false;
if (this.effectState.target !== target) {
this.add('-activate', this.effectState.target, 'ability: Hydrostatic Positivity');
}
return this.effectState.target;
}
},
onDamagePriority: -30,
onDamage(damage, target, source, effect) {
// Sturdy
if (target.hp === target.maxhp && damage >= target.hp && effect && effect.effectType === 'Move') {
this.add('-ability', target, 'Hydrostatic Positivity');
return target.hp - 1;
}
},
onSourceModifyAccuracyPriority: -1,
onSourceModifyAccuracy(accuracy, target, source, move) {
if (typeof accuracy !== 'number') return;
if (['Electric', 'Water'].includes(move.type)) {
this.debug('Hydrostatic Positivity - enhancing accuracy');
return this.chainModify([5325, 4096]);
}
},
},

// in the hills
illiterit: {
shortDesc: "Immune to moves with 12 or more alphanumeric characters.",
Expand Down
18 changes: 18 additions & 0 deletions data/mods/gen9ssb/conditions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,24 @@ export const Conditions: {[k: string]: ModdedConditionData & {innateName?: strin
this.add(`c:|${getName('hsy')}|https://www.youtube.com/watch?v=g104OJIh9hs`);
},
},
hydrostaticsuser: {
noCopy: true,
onStart(pokemon) {
this.add(`c:|${getName('Hydrostatics')}|Straighten your backs and get some hydration :]`);
this.add('-start', pokemon, 'typechange', 'Electric/Water', '[silent]');
},
onSwitchOut() {
this.add(`c:|${getName('Hydrostatics')}|Brb getting some water :d`);
},
onFaint(pokemon) {
this.add(`c:|${getName('Hydrostatics')}|Seems like you were more hydrated than me :c`);
if (pokemon.side.pokemon.some(mon => mon.name === 'PartMan')) {
// Custom message for PartMan
// Yes, this reveals that the enemy has PartMan
this.add(`c:|${getName('PartMan')}|Hydro here have a tiara`);
}
},
},
inthehills: {
noCopy: true,
onStart() {
Expand Down
17 changes: 17 additions & 0 deletions data/mods/gen9ssb/items.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,23 @@ export const Items: {[k: string]: ModdedItemData} = {
},

// Modified for other effects

eviolite: {
inherit: true,
onModifyDef(def, pokemon) {
// Added Pichu-Spiky-eared for Hydrostatics to use Eviolite
if (pokemon.baseSpecies.nfe || pokemon.species.id === 'pichuspikyeared') {
return this.chainModify(1.5);
}
},
onModifySpD(spd, pokemon) {
// Added Pichu-Spiky-eared for Hydrostatics to use Eviolite
if (pokemon.baseSpecies.nfe || pokemon.species.id === 'pichuspikyeared') {
return this.chainModify(1.5);
}
},
},

safetygoggles: {
inherit: true,
onImmunity(type, pokemon) {
Expand Down
53 changes: 53 additions & 0 deletions data/mods/gen9ssb/moves.ts
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,60 @@ export const Moves: {[k: string]: ModdedMoveData} = {
},
target: "normal",
type: "Flying",
},

// Hydrostatics
hydrostatics: {
accuracy: 100,
basePower: 90,
category: "Special",
name: "Hydrostatics",
shortDesc: "70% +1 SpA, 50% prz, +water effectiveness. Tera-ed: Water-type, 80% +1 SpA, 60% to Soak, super-effective against Water",
pp: 20,
priority: 1,
flags: {protect: 1, mirror: 1},
onModifyMove(move, source, target) {
if (source.terastallized) {
move.type = 'Water';
}
},
onTryMove() {
this.attrLastMove('[still]');
},
onPrepareHit(target, source) {
if (!source.terastallized) this.add('-anim', source, 'Charge Beam', source);
else this.add('-anim', source, 'Water Pulse', target);
},
onEffectiveness(typeMod, target, type, move) {
if (move.type === 'Electric') return typeMod + this.dex.getEffectiveness('Water', type);
else if (type === 'Water' && move.type === 'Water') return 1;
},
secondary: {
chance: 100,
onHit(target, source, move) {
// None of these stack with Serene Grace
if (!source.terastallized) {
if (this.randomChance(70, 100)) {
this.boost({spa: 1}, source);
}
if (this.randomChance(50, 100)) {
if (target.isActive) target.trySetStatus('par', source, this.effect);
}
} else {
if (this.randomChance(80, 100)) {
this.boost({spa: 1}, source);
}
if (this.randomChance(60, 100)) {
// Soak
if (target.getTypes().join() !== 'Water' && target.setType('Water')) {
this.add('-start', target, 'typechange', 'Water');
}
}
}
},
},
target: "normal",
type: "Electric",
},

// in the hills
Expand Down
8 changes: 8 additions & 0 deletions data/mods/gen9ssb/pokedex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,14 @@ export const Pokedex: {[k: string]: ModdedSpeciesData} = {
abilities: {0: "Mime knows best"},
},

// Hydrostatics
pichuspikyeared: {
inherit: true,
baseStats: {hp: 35, atk: 55, def: 40, spa: 50, spd: 50, spe: 90},
abilities: {0: 'Hydrostatic Positivity'},
types: ["Electric", "Water"],
},

// Isaiah
medicham: {
inherit: true,
Expand Down
6 changes: 6 additions & 0 deletions data/mods/gen9ssb/random-teams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,12 @@ export const ssbSets: SSBSets = {
signatureMove: 'Wonder Wing',
evs: {hp: 252, atk: 252, spe: 4}, nature: 'Adamant', teraType: 'Flying',
},
Hydrostatics: {
species: 'Pichu-Spiky-eared', ability: 'Hydrostatic Positivity', item: 'Eviolite', gender: 'M',
moves: ['Hydro Pump', 'Thunder', 'Ice Beam'],
signatureMove: 'Hydrostatics',
evs: {def: 4, spa: 252, spe: 252}, nature: 'Modest', teraType: 'Water', shiny: 2,
},
'in the hills': {
species: 'Gligar', ability: 'Illiterit', item: 'Eviolite', gender: 'M',
moves: ['Roost', 'Knock Off', 'Tidy Up'],
Expand Down

0 comments on commit faca6a0

Please sign in to comment.