Skip to content

Commit

Permalink
Add Artemis (#102)
Browse files Browse the repository at this point in the history
Co-authored-by: Kris Johnson <[email protected]>
  • Loading branch information
WarriorGallade and KrisXV committed Apr 18, 2024
1 parent 0d83324 commit c623282
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 0 deletions.
40 changes: 40 additions & 0 deletions data/mods/gen9ssb/abilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,46 @@ export const Abilities: {[k: string]: ModdedAbilityData} = {
gen: 9,
},

// Artemis
supervisedlearning: {
shortDesc: "Mold Breaker + Unaware + Clear Body.",
name: "Supervised Learning",
onModifyMove(move) {
move.ignoreAbility = true;
},
onAnyModifyBoost(boosts, pokemon) {
const unawareUser = this.effectState.target;
if (unawareUser === pokemon) return;
if (unawareUser === this.activePokemon && pokemon === this.activeTarget) {
boosts['def'] = 0;
boosts['spd'] = 0;
boosts['evasion'] = 0;
}
if (pokemon === this.activePokemon && unawareUser === this.activeTarget) {
boosts['atk'] = 0;
boosts['def'] = 0;
boosts['spa'] = 0;
boosts['accuracy'] = 0;
}
},
onTryBoost(boost, target, source, effect) {
if (source && target === source) return;
let showMsg = false;
let i: BoostID;
for (i in boost) {
if (boost[i]! < 0) {
delete boost[i];
showMsg = true;
}
}
if (showMsg && !(effect as ActiveMove).secondaries && effect.id !== 'octolock') {
this.add("-fail", target, "unboost", "[from] ability: Supervised Learning", "[of] " + target);
}
},
flags: {},
gen: 9,
},

// Blitz
blitzofruin: {
shortDesc: "Active Pokemon without this Ability have their Speed multiplied by 0.75. Also Dazzling.",
Expand Down
6 changes: 6 additions & 0 deletions data/mods/gen9ssb/conditions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,12 @@ export const Conditions: {[k: string]: ModdedConditionData & {innateName?: strin
this.add(`c:|${getName('Arya')}|W-whats this? Oh, come on...!!!`);
}, // Is a message before going mega supported(unlikely)? if so, the first message in onAfterMega goes there.
},
artemis: {
noCopy: true,
onFoeAfterFaint(target, source, effect) {
this.add('message', `${source.name} was banned from Pok\u00e9mon Showdown!`);
},
},
berry: {
noCopy: true,
onStart(pokemon) {
Expand Down
47 changes: 47 additions & 0 deletions data/mods/gen9ssb/moves.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,53 @@ export const Moves: {[k: string]: ModdedMoveData} = {
type: "Ground",
},

// Artemis
automatedresponse: {
accuracy: 100,
basePower: 90,
category: "Special",
shortDesc: "Changes the move's and user's type to deal super effective damage. 10% false positive rate.",
name: "Automated Response",
pp: 20,
priority: 0,
flags: {protect: 1},
onTryMove() {
this.attrLastMove('[still]');
},
onPrepareHit(target, source, move) {
const seTypes = [];
const nveTypes = [];
let netType = "";
for (const i of this.dex.types.names()) {
if (target) {
const effect = this.dex.getEffectiveness(i, target.types);
const immune = this.dex.getImmunity(i, target.types);
if (effect > 0 && immune) {
seTypes.push(i);
} else if (effect < 0 && immune) {
nveTypes.push(i);
}
}
}
if (this.randomChance(90, 100)) {
netType = this.sample(seTypes);
} else { // false positive
netType = this.sample(nveTypes);
}
if (netType === "") {
netType = "Electric";
}
// TODO add messages for false positive etc
source.setType(netType);
this.add('-start', source, 'typechange', netType);
if (move) {
move.type = netType;
}
this.add('-anim', source, 'Techno Blast', target);
},
target: "normal",
type: "Electric",
},

// berry
whatkind: {
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 @@ -84,6 +84,12 @@ export const ssbSets: SSBSets = {
signatureMove: 'Anyone can be killed',
evs: {spa: 252, spd: 4, spe: 252}, nature: 'Timid', shiny: false,
},
Artemis: {
species: 'Genesect', ability: 'Supervised Learning', item: 'Choice Specs', gender: 'N',
moves: [],
signatureMove: 'Automated Response​',
evs: {hp: 4, spa: 252, spe: 252}, nature: 'Serious', shiny: true,
},
berry: {
species: 'Regirock', ability: 'Sturdy', item: 'Maranga Berry', gender: 'F',
moves: ['Curse', 'Salt Cure', 'Stone Axe'],
Expand Down

0 comments on commit c623282

Please sign in to comment.