Skip to content

Commit

Permalink
Add Hidden Format and fix aesthetics (#179)
Browse files Browse the repository at this point in the history
Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
HisuianZoroark and KrisXV authored May 2, 2024
1 parent ed213f3 commit de4542d
Showing 5 changed files with 108 additions and 57 deletions.
11 changes: 8 additions & 3 deletions config/formats.ts
Original file line number Diff line number Diff line change
@@ -2631,10 +2631,15 @@ export const Formats: FormatList = [
// https://discordapp.com/channels/630837856075513856/630845310033330206/716126469528485909
// Requires client change
// this.add(`raw|<div class='broadcast-green'><b>Wondering what all these custom moves, abilities, and items do?<br />Check out the <a href="https://www.smogon.com/articles/super-staff-bros-4" target="_blank">Super Staff Bros 4 Guide</a> or use /ssb to find out!</b></div>`);
if (this.ruleTable.has('dynamaxclause')) {
// Old joke format we're bringing back
this.add('message', 'Fox only');
this.add('message', 'No items');
this.add('message', 'Final Destination');
return;
}

this.add('message', [
'THE BATTLE FOR SURVIVAL BEGINS!', 'WHO WILL SURVIVE?', 'GET READY TO KEEP UP!', 'GET READY!', 'DARE TO BELIEVE YOU CAN SURVIVE!', 'THERE CAN BE ONLY ONE WINNER!', 'GET READY FOR THE FIGHT OF YOUR LIFE!', 'WHO WILL PREVAIL?', 'ONLY ONE TEAM WILL BE LEFT STANDING!', 'BATTLE WITHOUT LIMITS!',
][this.random(10)]);
this.add('message', 'EVERYONE IS HERE!');
this.add('message', 'FIGHT!');
},
onSwitchInPriority: 100,
16 changes: 9 additions & 7 deletions data/mods/gen9ssb/conditions.ts
Original file line number Diff line number Diff line change
@@ -956,27 +956,29 @@ export const Conditions: {[k: string]: ModdedConditionData & {innateName?: strin
hizo: {
noCopy: true,
onStart() {
// TODO: Confirm nicks later
let friends;
const tier = this.sample(['pic', 'sketch', 'ggsp']);
const tier = this.sample(['Partners in Crime', 'Sketchmons', 'Godly Power']);
switch (tier) {
case 'pic':
case 'Partners in Crime':
friends = ['chromate', 'yuki', 'YoBuddyTheBaker', 'zoe', 'jasprose'];
break;
case 'sketch':
case 'Sketchmons':
friends = ['Eggs', 'career ended', 'ponchlake'];
break;
default:
friends = ['roonie217', 'chromate', 'tkhanh', 'lilyhii'];
break;
}
this.add(`c:|${getName('HiZo')}|/pm ${this.sample(friends)}, ${tier}?`);
this.add(`c:|${getName('HiZo')}|Why am I needed here, I was in the middle of a game of ${tier} with ${this.sample(friends)}`);
this.add(`c:|${getName('HiZo')}|Did I break something again`);
},
onSwitchOut() {
this.add(`c:|${getName('HiZo')}|maybe later then`);
this.add(`c:|${getName('HiZo')}|This isn't my fault this time I swear`);
this.add(`c:|${getName('HiZo')}|Ok maybe it is but that doesn't mean you should blame me automatically`);
},
onFaint() {
this.add(`c:|${getName('HiZo')}|can i try that matchup again?`);
this.add(`c:|${getName('HiZo')}|What did I do to deserve this`);
this.add(`c:|${getName('HiZo')}|Actually on second thought don't answer that question`);
},
},
hoeenhero: {
117 changes: 75 additions & 42 deletions data/mods/gen9ssb/moves.ts
Original file line number Diff line number Diff line change
@@ -2264,6 +2264,7 @@ export const Moves: {[k: string]: ModdedMoveData} = {
this.add('-anim', source, 'Swords Dance', source);
},
onHit(target, source) {
this.add(`c:|${getName((source.illusion || source).name)}|Ok I have a stupid idea, just hear me out`);
this.add('message', `A sacrifice is needed.`);
},
slotCondition: 'scapegoat',
@@ -4162,48 +4163,36 @@ export const Moves: {[k: string]: ModdedMoveData} = {
const type = this.sample(this.dex.types.names().filter(i => i !== 'Stellar'));
move.type = type;
},
self: {
slotCondition: 'Luck Pulse',
},
condition: {
duration: 999,
onStart(pokemon, source) {
const messages = [
'Kai Shinden',
'Kaio Sama',
'Kaiba, Seto',
'Kairyu-Shin',
'Kaito Shizuki',
'Kanga Skhan',
'KanSas',
'Karakuri Shogun',
'Kartana Swords dance',
'Kate Stewart',
'Kendo Spirit',
'Keratan Sulfate',
'Kernel Streaming',
'Key Stage',
'Kids Suck',
'KillSteal',
'Kilometers / Second',
'KiloSecond',
'King of the Swamp',
'King\'s Shield',
'Kirk/Spock',
'Klingon Security',
'Kpop Star',
'Kuroudo (Cloud) Strife',
'Kyouko Sakura',
'KyrgyzStan',
];
this.effectState.ksName = this.sample(messages);
this.add(`c:|${getName('Pulse_kS')}|The kS stands for ${this.effectState.ksName}`);
},
onTryHit(source, target, move) {
if (source.species.baseSpecies === 'Hydreigon' && move.name === 'Luck Pulse') {
this.add(`c:|${getName('Pulse_kS')}|The kS stands for ${this.effectState.ksName}`);
}
},
onTryHit(target, source, move) {
const messages = [
'Kai Shinden',
'Kaio Sama',
'Kaiba, Seto',
'Kairyu-Shin',
'Kaito Shizuki',
'Kanga Skhan',
'KanSas',
'Karakuri Shogun',
'Kate Stewart',
'Kendo Spirit',
'Keratan sulfate',
'Kernel streaming',
'Key Stage',
'Kids Suck',
'KillSteal',
'Kilometers / Second',
'Kilosecond',
'King of the Swamp',
'King\'s Shield',
'Kirk/Spock',
'Klingon Security',
'Kuroudo (Cloud) Strife',
'Kyouko Sakura',
'KyrgyzStan',
'Kpop Star',
'Kartana Swords dance',
];
this.add(`c:|${getName((source.illusion || source).name)}|The kS stands for ${this.sample(messages)}`);
},
secondary: {
chance: 40,
@@ -6632,4 +6621,48 @@ export const Moves: {[k: string]: ModdedMoveData} = {
},
},
},

// Try playing Staff Bros with dynamax clause and see what happens
supermetronome: {
accuracy: true,
basePower: 0,
category: "Status",
desc: "Uses 2-5 random moves. Does not include 1-Base Power Z-Moves, Super Metronome, Metronome, or 10-Base Power Max moves.",
shortDesc: "Uses 2-5 random moves.",
name: "Super Metronome",
isNonstandard: "Custom",
pp: 100,
noPPBoosts: true,
priority: 0,
flags: {},
onTryMove(pokemon) {
this.attrLastMove('[still]');
},
onPrepareHit(target, source) {
this.add('-anim', source, "Metronome", source);
},
onHit(target, source, effect) {
const moves = [];
for (const move of this.dex.moves.all()) {
if (move.realMove || move.id.includes('metronome')) continue;
// Calling 1 BP move is somewhat lame and disappointing. However,
// signature Z moves are fine, as they actually have a base power.
if (move.isZ && move.basePower === 1) continue;
if (move.gen > this.gen) continue;
if (move.isMax) continue;
moves.push(move.name);
}
let randomMove: string;
if (moves.length) {
randomMove = this.sample(moves);
} else {
return false;
}
this.actions.useMove(randomMove, target);
},
multihit: [2, 5],
secondary: null,
target: "self",
type: "???",
},
};
19 changes: 14 additions & 5 deletions data/mods/gen9ssb/random-teams.ts
Original file line number Diff line number Diff line change
@@ -712,7 +712,7 @@ export const ssbSets: SSBSets = {
Pulse_kS: {
species: 'Hydreigon', ability: 'Pulse Luck', item: 'Quick Claw', gender: 'N',
moves: ['Dark Pulse', 'Dragon Pulse', 'Origin Pulse'],
signatureMove: 'Lucky Pulse',
signatureMove: 'Luck Pulse',
evs: {hp: 85, atk: 85, def: 85, spa: 85, spd: 85, spe: 85}, nature: 'Serious', teraType: ['Steel', 'Poison'],
},
PYRO: {
@@ -1029,17 +1029,26 @@ export const ssbSets: SSBSets = {
},
};

const afdSSBSets: SSBSets = {
'Fox': {
species: 'Fennekin', ability: 'No Ability', item: '', gender: '',
moves: [],
signatureMove: 'Super Metronome',
},
};

export class RandomStaffBrosTeams extends RandomTeams {
randomStaffBrosTeam(options: {inBattle?: boolean} = {}) {
this.enforceNoDirectCustomBanlistChanges();

const team: PokemonSet[] = [];
const debug: string[] = []; // Set this to a list of SSB sets to override the normal pool for debugging.
const ruleTable = this.dex.formats.getRuleTable(this.format);
const memeformat = ruleTable.has('dynamaxclause');
const monotype = ruleTable.has('sametypeclause') ?
this.sample([...this.dex.types.names().filter(x => x !== 'Stellar')]) : false;

let pool = Object.keys(ssbSets);
let pool = debug.length ? debug : memeformat ? Object.keys(afdSSBSets) : Object.keys(ssbSets);
if (debug.length) {
while (debug.length < 6) {
const staff = this.sampleNoReplace(pool);
@@ -1056,12 +1065,12 @@ export class RandomStaffBrosTeams extends RandomTeams {
while (pool.length && team.length < this.maxTeamSize) {
if (depth >= 200) throw new Error(`Infinite loop in Super Staff Bros team generation.`);
depth++;
const name = this.sampleNoReplace(pool);
const ssbSet: SSBSet = this.dex.deepClone(ssbSets[name]);
const name = memeformat ? this.sample(pool) : this.sampleNoReplace(pool);
const ssbSet: SSBSet = memeformat ? this.dex.deepClone(afdSSBSets[name]) : this.dex.deepClone(ssbSets[name]);
if (ssbSet.skip) continue;

// Enforce typing limits
if (!(debug.length || monotype)) { // Type limits are ignored for debugging, monotype, or memes.
if (!(debug.length || monotype || memeformat)) { // Type limits are ignored for debugging, monotype, or memes.
const species = this.dex.species.get(ssbSet.species);
if (this.forceMonotype && !species.types.includes(this.forceMonotype)) continue;

2 changes: 2 additions & 0 deletions data/mods/gen9ssb/scripts.ts
Original file line number Diff line number Diff line change
@@ -385,6 +385,8 @@ export const Scripts: ModdedBattleScriptsData = {
this.boost({atk: 1, spa: 1, spe: 1}, action.pokemon, action.pokemon, this.dex.moves.get('scapegoat'));
}
// @ts-ignore
this.add(`c:|${getName((action.pokemon.illusion || action.pokemon).name)}|Don't worry, if this plan fails we can just blame ${action.target.name}`);
// @ts-ignore
action.pokemon.side.removeSlotCondition(action.pokemon, 'scapegoat');
break;
case 'runUnnerve':

0 comments on commit de4542d

Please sign in to comment.