From 2c44ee8f5a4093901b86dd88462fca2142f49fe1 Mon Sep 17 00:00:00 2001 From: shayebeadlingkl Date: Fri, 19 Apr 2024 13:46:06 -0400 Subject: [PATCH] implements revelation dance --- src/data/move.ts | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/src/data/move.ts b/src/data/move.ts index bb88066caca..e7432b56b31 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -2150,6 +2150,35 @@ export class RagingBullTypeAttr extends VariableMoveTypeAttr { } } +export class RevelationDanceTypeAttr extends VariableMoveTypeAttr { + apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { + if ([user.species.speciesId, user.fusionSpecies?.speciesId].includes(Species.ORICORIO)) { + const form = user.species.speciesId === Species.ORICORIO ? user.formIndex : user.fusionSpecies.formIndex; + const type = (args[0] as Utils.IntegerHolder); + + switch (form) { + case 0: // Baile Style + type.value = Type.FIRE; + break; + case 1: // Pom-Pom Style + type.value = Type.ELECTRIC; + break; + case 2: // Pau Style + type.value = Type.PSYCHIC; + break; + case 3: // Sensu Style + type.value = Type.GHOST; + break; + default: + break; + } + return true; + } + + return false; + } +} + export class IvyCudgelTypeAttr extends VariableMoveTypeAttr { apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { if ([user.species.speciesId, user.fusionSpecies?.speciesId].includes(Species.OGERPON)) { @@ -5400,8 +5429,8 @@ export function initMoves() { .triageMove() .unimplemented(), new AttackMove(Moves.REVELATION_DANCE, Type.NORMAL, MoveCategory.SPECIAL, 90, 100, 15, -1, 0, 7) - .danceMove() - .partial(), + .attr(RevelationDanceTypeAttr) + .danceMove(), new AttackMove(Moves.CORE_ENFORCER, Type.DRAGON, MoveCategory.SPECIAL, 100, 100, 10, -1, 0, 7) .target(MoveTarget.ALL_NEAR_ENEMIES) .unimplemented(),