Jofthomas's picture
Jofthomas HF staff
Upload 4781 files
5c2ed06 verified
{
"version": 3,
"sources": ["../../../../data/mods/gen8linked/moves.ts"],
"sourcesContent": ["export const Moves: import('../../../sim/dex-moves').ModdedMoveDataTable = {\n\tpursuit: {\n\t\tinherit: true,\n\t\tbeforeTurnCallback(pokemon, target) {\n\t\t\t// @ts-expect-error modded\n\t\t\tconst linkedMoves: [string, string] = pokemon.getLinkedMoves();\n\t\t\tif (linkedMoves.length) {\n\t\t\t\tif (linkedMoves[0] !== 'pursuit' && linkedMoves[1] === 'pursuit') return;\n\t\t\t}\n\n\t\t\ttarget.side.addSideCondition('pursuit', pokemon);\n\t\t\tif (!target.side.sideConditions['pursuit'].sources) {\n\t\t\t\ttarget.side.sideConditions['pursuit'].sources = [];\n\t\t\t}\n\t\t\ttarget.side.sideConditions['pursuit'].sources.push(pokemon);\n\t\t},\n\t},\n\tmefirst: {\n\t\tinherit: true,\n\t\tonTryHit(target, pokemon) {\n\t\t\tconst action = this.queue.willMove(target);\n\t\t\tif (action) {\n\t\t\t\t// Mod-specific: Me First copies the first move in the link\n\t\t\t\t// @ts-expect-error modded\n\t\t\t\tconst move = this.dex.getActiveMove(action.linked?.[0] || action.move);\n\t\t\t\tif (move.category !== 'Status' && !move.flags['failmefirst']) {\n\t\t\t\t\tpokemon.addVolatile('mefirst');\n\t\t\t\t\tthis.actions.useMove(move, pokemon, { target });\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t},\n\n\t// Modify Sucker Punch to check if both moves in a link are status\n\tsuckerpunch: {\n\t\tinherit: true,\n\t\tonTry(source, target) {\n\t\t\tconst action = this.queue.willMove(target);\n\t\t\tif (!action || action.choice !== 'move') {\n\t\t\t\tthis.attrLastMove('[still]');\n\t\t\t\tthis.add('-fail', source);\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tif (target.volatiles.mustrecharge && target.volatiles.mustrecharge.duration! < 2) {\n\t\t\t\t// Duration may not be lower than 2 if Sucker Punch is used as a low-priority move\n\t\t\t\t// i.e. if Sucker Punch is linked with a negative priority move\n\t\t\t\tthis.attrLastMove('[still]');\n\t\t\t\tthis.add('-fail', source);\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t// @ts-expect-error modded\n\t\t\tif (!action.linked) {\n\t\t\t\tif (action.move.category === 'Status' && action.move.id !== 'mefirst') {\n\t\t\t\t\tthis.attrLastMove('[still]');\n\t\t\t\t\tthis.add('-fail', source);\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// @ts-expect-error modded\n\t\t\t\tfor (const linkedMove of action.linked) {\n\t\t\t\t\tif (linkedMove.category !== 'Status' || linkedMove.id === 'mefirst') return;\n\t\t\t\t}\n\t\t\t\tthis.attrLastMove('[still]');\n\t\t\t\tthis.add('-fail', source);\n\t\t\t\treturn null;\n\t\t\t}\n\t\t},\n\t},\n\n\t// Copy the last used move of a link\n\tsketch: {\n\t\tinherit: true,\n\t\tonHit(target, source) {\n\t\t\tconst disallowedMoves = ['chatter', 'sketch', 'struggle'];\n\t\t\tconst lastMove: Move = target.m.lastMoveAbsolute;\n\t\t\tif (source.transformed || !lastMove || disallowedMoves.includes(lastMove.id) ||\n\t\t\t\tsource.moves.includes(lastMove.id) || lastMove.isZ) return false;\n\t\t\tconst sketchIndex = source.moves.indexOf('sketch');\n\t\t\tif (sketchIndex < 0) return false;\n\t\t\tconst move = this.dex.moves.get(lastMove);\n\t\t\tconst sketchedMove = {\n\t\t\t\tmove: move.name,\n\t\t\t\tid: move.id,\n\t\t\t\tpp: move.pp,\n\t\t\t\tmaxpp: move.pp,\n\t\t\t\ttarget: move.target,\n\t\t\t\tdisabled: false,\n\t\t\t\tused: false,\n\t\t\t};\n\t\t\tsource.moveSlots[sketchIndex] = sketchedMove;\n\t\t\tsource.baseMoveSlots[sketchIndex] = sketchedMove;\n\t\t\tthis.add('-activate', source, 'move: Sketch', move.name);\n\t\t},\n\t},\n\tmimic: {\n\t\tinherit: true,\n\t\tonHit(target, source) {\n\t\t\tconst lastMove: Move = target.m.lastMoveAbsolute;\n\t\t\tif (source.transformed || !lastMove || lastMove.flags['failmimic'] ||\n\t\t\t\tsource.moves.includes(lastMove.id) || lastMove.isZ) return false;\n\t\t\tconst mimicIndex = source.moves.indexOf('mimic');\n\t\t\tif (mimicIndex < 0) return false;\n\t\t\tconst move = this.dex.moves.get(lastMove);\n\t\t\tsource.moveSlots[mimicIndex] = {\n\t\t\t\tmove: move.name,\n\t\t\t\tid: move.id,\n\t\t\t\tpp: move.pp,\n\t\t\t\tmaxpp: move.pp,\n\t\t\t\ttarget: move.target,\n\t\t\t\tdisabled: false,\n\t\t\t\tused: false,\n\t\t\t\tvirtual: true,\n\t\t\t};\n\t\t\tthis.add('-start', source, 'Mimic', move.name);\n\t\t},\n\t},\n\n\t// Copy/call last move of a link\n\tinstruct: {\n\t\tinherit: true,\n\t\tonHit(target, source) {\n\t\t\tconst lastMove: Move | ActiveMove | null = target.m.lastMoveAbsolute;\n\t\t\tif (!lastMove || target.volatiles['dynamax']) return false;\n\t\t\tconst moveIndex = target.moves.indexOf(lastMove.id);\n\t\t\tif (\n\t\t\t\tlastMove.flags['failinstruct'] || lastMove.isZ || lastMove.isMax ||\n\t\t\t\tlastMove.flags['charge'] || lastMove.flags['recharge'] ||\n\t\t\t\ttarget.volatiles['beakblast'] || target.volatiles['focuspunch'] || target.volatiles['shelltrap'] ||\n\t\t\t\t(target.moveSlots[moveIndex] && target.moveSlots[moveIndex].pp <= 0)\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tthis.add('-singleturn', target, 'move: Instruct', `[of] ${source}`);\n\t\t\tthis.actions.runMove(lastMove.id, target, target.lastMoveTargetLoc!);\n\t\t},\n\t},\n\tmirrormove: {\n\t\tinherit: true,\n\t\tonTryHit(target, pokemon) {\n\t\t\tconst move: Move | ActiveMove | null = target.m.lastMoveAbsolute;\n\t\t\tif (!move?.flags['mirror'] || move.isZ || move.isMax) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tthis.actions.useMove(move.id, pokemon, { target });\n\t\t\treturn null;\n\t\t},\n\t},\n\n\t// Disabling effects\n\tdisable: {\n\t\tinherit: true,\n\t\tcondition: {\n\t\t\tduration: 5,\n\t\t\tnoCopy: true, // doesn't get copied by Baton Pass\n\t\t\tonStart(pokemon, source, effect) {\n\t\t\t\tconst lastMove: Move | ActiveMove | null = pokemon.m.lastMoveAbsolute;\n\t\t\t\tif (\n\t\t\t\t\tthis.queue.willMove(pokemon) ||\n\t\t\t\t\t(pokemon === this.activePokemon && this.activeMove && !this.activeMove.isExternal)\n\t\t\t\t) {\n\t\t\t\t\tthis.effectState.duration!--;\n\t\t\t\t}\n\t\t\t\tif (!lastMove) {\n\t\t\t\t\tthis.debug('pokemon hasn\\'t moved yet');\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tfor (const moveSlot of pokemon.moveSlots) {\n\t\t\t\t\tif (moveSlot.id === lastMove.id) {\n\t\t\t\t\t\tif (!moveSlot.pp) {\n\t\t\t\t\t\t\tthis.debug('Move out of PP');\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (effect.id === 'cursedbody') {\n\t\t\t\t\t\t\t\tthis.add('-start', pokemon, 'Disable', moveSlot.move, '[from] ability: Cursed Body', `[of] ${source}`);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.add('-start', pokemon, 'Disable', moveSlot.move);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tthis.effectState.move = lastMove.id;\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t},\n\t\t\tonResidualOrder: 14,\n\t\t\tonEnd(pokemon) {\n\t\t\t\tthis.add('-end', pokemon, 'Disable');\n\t\t\t},\n\t\t\tonBeforeMovePriority: 7,\n\t\t\tonBeforeMove(attacker, defender, move) {\n\t\t\t\tif (!move.isZ && move.id === this.effectState.move) {\n\t\t\t\t\tthis.add('cant', attacker, 'Disable', move);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\t\t\tonDisableMove(pokemon) {\n\t\t\t\tfor (const moveSlot of pokemon.moveSlots) {\n\t\t\t\t\tif (moveSlot.id === this.effectState.move) {\n\t\t\t\t\t\tpokemon.disableMove(moveSlot.id);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\t},\n\tencore: {\n\t\tinherit: true,\n\t\tcondition: {\n\t\t\tduration: 3,\n\t\t\tnoCopy: true, // doesn't get copied by Z-Baton Pass\n\t\t\tonStart(target) {\n\t\t\t\tlet lastMove: Move | ActiveMove | null = target.m.lastMoveAbsolute;\n\t\t\t\tif (!lastMove || target.volatiles['dynamax']) return false;\n\t\t\t\tif ((lastMove as ActiveMove).isZOrMaxPowered) lastMove = this.dex.moves.get(lastMove.baseMove);\n\t\t\t\t// @ts-expect-error modded\n\t\t\t\tconst linkedMoves: [string, string] = target.getLinkedMoves(true);\n\t\t\t\tconst moveIndex = target.moves.indexOf(lastMove.id);\n\t\t\t\tif (linkedMoves.includes(lastMove.id) && this.dex.moves.get((linkedMoves[0])).flags['failencore'] &&\n\t\t\t\t\tthis.dex.moves.get((linkedMoves[1])).flags['failencore']) {\n\t\t\t\t\t// both moves cannot be encored\n\t\t\t\t\tdelete target.volatiles['encore'];\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (lastMove.isZ || lastMove.flags['failencore'] ||\n\t\t\t\t\t(target.moveSlots[moveIndex] && target.moveSlots[moveIndex].pp <= 0)) {\n\t\t\t\t\t// it failed\n\t\t\t\t\tdelete target.volatiles['encore'];\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tthis.effectState.turnsActivated = {};\n\t\t\t\tthis.effectState.move = lastMove.id;\n\t\t\t\tthis.add('-start', target, 'Encore');\n\t\t\t\tif (linkedMoves.includes(lastMove.id)) {\n\t\t\t\t\tthis.effectState.move = linkedMoves;\n\t\t\t\t}\n\t\t\t\tif (!this.queue.willMove(target)) {\n\t\t\t\t\tthis.effectState.duration!++;\n\t\t\t\t}\n\t\t\t},\n\t\t\tonOverrideAction(pokemon, target, move) {\n\t\t\t\tif (!this.effectState.turnsActivated[this.turn]) {\n\t\t\t\t\t// Initialize Encore effect for this turn\n\t\t\t\t\tthis.effectState.turnsActivated[this.turn] = 0;\n\t\t\t\t} else if (\n\t\t\t\t\tthis.effectState.turnsActivated[this.turn] >= (Array.isArray(this.effectState.move) ?\n\t\t\t\t\t\tthis.effectState.move.length : 1)) {\n\t\t\t\t\t// Finish Encore effect for this turn\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis.effectState.turnsActivated[this.turn]++;\n\t\t\t\tif (!Array.isArray(this.effectState.move)) {\n\t\t\t\t\tthis.queue.cancelAction(pokemon);\n\t\t\t\t\tif (move.id !== this.effectState.move) return this.effectState.move;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Locked into a link\n\t\t\t\tswitch (this.effectState.turnsActivated[this.turn]) {\n\t\t\t\tcase 1: {\n\t\t\t\t\tif (this.effectState.move[0] !== move.id) return this.effectState.move[0];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tcase 2:\n\t\t\t\t\tif (this.effectState.move[1] !== move.id) return this.effectState.move[1];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t},\n\t\t\tonResidualOrder: 13,\n\t\t\tonResidual(target) {\n\t\t\t\t// early termination if you run out of PP\n\t\t\t\tconst lastMove = target.m.lastMoveAbsolute;\n\t\t\t\tconst index = target.moves.indexOf(lastMove.id);\n\t\t\t\tif (index === -1) return; // no last move\n\n\t\t\t\t// @ts-expect-error modded\n\t\t\t\tif (target.hasLinkedMove(lastMove.id)) {\n\t\t\t\t\t// TODO: Check instead whether the last executed move was linked\n\t\t\t\t\tif (target.moveSlots[0].pp <= 0 || target.moveSlots[1].pp <= 0) {\n\t\t\t\t\t\tdelete target.volatiles.encore;\n\t\t\t\t\t\tthis.add('-end', target, 'Encore');\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (target.moveSlots[index].pp <= 0) {\n\t\t\t\t\t\tdelete target.volatiles.encore;\n\t\t\t\t\t\tthis.add('-end', target, 'Encore');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tonEnd(target) {\n\t\t\t\tthis.add('-end', target, 'Encore');\n\t\t\t},\n\t\t\tonDisableMove(pokemon) {\n\t\t\t\tif (Array.isArray(this.effectState.move)) {\n\t\t\t\t\tfor (const moveSlot of pokemon.moveSlots) {\n\t\t\t\t\t\tif (moveSlot.id !== this.effectState.move[0] && moveSlot.id !== this.effectState.move[1]) {\n\t\t\t\t\t\t\tpokemon.disableMove(moveSlot.id);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!this.effectState.move || !pokemon.hasMove(this.effectState.move)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tfor (const moveSlot of pokemon.moveSlots) {\n\t\t\t\t\tif (moveSlot.id !== this.effectState.move) {\n\t\t\t\t\t\tpokemon.disableMove(moveSlot.id);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\t},\n\ttorment: {\n\t\tinherit: true,\n\t\tcondition: {\n\t\t\tnoCopy: true,\n\t\t\tonStart(pokemon) {\n\t\t\t\tif (pokemon.volatiles['dynamax']) {\n\t\t\t\t\tdelete pokemon.volatiles['torment'];\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tthis.add('-start', pokemon, 'Torment');\n\t\t\t},\n\t\t\tonEnd(pokemon) {\n\t\t\t\tthis.add('-end', pokemon, 'Torment');\n\t\t\t},\n\t\t\tonDisableMove(pokemon) {\n\t\t\t\tconst lastMove = pokemon.lastMove;\n\t\t\t\tif (!lastMove || lastMove.id === 'struggle') return;\n\n\t\t\t\tif (Array.isArray(lastMove)) {\n\t\t\t\t\tfor (const move of lastMove) {\n\t\t\t\t\t\tpokemon.disableMove(move.id);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tpokemon.disableMove(lastMove.id);\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\t},\n\n\t// PP-decreasing moves\n\tgrudge: {\n\t\tinherit: true,\n\t\tcondition: {\n\t\t\tonStart(pokemon) {\n\t\t\t\tthis.add('-singlemove', pokemon, 'Grudge');\n\t\t\t},\n\t\t\tonFaint(target, source, effect) {\n\t\t\t\tif (!source || source.fainted || !effect) return;\n\t\t\t\tconst lastMove: Move | ActiveMove | null = source.m.lastMoveAbsolute;\n\t\t\t\tif (effect.effectType === 'Move' && !effect.flags['futuremove'] && lastMove) {\n\t\t\t\t\tfor (const moveSlot of source.moveSlots) {\n\t\t\t\t\t\tif (moveSlot.id === lastMove.id) {\n\t\t\t\t\t\t\tmoveSlot.pp = 0;\n\t\t\t\t\t\t\tthis.add('-activate', source, 'move: Grudge', this.dex.moves.get(lastMove.id).name);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tonBeforeMovePriority: 100,\n\t\t\tonBeforeMove(pokemon) {\n\t\t\t\tif (pokemon.moveThisTurn) return; // Second stage of a Linked move\n\t\t\t\tthis.debug('removing Grudge before attack');\n\t\t\t\tpokemon.removeVolatile('grudge');\n\t\t\t},\n\t\t},\n\t},\n\tspite: {\n\t\tinherit: true,\n\t\tonHit(target) {\n\t\t\tconst lastMove: Move | ActiveMove | null = target.m.lastMoveAbsolute;\n\t\t\tif (!lastMove || lastMove.isZ || lastMove.isMax) return false;\n\t\t\tconst ppDeducted = target.deductPP(lastMove.id, 4);\n\t\t\tif (!ppDeducted) return false;\n\t\t\tthis.add(\"-activate\", target, 'move: Spite', lastMove.name, ppDeducted);\n\t\t},\n\t},\n\n\t// Other lastMove checks\n\tconversion2: {\n\t\tinherit: true,\n\t\tonHit(target, source) {\n\t\t\tconst lastMove: Move | ActiveMove | null = target.m.lastMoveAbsolute;\n\t\t\tif (!lastMove) return false;\n\t\t\tconst possibleTypes = [];\n\t\t\tconst attackType = lastMove.type;\n\t\t\tfor (const typeName of this.dex.types.names()) {\n\t\t\t\tif (source.hasType(typeName)) continue;\n\t\t\t\tconst typeCheck = this.dex.types.get(typeName).damageTaken[attackType];\n\t\t\t\tif (typeCheck === 2 || typeCheck === 3) {\n\t\t\t\t\tpossibleTypes.push(typeName);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!possibleTypes.length) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tconst randomType = this.sample(possibleTypes);\n\n\t\t\tif (!source.setType(randomType)) return false;\n\t\t\tthis.add('-start', source, 'typechange', randomType);\n\t\t},\n\t},\n\tdestinybond: {\n\t\tinherit: true,\n\t\tcondition: {\n\t\t\tonStart(pokemon) {\n\t\t\t\tthis.add('-singlemove', pokemon, 'Destiny Bond');\n\t\t\t},\n\t\t\tonFaint(target, source, effect) {\n\t\t\t\tif (!source || !effect || target.side === source.side) return;\n\t\t\t\tif (effect.effectType === 'Move' && !effect.flags['futuremove']) {\n\t\t\t\t\tif (source.volatiles['dynamax']) {\n\t\t\t\t\t\tthis.add('-hint', \"Dynamaxed Pok\u00E9mon are immune to Destiny Bond.\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tthis.add('-activate', target, 'move: Destiny Bond');\n\t\t\t\t\tsource.faint();\n\t\t\t\t}\n\t\t\t},\n\t\t\tonBeforeMovePriority: -1,\n\t\t\tonBeforeMove(pokemon, target, move) {\n\t\t\t\t// Second stage of a Linked move does not remove Destiny Bond\n\t\t\t\tif (pokemon.moveThisTurn || move.id === 'destinybond') return;\n\t\t\t\tthis.debug('removing Destiny Bond before attack');\n\t\t\t\tpokemon.removeVolatile('destinybond');\n\t\t\t},\n\t\t\tonMoveAborted(pokemon, target, move) {\n\t\t\t\tpokemon.removeVolatile('destinybond');\n\t\t\t},\n\t\t},\n\t},\n\ticeball: {\n\t\tinherit: true,\n\t\tcondition: {\n\t\t\tduration: 1,\n\t\t\tonLockMove: 'iceball',\n\t\t\tonStart() {\n\t\t\t\tthis.effectState.hitCount = 0;\n\t\t\t},\n\t\t\tonResidual(target) {\n\t\t\t\t// This is just to ensure the volatile is deleted correctly\n\t\t\t\tconst lastMove: Move | ActiveMove | null = target.m.lastMoveAbsolute;\n\t\t\t\tif (lastMove?.id === 'struggle') {\n\t\t\t\t\tdelete target.volatiles['iceball'];\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\t},\n\trollout: {\n\t\tinherit: true,\n\t\tcondition: {\n\t\t\tduration: 1,\n\t\t\tonLockMove: 'rollout',\n\t\t\tonStart() {\n\t\t\t\tthis.effectState.hitCount = 0;\n\t\t\t},\n\t\t\tonResidual(target) {\n\t\t\t\t// This is just to ensure the volatile is deleted correctly\n\t\t\t\tconst lastMove: Move | ActiveMove | null = target.m.lastMoveAbsolute;\n\t\t\t\tif (lastMove?.id === 'struggle') {\n\t\t\t\t\tdelete target.volatiles['rollout'];\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\t},\n};\n"],
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,QAA8D;AAAA,EAC1E,SAAS;AAAA,IACR,SAAS;AAAA,IACT,mBAAmB,SAAS,QAAQ;AAEnC,YAAM,cAAgC,QAAQ,eAAe;AAC7D,UAAI,YAAY,QAAQ;AACvB,YAAI,YAAY,CAAC,MAAM,aAAa,YAAY,CAAC,MAAM;AAAW;AAAA,MACnE;AAEA,aAAO,KAAK,iBAAiB,WAAW,OAAO;AAC/C,UAAI,CAAC,OAAO,KAAK,eAAe,SAAS,EAAE,SAAS;AACnD,eAAO,KAAK,eAAe,SAAS,EAAE,UAAU,CAAC;AAAA,MAClD;AACA,aAAO,KAAK,eAAe,SAAS,EAAE,QAAQ,KAAK,O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