Skip to content

Commit

Permalink
Convert noSketch to move flag (#10407)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaWoblefet committed Jul 15, 2024
1 parent 9898db9 commit 27557e5
Show file tree
Hide file tree
Showing 14 changed files with 60 additions and 68 deletions.
20 changes: 8 additions & 12 deletions data/mods/gen2/moves.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ export const Moves: import('../../../sim/dex-moves').ModdedMoveDataTable = {
},
explosion: {
inherit: true,
noSketch: true,
flags: {protect: 1, mirror: 1, metronome: 1, noparentalbond: 1, nosketch: 1},
},
flail: {
inherit: true,
Expand Down Expand Up @@ -402,14 +402,12 @@ export const Moves: import('../../../sim/dex-moves').ModdedMoveDataTable = {
},
metronome: {
inherit: true,
flags: {failencore: 1},
noSketch: true,
flags: {failencore: 1, nosketch: 1},
},
mimic: {
inherit: true,
accuracy: 100,
noSketch: true,
flags: {protect: 1, bypasssub: 1, allyanim: 1, failencore: 1, noassist: 1},
flags: {protect: 1, bypasssub: 1, allyanim: 1, failencore: 1, noassist: 1, nosketch: 1},
},
mindreader: {
inherit: true,
Expand All @@ -436,7 +434,7 @@ export const Moves: import('../../../sim/dex-moves').ModdedMoveDataTable = {
},
mirrormove: {
inherit: true,
flags: {metronome: 1, failencore: 1},
flags: {metronome: 1, failencore: 1, nosketch: 1},
onHit(pokemon) {
const noMirror = ['metronome', 'mimic', 'mirrormove', 'sketch', 'sleeptalk', 'transform'];
const target = pokemon.side.foe.active[0];
Expand All @@ -449,7 +447,6 @@ export const Moves: import('../../../sim/dex-moves').ModdedMoveDataTable = {
}
this.actions.useMove(lastMove, pokemon);
},
noSketch: true,
},
mist: {
num: 54,
Expand Down Expand Up @@ -727,11 +724,11 @@ export const Moves: import('../../../sim/dex-moves').ModdedMoveDataTable = {
},
selfdestruct: {
inherit: true,
noSketch: true,
flags: {protect: 1, mirror: 1, metronome: 1, noparentalbond: 1, nosketch: 1},
},
sketch: {
inherit: true,
flags: {bypasssub: 1, failencore: 1, noassist: 1},
flags: {bypasssub: 1, failencore: 1, noassist: 1, nosketch: 1},
onHit() {
// Sketch always fails in Link Battles
this.add('-nothing');
Expand All @@ -757,7 +754,7 @@ export const Moves: import('../../../sim/dex-moves').ModdedMoveDataTable = {
},
sleeptalk: {
inherit: true,
flags: {failencore: 1, nosleeptalk: 1},
flags: {failencore: 1, nosleeptalk: 1, nosketch: 1},
onHit(pokemon) {
const moves = [];
for (const moveSlot of pokemon.moveSlots) {
Expand All @@ -772,7 +769,6 @@ export const Moves: import('../../../sim/dex-moves').ModdedMoveDataTable = {
if (!randomMove) return false;
this.actions.useMove(randomMove, pokemon);
},
noSketch: true,
},
solarbeam: {
inherit: true,
Expand Down Expand Up @@ -934,7 +930,7 @@ export const Moves: import('../../../sim/dex-moves').ModdedMoveDataTable = {
},
transform: {
inherit: true,
noSketch: true,
flags: {bypasssub: 1, metronome: 1, failencore: 1, nosketch: 1},
},
triattack: {
inherit: true,
Expand Down
4 changes: 2 additions & 2 deletions data/mods/gen3/moves.ts
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ export const Moves: import('../../../sim/dex-moves').ModdedMoveDataTable = {
},
sketch: {
inherit: true,
flags: {bypasssub: 1, failencore: 1, noassist: 1, failmimic: 1},
flags: {bypasssub: 1, failencore: 1, noassist: 1, failmimic: 1, nosketch: 1},
},
sleeptalk: {
inherit: true,
Expand Down Expand Up @@ -640,7 +640,7 @@ export const Moves: import('../../../sim/dex-moves').ModdedMoveDataTable = {
},
struggle: {
inherit: true,
flags: {contact: 1, protect: 1, noassist: 1, failencore: 1, failmimic: 1},
flags: {contact: 1, protect: 1, noassist: 1, failencore: 1, failmimic: 1, nosketch: 1},
accuracy: 100,
recoil: [1, 4],
struggleRecoil: false,
Expand Down
11 changes: 7 additions & 4 deletions data/mods/gen4/moves.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1387,13 +1387,15 @@ export const Moves: import('../../../sim/dex-moves').ModdedMoveDataTable = {
},
sketch: {
inherit: true,
flags: {bypasssub: 1, allyanim: 1, failencore: 1, noassist: 1, failcopycat: 1, failinstruct: 1, failmimic: 1},
flags: {
bypasssub: 1, allyanim: 1, failencore: 1, noassist: 1,
failcopycat: 1, failinstruct: 1, failmimic: 1, nosketch: 1,
},
onHit(target, source) {
const disallowedMoves = ['chatter', 'sketch', 'struggle'];
if (source.transformed || !target.lastMove || target.volatiles['substitute']) {
return false;
}
if (disallowedMoves.includes(target.lastMove.id) || source.moves.includes(target.lastMove.id)) {
if (target.lastMove.flags['nosketch'] || source.moves.includes(target.lastMove.id)) {
return false;
}
const sketchIndex = source.moves.indexOf('sketch');
Expand Down Expand Up @@ -1472,7 +1474,8 @@ export const Moves: import('../../../sim/dex-moves').ModdedMoveDataTable = {
struggle: {
inherit: true,
flags: {
contact: 1, protect: 1, failencore: 1, failmefirst: 1, noassist: 1, failcopycat: 1, failinstruct: 1, failmimic: 1,
contact: 1, protect: 1, failencore: 1, failmefirst: 1,
noassist: 1, failcopycat: 1, failinstruct: 1, failmimic: 1, nosketch: 1,
},
onModifyMove(move) {
move.type = '???';
Expand Down
5 changes: 4 additions & 1 deletion data/mods/gen5/moves.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,10 @@ export const Moves: import('../../../sim/dex-moves').ModdedMoveDataTable = {
chance: 10,
volatileStatus: 'confusion',
},
flags: {protect: 1, sound: 1, distance: 1, noassist: 1, failcopycat: 1, failmefirst: 1, nosleeptalk: 1, failmimic: 1},
flags: {
protect: 1, sound: 1, distance: 1, noassist: 1, failcopycat: 1,
failmefirst: 1, nosleeptalk: 1, failmimic: 1, nosketch: 1,
},
},
conversion: {
inherit: true,
Expand Down
6 changes: 3 additions & 3 deletions data/mods/gen8/moves.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export const Moves: import('../../../sim/dex-moves').ModdedMoveDataTable = {
inherit: true,
flags: {
protect: 1, mirror: 1, sound: 1, distance: 1, bypasssub: 1,
noassist: 1, failcopycat: 1, failinstruct: 1, failmefirst: 1, nosleeptalk: 1, failmimic: 1,
noassist: 1, failcopycat: 1, failinstruct: 1, failmefirst: 1, nosleeptalk: 1, failmimic: 1, nosketch: 1,
},
},
copycat: {
Expand Down Expand Up @@ -126,7 +126,7 @@ export const Moves: import('../../../sim/dex-moves').ModdedMoveDataTable = {
darkvoid: {
inherit: true,
isNonstandard: "Past",
noSketch: false,
flags: {protect: 1, reflectable: 1, mirror: 1, metronome: 1},
},
doubleironbash: {
inherit: true,
Expand Down Expand Up @@ -234,7 +234,7 @@ export const Moves: import('../../../sim/dex-moves').ModdedMoveDataTable = {
hyperspacefury: {
inherit: true,
isNonstandard: "Past",
noSketch: false,
flags: {mirror: 1, bypasssub: 1},
},
hyperspacehole: {
inherit: true,
Expand Down
6 changes: 3 additions & 3 deletions data/mods/gen9dlc1/moves.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const Moves: import('../../../sim/dex-moves').ModdedMoveDataTable = {
},
darkvoid: {
inherit: true,
noSketch: false,
flags: {protect: 1, reflectable: 1, mirror: 1, metronome: 1},
},
decorate: {
inherit: true,
Expand Down Expand Up @@ -90,7 +90,7 @@ export const Moves: import('../../../sim/dex-moves').ModdedMoveDataTable = {
},
hyperspacefury: {
inherit: true,
noSketch: false,
flags: {mirror: 1, bypasssub: 1},
},
iceburn: {
inherit: true,
Expand Down Expand Up @@ -140,7 +140,7 @@ export const Moves: import('../../../sim/dex-moves').ModdedMoveDataTable = {
},
revivalblessing: {
inherit: true,
noSketch: false,
flags: {heal: 1},
},
rockwrecker: {
inherit: true,
Expand Down
11 changes: 4 additions & 7 deletions data/mods/gen9ssb/moves.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1401,8 +1401,7 @@ export const Moves: import('../../../sim/dex-moves').ModdedMoveDataTable = {
name: "(╯°o°)╯︵ ┻━┻",
pp: 10,
priority: 0,
flags: {protect: 1, failcopycat: 1},
noSketch: true,
flags: {protect: 1, failcopycat: 1, nosketch: 1},
onTryMove() {
this.attrLastMove('[still]');
},
Expand Down Expand Up @@ -3763,7 +3762,7 @@ export const Moves: import('../../../sim/dex-moves').ModdedMoveDataTable = {
desc: "User copies opponents signature move and adds it to its own movepool, replacing this move. The user then uses the copied move immediately and gains the Imprison condition, preventing foes from using moves in the user's moveset. The PP of the copied move will be adjusted to match the PP the copied signature move is supposed to have. If the copied custom move would fail if used in this manner, Plagiarism fails and the user boosts all stats by 1 stage, except Accuracy and Evasion.",
pp: 5,
priority: 1,
flags: {failencore: 1, nosleeptalk: 1, noassist: 1, failcopycat: 1, failinstruct: 1, failmimic: 1},
flags: {failencore: 1, nosleeptalk: 1, noassist: 1, failcopycat: 1, failinstruct: 1, failmimic: 1, nosketch: 1},
onTry(source) {
if (source.m.usedPlagiarism) {
this.hint("Plagiarism only works once per switch-in.");
Expand All @@ -3778,7 +3777,7 @@ export const Moves: import('../../../sim/dex-moves').ModdedMoveDataTable = {
const sigMoveName = ssbSets[(target.illusion || target).name].signatureMove;
const move = this.dex.getActiveMove(sigMoveName);
if (!target || this.queue.willSwitch(target) || target.beingCalledBack ||
move.flags['failcopycat'] || move.noSketch) {
move.flags['failcopycat'] || move.flags['nosketch']) {
this.boost({spa: 1, spd: 1, spe: 1}, source, source, m);
return;
}
Expand All @@ -3802,7 +3801,6 @@ export const Moves: import('../../../sim/dex-moves').ModdedMoveDataTable = {
source.addVolatile('imprison', source);
source.m.usedPlagiarism = true;
},
noSketch: true,
secondary: null,
target: "normal",
type: "Dark",
Expand Down Expand Up @@ -4349,8 +4347,7 @@ export const Moves: import('../../../sim/dex-moves').ModdedMoveDataTable = {
desc: "If the user is Volcarona, this move is Ice-type and, after dealing damage, transforms the user into a Snow Warning Frosmoth with Blizzard, Chilly Reception, and Aurora Veil. If the user is Frosmoth, this move is Fire-type and, after dealing damage, transforms the user into a Drought Volcarona with Torch Song, Morning Sun, and Solar Beam. This move fails if the user is neither Frosmoth nor Volcarona.",
pp: 10,
priority: 0,
flags: {protect: 1, mirror: 1, failcopycat: 1},
noSketch: true,
flags: {protect: 1, mirror: 1, failcopycat: 1, nosketch: 1},
onTryMove() {
this.attrLastMove('[still]');
},
Expand Down
3 changes: 1 addition & 2 deletions data/mods/gennext/moves.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2086,8 +2086,7 @@ export const Moves: import('../../../sim/dex-moves').ModdedMoveDataTable = {
name: "Magikarp's Revenge",
pp: 10,
priority: 0,
flags: {contact: 1, recharge: 1, protect: 1, mirror: 1, heal: 1, metronome: 1},
noSketch: true,
flags: {contact: 1, recharge: 1, protect: 1, mirror: 1, heal: 1, metronome: 1, nosketch: 1},
drain: [1, 2],
onTry(pokemon) {
if (pokemon.species.name !== 'Magikarp') {
Expand Down
Loading

0 comments on commit 27557e5

Please sign in to comment.