From 03fc055a8657c793da930a3eae38055ea70ea920 Mon Sep 17 00:00:00 2001 From: WarriorGallade <100499523+WarriorGallade@users.noreply.github.com> Date: Fri, 23 Feb 2024 06:45:15 +0530 Subject: [PATCH] Add zoro (#101) Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com> --- data/mods/gen9ssb/abilities.ts | 28 ++++++++++++++++++++++++++++ data/mods/gen9ssb/conditions.ts | 12 ++++++++++++ data/mods/gen9ssb/moves.ts | 21 +++++++++++++++++++++ data/mods/gen9ssb/random-teams.ts | 6 ++++++ 4 files changed, 67 insertions(+) diff --git a/data/mods/gen9ssb/abilities.ts b/data/mods/gen9ssb/abilities.ts index 71cbf8170..bff5d24ce 100644 --- a/data/mods/gen9ssb/abilities.ts +++ b/data/mods/gen9ssb/abilities.ts @@ -1461,6 +1461,34 @@ export const Abilities: {[k: string]: ModdedAbilityData} = { flags: {}, }, + // zoro + ninelives: { + shortDesc: "Twice per battle, Umbreon will survive a lethal hit with 1 HP remaining, regardless of the HP it was at.", + name: "Nine Lives", + onTryHit(pokemon, target, move) { + if (move.ohko) { + this.add('-immune', pokemon, '[from] ability: Nine Lives'); + return null; + } + }, + onDamagePriority: -30, + onDamage(damage, target, source, effect) { + if (damage >= target.hp && effect?.effectType === 'Move' && !this.effectState.busted) { + this.add('-ability', target, 'Nine Lives'); + if (this.effectState.busted === 0) { + this.effectState.busted = 1; + } else { + this.effectState.busted = 0; + } + return target.hp - 1; + } + }, + // Yes, this looks very patchwork-y. declaring new persistent global variables seems to be a no-go here + // so i repurposed one which should likely not affect anything else - have tested with clerica/zoro on both sides + // and their disguise/sturdy state is unaffected by modifying anything here. but let wg know if this breaks stuff. + flags: {breakable: 1}, + }, + // Modified abilities baddreams: { inherit: true, diff --git a/data/mods/gen9ssb/conditions.ts b/data/mods/gen9ssb/conditions.ts index 6b150e715..faa404a35 100644 --- a/data/mods/gen9ssb/conditions.ts +++ b/data/mods/gen9ssb/conditions.ts @@ -1294,6 +1294,18 @@ export const Conditions: {[k: string]: ModdedConditionData & {innateName?: strin this.add(`c:|${getName('zee')}|Hey everyone it's been a great time working with you all in this Super Staff Bros battle but I think it's the right time for me to step down. Thank you all and see you around.`); }, }, + zoro: { + noCopy: true, + onStart() { + this.add(`c:|${getName('zoro')}|gmeow`); + }, + onSwitchOut() { + this.add(`c:|${getName('zoro')}|brb I want to chase some yarn`); + }, + onFaint() { + this.add(`c:|${getName('zoro')}|time to take a cat nap`); + }, + }, // Custom effects // Elly diff --git a/data/mods/gen9ssb/moves.ts b/data/mods/gen9ssb/moves.ts index c0bdb852b..6a8836dc6 100644 --- a/data/mods/gen9ssb/moves.ts +++ b/data/mods/gen9ssb/moves.ts @@ -2836,6 +2836,27 @@ export const Moves: {[k: string]: ModdedMoveData} = { type: "Fire", }, + // zoro + darkestnight: { + accuracy: 100, + basePower: 95, + category: "Physical", + name: "Darkest Night", + pp: 15, + priority: 0, + flags: {contact: 1, protect: 1, mirror: 1, metronome: 1}, + overrideOffensivePokemon: 'target', + secondary: null, + target: "normal", + type: "Dark", + onTryMove() { + this.attrLastMove('[still]'); + }, + onPrepareHit(target, source) { + this.add('-anim', source, "Foul Play", target); + }, + }, + // Modified moves bleakwindstorm: { inherit: true, diff --git a/data/mods/gen9ssb/random-teams.ts b/data/mods/gen9ssb/random-teams.ts index eb39578b8..9cfa78878 100644 --- a/data/mods/gen9ssb/random-teams.ts +++ b/data/mods/gen9ssb/random-teams.ts @@ -523,6 +523,12 @@ export const ssbSets: SSBSets = { signatureMove: 'Solar Summon', evs: {hp: 80, atk: 176, spe: 252}, nature: 'Adamant', teraType: 'Fire', }, + zoro: { + species: 'Umbreon', ability: 'Nine Lives', item: 'Leftovers', gender: 'M', + moves: ['Wish', 'Protect', 'Toxic'], + signatureMove: 'Darkest Night', + evs: {hp: 252, def: 240, spd: 16}, nature: 'Calm', teraType: 'Steel', shiny: true, + }, }; export class RandomStaffBrosTeams extends RandomTeams {