Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Two of Roses #95

Merged
merged 6 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions data/mods/gen9ssb/abilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1194,6 +1194,47 @@ export const Abilities: {[k: string]: ModdedAbilityData} = {
flags: {},
},

// Two of Roses
aswesee: {
shortDesc: "Once per turn, when any active Pokemon has a stat boosted, this Pokemon has a 50%" +
" chance of copying it and a 15% chance to raise another random stat.",
name: "As We See",
KrisXV marked this conversation as resolved.
Show resolved Hide resolved
onFoeAfterBoost(boost, target, source, effect) { // Opportunist
if (this.randomChance(1, 2)) {
if (effect?.name === 'As We See' || effect?.name === 'Mirror Herb' || effect?.name === 'Opportunist') return;
KrisXV marked this conversation as resolved.
Show resolved Hide resolved
const pokemon = this.effectState.target;
const positiveBoosts: Partial<BoostsTable> = {};
let i: BoostID;
for (i in boost) {
if (boost[i]! > 0) {
positiveBoosts[i] = boost[i];
}
}
if (Object.keys(positiveBoosts).length < 1) return;
this.boost(positiveBoosts, pokemon);
this.effectState.oncePerTurn = 0;
KrisXV marked this conversation as resolved.
Show resolved Hide resolved
}
},
onResidual(target, source, effect) {
if (this.randomChance(15, 100) && this.effectState.oncePerTurn === 0) {
KrisXV marked this conversation as resolved.
Show resolved Hide resolved
const stats: BoostID[] = [];
const boost: SparseBoostsTable = {};
let statPlus: BoostID;
for (statPlus in target.boosts) {
if (statPlus === 'accuracy' || statPlus === 'evasion') continue;
if (target.boosts[statPlus] < 6) {
stats.push(statPlus);
}
}
const randomStat: BoostID | undefined = stats.length ? this.sample(stats) : undefined;
if (randomStat) boost[randomStat] = 1;
this.boost(boost, target, target);
}
this.effectState.oncePerTurn = undefined;
KrisXV marked this conversation as resolved.
Show resolved Hide resolved
},
flags: {},
},

// UT
galeguard: {
shortDesc: "Only damaged by direct attacks; Flying moves +1 priority.",
Expand Down
65 changes: 65 additions & 0 deletions data/mods/gen9ssb/conditions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -925,6 +925,71 @@ export const Conditions: {[k: string]: ModdedConditionData & {innateName?: strin
this.add(`c:|${getName('trace')}|How disappointingly short a dream lasts.`);
},
},
twoofroses: {
noCopy: true,
onStart(pokemon) {
this.add(`c:|${getName('Two of Roses')}|I'm here! I'm uhh- Yes! Also hi! Happy to be here.`);
this.singleEvent('WeatherChange', this.effect, this.effectState, pokemon);
this.singleEvent('TerrainChange', this.effect, this.effectState, pokemon);
},
onSwitchOut() {
this.add(`c:|${getName('Two of Roses')}|Pfft! I prefer lurking anyway.`);
},
onFaint() {
this.add(`c:|${getName('Two of Roses')}|It matters not how much we try but only that we try. For if the tides swell the dunes of a timeless existence, and our strength wanes in the coming unlight- And if we are to be as the forsaken namesakes before us, for the yesterday that never came and the tomorrow that is forever promised, know this; We dilly, so they do not dally...`);
},
innateName: "Wonderer",
shortDesc: "This Pokemon's secondary type changes based on the active weather or terrain, monotype if neither.",
onWeatherChange(target, source, sourceEffect) {
const currentWeather = this.field.weather;
const currentTerrain = this.field.terrain;
KrisXV marked this conversation as resolved.
Show resolved Hide resolved
if (!currentWeather && !currentTerrain && !target.getTypes().includes('Dark')) {
target.addType('Dark');
this.add('-start', target, 'typeadd', 'Dark', '[from] ability: Wonderer');
} else if (currentWeather) {
if (['raindance', 'primordialsea'].includes(currentWeather) && !target.getTypes().includes('Water')) {
target.addType('Water');
this.add('-start', target, 'typeadd', 'Water', '[from] ability: Wonderer');
} else if (['sunnyday', 'desolateland'].includes(currentWeather) && !target.getTypes().includes('Fire')) {
target.addType('Fire');
this.add('-start', target, 'typeadd', 'Fire', '[from] ability: Wonderer');
} else if (['sandstorm', 'deserteddunes'].includes(currentWeather) && !target.getTypes().includes('Rock')) {
target.addType('Rock');
this.add('-start', target, 'typeadd', 'Rock', '[from] ability: Wonderer');
} else if (['hail', 'snow'].includes(currentWeather) && !target.getTypes().includes('Ice')) {
target.addType('Ice');
this.add('-start', target, 'typeadd', 'Ice', '[from] ability: Wonderer');
} else {
// do nothing if it's not the 4 primary weathers...unless there are more?
}
KrisXV marked this conversation as resolved.
Show resolved Hide resolved
}
},

onTerrainChange(target, source, sourceEffect) {
KrisXV marked this conversation as resolved.
Show resolved Hide resolved
const currentWeather = this.field.weather;
const currentTerrain = this.field.terrain;
KrisXV marked this conversation as resolved.
Show resolved Hide resolved
if (!currentWeather && !currentTerrain && !target.getTypes().includes('Dark')) {
target.addType('Dark');
this.add('-start', target, 'typeadd', 'Dark', '[from] ability: Wonderer');
} else if (currentTerrain) {
if (currentTerrain === 'electricterrain') {
target.setType('Electric');
} else if (currentTerrain === 'psychicterrain' && !target.getTypes().includes('Psychic')) {
target.addType('Psychic');
this.add('-start', target, 'typeadd', 'Psychic', '[from] ability: Wonderer');
} else if (currentTerrain === 'grassyterrain' && !target.getTypes().includes('Grass')) {
target.addType('Grass');
this.add('-start', target, 'typeadd', 'Grass', '[from] ability: Wonderer');
} else if (currentTerrain === 'mistyterrain' && !target.getTypes().includes('Fairy')) {
target.addType('Fairy');
this.add('-start', target, 'typeadd', 'Fairy', '[from] ability: Wonderer');
} else if (!target.getTypes().includes('Ghost')) { // custom terrains
target.addType('Ghost');
this.add('-start', target, 'typeadd', 'Ghost', '[from] ability: Wonderer');
}
}
KrisXV marked this conversation as resolved.
Show resolved Hide resolved
},
},
ut: {
noCopy: true,
onStart() {
Expand Down
45 changes: 45 additions & 0 deletions data/mods/gen9ssb/moves.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2254,6 +2254,51 @@ export const Moves: {[k: string]: ModdedMoveData} = {
type: "Psychic",
},

// Two of Roses
dillydally: {
accuracy: 90,
basePower: 40,
category: "Physical",
shortDesc: "Hits twice, each hit raises a random stat by 1. User's secondary type determines type.",
KrisXV marked this conversation as resolved.
Show resolved Hide resolved
name: "Dilly Dally",
pp: 20,
priority: 0,
multihit: 2,
flags: {protect: 1, contact: 1},
type: "???",
onTryMove() {
this.attrLastMove('[still]');
},
onModifyType(move, pokemon) {
let type = pokemon.getTypes()[pokemon.getTypes().length - 1];
if (type === "Bird" || type === undefined) type = "???";
if (type === "Stellar") type = pokemon.getTypes()[pokemon.getTypes(false, true).length - 1];
move.type = type;
},
secondary: {
onHit(target, source, move) {
const stats: BoostID[] = [];
const boost: SparseBoostsTable = {};
let statPlus: BoostID;
for (statPlus in source.boosts) {
if (statPlus === 'accuracy' || statPlus === 'evasion') continue;
if (source.boosts[statPlus] < 6) {
stats.push(statPlus);
}
}
const randomStat: BoostID | undefined = stats.length ? this.sample(stats) : undefined;
if (randomStat) boost[randomStat] = 1;
this.boost(boost, source, source);
},
KrisXV marked this conversation as resolved.
Show resolved Hide resolved
},
onPrepareHit(target, source) {
this.add('-anim', source, 'Volt Tackle', source);
this.add('-anim', source, 'Extreme Speed', target);
},
target: "normal",
},


// UT
wingover: {
accuracy: 100,
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 @@ -426,6 +426,12 @@ export const ssbSets: SSBSets = {
signatureMove: 'Chronostasis',
evs: {spa: 252, spd: 4, spe: 252}, ivs: {atk: 0}, nature: 'Modest', teraType: 'Psychic',
},
'Two of Roses': {
species: 'Luxray', ability: 'As We See', item: 'Mirror Herb', gender: 'M',
moves: ['Knock Off', 'Supercell Slam', 'Trailblaze'],
signatureMove: 'Dilly Dally',
evs: {atk: 252, spd: 4, spe: 252}, nature: 'Jolly', teraType: 'Flying', shiny: 1024,
},
UT: {
species: 'Talonflame', ability: 'Gale Guard', item: 'Life Orb', gender: 'M',
moves: ['Brave Bird', 'Roost', ['Swords Dance', 'Flare Blitz', 'Will-O-Wisp']],
Expand Down
Loading