From 89a632cfa4befab4ca5345e1fc1284d35cd501f7 Mon Sep 17 00:00:00 2001 From: Nephrite Date: Sat, 20 Jan 2024 00:44:09 +0900 Subject: [PATCH] Moved scripts array to src/data/battle_move_effects.h (#3994) * Created gMoveBattleEffects array * Renamed array to gBattleMoveEffects Applied array in battle_util.c and battle_script_commands.c; doesn't build yet... * Got it building... * Added missing battle_tv effects * Fixed and got it building I'm an idiot sometimes * Added battle_tv scores, encourage Encore flag All works and builds just fine * Merge fixes * Reformatted battle_move_effects Also tweaked struct, added macro --------- Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com> --- data/battle_scripts_1.s | 642 ++----- include/battle.h | 12 + include/battle_ai_util.h | 1 - include/battle_scripts.h | 290 +++ include/constants/battle_move_effects.h | 2 +- src/battle_ai_main.c | 2 +- src/battle_ai_util.c | 85 +- src/battle_script_commands.c | 17 +- src/battle_tv.c | 344 +--- src/battle_util.c | 3 +- src/data/battle_move_effects.h | 2226 +++++++++++++++++++++++ 11 files changed, 2686 insertions(+), 938 deletions(-) create mode 100644 src/data/battle_move_effects.h diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index d28afa4877..c962e74535 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -20,359 +20,7 @@ .section script_data, "aw", %progbits -.align 2 -gBattleScriptsForMoveEffects:: - .4byte BattleScript_EffectHit @ EFFECT_HIT - .4byte BattleScript_EffectSleep @ EFFECT_SLEEP - .4byte BattleScript_EffectAbsorb @ EFFECT_ABSORB - .4byte BattleScript_EffectExplosion @ EFFECT_EXPLOSION - .4byte BattleScript_EffectDreamEater @ EFFECT_DREAM_EATER - .4byte BattleScript_EffectMirrorMove @ EFFECT_MIRROR_MOVE - .4byte BattleScript_EffectAttackUp @ EFFECT_ATTACK_UP - .4byte BattleScript_EffectDefenseUp @ EFFECT_DEFENSE_UP - .4byte BattleScript_EffectSpeedUp @ EFFECT_SPEED_UP - .4byte BattleScript_EffectSpecialAttackUp @ EFFECT_SPECIAL_ATTACK_UP - .4byte BattleScript_EffectSpecialDefenseUp @ EFFECT_SPECIAL_DEFENSE_UP - .4byte BattleScript_EffectAccuracyUp @ EFFECT_ACCURACY_UP - .4byte BattleScript_EffectEvasionUp @ EFFECT_EVASION_UP - .4byte BattleScript_EffectSpecialAttackUp3 @ EFFECT_SPECIAL_ATTACK_UP_3 - .4byte BattleScript_EffectAttackDown @ EFFECT_ATTACK_DOWN - .4byte BattleScript_EffectDefenseDown @ EFFECT_DEFENSE_DOWN - .4byte BattleScript_EffectSpeedDown @ EFFECT_SPEED_DOWN - .4byte BattleScript_EffectSpecialAttackDown @ EFFECT_SPECIAL_ATTACK_DOWN - .4byte BattleScript_EffectSpecialDefenseDown @ EFFECT_SPECIAL_DEFENSE_DOWN - .4byte BattleScript_EffectAccuracyDown @ EFFECT_ACCURACY_DOWN - .4byte BattleScript_EffectEvasionDown @ EFFECT_EVASION_DOWN - .4byte BattleScript_EffectHaze @ EFFECT_HAZE - .4byte BattleScript_EffectBide @ EFFECT_BIDE - .4byte BattleScript_EffectRoar @ EFFECT_ROAR - .4byte BattleScript_EffectHit @ EFFECT_MULTI_HIT - .4byte BattleScript_EffectConversion @ EFFECT_CONVERSION - .4byte BattleScript_EffectRestoreHp @ EFFECT_RESTORE_HP - .4byte BattleScript_EffectToxic @ EFFECT_TOXIC - .4byte BattleScript_EffectLightScreen @ EFFECT_LIGHT_SCREEN - .4byte BattleScript_EffectRest @ EFFECT_REST - .4byte BattleScript_EffectOHKO @ EFFECT_OHKO - .4byte BattleScript_EffectHit @ EFFECT_FUSION_COMBO - .4byte BattleScript_EffectSuperFang @ EFFECT_SUPER_FANG - .4byte BattleScript_EffectFixedDamageArg @ EFFECT_FIXED_DAMAGE_ARG - .4byte BattleScript_EffectHealBlock @ EFFECT_HEAL_BLOCK - .4byte BattleScript_EffectRecoilIfMiss @ EFFECT_RECOIL_IF_MISS - .4byte BattleScript_EffectMist @ EFFECT_MIST - .4byte BattleScript_EffectFocusEnergy @ EFFECT_FOCUS_ENERGY - .4byte BattleScript_EffectConfuse @ EFFECT_CONFUSE - .4byte BattleScript_EffectAttackUp2 @ EFFECT_ATTACK_UP_2 - .4byte BattleScript_EffectDefenseUp2 @ EFFECT_DEFENSE_UP_2 - .4byte BattleScript_EffectSpeedUp2 @ EFFECT_SPEED_UP_2 - .4byte BattleScript_EffectSpecialAttackUp2 @ EFFECT_SPECIAL_ATTACK_UP_2 - .4byte BattleScript_EffectSpecialDefenseUp2 @ EFFECT_SPECIAL_DEFENSE_UP_2 - .4byte BattleScript_EffectAccuracyUp2 @ EFFECT_ACCURACY_UP_2 - .4byte BattleScript_EffectEvasionUp2 @ EFFECT_EVASION_UP_2 - .4byte BattleScript_EffectTransform @ EFFECT_TRANSFORM - .4byte BattleScript_EffectAttackDown2 @ EFFECT_ATTACK_DOWN_2 - .4byte BattleScript_EffectDefenseDown2 @ EFFECT_DEFENSE_DOWN_2 - .4byte BattleScript_EffectSpeedDown2 @ EFFECT_SPEED_DOWN_2 - .4byte BattleScript_EffectSpecialAttackDown2 @ EFFECT_SPECIAL_ATTACK_DOWN_2 - .4byte BattleScript_EffectSpecialDefenseDown2 @ EFFECT_SPECIAL_DEFENSE_DOWN_2 - .4byte BattleScript_EffectAccuracyDown2 @ EFFECT_ACCURACY_DOWN_2 - .4byte BattleScript_EffectEvasionDown2 @ EFFECT_EVASION_DOWN_2 - .4byte BattleScript_EffectReflect @ EFFECT_REFLECT - .4byte BattleScript_EffectPoison @ EFFECT_POISON - .4byte BattleScript_EffectParalyze @ EFFECT_PARALYZE - .4byte BattleScript_EffectTwoTurnsAttack @ EFFECT_TWO_TURNS_ATTACK - .4byte BattleScript_EffectSubstitute @ EFFECT_SUBSTITUTE - .4byte BattleScript_EffectRage @ EFFECT_RAGE - .4byte BattleScript_EffectMimic @ EFFECT_MIMIC - .4byte BattleScript_EffectMetronome @ EFFECT_METRONOME - .4byte BattleScript_EffectLeechSeed @ EFFECT_LEECH_SEED - .4byte BattleScript_EffectDoNothing @ EFFECT_DO_NOTHING - .4byte BattleScript_EffectDisable @ EFFECT_DISABLE - .4byte BattleScript_EffectLevelDamage @ EFFECT_LEVEL_DAMAGE - .4byte BattleScript_EffectPsywave @ EFFECT_PSYWAVE - .4byte BattleScript_EffectCounter @ EFFECT_COUNTER - .4byte BattleScript_EffectEncore @ EFFECT_ENCORE - .4byte BattleScript_EffectPainSplit @ EFFECT_PAIN_SPLIT - .4byte BattleScript_EffectSnore @ EFFECT_SNORE - .4byte BattleScript_EffectConversion2 @ EFFECT_CONVERSION_2 - .4byte BattleScript_EffectLockOn @ EFFECT_LOCK_ON - .4byte BattleScript_EffectSketch @ EFFECT_SKETCH - .4byte BattleScript_EffectSleepTalk @ EFFECT_SLEEP_TALK - .4byte BattleScript_EffectDestinyBond @ EFFECT_DESTINY_BOND - .4byte BattleScript_EffectHit @ EFFECT_FLAIL - .4byte BattleScript_EffectSpite @ EFFECT_SPITE - .4byte BattleScript_EffectHit @ EFFECT_FALSE_SWIPE - .4byte BattleScript_EffectHealBell @ EFFECT_HEAL_BELL - .4byte BattleScript_EffectTripleKick @ EFFECT_TRIPLE_KICK - .4byte BattleScript_EffectMeanLook @ EFFECT_MEAN_LOOK - .4byte BattleScript_EffectNightmare @ EFFECT_NIGHTMARE - .4byte BattleScript_EffectMinimize @ EFFECT_MINIMIZE - .4byte BattleScript_EffectCurse @ EFFECT_CURSE - .4byte BattleScript_EffectHealingWish @ EFFECT_HEALING_WISH - .4byte BattleScript_EffectProtect @ EFFECT_PROTECT - .4byte BattleScript_EffectSpikes @ EFFECT_SPIKES - .4byte BattleScript_EffectForesight @ EFFECT_FORESIGHT - .4byte BattleScript_EffectPerishSong @ EFFECT_PERISH_SONG - .4byte BattleScript_EffectSandstorm @ EFFECT_SANDSTORM - .4byte BattleScript_EffectEndure @ EFFECT_ENDURE - .4byte BattleScript_EffectRollout @ EFFECT_ROLLOUT - .4byte BattleScript_EffectSwagger @ EFFECT_SWAGGER - .4byte BattleScript_EffectFuryCutter @ EFFECT_FURY_CUTTER - .4byte BattleScript_EffectAttract @ EFFECT_ATTRACT - .4byte BattleScript_EffectHit @ EFFECT_RETURN - .4byte BattleScript_EffectPresent @ EFFECT_PRESENT - .4byte BattleScript_EffectHit @ EFFECT_FRUSTRATION - .4byte BattleScript_EffectSafeguard @ EFFECT_SAFEGUARD - .4byte BattleScript_EffectMagnitude @ EFFECT_MAGNITUDE - .4byte BattleScript_EffectBatonPass @ EFFECT_BATON_PASS - .4byte BattleScript_EffectHit @ EFFECT_PURSUIT - .4byte BattleScript_EffectCaptivate @ EFFECT_CAPTIVATE - .4byte BattleScript_EffectMorningSun @ EFFECT_MORNING_SUN - .4byte BattleScript_EffectSynthesis @ EFFECT_SYNTHESIS - .4byte BattleScript_EffectMoonlight @ EFFECT_MOONLIGHT - .4byte BattleScript_EffectHit @ EFFECT_HIDDEN_POWER - .4byte BattleScript_EffectRainDance @ EFFECT_RAIN_DANCE - .4byte BattleScript_EffectSunnyDay @ EFFECT_SUNNY_DAY - .4byte BattleScript_EffectHit @ EFFECT_FELL_STINGER - .4byte BattleScript_EffectBellyDrum @ EFFECT_BELLY_DRUM - .4byte BattleScript_EffectPsychUp @ EFFECT_PSYCH_UP - .4byte BattleScript_EffectMirrorCoat @ EFFECT_MIRROR_COAT - .4byte BattleScript_EffectSkullBash @ EFFECT_SKULL_BASH - .4byte BattleScript_EffectHit @ EFFECT_EARTHQUAKE - .4byte BattleScript_EffectFutureSight @ EFFECT_FUTURE_SIGHT - .4byte BattleScript_EffectGust @ EFFECT_GUST - .4byte BattleScript_EffectSolarBeam @ EFFECT_SOLAR_BEAM - .4byte BattleScript_EffectHit @ EFFECT_THUNDER - .4byte BattleScript_EffectTeleport @ EFFECT_TELEPORT - .4byte BattleScript_EffectBeatUp @ EFFECT_BEAT_UP - .4byte BattleScript_EffectSemiInvulnerable @ EFFECT_SEMI_INVULNERABLE - .4byte BattleScript_EffectDefenseCurl @ EFFECT_DEFENSE_CURL - .4byte BattleScript_EffectSoftboiled @ EFFECT_SOFTBOILED - .4byte BattleScript_EffectFakeOut @ EFFECT_FAKE_OUT - .4byte BattleScript_EffectUproar @ EFFECT_UPROAR - .4byte BattleScript_EffectStockpile @ EFFECT_STOCKPILE - .4byte BattleScript_EffectSpitUp @ EFFECT_SPIT_UP - .4byte BattleScript_EffectSwallow @ EFFECT_SWALLOW - .4byte BattleScript_EffectWorrySeed @ EFFECT_WORRY_SEED - .4byte BattleScript_EffectHail @ EFFECT_HAIL - .4byte BattleScript_EffectTorment @ EFFECT_TORMENT - .4byte BattleScript_EffectFlatter @ EFFECT_FLATTER - .4byte BattleScript_EffectWillOWisp @ EFFECT_WILL_O_WISP - .4byte BattleScript_EffectMemento @ EFFECT_MEMENTO - .4byte BattleScript_EffectHit @ EFFECT_FACADE - .4byte BattleScript_EffectFocusPunch @ EFFECT_FOCUS_PUNCH - .4byte BattleScript_EffectHit @ EFFECT_DOUBLE_POWER_ON_ARG_STATUS - .4byte BattleScript_EffectFollowMe @ EFFECT_FOLLOW_ME - .4byte BattleScript_EffectNaturePower @ EFFECT_NATURE_POWER - .4byte BattleScript_EffectCharge @ EFFECT_CHARGE - .4byte BattleScript_EffectTaunt @ EFFECT_TAUNT - .4byte BattleScript_EffectHelpingHand @ EFFECT_HELPING_HAND - .4byte BattleScript_EffectTrick @ EFFECT_TRICK - .4byte BattleScript_EffectRolePlay @ EFFECT_ROLE_PLAY - .4byte BattleScript_EffectWish @ EFFECT_WISH - .4byte BattleScript_EffectAssist @ EFFECT_ASSIST - .4byte BattleScript_EffectIngrain @ EFFECT_INGRAIN - .4byte BattleScript_EffectMagicCoat @ EFFECT_MAGIC_COAT - .4byte BattleScript_EffectRecycle @ EFFECT_RECYCLE - .4byte BattleScript_EffectHit @ EFFECT_REVENGE - .4byte BattleScript_EffectBrickBreak @ EFFECT_BRICK_BREAK - .4byte BattleScript_EffectYawn @ EFFECT_YAWN - .4byte BattleScript_EffectHit @ EFFECT_KNOCK_OFF - .4byte BattleScript_EffectEndeavor @ EFFECT_ENDEAVOR - .4byte BattleScript_EffectHit @ EFFECT_ERUPTION - .4byte BattleScript_EffectSkillSwap @ EFFECT_SKILL_SWAP - .4byte BattleScript_EffectImprison @ EFFECT_IMPRISON - .4byte BattleScript_EffectRefresh @ EFFECT_REFRESH - .4byte BattleScript_EffectGrudge @ EFFECT_GRUDGE - .4byte BattleScript_EffectSnatch @ EFFECT_SNATCH - .4byte BattleScript_EffectHit @ EFFECT_LOW_KICK - .4byte BattleScript_EffectTeeterDance @ EFFECT_TEETER_DANCE - .4byte BattleScript_EffectHitEscape @ EFFECT_HIT_ESCAPE - .4byte BattleScript_EffectMudSport @ EFFECT_MUD_SPORT - .4byte BattleScript_EffectHit @ EFFECT_WEATHER_BALL - .4byte BattleScript_EffectTickle @ EFFECT_TICKLE - .4byte BattleScript_EffectCosmicPower @ EFFECT_COSMIC_POWER - .4byte BattleScript_EffectSkyUppercut @ EFFECT_SKY_UPPERCUT - .4byte BattleScript_EffectBulkUp @ EFFECT_BULK_UP - .4byte BattleScript_EffectPlaceholder @ EFFECT_PLACEHOLDER - .4byte BattleScript_EffectWaterSport @ EFFECT_WATER_SPORT - .4byte BattleScript_EffectCalmMind @ EFFECT_CALM_MIND - .4byte BattleScript_EffectDragonDance @ EFFECT_DRAGON_DANCE - .4byte BattleScript_EffectCamouflage @ EFFECT_CAMOUFLAGE - .4byte BattleScript_EffectPledge @ EFFECT_PLEDGE - .4byte BattleScript_EffectFling @ EFFECT_FLING - .4byte BattleScript_EffectNaturalGift @ EFFECT_NATURAL_GIFT - .4byte BattleScript_EffectHit @ EFFECT_WRING_OUT - .4byte BattleScript_EffectHit @ EFFECT_ASSURANCE - .4byte BattleScript_EffectHit @ EFFECT_TRUMP_CARD - .4byte BattleScript_EffectHit @ EFFECT_ACROBATICS - .4byte BattleScript_EffectHit @ EFFECT_HEAT_CRASH - .4byte BattleScript_EffectHit @ EFFECT_PUNISHMENT - .4byte BattleScript_EffectHit @ EFFECT_STORED_POWER - .4byte BattleScript_EffectHit @ EFFECT_ELECTRO_BALL - .4byte BattleScript_EffectHit @ EFFECT_GYRO_BALL - .4byte BattleScript_EffectHit @ EFFECT_ECHOED_VOICE - .4byte BattleScript_EffectHit @ EFFECT_PAYBACK - .4byte BattleScript_EffectHit @ EFFECT_ROUND - .4byte BattleScript_EffectHit @ EFFECT_BRINE - .4byte BattleScript_EffectHit @ EFFECT_RETALIATE - .4byte BattleScript_EffectHit @ EFFECT_BULLDOZE - .4byte BattleScript_EffectHit @ EFFECT_FOUL_PLAY - .4byte BattleScript_EffectHit @ EFFECT_PSYSHOCK - .4byte BattleScript_EffectRoost @ EFFECT_ROOST - .4byte BattleScript_EffectGravity @ EFFECT_GRAVITY - .4byte BattleScript_EffectMircleEye @ EFFECT_MIRACLE_EYE - .4byte BattleScript_EffectTailwind @ EFFECT_TAILWIND - .4byte BattleScript_EffectEmbargo @ EFFECT_EMBARGO - .4byte BattleScript_EffectAquaRing @ EFFECT_AQUA_RING - .4byte BattleScript_EffectTrickRoom @ EFFECT_TRICK_ROOM - .4byte BattleScript_EffectWonderRoom @ EFFECT_WONDER_ROOM - .4byte BattleScript_EffectMagicRoom @ EFFECT_MAGIC_ROOM - .4byte BattleScript_EffectMagnetRise @ EFFECT_MAGNET_RISE - .4byte BattleScript_EffectToxicSpikes @ EFFECT_TOXIC_SPIKES - .4byte BattleScript_EffectGastroAcid @ EFFECT_GASTRO_ACID - .4byte BattleScript_EffectStealthRock @ EFFECT_STEALTH_ROCK - .4byte BattleScript_EffectTelekinesis @ EFFECT_TELEKINESIS - .4byte BattleScript_EffectPowerSwap @ EFFECT_POWER_SWAP - .4byte BattleScript_EffectGuardSwap @ EFFECT_GUARD_SWAP - .4byte BattleScript_EffectHeartSwap @ EFFECT_HEART_SWAP - .4byte BattleScript_EffectPowerSplit @ EFFECT_POWER_SPLIT - .4byte BattleScript_EffectGuardSplit @ EFFECT_GUARD_SPLIT - .4byte BattleScript_EffectStickyWeb @ EFFECT_STICKY_WEB - .4byte BattleScript_EffectMetalBurst @ EFFECT_METAL_BURST - .4byte BattleScript_EffectLuckyChant @ EFFECT_LUCKY_CHANT - .4byte BattleScript_EffectSuckerPunch @ EFFECT_SUCKER_PUNCH - .4byte BattleScript_EffectSimpleBeam @ EFFECT_SIMPLE_BEAM - .4byte BattleScript_EffectEntrainment @ EFFECT_ENTRAINMENT - .4byte BattleScript_EffectHealPulse @ EFFECT_HEAL_PULSE - .4byte BattleScript_EffectQuash @ EFFECT_QUASH - .4byte BattleScript_EffectIonDeluge @ EFFECT_ION_DELUGE - .4byte BattleScript_EffectHit @ EFFECT_FREEZE_DRY - .4byte BattleScript_EffectTopsyTurvy @ EFFECT_TOPSY_TURVY - .4byte BattleScript_EffectMistyTerrain @ EFFECT_MISTY_TERRAIN - .4byte BattleScript_EffectGrassyTerrain @ EFFECT_GRASSY_TERRAIN - .4byte BattleScript_EffectElectricTerrain @ EFFECT_ELECTRIC_TERRAIN - .4byte BattleScript_EffectPsychicTerrain @ EFFECT_PSYCHIC_TERRAIN - .4byte BattleScript_EffectAttackAccUp @ EFFECT_ATTACK_ACCURACY_UP - .4byte BattleScript_EffectAttackSpAttackUp @ EFFECT_ATTACK_SPATK_UP - .4byte BattleScript_EffectHit @ EFFECT_TWO_TYPED_MOVE - .4byte BattleScript_EffectMeFirst @ EFFECT_ME_FIRST - .4byte BattleScript_EffectQuiverDance @ EFFECT_QUIVER_DANCE - .4byte BattleScript_EffectCoil @ EFFECT_COIL - .4byte BattleScript_EffectElectrify @ EFFECT_ELECTRIFY - .4byte BattleScript_EffectReflectType @ EFFECT_REFLECT_TYPE - .4byte BattleScript_EffectSoak @ EFFECT_SOAK - .4byte BattleScript_EffectGrowth @ EFFECT_GROWTH - .4byte BattleScript_EffectLastResort @ EFFECT_LAST_RESORT - .4byte BattleScript_EffectShellSmash @ EFFECT_SHELL_SMASH - .4byte BattleScript_EffectShiftGear @ EFFECT_SHIFT_GEAR - .4byte BattleScript_EffectDefenseUp3 @ EFFECT_DEFENSE_UP_3 - .4byte BattleScript_EffectNobleRoar @ EFFECT_NOBLE_ROAR - .4byte BattleScript_EffectVenomDrench @ EFFECT_VENOM_DRENCH - .4byte BattleScript_EffectToxicThread @ EFFECT_TOXIC_THREAD - .4byte BattleScript_EffectHitSwitchTarget @ EFFECT_HIT_SWITCH_TARGET - .4byte BattleScript_EffectFinalGambit @ EFFECT_FINAL_GAMBIT - .4byte BattleScript_EffectHit @ EFFECT_CHANGE_TYPE_ON_ITEM - .4byte BattleScript_EffectAutotomize @ EFFECT_AUTOTOMIZE - .4byte BattleScript_EffectCopycat @ EFFECT_COPYCAT - .4byte BattleScript_EffectDefog @ EFFECT_DEFOG - .4byte BattleScript_EffectHitEnemyHealAlly @ EFFECT_HIT_ENEMY_HEAL_ALLY - .4byte BattleScript_EffectSynchronoise @ EFFECT_SYNCHRONOISE - .4byte BattleScript_EffectPsychoShift @ EFFECT_PSYCHO_SHIFT - .4byte BattleScript_EffectPowerTrick @ EFFECT_POWER_TRICK - .4byte BattleScript_EffectAfterYou @ EFFECT_AFTER_YOU - .4byte BattleScript_EffectBestow @ EFFECT_BESTOW - .4byte BattleScript_EffectRototiller @ EFFECT_ROTOTILLER - .4byte BattleScript_EffectFlowerShield @ EFFECT_FLOWER_SHIELD - .4byte BattleScript_EffectSpeedSwap @ EFFECT_SPEED_SWAP - .4byte BattleScript_EffectHit @ EFFECT_REVELATION_DANCE - .4byte BattleScript_EffectAuroraVeil @ EFFECT_AURORA_VEIL - .4byte BattleScript_EffectThirdType @ EFFECT_THIRD_TYPE - .4byte BattleScript_EffectAcupressure @ EFFECT_ACUPRESSURE - .4byte BattleScript_EffectAromaticMist @ EFFECT_AROMATIC_MIST - .4byte BattleScript_EffectPowder @ EFFECT_POWDER - .4byte BattleScript_EffectHit @ EFFECT_BELCH - .4byte BattleScript_EffectPartingShot @ EFFECT_PARTING_SHOT - .4byte BattleScript_EffectMatBlock @ EFFECT_MAT_BLOCK - .4byte BattleScript_EffectHit @ EFFECT_STOMPING_TANTRUM - .4byte BattleScript_EffectInstruct @ EFFECT_INSTRUCT - .4byte BattleScript_EffectLaserFocus @ EFFECT_LASER_FOCUS - .4byte BattleScript_EffectMagneticFlux @ EFFECT_MAGNETIC_FLUX - .4byte BattleScript_EffectGearUp @ EFFECT_GEAR_UP - .4byte BattleScript_EffectStrengthSap @ EFFECT_STRENGTH_SAP - .4byte BattleScript_EffectMindBlown @ EFFECT_MIND_BLOWN - .4byte BattleScript_EffectPurify @ EFFECT_PURIFY - .4byte BattleScript_FailIfNotArgType @ EFFECT_FAIL_IF_NOT_ARG_TYPE - .4byte BattleScript_EffectShoreUp @ EFFECT_SHORE_UP - .4byte BattleScript_EffectGeomancy @ EFFECT_GEOMANCY - .4byte BattleScript_EffectFairyLock @ EFFECT_FAIRY_LOCK - .4byte BattleScript_EffectAllySwitch @ EFFECT_ALLY_SWITCH - .4byte BattleScript_EffectRelicSong @ EFFECT_RELIC_SONG - .4byte BattleScript_EffectHit @ EFFECT_BODY_PRESS - .4byte BattleScript_EffectEerieSpell @ EFFECT_EERIE_SPELL - .4byte BattleScript_EffectJungleHealing @ EFFECT_JUNGLE_HEALING - .4byte BattleScript_EffectCoaching @ EFFECT_COACHING - .4byte BattleScript_EffectHit @ EFFECT_LASH_OUT - .4byte BattleScript_EffectHit @ EFFECT_GRASSY_GLIDE - .4byte BattleScript_EffectHit @ EFFECT_DYNAMAX_DOUBLE_DMG - .4byte BattleScript_EffectDecorate @ EFFECT_DECORATE - .4byte BattleScript_EffectHit @ EFFECT_SNIPE_SHOT - .4byte BattleScript_EffectRecoilHP25 @ EFFECT_RECOIL_HP_25 - .4byte BattleScript_EffectStuffCheeks @ EFFECT_STUFF_CHEEKS - .4byte BattleScript_EffectHit @ EFFECT_GRAV_APPLE - .4byte BattleScript_EffectGlitzyGlow @ EFFECT_GLITZY_GLOW - .4byte BattleScript_EffectBaddyBad @ EFFECT_BADDY_BAD - .4byte BattleScript_EffectSappySeed @ EFFECT_SAPPY_SEED - .4byte BattleScript_EffectFreezyFrost @ EFFECT_FREEZY_FROST - .4byte BattleScript_EffectSparklySwirl @ EFFECT_SPARKLY_SWIRL - .4byte BattleScript_EffectPlasmaFists @ EFFECT_PLASMA_FISTS - .4byte BattleScript_EffectHyperspaceFury @ EFFECT_HYPERSPACE_FURY - .4byte BattleScript_EffectAuraWheel @ EFFECT_AURA_WHEEL - .4byte BattleScript_EffectPhotonGeyser @ EFFECT_PHOTON_GEYSER - .4byte BattleScript_EffectShellSideArm @ EFFECT_SHELL_SIDE_ARM - .4byte BattleScript_EffectHit @ EFFECT_TERRAIN_PULSE - .4byte BattleScript_EffectNoRetreat @ EFFECT_NO_RETREAT - .4byte BattleScript_EffectTarShot @ EFFECT_TAR_SHOT - .4byte BattleScript_EffectPoltergeist @ EFFECT_POLTERGEIST - .4byte BattleScript_EffectOctolock @ EFFECT_OCTOLOCK - .4byte BattleScript_EffectClangorousSoul @ EFFECT_CLANGOROUS_SOUL - .4byte BattleScript_EffectHit @ EFFECT_BOLT_BEAK - .4byte BattleScript_EffectSkyDrop @ EFFECT_SKY_DROP - .4byte BattleScript_EffectHit @ EFFECT_EXPANDING_FORCE - .4byte BattleScript_EffectMeteorBeam @ EFFECT_METEOR_BEAM - .4byte BattleScript_EffectHit @ EFFECT_RISING_VOLTAGE - .4byte BattleScript_EffectHit @ EFFECT_BEAK_BLAST - .4byte BattleScript_EffectCourtChange @ EFFECT_COURT_CHANGE - .4byte BattleScript_EffectSteelBeam @ EFFECT_STEEL_BEAM - .4byte BattleScript_EffectExtremeEvoboost @ EFFECT_EXTREME_EVOBOOST - .4byte BattleScript_EffectHitSetRemoveTerrain @ EFFECT_HIT_SET_REMOVE_TERRAIN - .4byte BattleScript_EffectDarkVoid @ EFFECT_DARK_VOID - .4byte BattleScript_EffectVictoryDance @ EFFECT_VICTORY_DANCE - .4byte BattleScript_EffectTeatime @ EFFECT_TEATIME - .4byte BattleScript_EffectAttackUpUserAlly @ EFFECT_ATTACK_UP_USER_ALLY - .4byte BattleScript_EffectShellTrap @ EFFECT_SHELL_TRAP - .4byte BattleScript_EffectHit @ EFFECT_PSYBLADE - .4byte BattleScript_EffectHit @ EFFECT_HYDRO_STEAM - .4byte BattleScript_EffectRevivalBlessing @ EFFECT_REVIVAL_BLESSING - .4byte BattleScript_EffectSnow @ EFFECT_SNOWSCAPE - .4byte BattleScript_EffectTakeHeart @ EFFECT_TAKE_HEART - .4byte BattleScript_EffectHit @ EFFECT_COLLISION_COURSE - .4byte BattleScript_EffectCorrosiveGas @ EFFECT_CORROSIVE_GAS - .4byte BattleScript_EffectHit @ EFFECT_POPULATION_BOMB - .4byte BattleScript_EffectSaltCure @ EFFECT_SALT_CURE - .4byte BattleScript_EffectChillyReception @ EFFECT_CHILLY_RECEPTION - .4byte BattleScript_EffectMaxMove @ EFFECT_MAX_MOVE - .4byte BattleScript_EffectGlaiveRush @ EFFECT_GLAIVE_RUSH - .4byte BattleScript_EffectBrickBreak @ EFFECT_RAGING_BULL - .4byte BattleScript_EffectHit @ EFFECT_RAGE_FIST - .4byte BattleScript_EffectDoodle @ EFFECT_DOODLE - .4byte BattleScript_EffectFilletAway @ EFFECT_FILLET_AWAY - .4byte BattleScript_EffectHit @ EFFECT_IVY_CUDGEL - .4byte BattleScript_EffectHit @ EFFECT_FICKLE_BEAM - .4byte BattleScript_EffectHit @ EFFECT_BLIZZARD - .4byte BattleScript_EffectHit @ EFFECT_RAIN_ALWAYS_HIT - .4byte BattleScript_EffectShedTail @ EFFECT_SHED_TAIL - -BattleScript_EffectShedTail: +BattleScript_EffectShedTail:: attackcanceler attackstring ppreduce @@ -397,7 +45,7 @@ BattleScript_EffectPsychicNoise:: waitmessage B_WAIT_TIME_LONG return -BattleScript_EffectFilletAway: +BattleScript_EffectFilletAway:: attackcanceler attackstring ppreduce @@ -431,7 +79,7 @@ BattleScript_FilletAwayEnd:: datahpupdate BS_ATTACKER goto BattleScript_MoveEnd -BattleScript_EffectDoodle: +BattleScript_EffectDoodle:: attackcanceler attackstring ppreduce @@ -613,7 +261,7 @@ BattleScript_EffectHit_Pledge:: tryfaintmon BS_TARGET return -BattleScript_EffectSaltCure: +BattleScript_EffectSaltCure:: call BattleScript_EffectHit_Ret tryfaintmon BS_TARGET jumpiffainted BS_TARGET, TRUE, BattleScript_EffectSaltCure_End @@ -638,7 +286,7 @@ BattleScript_HurtTarget_NoString: tryfaintmon BS_TARGET return -BattleScript_EffectCorrosiveGas: +BattleScript_EffectCorrosiveGas:: attackcanceler accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE attackstring @@ -705,7 +353,7 @@ BattleScript_SpikesActivates:: waitmessage B_WAIT_TIME_LONG return -BattleScript_EffectAttackUpUserAlly: +BattleScript_EffectAttackUpUserAlly:: jumpifnoally BS_ATTACKER, BattleScript_EffectAttackUp attackcanceler attackstring @@ -969,7 +617,7 @@ BattleScript_FirstChargingTurnMeteorBeam:: setadditionaleffects @ only onChargeTurnOnly effects will work here return -BattleScript_EffectSkyDrop: +BattleScript_EffectSkyDrop:: jumpifstatus2 BS_ATTACKER, STATUS2_MULTIPLETURNS, BattleScript_SkyDropTurn2 attackcanceler ppreduce @@ -1023,7 +671,7 @@ BattleScript_SkyDropFlyingAlreadyConfused: setbyte BS_ATTACKER, BS_TARGET goto BattleScript_ThrashConfuses -BattleScript_EffectFling: +BattleScript_EffectFling:: attackcanceler jumpifcantfling BS_ATTACKER, BattleScript_FailedFromAtkString setlastuseditem BS_ATTACKER @@ -1120,20 +768,20 @@ BattleScript_FlingMissed: ppreduce goto BattleScript_MoveMissedPause -BattleScript_EffectShellSideArm: +BattleScript_EffectShellSideArm:: shellsidearmcheck goto BattleScript_EffectHit -BattleScript_EffectPhotonGeyser: +BattleScript_EffectPhotonGeyser:: setphotongeysercategory goto BattleScript_EffectHit -BattleScript_EffectAuraWheel: @ Aura Wheel can only be used by Morpeko +BattleScript_EffectAuraWheel:: @ Aura Wheel can only be used by Morpeko jumpifspecies BS_ATTACKER, SPECIES_MORPEKO_FULL_BELLY, BattleScript_EffectHit jumpifspecies BS_ATTACKER, SPECIES_MORPEKO_HANGRY, BattleScript_EffectHit goto BattleScript_PokemonCantUseTheMove -BattleScript_EffectClangorousSoul: +BattleScript_EffectClangorousSoul:: attackcanceler attackstring ppreduce @@ -1146,7 +794,7 @@ BattleScript_EffectClangorousSoul: call BattleScript_AllStatsUp goto BattleScript_MoveEnd -BattleScript_EffectOctolock: +BattleScript_EffectOctolock:: attackcanceler jumpifsubstituteblocks BattleScript_FailedFromAtkString accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE @@ -1175,7 +823,7 @@ BattleScript_OctolockTurnDmgPrintMsg: BattleScript_OctlockTurnDmgEnd: end2 -BattleScript_EffectPoltergeist: +BattleScript_EffectPoltergeist:: attackcanceler attackstring ppreduce @@ -1184,7 +832,7 @@ BattleScript_EffectPoltergeist: waitmessage B_WAIT_TIME_LONG goto BattleScript_HitFromCritCalc -BattleScript_EffectTarShot: +BattleScript_EffectTarShot:: attackcanceler jumpifsubstituteblocks BattleScript_FailedFromAtkString accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE @@ -1205,7 +853,7 @@ BattleScript_TryTarShot: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectNoRetreat: +BattleScript_EffectNoRetreat:: attackcanceler accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE attackstring @@ -1225,7 +873,7 @@ BattleScript_BothCanNoLongerEscape:: waitmessage B_WAIT_TIME_LONG return -BattleScript_EffectHyperspaceFury: +BattleScript_EffectHyperspaceFury:: jumpifspecies BS_ATTACKER, SPECIES_HOOPA_UNBOUND, BattleScript_EffectHyperspaceFuryUnbound jumpifspecies BS_ATTACKER, SPECIES_HOOPA_CONFINED, BattleScript_ButHoopaCantUseIt goto BattleScript_PokemonCantUseTheMove @@ -1249,7 +897,7 @@ BattleScript_HyperspaceFuryRemoveProtect:: waitmessage B_WAIT_TIME_LONG return -BattleScript_EffectPlasmaFists: +BattleScript_EffectPlasmaFists:: call BattleScript_EffectHit_Ret tryfaintmon BS_TARGET orword gFieldStatuses, STATUS_FIELD_ION_DELUGE @@ -1257,7 +905,7 @@ BattleScript_EffectPlasmaFists: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectSparklySwirl: +BattleScript_EffectSparklySwirl:: call BattleScript_EffectHit_Ret tryfaintmon BS_TARGET healpartystatus @@ -1266,7 +914,7 @@ BattleScript_EffectSparklySwirl: waitstate goto BattleScript_MoveEnd -BattleScript_EffectFreezyFrost: +BattleScript_EffectFreezyFrost:: call BattleScript_EffectHit_Ret tryfaintmon BS_TARGET normalisebuffs @@ -1274,7 +922,7 @@ BattleScript_EffectFreezyFrost: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectSappySeed: +BattleScript_EffectSappySeed:: jumpifstatus3 BS_TARGET, STATUS3_LEECHSEED, BattleScript_EffectHit call BattleScript_EffectHit_Ret tryfaintmon BS_TARGET @@ -1284,7 +932,7 @@ BattleScript_EffectSappySeed: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectBaddyBad: +BattleScript_EffectBaddyBad:: jumpifsideaffecting BS_ATTACKER, SIDE_STATUS_REFLECT, BattleScript_EffectHit call BattleScript_EffectHit_Ret tryfaintmon BS_TARGET @@ -1293,7 +941,7 @@ BattleScript_EffectBaddyBad: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectGlitzyGlow: +BattleScript_EffectGlitzyGlow:: jumpifsideaffecting BS_ATTACKER, SIDE_STATUS_LIGHTSCREEN, BattleScript_EffectHit call BattleScript_EffectHit_Ret tryfaintmon BS_TARGET @@ -1326,7 +974,7 @@ BattleScript_StuffCheeksEatBerry: BattleScript_StuffCheeksEnd: goto BattleScript_MoveEnd -BattleScript_EffectDecorate: +BattleScript_EffectDecorate:: attackcanceler accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE attackstring @@ -1352,7 +1000,7 @@ BattleScript_DecorateBoostSpAtk: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectCoaching: +BattleScript_EffectCoaching:: attackcanceler attackstring ppreduce @@ -1382,7 +1030,7 @@ BattleScript_CoachingBoostDef: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectJungleHealing: +BattleScript_EffectJungleHealing:: attackcanceler attackstring ppreduce @@ -1415,14 +1063,14 @@ BattleScript_JungleHealingTryRestoreAlly: setallytonexttarget JungleHealing_RestoreTargetHealth goto BattleScript_MoveEnd -BattleScript_EffectRelicSong: +BattleScript_EffectRelicSong:: call BattleScript_EffectHit_Ret tryfaintmon BS_TARGET moveendall tryrelicsong end -BattleScript_EffectAllySwitch: +BattleScript_EffectAllySwitch:: attackcanceler accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE attackstring @@ -1437,7 +1085,7 @@ BattleScript_EffectAllySwitch: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectFairyLock: +BattleScript_EffectFairyLock:: attackcanceler accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE attackstring @@ -1449,7 +1097,7 @@ BattleScript_EffectFairyLock: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_FailIfNotArgType: +BattleScript_FailIfNotArgType:: attackcanceler attackstring ppreduce @@ -1477,7 +1125,7 @@ BattleScript_DefDown:: BattleScript_DefDown_Ret: return -BattleScript_EffectPurify: +BattleScript_EffectPurify:: attackcanceler attackstring ppreduce @@ -1494,7 +1142,7 @@ BattleScript_PurifyWorks: tryhealhalfhealth BattleScript_AlreadyAtFullHp, BS_ATTACKER goto BattleScript_RestoreHp -BattleScript_EffectStrengthSap: +BattleScript_EffectStrengthSap:: setstatchanger STAT_ATK, 1, TRUE attackcanceler jumpifsubstituteblocks BattleScript_FailedFromAtkString @@ -1583,7 +1231,7 @@ BattleScript_MoveEffectCoreEnforcer:: BattleScript_CoreEnforcerRet: return -BattleScript_EffectLaserFocus: +BattleScript_EffectLaserFocus:: attackcanceler attackstring ppreduce @@ -1658,7 +1306,7 @@ BattleScript_EffectPartingShotSwitch: BattleScript_PartingShotEnd: end -BattleScript_EffectPowder: +BattleScript_EffectPowder:: attackcanceler accuracycheck BattleScript_PrintMoveMissed, NO_ACC_CALC_CHECK_LOCK_ON attackstring @@ -1671,7 +1319,7 @@ BattleScript_EffectPowder: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectAromaticMist: +BattleScript_EffectAromaticMist:: attackcanceler attackstring ppreduce @@ -1774,7 +1422,7 @@ BattleScript_EffectGearUpEnd: jumpifbyte CMP_NOT_EQUAL, gBattleCommunication, 0, BattleScript_MoveEnd goto BattleScript_ButItFailed -BattleScript_EffectAcupressure: +BattleScript_EffectAcupressure:: attackcanceler jumpifbyteequal gBattlerTarget, gBattlerAttacker, BattleScript_EffectAcupressureTry jumpifstatus2 BS_TARGET, STATUS2_SUBSTITUTE, BattleScript_PrintMoveMissed @@ -1796,7 +1444,7 @@ BattleScript_MoveEffectFeint:: waitmessage B_WAIT_TIME_LONG return -BattleScript_EffectThirdType: +BattleScript_EffectThirdType:: attackcanceler accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE attackstring @@ -1808,7 +1456,7 @@ BattleScript_EffectThirdType: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectFlowerShield: +BattleScript_EffectFlowerShield:: attackcanceler attackstring ppreduce @@ -1843,7 +1491,7 @@ BattleScript_FlowerShieldMoveTargetEnd: jumpifnexttargetvalid BattleScript_FlowerShieldLoop end -BattleScript_EffectRototiller: +BattleScript_EffectRototiller:: attackcanceler attackstring ppreduce @@ -1891,7 +1539,7 @@ BattleScript_RototillerNoEffect: waitmessage B_WAIT_TIME_LONG goto BattleScript_RototillerMoveTargetEnd -BattleScript_EffectBestow: +BattleScript_EffectBestow:: attackcanceler accuracycheck BattleScript_PrintMoveMissed, NO_ACC_CALC_CHECK_LOCK_ON attackstring @@ -1905,7 +1553,7 @@ BattleScript_EffectBestow: trysymbiosis goto BattleScript_MoveEnd -BattleScript_EffectAfterYou: +BattleScript_EffectAfterYou:: attackcanceler accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE attackstring @@ -1930,7 +1578,7 @@ BattleScript_MoveEffectFlameBurst:: restoretarget goto BattleScript_MoveEnd -BattleScript_EffectPowerTrick: +BattleScript_EffectPowerTrick:: attackcanceler accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE attackstring @@ -1942,7 +1590,7 @@ BattleScript_EffectPowerTrick: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectPsychoShift: +BattleScript_EffectPsychoShift:: attackcanceler accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE attackstring @@ -1966,7 +1614,7 @@ BattleScript_EffectPsychoShiftCanWork: updatestatusicon BS_ATTACKER goto BattleScript_MoveEnd -BattleScript_EffectSynchronoise: +BattleScript_EffectSynchronoise:: attackcanceler attackstring ppreduce @@ -2011,11 +1659,11 @@ BattleScript_MoveEffectSmackDown:: waitmessage B_WAIT_TIME_LONG return -BattleScript_EffectHitEnemyHealAlly: +BattleScript_EffectHitEnemyHealAlly:: jumpiftargetally BattleScript_EffectHealPulse goto BattleScript_EffectHit -BattleScript_EffectDefog: +BattleScript_EffectDefog:: setstatchanger STAT_EVASION, 1, TRUE attackcanceler jumpifsubstituteblocks BattleScript_DefogIfCanClearHazards @@ -2049,7 +1697,7 @@ BattleScript_DefogTryHazardsWithAnim: waitanimation goto BattleScript_DefogTryHazards -BattleScript_EffectCopycat: +BattleScript_EffectCopycat:: attackcanceler attackstring pause 5 @@ -2061,7 +1709,7 @@ BattleScript_CopycatFail: ppreduce goto BattleScript_ButItFailed -BattleScript_EffectInstruct: +BattleScript_EffectInstruct:: attackcanceler attackstring ppreduce @@ -2075,7 +1723,7 @@ BattleScript_EffectInstruct: setbyte sB_ANIM_TARGETS_HIT, 0 jumptocalledmove TRUE -BattleScript_EffectAutotomize: +BattleScript_EffectAutotomize:: setstatchanger STAT_SPEED, 2, FALSE attackcanceler attackstring @@ -2100,7 +1748,7 @@ BattleScript_AutotomizeWeightLoss:: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectFinalGambit: +BattleScript_EffectFinalGambit:: attackcanceler accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE attackstring @@ -2128,7 +1776,7 @@ BattleScript_EffectFinalGambit: jumpifmovehadnoeffect BattleScript_MoveEnd goto BattleScript_MoveEnd -BattleScript_EffectHitSwitchTarget: +BattleScript_EffectHitSwitchTarget:: call BattleScript_EffectHit_Ret tryfaintmon BS_TARGET jumpiffainted BS_TARGET, TRUE, BattleScript_MoveEnd @@ -2147,7 +1795,7 @@ BattleScript_HitSwitchTargetForceRandomSwitchFailed: setbyte sSWITCH_CASE, B_SWITCH_NORMAL goto BattleScript_MoveEnd -BattleScript_EffectToxicThread: +BattleScript_EffectToxicThread:: setstatchanger STAT_SPEED, 2, TRUE attackcanceler jumpifsubstituteblocks BattleScript_FailedFromAtkString @@ -2174,7 +1822,7 @@ BattleScript_ToxicThreadTryPsn:: seteffectprimary MOVE_EFFECT_POISON goto BattleScript_MoveEnd -BattleScript_EffectVenomDrench: +BattleScript_EffectVenomDrench:: attackcanceler attackstring ppreduce @@ -2213,7 +1861,7 @@ BattleScript_VenomDrenchTryLowerSpeed:: BattleScript_VenomDrenchEnd:: goto BattleScript_MoveEnd -BattleScript_EffectNobleRoar: +BattleScript_EffectNobleRoar:: attackcanceler attackstring ppreduce @@ -2241,7 +1889,7 @@ BattleScript_NobleRoarTryLowerSpAtk:: BattleScript_NobleRoarEnd:: goto BattleScript_MoveEnd -BattleScript_EffectShellSmash: +BattleScript_EffectShellSmash:: attackcanceler attackstring ppreduce @@ -2289,7 +1937,7 @@ BattleScript_ShellSmashTrySpeed: BattleScript_ShellSmashEnd: goto BattleScript_MoveEnd -BattleScript_EffectLastResort: +BattleScript_EffectLastResort:: attackcanceler attackstring ppreduce @@ -2297,7 +1945,7 @@ BattleScript_EffectLastResort: accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE goto BattleScript_HitFromCritCalc -BattleScript_EffectGrowth: +BattleScript_EffectGrowth:: attackcanceler attackstring ppreduce @@ -2332,7 +1980,7 @@ BattleScript_GrowthSpAtk: BattleScript_GrowthEnd: goto BattleScript_MoveEnd -BattleScript_EffectSoak: +BattleScript_EffectSoak:: attackcanceler accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE attackstring @@ -2347,7 +1995,7 @@ BattleScript_EffectSoak: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectReflectType: +BattleScript_EffectReflectType:: attackcanceler accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE attackstring @@ -2359,7 +2007,7 @@ BattleScript_EffectReflectType: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectElectrify: +BattleScript_EffectElectrify:: attackcanceler accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE attackstring @@ -2371,7 +2019,7 @@ BattleScript_EffectElectrify: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectShiftGear: +BattleScript_EffectShiftGear:: attackcanceler attackstring ppreduce @@ -2402,7 +2050,7 @@ BattleScript_ShiftGearTryAtk: BattleScript_ShiftGearEnd: goto BattleScript_MoveEnd -BattleScript_EffectCoil: +BattleScript_EffectCoil:: attackcanceler attackstring ppreduce @@ -2434,7 +2082,7 @@ BattleScript_CoilTryAcc: BattleScript_CoilEnd: goto BattleScript_MoveEnd -BattleScript_EffectQuiverDance: +BattleScript_EffectQuiverDance:: attackcanceler attackstring ppreduce @@ -2466,7 +2114,7 @@ BattleScript_QuiverDanceTrySpeed:: BattleScript_QuiverDanceEnd:: goto BattleScript_MoveEnd -BattleScript_EffectVictoryDance: +BattleScript_EffectVictoryDance:: attackcanceler attackstring ppreduce @@ -2498,7 +2146,7 @@ BattleScript_VictoryDanceTrySpeed:: BattleScript_VictoryDanceEnd:: goto BattleScript_MoveEnd -BattleScript_EffectMeFirst: +BattleScript_EffectMeFirst:: attackcanceler attackstring trymefirst BattleScript_FailedFromPpReduce @@ -2508,7 +2156,7 @@ BattleScript_EffectMeFirst: setbyte sB_ANIM_TARGETS_HIT, 0 jumptocalledmove TRUE -BattleScript_EffectAttackSpAttackUp: +BattleScript_EffectAttackSpAttackUp:: attackcanceler attackstring ppreduce @@ -2533,7 +2181,7 @@ BattleScript_AttackSpAttackUpTrySpAtk:: BattleScript_AttackSpAttackUpEnd: goto BattleScript_MoveEnd -BattleScript_EffectAttackAccUp: +BattleScript_EffectAttackAccUp:: attackcanceler attackstring ppreduce @@ -2558,10 +2206,10 @@ BattleScript_AttackAccUpTrySpDef:: BattleScript_AttackAccUpEnd: goto BattleScript_MoveEnd -BattleScript_EffectMistyTerrain: -BattleScript_EffectGrassyTerrain: -BattleScript_EffectElectricTerrain: -BattleScript_EffectPsychicTerrain: +BattleScript_EffectMistyTerrain:: +BattleScript_EffectGrassyTerrain:: +BattleScript_EffectElectricTerrain:: +BattleScript_EffectPsychicTerrain:: attackcanceler attackstring ppreduce @@ -2574,7 +2222,7 @@ BattleScript_EffectPsychicTerrain: call BattleScript_ActivateTerrainEffects goto BattleScript_MoveEnd -BattleScript_EffectTopsyTurvy: +BattleScript_EffectTopsyTurvy:: attackcanceler attackstring ppreduce @@ -2594,7 +2242,7 @@ BattleScript_EffectTopsyTurvyWorks: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectIonDeluge: +BattleScript_EffectIonDeluge:: attackcanceler accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE attackstring @@ -2606,7 +2254,7 @@ BattleScript_EffectIonDeluge: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectQuash: +BattleScript_EffectQuash:: attackcanceler accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE attackstring @@ -2618,7 +2266,7 @@ BattleScript_EffectQuash: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectHealPulse: +BattleScript_EffectHealPulse:: attackcanceler attackstring ppreduce @@ -2635,7 +2283,7 @@ BattleScript_EffectHealPulse: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectEntrainment: +BattleScript_EffectEntrainment:: attackcanceler accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE attackstring @@ -2648,7 +2296,7 @@ BattleScript_EffectEntrainment: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectSimpleBeam: +BattleScript_EffectSimpleBeam:: attackcanceler accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE attackstring @@ -2664,13 +2312,13 @@ BattleScript_EffectSimpleBeam: tryendneutralizinggas BS_TARGET goto BattleScript_MoveEnd -BattleScript_EffectSuckerPunch: +BattleScript_EffectSuckerPunch:: attackcanceler suckerpunchcheck BattleScript_FailedFromAtkString accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE goto BattleScript_HitFromAtkString -BattleScript_EffectLuckyChant: +BattleScript_EffectLuckyChant:: attackcanceler attackstring ppreduce @@ -2681,7 +2329,7 @@ BattleScript_EffectLuckyChant: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectMetalBurst: +BattleScript_EffectMetalBurst:: attackcanceler metalburstdamagecalculator BattleScript_FailedFromAtkString accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE @@ -2692,7 +2340,7 @@ BattleScript_EffectMetalBurst: adjustdamage goto BattleScript_HitFromAtkAnimation -BattleScript_EffectHealingWish: +BattleScript_EffectHealingWish:: attackcanceler jumpifcantswitch SWITCH_IGNORE_ESCAPE_PREVENTION | BS_ATTACKER, BattleScript_FailedFromAtkString attackstring @@ -2746,7 +2394,7 @@ BattleScript_EffectHealingWishRestore: waitmessage B_WAIT_TIME_LONG return -BattleScript_EffectWorrySeed: +BattleScript_EffectWorrySeed:: attackcanceler accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE attackstring @@ -2761,7 +2409,7 @@ BattleScript_EffectWorrySeed: flushtextbox goto BattleScript_MoveEnd -BattleScript_EffectPowerSplit: +BattleScript_EffectPowerSplit:: attackcanceler attackstring ppreduce @@ -2774,7 +2422,7 @@ BattleScript_EffectPowerSplit: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectGuardSplit: +BattleScript_EffectGuardSplit:: attackcanceler attackstring ppreduce @@ -2787,7 +2435,7 @@ BattleScript_EffectGuardSplit: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectHeartSwap: +BattleScript_EffectHeartSwap:: attackcanceler attackstring ppreduce @@ -2805,7 +2453,7 @@ BattleScript_EffectHeartSwap: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectPowerSwap: +BattleScript_EffectPowerSwap:: attackcanceler attackstring ppreduce @@ -2818,7 +2466,7 @@ BattleScript_EffectPowerSwap: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectGuardSwap: +BattleScript_EffectGuardSwap:: attackcanceler attackstring ppreduce @@ -2831,7 +2479,7 @@ BattleScript_EffectGuardSwap: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectSpeedSwap: +BattleScript_EffectSpeedSwap:: attackcanceler attackstring ppreduce @@ -2843,7 +2491,7 @@ BattleScript_EffectSpeedSwap: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectTelekinesis: +BattleScript_EffectTelekinesis:: attackcanceler accuracycheck BattleScript_PrintMoveMissed, NO_ACC_CALC_CHECK_LOCK_ON attackstring @@ -2855,7 +2503,7 @@ BattleScript_EffectTelekinesis: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectStealthRock: +BattleScript_EffectStealthRock:: attackcanceler attackstring ppreduce @@ -2866,7 +2514,7 @@ BattleScript_EffectStealthRock: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectStickyWeb: +BattleScript_EffectStickyWeb:: attackcanceler attackstring ppreduce @@ -2877,7 +2525,7 @@ BattleScript_EffectStickyWeb: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectGastroAcid: +BattleScript_EffectGastroAcid:: attackcanceler accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE attackstring @@ -2893,7 +2541,7 @@ BattleScript_EffectGastroAcid: tryendneutralizinggas BS_TARGET goto BattleScript_MoveEnd -BattleScript_EffectToxicSpikes: +BattleScript_EffectToxicSpikes:: attackcanceler attackstring ppreduce @@ -2904,7 +2552,7 @@ BattleScript_EffectToxicSpikes: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectMagnetRise: +BattleScript_EffectMagnetRise:: attackcanceler attackstring ppreduce @@ -2915,7 +2563,7 @@ BattleScript_EffectMagnetRise: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectTrickRoom: +BattleScript_EffectTrickRoom:: attackcanceler attackstring ppreduce @@ -2936,8 +2584,8 @@ BattleScript_RoomServiceLoop_NextBattler: restoretarget goto BattleScript_MoveEnd -BattleScript_EffectWonderRoom: -BattleScript_EffectMagicRoom: +BattleScript_EffectWonderRoom:: +BattleScript_EffectMagicRoom:: attackcanceler attackstring ppreduce @@ -2948,7 +2596,7 @@ BattleScript_EffectMagicRoom: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectAquaRing: +BattleScript_EffectAquaRing:: attackcanceler attackstring ppreduce @@ -2959,7 +2607,7 @@ BattleScript_EffectAquaRing: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectEmbargo: +BattleScript_EffectEmbargo:: attackcanceler accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE attackstring @@ -2971,7 +2619,7 @@ BattleScript_EffectEmbargo: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectTailwind: +BattleScript_EffectTailwind:: attackcanceler attackstring ppreduce @@ -3009,7 +2657,7 @@ BattleScript_TryTailwindAbilitiesLoop_WindPower: waitmessage B_WAIT_TIME_LONG goto BattleScript_TryTailwindAbilitiesLoop_Increment -BattleScript_EffectMircleEye: +BattleScript_EffectMircleEye:: attackcanceler accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE attackstring @@ -3017,7 +2665,7 @@ BattleScript_EffectMircleEye: setmiracleeye BattleScript_ButItFailed goto BattleScript_IdentifiedFoe -BattleScript_EffectGravity: +BattleScript_EffectGravity:: attackcanceler attackstring ppreduce @@ -3041,7 +2689,7 @@ BattleScript_GravityLoopEnd: jumpifnexttargetvalid BattleScript_GravityLoop end -BattleScript_EffectRoost: +BattleScript_EffectRoost:: attackcanceler attackstring ppreduce @@ -3049,7 +2697,7 @@ BattleScript_EffectRoost: setroost goto BattleScript_PresentHealTarget -BattleScript_EffectCaptivate: +BattleScript_EffectCaptivate:: setstatchanger STAT_SPATK, 2, TRUE attackcanceler jumpifsubstituteblocks BattleScript_FailedFromAtkString @@ -3059,7 +2707,7 @@ BattleScript_CaptivateCheckAcc: accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE goto BattleScript_StatDownFromAttackString -BattleScript_EffectHealBlock: +BattleScript_EffectHealBlock:: attackcanceler accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE attackstring @@ -3072,7 +2720,7 @@ BattleScript_EffectHealBlock: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectHitEscape: +BattleScript_EffectHitEscape:: call BattleScript_EffectHit_Ret jumpifmovehadnoeffect BattleScript_MoveEnd jumpifability BS_TARGET, ABILITY_GUARD_DOG, BattleScript_MoveEnd @@ -3086,7 +2734,7 @@ BattleScript_EffectHitEscape: BattleScript_HitEscapeEnd: end -BattleScript_EffectPlaceholder: +BattleScript_EffectPlaceholder:: attackcanceler attackstring ppreduce @@ -3139,7 +2787,7 @@ BattleScript_Hit_RetFromAtkAnimation:: setadditionaleffects return -BattleScript_EffectNaturalGift: +BattleScript_EffectNaturalGift:: attackcanceler attackstring ppreduce @@ -3477,15 +3125,15 @@ BattleScript_EffectSpecialAttackUp:: setstatchanger STAT_SPATK, 1, FALSE goto BattleScript_EffectStatUp -BattleScript_EffectSpeedUp: +BattleScript_EffectSpeedUp:: setstatchanger STAT_SPEED, 1, FALSE goto BattleScript_EffectStatUp -BattleScript_EffectSpecialDefenseUp: +BattleScript_EffectSpecialDefenseUp:: setstatchanger STAT_SPDEF, 1, FALSE goto BattleScript_EffectStatUp -BattleScript_EffectAccuracyUp: +BattleScript_EffectAccuracyUp:: setstatchanger STAT_ACC, 1, FALSE goto BattleScript_EffectStatUp @@ -3519,31 +3167,31 @@ BattleScript_StatUpMsg:: waitmessage B_WAIT_TIME_LONG return -BattleScript_EffectAttackDown: +BattleScript_EffectAttackDown:: setstatchanger STAT_ATK, 1, TRUE goto BattleScript_EffectStatDown -BattleScript_EffectDefenseDown: +BattleScript_EffectDefenseDown:: setstatchanger STAT_DEF, 1, TRUE goto BattleScript_EffectStatDown -BattleScript_EffectSpeedDown: +BattleScript_EffectSpeedDown:: setstatchanger STAT_SPEED, 1, TRUE goto BattleScript_EffectStatDown -BattleScript_EffectAccuracyDown: +BattleScript_EffectAccuracyDown:: setstatchanger STAT_ACC, 1, TRUE goto BattleScript_EffectStatDown -BattleScript_EffectSpecialAttackDown: +BattleScript_EffectSpecialAttackDown:: setstatchanger STAT_SPATK, 1, TRUE goto BattleScript_EffectStatDown -BattleScript_EffectSpecialDefenseDown: +BattleScript_EffectSpecialDefenseDown:: setstatchanger STAT_SPDEF, 1, TRUE goto BattleScript_EffectStatDown -BattleScript_EffectEvasionDown: +BattleScript_EffectEvasionDown:: setstatchanger STAT_EVASION, 1, TRUE BattleScript_EffectStatDown: attackcanceler @@ -3761,7 +3409,7 @@ BattleScript_ImmunityProtected:: call BattleScript_PSNPrevention goto BattleScript_MoveEnd -BattleScript_EffectAuroraVeil: +BattleScript_EffectAuroraVeil:: attackcanceler attackstring ppreduce @@ -3921,7 +3569,7 @@ BattleScript_EffectMist:: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectFocusEnergy: +BattleScript_EffectFocusEnergy:: attackcanceler attackstring ppreduce @@ -3933,7 +3581,7 @@ BattleScript_EffectFocusEnergy: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectConfuse: +BattleScript_EffectConfuse:: attackcanceler attackstring ppreduce @@ -3965,7 +3613,7 @@ BattleScript_EffectDefenseUp2:: setstatchanger STAT_DEF, 2, FALSE goto BattleScript_EffectStatUp -BattleScript_EffectDefenseUp3: +BattleScript_EffectDefenseUp3:: setstatchanger STAT_DEF, 3, FALSE goto BattleScript_EffectStatUp @@ -3985,11 +3633,11 @@ BattleScript_EffectSpecialDefenseUp2:: setstatchanger STAT_SPDEF, 2, FALSE goto BattleScript_EffectStatUp -BattleScript_EffectAccuracyUp2: +BattleScript_EffectAccuracyUp2:: setstatchanger STAT_ACC, 2, FALSE goto BattleScript_EffectStatUp -BattleScript_EffectEvasionUp2: +BattleScript_EffectEvasionUp2:: setstatchanger STAT_EVASION, 2, FALSE goto BattleScript_EffectStatUp @@ -4006,31 +3654,31 @@ BattleScript_EffectTransform:: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectAttackDown2: +BattleScript_EffectAttackDown2:: setstatchanger STAT_ATK, 2, TRUE goto BattleScript_EffectStatDown -BattleScript_EffectDefenseDown2: +BattleScript_EffectDefenseDown2:: setstatchanger STAT_DEF, 2, TRUE goto BattleScript_EffectStatDown -BattleScript_EffectSpeedDown2: +BattleScript_EffectSpeedDown2:: setstatchanger STAT_SPEED, 2, TRUE goto BattleScript_EffectStatDown -BattleScript_EffectSpecialDefenseDown2: +BattleScript_EffectSpecialDefenseDown2:: setstatchanger STAT_SPDEF, 2, TRUE goto BattleScript_EffectStatDown -BattleScript_EffectSpecialAttackDown2: +BattleScript_EffectSpecialAttackDown2:: setstatchanger STAT_SPATK, 2, TRUE goto BattleScript_EffectStatDown -BattleScript_EffectAccuracyDown2: +BattleScript_EffectAccuracyDown2:: setstatchanger STAT_ACC, 2, TRUE goto BattleScript_EffectStatDown -BattleScript_EffectEvasionDown2: +BattleScript_EffectEvasionDown2:: setstatchanger STAT_EVASION, 2, TRUE goto BattleScript_EffectStatDown @@ -4073,7 +3721,7 @@ BattleScript_EffectPoison:: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectParalyze: +BattleScript_EffectParalyze:: attackcanceler attackstring ppreduce @@ -4153,7 +3801,7 @@ BattleScript_EffectTwoTurnsAttackFreezeShock: setbyte sTWOTURN_STRINGID, B_MSG_TURN1_FREEZE_SHOCK goto BattleScript_EffectTwoTurnsAttackContinue -BattleScript_EffectGeomancy: +BattleScript_EffectGeomancy:: jumpifstatus2 BS_ATTACKER, STATUS2_MULTIPLETURNS, BattleScript_GeomancySecondTurn jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_NO_ATTACKSTRING, BattleScript_GeomancySecondTurn setbyte sTWOTURN_STRINGID, B_MSG_TURN1_GEOMANCY @@ -4657,7 +4305,7 @@ BattleScript_EffectSpikes:: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectForesight: +BattleScript_EffectForesight:: attackcanceler attackstring ppreduce @@ -4742,7 +4390,7 @@ BattleScript_SwaggerTryConfuse: seteffectprimary MOVE_EFFECT_CONFUSION goto BattleScript_MoveEnd -BattleScript_EffectFuryCutter: +BattleScript_EffectFuryCutter:: attackcanceler attackstring ppreduce @@ -5047,7 +4695,7 @@ BattleScript_SolarBeamOnFirstTurn:: ppreduce goto BattleScript_TwoTurnMovesSecondTurn -BattleScript_EffectTeleport: +BattleScript_EffectTeleport:: .if B_TELEPORT_BEHAVIOR >= GEN_7 jumpifbattletype BATTLE_TYPE_TRAINER, BattleScript_EffectBatonPass jumpifside BS_ATTACKER, B_SIDE_PLAYER, BattleScript_EffectBatonPass @@ -5569,7 +5217,7 @@ BattleScript_EffectWish:: waitanimation goto BattleScript_MoveEnd -BattleScript_EffectAssist: +BattleScript_EffectAssist:: attackcanceler attackstring assistattackselect BattleScript_FailedFromPpReduce @@ -5579,7 +5227,7 @@ BattleScript_EffectAssist: setbyte sB_ANIM_TARGETS_HIT, 0 jumptocalledmove TRUE -BattleScript_EffectIngrain: +BattleScript_EffectIngrain:: attackcanceler attackstring ppreduce @@ -5590,7 +5238,7 @@ BattleScript_EffectIngrain: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectMagicCoat: +BattleScript_EffectMagicCoat:: attackcanceler trysetmagiccoat BattleScript_FailedFromAtkString attackstring @@ -5689,7 +5337,7 @@ BattleScript_EffectEndeavor:: adjustdamage goto BattleScript_HitFromAtkAnimation -BattleScript_EffectSkillSwap: +BattleScript_EffectSkillSwap:: attackcanceler attackstring ppreduce @@ -5722,7 +5370,7 @@ BattleScript_EffectImprison:: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectRefresh: +BattleScript_EffectRefresh:: attackcanceler attackstring ppreduce @@ -5734,7 +5382,7 @@ BattleScript_EffectRefresh: updatestatusicon BS_ATTACKER goto BattleScript_MoveEnd -BattleScript_EffectGrudge: +BattleScript_EffectGrudge:: attackcanceler attackstring ppreduce @@ -5745,7 +5393,7 @@ BattleScript_EffectGrudge: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectSnatch: +BattleScript_EffectSnatch:: attackcanceler trysetsnatch BattleScript_FailedFromAtkString attackstring @@ -5757,7 +5405,7 @@ BattleScript_EffectSnatch: waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_EffectRecoilHP25: +BattleScript_EffectRecoilHP25:: jumpifnotmove MOVE_STRUGGLE, BattleScript_EffectHit incrementgamestat GAME_STAT_USED_STRUGGLE goto BattleScript_EffectHit @@ -9824,7 +9472,7 @@ BattleScript_ExtremeEvoboostSpDef:: BattleScript_ExtremeEvoboostEnd:: goto BattleScript_MoveEnd -BattleScript_EffectHitSetRemoveTerrain: +BattleScript_EffectHitSetRemoveTerrain:: attackcanceler accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE attackstring diff --git a/include/battle.h b/include/battle.h index 408ad7e9b0..703ee2ff16 100644 --- a/include/battle.h +++ b/include/battle.h @@ -48,6 +48,17 @@ // Special indicator value for shellBellDmg in SpecialStatus #define IGNORE_SHELL_BELL 0xFFFF +// For defining EFFECT_HIT etc. with battle TV scores and flags etc. +struct __attribute__((packed, aligned(2))) BattleMoveEffect +{ + const u8 *battleScript; + u16 battleTvScore:3; + u16 encourageEncore:1; + u16 flags:12; // coming soon... +}; + +#define GET_MOVE_BATTLESCRIPT(move) gBattleMoveEffects[gBattleMoves[move].effect].battleScript + struct ResourceFlags { u32 flags[MAX_BATTLERS_COUNT]; @@ -1081,6 +1092,7 @@ extern struct FieldTimer gFieldTimers; extern u8 gBattlerAbility; extern u16 gPartnerSpriteId; extern struct QueuedStatBoost gQueuedStatBoosts[MAX_BATTLERS_COUNT]; +extern const struct BattleMoveEffect gBattleMoveEffects[]; extern void (*gPreBattleCallback1)(void); extern void (*gBattleMainFunc)(void); diff --git a/include/battle_ai_util.h b/include/battle_ai_util.h index 0c3b71d7ca..7475ab21ab 100644 --- a/include/battle_ai_util.h +++ b/include/battle_ai_util.h @@ -110,7 +110,6 @@ bool32 IsStatLoweringMoveEffect(u32 moveEffect); bool32 IsMoveRedirectionPrevented(u32 move, u32 atkAbility); bool32 IsMoveEncouragedToHit(u32 battlerAtk, u32 battlerDef, u32 move); bool32 IsHazardMoveEffect(u32 moveEffect); -bool32 IsEncoreEncouragedEffect(u32 moveEffect); bool32 IsChargingMove(u32 battlerAtk, u32 effect); void ProtectChecks(u32 battlerAtk, u32 battlerDef, u32 move, u32 predictedMove, s32 *score); bool32 ShouldSetSandstorm(u32 battler, u32 ability, u32 holdEffect); diff --git a/include/battle_scripts.h b/include/battle_scripts.h index 505e30f9da..9ecce158ea 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -533,4 +533,294 @@ extern const u8 BattleScript_DynamaxBegins[]; extern const u8 BattleScript_DynamaxEnds[]; extern const u8 BattleScript_MoveBlockedByDynamax[]; +// Battle move scripts +extern const u8 BattleScript_EffectSleep[]; +extern const u8 BattleScript_EffectAbsorb[]; +extern const u8 BattleScript_EffectExplosion[]; +extern const u8 BattleScript_EffectDreamEater[]; +extern const u8 BattleScript_EffectMirrorMove[]; +extern const u8 BattleScript_EffectAttackUp[]; +extern const u8 BattleScript_EffectDefenseUp[]; +extern const u8 BattleScript_EffectSpeedUp[]; +extern const u8 BattleScript_EffectSpecialAttackUp[]; +extern const u8 BattleScript_EffectSpecialDefenseUp[]; +extern const u8 BattleScript_EffectAccuracyUp[]; +extern const u8 BattleScript_EffectEvasionUp[]; +extern const u8 BattleScript_EffectSpecialAttackUp3[]; +extern const u8 BattleScript_EffectAttackDown[]; +extern const u8 BattleScript_EffectDefenseDown[]; +extern const u8 BattleScript_EffectSpeedDown[]; +extern const u8 BattleScript_EffectSpecialAttackDown[]; +extern const u8 BattleScript_EffectSpecialDefenseDown[]; +extern const u8 BattleScript_EffectAccuracyDown[]; +extern const u8 BattleScript_EffectEvasionDown[]; +extern const u8 BattleScript_EffectHaze[]; +extern const u8 BattleScript_EffectBide[]; +extern const u8 BattleScript_EffectRoar[]; +extern const u8 BattleScript_EffectHit[]; +extern const u8 BattleScript_EffectConversion[]; +extern const u8 BattleScript_EffectRestoreHp[]; +extern const u8 BattleScript_EffectToxic[]; +extern const u8 BattleScript_EffectLightScreen[]; +extern const u8 BattleScript_EffectRest[]; +extern const u8 BattleScript_EffectOHKO[]; +extern const u8 BattleScript_EffectSuperFang[]; +extern const u8 BattleScript_EffectFixedDamageArg[]; +extern const u8 BattleScript_EffectHealBlock[]; +extern const u8 BattleScript_EffectRecoilIfMiss[]; +extern const u8 BattleScript_EffectMist[]; +extern const u8 BattleScript_EffectFocusEnergy[]; +extern const u8 BattleScript_EffectConfuse[]; +extern const u8 BattleScript_EffectAttackUp2[]; +extern const u8 BattleScript_EffectDefenseUp2[]; +extern const u8 BattleScript_EffectSpeedUp2[]; +extern const u8 BattleScript_EffectSpecialAttackUp2[]; +extern const u8 BattleScript_EffectSpecialDefenseUp2[]; +extern const u8 BattleScript_EffectAccuracyUp2[]; +extern const u8 BattleScript_EffectEvasionUp2[]; +extern const u8 BattleScript_EffectTransform[]; +extern const u8 BattleScript_EffectAttackDown2[]; +extern const u8 BattleScript_EffectDefenseDown2[]; +extern const u8 BattleScript_EffectSpeedDown2[]; +extern const u8 BattleScript_EffectSpecialAttackDown2[]; +extern const u8 BattleScript_EffectSpecialDefenseDown2[]; +extern const u8 BattleScript_EffectAccuracyDown2[]; +extern const u8 BattleScript_EffectEvasionDown2[]; +extern const u8 BattleScript_EffectReflect[]; +extern const u8 BattleScript_EffectPoison[]; +extern const u8 BattleScript_EffectParalyze[]; +extern const u8 BattleScript_EffectTwoTurnsAttack[]; +extern const u8 BattleScript_EffectSubstitute[]; +extern const u8 BattleScript_EffectRage[]; +extern const u8 BattleScript_EffectMimic[]; +extern const u8 BattleScript_EffectMetronome[]; +extern const u8 BattleScript_EffectLeechSeed[]; +extern const u8 BattleScript_EffectDoNothing[]; +extern const u8 BattleScript_EffectDisable[]; +extern const u8 BattleScript_EffectLevelDamage[]; +extern const u8 BattleScript_EffectPsywave[]; +extern const u8 BattleScript_EffectCounter[]; +extern const u8 BattleScript_EffectEncore[]; +extern const u8 BattleScript_EffectPainSplit[]; +extern const u8 BattleScript_EffectSnore[]; +extern const u8 BattleScript_EffectConversion2[]; +extern const u8 BattleScript_EffectLockOn[]; +extern const u8 BattleScript_EffectSketch[]; +extern const u8 BattleScript_EffectSleepTalk[]; +extern const u8 BattleScript_EffectDestinyBond[]; +extern const u8 BattleScript_EffectSpite[]; +extern const u8 BattleScript_EffectHealBell[]; +extern const u8 BattleScript_EffectTripleKick[]; +extern const u8 BattleScript_EffectMeanLook[]; +extern const u8 BattleScript_EffectNightmare[]; +extern const u8 BattleScript_EffectMinimize[]; +extern const u8 BattleScript_EffectCurse[]; +extern const u8 BattleScript_EffectHealingWish[]; +extern const u8 BattleScript_EffectProtect[]; +extern const u8 BattleScript_EffectSpikes[]; +extern const u8 BattleScript_EffectForesight[]; +extern const u8 BattleScript_EffectPerishSong[]; +extern const u8 BattleScript_EffectSandstorm[]; +extern const u8 BattleScript_EffectEndure[]; +extern const u8 BattleScript_EffectRollout[]; +extern const u8 BattleScript_EffectSwagger[]; +extern const u8 BattleScript_EffectFuryCutter[]; +extern const u8 BattleScript_EffectAttract[]; +extern const u8 BattleScript_EffectPresent[]; +extern const u8 BattleScript_EffectSafeguard[]; +extern const u8 BattleScript_EffectMagnitude[]; +extern const u8 BattleScript_EffectBatonPass[]; +extern const u8 BattleScript_EffectCaptivate[]; +extern const u8 BattleScript_EffectMorningSun[]; +extern const u8 BattleScript_EffectSynthesis[]; +extern const u8 BattleScript_EffectMoonlight[]; +extern const u8 BattleScript_EffectRainDance[]; +extern const u8 BattleScript_EffectSunnyDay[]; +extern const u8 BattleScript_EffectBellyDrum[]; +extern const u8 BattleScript_EffectPsychUp[]; +extern const u8 BattleScript_EffectMirrorCoat[]; +extern const u8 BattleScript_EffectSkullBash[]; +extern const u8 BattleScript_EffectFutureSight[]; +extern const u8 BattleScript_EffectGust[]; +extern const u8 BattleScript_EffectSolarBeam[]; +extern const u8 BattleScript_EffectTeleport[]; +extern const u8 BattleScript_EffectBeatUp[]; +extern const u8 BattleScript_EffectSemiInvulnerable[]; +extern const u8 BattleScript_EffectDefenseCurl[]; +extern const u8 BattleScript_EffectSoftboiled[]; +extern const u8 BattleScript_EffectFakeOut[]; +extern const u8 BattleScript_EffectUproar[]; +extern const u8 BattleScript_EffectStockpile[]; +extern const u8 BattleScript_EffectSpitUp[]; +extern const u8 BattleScript_EffectSwallow[]; +extern const u8 BattleScript_EffectWorrySeed[]; +extern const u8 BattleScript_EffectHail[]; +extern const u8 BattleScript_EffectTorment[]; +extern const u8 BattleScript_EffectFlatter[]; +extern const u8 BattleScript_EffectWillOWisp[]; +extern const u8 BattleScript_EffectMemento[]; +extern const u8 BattleScript_EffectFocusPunch[]; +extern const u8 BattleScript_EffectFollowMe[]; +extern const u8 BattleScript_EffectNaturePower[]; +extern const u8 BattleScript_EffectCharge[]; +extern const u8 BattleScript_EffectTaunt[]; +extern const u8 BattleScript_EffectHelpingHand[]; +extern const u8 BattleScript_EffectTrick[]; +extern const u8 BattleScript_EffectRolePlay[]; +extern const u8 BattleScript_EffectWish[]; +extern const u8 BattleScript_EffectAssist[]; +extern const u8 BattleScript_EffectIngrain[]; +extern const u8 BattleScript_EffectMagicCoat[]; +extern const u8 BattleScript_EffectRecycle[]; +extern const u8 BattleScript_EffectBrickBreak[]; +extern const u8 BattleScript_EffectYawn[]; +extern const u8 BattleScript_EffectEndeavor[]; +extern const u8 BattleScript_EffectSkillSwap[]; +extern const u8 BattleScript_EffectImprison[]; +extern const u8 BattleScript_EffectRefresh[]; +extern const u8 BattleScript_EffectGrudge[]; +extern const u8 BattleScript_EffectSnatch[]; +extern const u8 BattleScript_EffectTeeterDance[]; +extern const u8 BattleScript_EffectHitEscape[]; +extern const u8 BattleScript_EffectMudSport[]; +extern const u8 BattleScript_EffectTickle[]; +extern const u8 BattleScript_EffectCosmicPower[]; +extern const u8 BattleScript_EffectSkyUppercut[]; +extern const u8 BattleScript_EffectBulkUp[]; +extern const u8 BattleScript_EffectPlaceholder[]; +extern const u8 BattleScript_EffectWaterSport[]; +extern const u8 BattleScript_EffectCalmMind[]; +extern const u8 BattleScript_EffectDragonDance[]; +extern const u8 BattleScript_EffectCamouflage[]; +extern const u8 BattleScript_EffectPledge[]; +extern const u8 BattleScript_EffectFling[]; +extern const u8 BattleScript_EffectNaturalGift[]; +extern const u8 BattleScript_EffectRoost[]; +extern const u8 BattleScript_EffectGravity[]; +extern const u8 BattleScript_EffectMircleEye[]; +extern const u8 BattleScript_EffectTailwind[]; +extern const u8 BattleScript_EffectEmbargo[]; +extern const u8 BattleScript_EffectAquaRing[]; +extern const u8 BattleScript_EffectTrickRoom[]; +extern const u8 BattleScript_EffectWonderRoom[]; +extern const u8 BattleScript_EffectMagicRoom[]; +extern const u8 BattleScript_EffectMagnetRise[]; +extern const u8 BattleScript_EffectToxicSpikes[]; +extern const u8 BattleScript_EffectGastroAcid[]; +extern const u8 BattleScript_EffectStealthRock[]; +extern const u8 BattleScript_EffectTelekinesis[]; +extern const u8 BattleScript_EffectPowerSwap[]; +extern const u8 BattleScript_EffectGuardSwap[]; +extern const u8 BattleScript_EffectHeartSwap[]; +extern const u8 BattleScript_EffectPowerSplit[]; +extern const u8 BattleScript_EffectGuardSplit[]; +extern const u8 BattleScript_EffectStickyWeb[]; +extern const u8 BattleScript_EffectMetalBurst[]; +extern const u8 BattleScript_EffectLuckyChant[]; +extern const u8 BattleScript_EffectSuckerPunch[]; +extern const u8 BattleScript_EffectSimpleBeam[]; +extern const u8 BattleScript_EffectEntrainment[]; +extern const u8 BattleScript_EffectHealPulse[]; +extern const u8 BattleScript_EffectQuash[]; +extern const u8 BattleScript_EffectIonDeluge[]; +extern const u8 BattleScript_EffectTopsyTurvy[]; +extern const u8 BattleScript_EffectMistyTerrain[]; +extern const u8 BattleScript_EffectGrassyTerrain[]; +extern const u8 BattleScript_EffectElectricTerrain[]; +extern const u8 BattleScript_EffectPsychicTerrain[]; +extern const u8 BattleScript_EffectAttackAccUp[]; +extern const u8 BattleScript_EffectAttackSpAttackUp[]; +extern const u8 BattleScript_EffectMeFirst[]; +extern const u8 BattleScript_EffectQuiverDance[]; +extern const u8 BattleScript_EffectCoil[]; +extern const u8 BattleScript_EffectElectrify[]; +extern const u8 BattleScript_EffectReflectType[]; +extern const u8 BattleScript_EffectSoak[]; +extern const u8 BattleScript_EffectGrowth[]; +extern const u8 BattleScript_EffectLastResort[]; +extern const u8 BattleScript_EffectShellSmash[]; +extern const u8 BattleScript_EffectShiftGear[]; +extern const u8 BattleScript_EffectDefenseUp3[]; +extern const u8 BattleScript_EffectNobleRoar[]; +extern const u8 BattleScript_EffectVenomDrench[]; +extern const u8 BattleScript_EffectToxicThread[]; +extern const u8 BattleScript_EffectHitSwitchTarget[]; +extern const u8 BattleScript_EffectFinalGambit[]; +extern const u8 BattleScript_EffectAutotomize[]; +extern const u8 BattleScript_EffectCopycat[]; +extern const u8 BattleScript_EffectDefog[]; +extern const u8 BattleScript_EffectHitEnemyHealAlly[]; +extern const u8 BattleScript_EffectSynchronoise[]; +extern const u8 BattleScript_EffectPsychoShift[]; +extern const u8 BattleScript_EffectPowerTrick[]; +extern const u8 BattleScript_EffectAfterYou[]; +extern const u8 BattleScript_EffectBestow[]; +extern const u8 BattleScript_EffectRototiller[]; +extern const u8 BattleScript_EffectFlowerShield[]; +extern const u8 BattleScript_EffectSpeedSwap[]; +extern const u8 BattleScript_EffectAuroraVeil[]; +extern const u8 BattleScript_EffectThirdType[]; +extern const u8 BattleScript_EffectAcupressure[]; +extern const u8 BattleScript_EffectAromaticMist[]; +extern const u8 BattleScript_EffectPowder[]; +extern const u8 BattleScript_EffectPartingShot[]; +extern const u8 BattleScript_EffectMatBlock[]; +extern const u8 BattleScript_EffectInstruct[]; +extern const u8 BattleScript_EffectLaserFocus[]; +extern const u8 BattleScript_EffectMagneticFlux[]; +extern const u8 BattleScript_EffectGearUp[]; +extern const u8 BattleScript_EffectStrengthSap[]; +extern const u8 BattleScript_EffectMindBlown[]; +extern const u8 BattleScript_EffectPurify[]; +extern const u8 BattleScript_FailIfNotArgType[]; +extern const u8 BattleScript_EffectShoreUp[]; +extern const u8 BattleScript_EffectGeomancy[]; +extern const u8 BattleScript_EffectFairyLock[]; +extern const u8 BattleScript_EffectAllySwitch[]; +extern const u8 BattleScript_EffectRelicSong[]; +extern const u8 BattleScript_EffectEerieSpell[]; +extern const u8 BattleScript_EffectJungleHealing[]; +extern const u8 BattleScript_EffectCoaching[]; +extern const u8 BattleScript_EffectDecorate[]; +extern const u8 BattleScript_EffectRecoilHP25[]; +extern const u8 BattleScript_EffectStuffCheeks[]; +extern const u8 BattleScript_EffectGlitzyGlow[]; +extern const u8 BattleScript_EffectBaddyBad[]; +extern const u8 BattleScript_EffectSappySeed[]; +extern const u8 BattleScript_EffectFreezyFrost[]; +extern const u8 BattleScript_EffectSparklySwirl[]; +extern const u8 BattleScript_EffectPlasmaFists[]; +extern const u8 BattleScript_EffectHyperspaceFury[]; +extern const u8 BattleScript_EffectAuraWheel[]; +extern const u8 BattleScript_EffectPhotonGeyser[]; +extern const u8 BattleScript_EffectShellSideArm[]; +extern const u8 BattleScript_EffectNoRetreat[]; +extern const u8 BattleScript_EffectTarShot[]; +extern const u8 BattleScript_EffectPoltergeist[]; +extern const u8 BattleScript_EffectOctolock[]; +extern const u8 BattleScript_EffectClangorousSoul[]; +extern const u8 BattleScript_EffectSkyDrop[]; +extern const u8 BattleScript_EffectMeteorBeam[]; +extern const u8 BattleScript_EffectCourtChange[]; +extern const u8 BattleScript_EffectSteelBeam[]; +extern const u8 BattleScript_EffectExtremeEvoboost[]; +extern const u8 BattleScript_EffectHitSetRemoveTerrain[]; +extern const u8 BattleScript_EffectDarkVoid[]; +extern const u8 BattleScript_EffectVictoryDance[]; +extern const u8 BattleScript_EffectTeatime[]; +extern const u8 BattleScript_EffectAttackUpUserAlly[]; +extern const u8 BattleScript_EffectShellTrap[]; +extern const u8 BattleScript_EffectRevivalBlessing[]; +extern const u8 BattleScript_EffectSnow[]; +extern const u8 BattleScript_EffectTakeHeart[]; +extern const u8 BattleScript_EffectCorrosiveGas[]; +extern const u8 BattleScript_EffectSaltCure[]; +extern const u8 BattleScript_EffectChillyReception[]; +extern const u8 BattleScript_EffectMaxMove[]; +extern const u8 BattleScript_EffectGlaiveRush[]; +extern const u8 BattleScript_EffectBrickBreak[]; +extern const u8 BattleScript_EffectDoodle[]; +extern const u8 BattleScript_EffectFilletAway[]; +extern const u8 BattleScript_EffectShedTail[]; + #endif // GUARD_BATTLE_SCRIPTS_H diff --git a/include/constants/battle_move_effects.h b/include/constants/battle_move_effects.h index 8b427bb118..902c69d76e 100644 --- a/include/constants/battle_move_effects.h +++ b/include/constants/battle_move_effects.h @@ -126,7 +126,7 @@ enum { EFFECT_BEAT_UP, EFFECT_SEMI_INVULNERABLE, EFFECT_DEFENSE_CURL, - EFFECT_SOFTBOILED, + EFFECT_SOFTBOILED, // differences vs Recover - can be used outside of battle to restore HP EFFECT_FAKE_OUT, EFFECT_UPROAR, EFFECT_STOCKPILE, diff --git a/src/battle_ai_main.c b/src/battle_ai_main.c index 5bb7731896..bd553162fc 100644 --- a/src/battle_ai_main.c +++ b/src/battle_ai_main.c @@ -3688,7 +3688,7 @@ static u32 AI_CalcMoveScore(u32 battlerAtk, u32 battlerDef, u32 move) if (gDisableStructs[battlerDef].encoreTimer == 0 && (B_MENTAL_HERB < GEN_5 || aiData->holdEffects[battlerDef] != HOLD_EFFECT_MENTAL_HERB)) { - if (IsEncoreEncouragedEffect(gBattleMoves[gLastMoves[battlerDef]].effect)) + if (gBattleMoveEffects[gBattleMoves[gLastMoves[battlerDef]].effect].encourageEncore) ADJUST_SCORE(3); } break; diff --git a/src/battle_ai_util.c b/src/battle_ai_util.c index 8579efdf0f..b2608bb900 100644 --- a/src/battle_ai_util.c +++ b/src/battle_ai_util.c @@ -34,75 +34,6 @@ static u32 AI_GetEffectiveness(uq4_12_t multiplier); -// Const Data -static const u16 sEncouragedEncoreEffects[] = -{ - EFFECT_DREAM_EATER, - EFFECT_ATTACK_UP, - EFFECT_DEFENSE_UP, - EFFECT_SPEED_UP, - EFFECT_SPECIAL_ATTACK_UP, - EFFECT_HAZE, - EFFECT_ROAR, - EFFECT_CONVERSION, - EFFECT_TOXIC, - EFFECT_LIGHT_SCREEN, - EFFECT_REST, - EFFECT_SUPER_FANG, - EFFECT_SPECIAL_DEFENSE_UP_2, - EFFECT_CONFUSE, - EFFECT_POISON, - EFFECT_PARALYZE, - EFFECT_LEECH_SEED, - EFFECT_DO_NOTHING, - EFFECT_ATTACK_UP_2, - EFFECT_ENCORE, - EFFECT_CONVERSION_2, - EFFECT_LOCK_ON, - EFFECT_HEAL_BELL, - EFFECT_MEAN_LOOK, - EFFECT_NIGHTMARE, - EFFECT_PROTECT, - EFFECT_SKILL_SWAP, - EFFECT_FORESIGHT, - EFFECT_PERISH_SONG, - EFFECT_SANDSTORM, - EFFECT_ENDURE, - EFFECT_SWAGGER, - EFFECT_ATTRACT, - EFFECT_SAFEGUARD, - EFFECT_RAIN_DANCE, - EFFECT_SUNNY_DAY, - EFFECT_BELLY_DRUM, - EFFECT_PSYCH_UP, - EFFECT_FUTURE_SIGHT, - EFFECT_FAKE_OUT, - EFFECT_STOCKPILE, - EFFECT_SPIT_UP, - EFFECT_SWALLOW, - EFFECT_HAIL, - EFFECT_SNOWSCAPE, - EFFECT_TORMENT, - EFFECT_WILL_O_WISP, - EFFECT_FOLLOW_ME, - EFFECT_CHARGE, - EFFECT_TRICK, - EFFECT_ROLE_PLAY, - EFFECT_INGRAIN, - EFFECT_RECYCLE, - EFFECT_KNOCK_OFF, - EFFECT_SKILL_SWAP, - EFFECT_IMPRISON, - EFFECT_REFRESH, - EFFECT_GRUDGE, - EFFECT_TEETER_DANCE, - EFFECT_MUD_SPORT, - EFFECT_WATER_SPORT, - EFFECT_DRAGON_DANCE, - EFFECT_CAMOUFLAGE, - EFFECT_FILLET_AWAY, -}; - // Functions u32 GetAIChosenMove(u32 battlerId) { @@ -2049,18 +1980,6 @@ bool32 HasSnatchAffectedMove(u32 battler) CHECK_MOVE_FLAG(snatchAffected); } -bool32 IsEncoreEncouragedEffect(u32 moveEffect) -{ - u32 i; - - for (i = 0; i < ARRAY_COUNT(sEncouragedEncoreEffects); i++) - { - if (moveEffect == sEncouragedEncoreEffects[i]) - return TRUE; - } - return FALSE; -} - bool32 IsChargingMove(u32 battlerAtk, u32 effect) { switch (effect) @@ -2071,9 +1990,7 @@ bool32 IsChargingMove(u32 battlerAtk, u32 effect) case EFFECT_SKULL_BASH: case EFFECT_METEOR_BEAM: case EFFECT_TWO_TURNS_ATTACK: - if (AI_DATA->holdEffects[battlerAtk] == HOLD_EFFECT_POWER_HERB) - return FALSE; - return TRUE; + return !(AI_DATA->holdEffects[battlerAtk] == HOLD_EFFECT_POWER_HERB); default: return FALSE; } diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 17dfce5408..642ea6f7c6 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -64,6 +64,7 @@ #include "battle_util.h" #include "constants/pokemon.h" #include "config/battle.h" +#include "data/battle_move_effects.h" // Helper for accessing command arguments and advancing gBattlescriptCurrInstr. // @@ -96,8 +97,6 @@ #define MEMBERS_7(a, b, c, d, e, f, g) a; b; c; d; e; f; g; #define MEMBERS_8(a, b, c, d, e, f, g, h) a; b; c; d; e; f; g; h; -extern const u8 *const gBattleScriptsForMoveEffects[]; - // table to avoid ugly powing on gba (courtesy of doesnt) // this returns (i^2.5)/4 // the quarters cancel so no need to re-quadruple them in actual calculation @@ -5882,7 +5881,7 @@ static void Cmd_moveend(void) gBattleScripting.moveendState = 0; MoveValuesCleanUp(); gBattleScripting.moveEffect = gBattleScripting.savedMoveEffect; - BattleScriptPush(gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect]); + BattleScriptPush(GET_MOVE_BATTLESCRIPT(gCurrentMove)); gBattlescriptCurrInstr = BattleScript_FlushMessageBox; return; } @@ -5903,7 +5902,7 @@ static void Cmd_moveend(void) gBattleScripting.animTurn = 0; gBattleScripting.animTargetsHit = 0; MoveValuesCleanUp(); - BattleScriptPush(gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect]); + BattleScriptPush(GET_MOVE_BATTLESCRIPT(gCurrentMove)); gBattlescriptCurrInstr = BattleScript_FlushMessageBox; return; } @@ -5959,7 +5958,7 @@ static void Cmd_moveend(void) gSpecialStatuses[gBattlerTarget].focusSashed = 0; // Delete this line to make Focus Sash last for the duration of the whole move turn. gSpecialStatuses[gBattlerAttacker].multiHitOn = TRUE; MoveValuesCleanUp(); - BattleScriptPush(gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect]); + BattleScriptPush(GET_MOVE_BATTLESCRIPT(gCurrentMove)); gBattlescriptCurrInstr = BattleScript_FlushMessageBox; return; } @@ -7635,7 +7634,7 @@ static void Cmd_jumptocalledmove(void) else gChosenMove = gCurrentMove = gCalledMove; - gBattlescriptCurrInstr = gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect]; + gBattlescriptCurrInstr = GET_MOVE_BATTLESCRIPT(gCurrentMove); } static void Cmd_statusanimation(void) @@ -10906,7 +10905,7 @@ static void SetMoveForMirrorMove(u32 move) gCurrentMove = move; SetAtkCancellerForCalledMove(); gBattlerTarget = GetMoveTarget(gCurrentMove, NO_TARGET_OVERRIDE); - gBattlescriptCurrInstr = gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect]; + gBattlescriptCurrInstr = GET_MOVE_BATTLESCRIPT(gCurrentMove); } static void Cmd_trymirrormove(void) @@ -12493,7 +12492,7 @@ static void Cmd_metronome(void) gCurrentMove = RandomUniformExcept(RNG_METRONOME, 1, moveCount - 1, InvalidMetronomeMove); gHitMarker &= ~HITMARKER_ATTACKSTRING_PRINTED; SetAtkCancellerForCalledMove(); - gBattlescriptCurrInstr = gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect]; + gBattlescriptCurrInstr = GET_MOVE_BATTLESCRIPT(gCurrentMove); gBattlerTarget = GetMoveTarget(gCurrentMove, NO_TARGET_OVERRIDE); } @@ -13745,7 +13744,7 @@ static void Cmd_callterrainattack(void) gHitMarker &= ~HITMARKER_ATTACKSTRING_PRINTED; gCurrentMove = GetNaturePowerMove(); gBattlerTarget = GetMoveTarget(gCurrentMove, NO_TARGET_OVERRIDE); - BattleScriptPush(gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect]); + BattleScriptPush(GET_MOVE_BATTLESCRIPT(gCurrentMove)); gBattlescriptCurrInstr = cmd->nextInstr; } diff --git a/src/battle_tv.c b/src/battle_tv.c index ec2b1cb1c7..c0e976dfc9 100644 --- a/src/battle_tv.c +++ b/src/battle_tv.c @@ -84,347 +84,6 @@ static const u16 sVariableDmgMoves[] = MOVE_MAGNITUDE, MOVE_PSYWAVE, TABLE_END }; -static const u16 sPoints_MoveEffect[NUM_BATTLE_MOVE_EFFECTS] = -{ - [EFFECT_HIT] = 1, - [EFFECT_SLEEP] = 1, - [EFFECT_ABSORB] = 4, - [EFFECT_EXPLOSION] = 0, - [EFFECT_DREAM_EATER] = 5, - [EFFECT_MIRROR_MOVE] = 1, - [EFFECT_ATTACK_UP] = 1, - [EFFECT_DEFENSE_UP] = 1, - [EFFECT_SPEED_UP] = 1, - [EFFECT_SPECIAL_ATTACK_UP] = 1, - [EFFECT_SPECIAL_DEFENSE_UP] = 1, - [EFFECT_ACCURACY_UP] = 1, - [EFFECT_EVASION_UP] = 1, - [EFFECT_ATTACK_DOWN] = 1, - [EFFECT_DEFENSE_DOWN] = 1, - [EFFECT_SPEED_DOWN] = 1, - [EFFECT_SPECIAL_ATTACK_DOWN] = 1, - [EFFECT_SPECIAL_DEFENSE_DOWN] = 1, - [EFFECT_ACCURACY_DOWN] = 1, - [EFFECT_EVASION_DOWN] = 1, - [EFFECT_HAZE] = 5, - [EFFECT_BIDE] = 5, - [EFFECT_ROAR] = 5, - [EFFECT_MULTI_HIT] = 1, - [EFFECT_CONVERSION] = 3, - [EFFECT_RESTORE_HP] = 3, - [EFFECT_TOXIC] = 5, - [EFFECT_LIGHT_SCREEN] = 7, - [EFFECT_REST] = 7, - [EFFECT_OHKO] = 7, - [EFFECT_SUPER_FANG] = 5, - [EFFECT_RECOIL_IF_MISS] = 1, - [EFFECT_MIST] = 5, - [EFFECT_FOCUS_ENERGY] = 1, - [EFFECT_CONFUSE] = 4, - [EFFECT_ATTACK_UP_2] = 1, - [EFFECT_DEFENSE_UP_2] = 1, - [EFFECT_SPEED_UP_2] = 1, - [EFFECT_SPECIAL_ATTACK_UP_2] = 1, - [EFFECT_SPECIAL_DEFENSE_UP_2] = 1, - [EFFECT_ACCURACY_UP_2] = 1, - [EFFECT_EVASION_UP_2] = 1, - [EFFECT_TRANSFORM] = 0, - [EFFECT_ATTACK_DOWN_2] = 1, - [EFFECT_DEFENSE_DOWN_2] = 1, - [EFFECT_SPEED_DOWN_2] = 1, - [EFFECT_SPECIAL_ATTACK_DOWN_2] = 1, - [EFFECT_SPECIAL_DEFENSE_DOWN_2] = 1, - [EFFECT_ACCURACY_DOWN_2] = 1, - [EFFECT_EVASION_DOWN_2] = 1, - [EFFECT_REFLECT] = 7, - [EFFECT_POISON] = 4, - [EFFECT_PARALYZE] = 4, - [EFFECT_SUBSTITUTE] = 4, - [EFFECT_RAGE] = 2, - [EFFECT_MIMIC] = 4, - [EFFECT_METRONOME] = 1, - [EFFECT_LEECH_SEED] = 4, - [EFFECT_DO_NOTHING] = 1, - [EFFECT_DISABLE] = 7, - [EFFECT_LEVEL_DAMAGE] = 2, - [EFFECT_PSYWAVE] = 1, - [EFFECT_COUNTER] = 5, - [EFFECT_ENCORE] = 7, - [EFFECT_PAIN_SPLIT] = 3, - [EFFECT_SNORE] = 3, - [EFFECT_CONVERSION_2] = 4, - [EFFECT_LOCK_ON] = 3, - [EFFECT_SKETCH] = 3, - [EFFECT_SLEEP_TALK] = 3, - [EFFECT_DESTINY_BOND] = 3, - [EFFECT_FLAIL] = 2, - [EFFECT_SPITE] = 4, - [EFFECT_FALSE_SWIPE] = 1, - [EFFECT_HEAL_BELL] = 5, - [EFFECT_TRIPLE_KICK] = 1, - [EFFECT_MEAN_LOOK] = 5, - [EFFECT_NIGHTMARE] = 3, - [EFFECT_MINIMIZE] = 1, - [EFFECT_CURSE] = 2, - [EFFECT_PROTECT] = 5, - [EFFECT_SPIKES] = 4, - [EFFECT_FORESIGHT] = 3, - [EFFECT_PERISH_SONG] = 6, - [EFFECT_SANDSTORM] = 4, - [EFFECT_ENDURE] = 3, - [EFFECT_ROLLOUT] = 3, - [EFFECT_SWAGGER] = 3, - [EFFECT_FURY_CUTTER] = 2, - [EFFECT_ATTRACT] = 4, - [EFFECT_RETURN] = 1, - [EFFECT_PRESENT] = 1, - [EFFECT_FRUSTRATION] = 1, - [EFFECT_SAFEGUARD] = 5, - [EFFECT_MAGNITUDE] = 1, - [EFFECT_BATON_PASS] = 7, - [EFFECT_PURSUIT] = 2, - [EFFECT_FIXED_DAMAGE_ARG] = 1, - [EFFECT_MORNING_SUN] = 4, - [EFFECT_SYNTHESIS] = 4, - [EFFECT_MOONLIGHT] = 4, - [EFFECT_HIDDEN_POWER] = 1, - [EFFECT_RAIN_DANCE] = 4, - [EFFECT_SUNNY_DAY] = 4, - [EFFECT_BELLY_DRUM] = 7, - [EFFECT_PSYCH_UP] = 7, - [EFFECT_MIRROR_COAT] = 6, - [EFFECT_SKULL_BASH] = 3, - [EFFECT_EARTHQUAKE] = 1, - [EFFECT_FUTURE_SIGHT] = 1, - [EFFECT_GUST] = 1, - [EFFECT_SOLAR_BEAM] = 1, - [EFFECT_THUNDER] = 1, - [EFFECT_TELEPORT] = 1, - [EFFECT_BEAT_UP] = 2, - [EFFECT_SEMI_INVULNERABLE] = 3, - [EFFECT_DEFENSE_CURL] = 1, - [EFFECT_SOFTBOILED] = 1, - [EFFECT_FAKE_OUT] = 4, - [EFFECT_UPROAR] = 4, - [EFFECT_STOCKPILE] = 3, - [EFFECT_SPIT_UP] = 3, - [EFFECT_SWALLOW] = 3, - [EFFECT_HAIL] = 4, - [EFFECT_TORMENT] = 7, - [EFFECT_FLATTER] = 7, - [EFFECT_WILL_O_WISP] = 5, - [EFFECT_MEMENTO] = 7, - [EFFECT_FACADE] = 1, - [EFFECT_FOCUS_PUNCH] = 7, - [EFFECT_DOUBLE_POWER_ON_ARG_STATUS] = 1, - [EFFECT_FOLLOW_ME] = 5, - [EFFECT_NATURE_POWER] = 0, - [EFFECT_CHARGE] = 4, - [EFFECT_TAUNT] = 4, - [EFFECT_HELPING_HAND] = 4, - [EFFECT_TRICK] = 4, - [EFFECT_ROLE_PLAY] = 4, - [EFFECT_WISH] = 2, - [EFFECT_ASSIST] = 2, - [EFFECT_INGRAIN] = 6, - [EFFECT_MAGIC_COAT] = 6, - [EFFECT_RECYCLE] = 4, - [EFFECT_REVENGE] = 4, - [EFFECT_BRICK_BREAK] = 2, - [EFFECT_YAWN] = 5, - [EFFECT_KNOCK_OFF] = 2, - [EFFECT_ENDEAVOR] = 1, - [EFFECT_ERUPTION] = 1, - [EFFECT_SKILL_SWAP] = 6, - [EFFECT_IMPRISON] = 6, - [EFFECT_REFRESH] = 6, - [EFFECT_GRUDGE] = 1, - [EFFECT_SNATCH] = 1, - [EFFECT_LOW_KICK] = 1, - [EFFECT_TEETER_DANCE] = 6, - [EFFECT_MUD_SPORT] = 4, - [EFFECT_WEATHER_BALL] = 1, - [EFFECT_TICKLE] = 1, - [EFFECT_COSMIC_POWER] = 1, - [EFFECT_SKY_UPPERCUT] = 1, - [EFFECT_BULK_UP] = 1, - [EFFECT_WATER_SPORT] = 4, - [EFFECT_CALM_MIND] = 1, - [EFFECT_DRAGON_DANCE] = 1, - [EFFECT_CAMOUFLAGE] = 3, - [EFFECT_PLEDGE] = 0, // TODO: Assign points - [EFFECT_FLING] = 0, // TODO: Assign points - [EFFECT_NATURAL_GIFT] = 0, // TODO: Assign points - [EFFECT_WRING_OUT] = 0, // TODO: Assign points - [EFFECT_ASSURANCE] = 0, // TODO: Assign points - [EFFECT_TRUMP_CARD] = 0, // TODO: Assign points - [EFFECT_ACROBATICS] = 0, // TODO: Assign points - [EFFECT_HEAT_CRASH] = 0, // TODO: Assign points - [EFFECT_PUNISHMENT] = 0, // TODO: Assign points - [EFFECT_STORED_POWER] = 0, // TODO: Assign points - [EFFECT_ELECTRO_BALL] = 0, // TODO: Assign points - [EFFECT_GYRO_BALL] = 0, // TODO: Assign points - [EFFECT_ECHOED_VOICE] = 0, // TODO: Assign points - [EFFECT_PAYBACK] = 0, // TODO: Assign points - [EFFECT_ROUND] = 0, // TODO: Assign points - [EFFECT_BRINE] = 0, // TODO: Assign points - [EFFECT_RETALIATE] = 0, // TODO: Assign points - [EFFECT_BULLDOZE] = 0, // TODO: Assign points - [EFFECT_FOUL_PLAY] = 0, // TODO: Assign points - [EFFECT_PSYSHOCK] = 0, // TODO: Assign points - [EFFECT_ROOST] = 0, // TODO: Assign points - [EFFECT_GRAVITY] = 0, // TODO: Assign points - [EFFECT_MIRACLE_EYE] = 0, // TODO: Assign points - [EFFECT_TAILWIND] = 0, // TODO: Assign points - [EFFECT_EMBARGO] = 0, // TODO: Assign points - [EFFECT_AQUA_RING] = 0, // TODO: Assign points - [EFFECT_TRICK_ROOM] = 0, // TODO: Assign points - [EFFECT_WONDER_ROOM] = 0, // TODO: Assign points - [EFFECT_MAGIC_ROOM] = 0, // TODO: Assign points - [EFFECT_MAGNET_RISE] = 0, // TODO: Assign points - [EFFECT_TOXIC_SPIKES] = 0, // TODO: Assign points - [EFFECT_GASTRO_ACID] = 0, // TODO: Assign points - [EFFECT_STEALTH_ROCK] = 0, // TODO: Assign points - [EFFECT_TELEKINESIS] = 0, // TODO: Assign points - [EFFECT_POWER_SWAP] = 0, // TODO: Assign points - [EFFECT_GUARD_SWAP] = 0, // TODO: Assign points - [EFFECT_HEART_SWAP] = 0, // TODO: Assign points - [EFFECT_POWER_SPLIT] = 0, // TODO: Assign points - [EFFECT_GUARD_SPLIT] = 0, // TODO: Assign points - [EFFECT_STICKY_WEB] = 0, // TODO: Assign points - [EFFECT_METAL_BURST] = 0, // TODO: Assign points - [EFFECT_LUCKY_CHANT] = 0, // TODO: Assign points - [EFFECT_SUCKER_PUNCH] = 0, // TODO: Assign points - [EFFECT_SIMPLE_BEAM] = 0, // TODO: Assign points - [EFFECT_ENTRAINMENT] = 0, // TODO: Assign points - [EFFECT_HEAL_PULSE] = 0, // TODO: Assign points - [EFFECT_QUASH] = 0, // TODO: Assign points - [EFFECT_ION_DELUGE] = 0, // TODO: Assign points - [EFFECT_FREEZE_DRY] = 0, // TODO: Assign points - [EFFECT_TOPSY_TURVY] = 0, // TODO: Assign points - [EFFECT_MISTY_TERRAIN] = 0, // TODO: Assign points - [EFFECT_GRASSY_TERRAIN] = 0, // TODO: Assign points - [EFFECT_ELECTRIC_TERRAIN] = 0, // TODO: Assign points - [EFFECT_PSYCHIC_TERRAIN] = 0, // TODO: Assign points - [EFFECT_ATTACK_ACCURACY_UP] = 0, // TODO: Assign points - [EFFECT_ATTACK_SPATK_UP] = 0, // TODO: Assign points - [EFFECT_TWO_TYPED_MOVE] = 0, // TODO: Assign points - [EFFECT_ME_FIRST] = 0, // TODO: Assign points - [EFFECT_QUIVER_DANCE] = 0, // TODO: Assign points - [EFFECT_COIL] = 0, // TODO: Assign points - [EFFECT_ELECTRIFY] = 0, // TODO: Assign points - [EFFECT_REFLECT_TYPE] = 0, // TODO: Assign points - [EFFECT_SOAK] = 0, // TODO: Assign points - [EFFECT_GROWTH] = 0, // TODO: Assign points - [EFFECT_LAST_RESORT] = 0, // TODO: Assign points - [EFFECT_SHELL_SMASH] = 0, // TODO: Assign points - [EFFECT_SHIFT_GEAR] = 0, // TODO: Assign points - [EFFECT_DEFENSE_UP_3] = 0, // TODO: Assign points - [EFFECT_NOBLE_ROAR] = 0, // TODO: Assign points - [EFFECT_VENOM_DRENCH] = 0, // TODO: Assign points - [EFFECT_TOXIC_THREAD] = 0, // TODO: Assign points - [EFFECT_HIT_SWITCH_TARGET] = 0, // TODO: Assign points - [EFFECT_FINAL_GAMBIT] = 0, // TODO: Assign points - [EFFECT_CHANGE_TYPE_ON_ITEM] = 0, // TODO: Assign points - [EFFECT_AUTOTOMIZE] = 0, // TODO: Assign points - [EFFECT_COPYCAT] = 0, // TODO: Assign points - [EFFECT_DEFOG] = 0, // TODO: Assign points - [EFFECT_HIT_ENEMY_HEAL_ALLY] = 0, // TODO: Assign points - [EFFECT_SYNCHRONOISE] = 0, // TODO: Assign points - [EFFECT_PSYCHO_SHIFT] = 0, // TODO: Assign points - [EFFECT_POWER_TRICK] = 0, // TODO: Assign points - [EFFECT_AFTER_YOU] = 0, // TODO: Assign points - [EFFECT_BESTOW] = 0, // TODO: Assign points - [EFFECT_ROTOTILLER] = 0, // TODO: Assign points - [EFFECT_FLOWER_SHIELD] = 0, // TODO: Assign points - [EFFECT_SPEED_SWAP] = 0, // TODO: Assign points - [EFFECT_REVELATION_DANCE] = 0, // TODO: Assign points - [EFFECT_AURORA_VEIL] = 0, // TODO: Assign points - [EFFECT_THIRD_TYPE] = 0, // TODO: Assign points - [EFFECT_ACUPRESSURE] = 0, // TODO: Assign points - [EFFECT_AROMATIC_MIST] = 0, // TODO: Assign points - [EFFECT_POWDER] = 0, // TODO: Assign points - [EFFECT_BELCH] = 0, // TODO: Assign points - [EFFECT_PARTING_SHOT] = 0, // TODO: Assign points - [EFFECT_MAT_BLOCK] = 0, // TODO: Assign points - [EFFECT_STOMPING_TANTRUM] = 0, // TODO: Assign points - [EFFECT_INSTRUCT] = 0, // TODO: Assign points - [EFFECT_LASER_FOCUS] = 0, // TODO: Assign points - [EFFECT_MAGNETIC_FLUX] = 0, // TODO: Assign points - [EFFECT_GEAR_UP] = 0, // TODO: Assign points - [EFFECT_STRENGTH_SAP] = 0, // TODO: Assign points - [EFFECT_MIND_BLOWN] = 0, // TODO: Assign points - [EFFECT_PURIFY] = 0, // TODO: Assign points - [EFFECT_SHORE_UP] = 0, // TODO: Assign points - [EFFECT_GEOMANCY] = 0, // TODO: Assign points - [EFFECT_FAIRY_LOCK] = 0, // TODO: Assign points - [EFFECT_ALLY_SWITCH] = 0, // TODO: Assign points - [EFFECT_RELIC_SONG] = 0, // TODO: Assign points - [EFFECT_BODY_PRESS] = 0, // TODO: Assign points - [EFFECT_EERIE_SPELL] = 0, // TODO: Assign points - [EFFECT_JUNGLE_HEALING] = 0, // TODO: Assign points - [EFFECT_COACHING] = 0, // TODO: Assign points - [EFFECT_LASH_OUT] = 0, // TODO: Assign points - [EFFECT_GRASSY_GLIDE] = 0, // TODO: Assign points - [EFFECT_DYNAMAX_DOUBLE_DMG] = 0, // TODO: Assign points - [EFFECT_DECORATE] = 0, // TODO: Assign points - [EFFECT_SNIPE_SHOT] = 0, // TODO: Assign points - [EFFECT_RECOIL_HP_25] = 0, // TODO: Assign points - [EFFECT_STUFF_CHEEKS] = 0, // TODO: Assign points - [EFFECT_GRAV_APPLE] = 0, // TODO: Assign points - [EFFECT_GLITZY_GLOW] = 0, // TODO: Assign points - [EFFECT_BADDY_BAD] = 0, // TODO: Assign points - [EFFECT_SAPPY_SEED] = 0, // TODO: Assign points - [EFFECT_FREEZY_FROST] = 0, // TODO: Assign points - [EFFECT_SPARKLY_SWIRL] = 0, // TODO: Assign points - [EFFECT_PLASMA_FISTS] = 0, // TODO: Assign points - [EFFECT_HYPERSPACE_FURY] = 0, // TODO: Assign points - [EFFECT_AURA_WHEEL] = 0, // TODO: Assign points - [EFFECT_PHOTON_GEYSER] = 0, // TODO: Assign points - [EFFECT_SHELL_SIDE_ARM] = 0, // TODO: Assign points - [EFFECT_TERRAIN_PULSE] = 0, // TODO: Assign points - [EFFECT_NO_RETREAT] = 0, // TODO: Assign points - [EFFECT_TAR_SHOT] = 0, // TODO: Assign points - [EFFECT_POLTERGEIST] = 0, // TODO: Assign points - [EFFECT_OCTOLOCK] = 0, // TODO: Assign points - [EFFECT_CLANGOROUS_SOUL] = 0, // TODO: Assign points - [EFFECT_BOLT_BEAK] = 0, // TODO: Assign points - [EFFECT_SKY_DROP] = 0, // TODO: Assign points - [EFFECT_EXPANDING_FORCE] = 0, // TODO: Assign points - [EFFECT_METEOR_BEAM] = 0, // TODO: Assign points - [EFFECT_RISING_VOLTAGE] = 0, // TODO: Assign points - [EFFECT_BEAK_BLAST] = 0, // TODO: Assign points - [EFFECT_COURT_CHANGE] = 0, // TODO: Assign points - [EFFECT_STEEL_BEAM] = 0, // TODO: Assign points - [EFFECT_EXTREME_EVOBOOST] = 0, // TODO: Assign points - [EFFECT_HIT_SET_REMOVE_TERRAIN] = 0, // TODO: Assign points - [EFFECT_DARK_VOID] = 0, // TODO: Assign points - [EFFECT_VICTORY_DANCE] = 0, // TODO: Assign points - [EFFECT_TEATIME] = 0, // TODO: Assign points - [EFFECT_ATTACK_UP_USER_ALLY] = 0, // TODO: Assign points - [EFFECT_SHELL_TRAP] = 0, // TODO: Assign points - [EFFECT_PSYBLADE] = 0, // TODO: Assign points - [EFFECT_HYDRO_STEAM] = 0, // TODO: Assign points - [EFFECT_REVIVAL_BLESSING] = 0, // TODO: Assign points - [EFFECT_SNOWSCAPE] = 4, - [EFFECT_TAKE_HEART] = 0, // TODO: Assign points - [EFFECT_COLLISION_COURSE] = 0, // TODO: Assign points - [EFFECT_CORROSIVE_GAS] = 0, // TODO: Assign points - [EFFECT_POPULATION_BOMB] = 0, // TODO: Assign points - [EFFECT_SALT_CURE] = 0, // TODO: Assign points - [EFFECT_CHILLY_RECEPTION] = 0, // TODO: Assign points - [EFFECT_MAX_MOVE] = 0, // TODO: Assign points - [EFFECT_GLAIVE_RUSH] = 0, // TODO: Assign points - [EFFECT_RAGING_BULL] = 0, // TODO: Assign points - [EFFECT_RAGE_FIST] = 0, // TODO: Assign points - [EFFECT_DOODLE] = 0, // TODO: Assign points - [EFFECT_FILLET_AWAY] = 0, // TODO: Assign points - [EFFECT_IVY_CUDGEL] = 0, // TODO: Assign points - [EFFECT_FICKLE_BEAM] = 0, // TODO: Assign points - [EFFECT_BLIZZARD] = 0, // TODO: Assign points - [EFFECT_RAIN_ALWAYS_HIT] = 0, // TODO: Assign points -}; - static const u16 sPoints_Effectiveness[] = { 4, // Super Effective @@ -618,7 +277,6 @@ static const u16 sPoints_StatIncreaseNotSelf[NUM_BATTLE_STATS - 1] = static const u16 *const sPointsArray[] = { - [PTS_MOVE_EFFECT] = sPoints_MoveEffect, [PTS_EFFECTIVENESS] = sPoints_Effectiveness, [PTS_SET_UP] = sPoints_SetUp, [PTS_RAIN] = sPoints_RainMoves, @@ -1279,7 +937,7 @@ static void AddMovePoints(u8 caseId, u16 arg1, u8 arg2, u8 arg3) { case PTS_MOVE_EFFECT: // arg1 -> move slot, arg2 -> move { - u8 baseFromEffect = sPointsArray[caseId][gBattleMoves[arg2].effect]; + u8 baseFromEffect = gBattleMoveEffects[gBattleMoves[arg2].effect].battleTvScore; // Various cases to add/remove points if (gBattleMoves[arg2].recoil > 0) diff --git a/src/battle_util.c b/src/battle_util.c index e056fcd6e6..877c3a2955 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -63,7 +63,6 @@ static u32 GetBattlerItemHoldEffectParam(u32 battler, u32 item); static uq4_12_t GetSupremeOverlordModifier(u32 battler); static bool32 CanBeInfinitelyConfused(u32 battler); -extern const u8 *const gBattleScriptsForMoveEffects[]; extern const u8 *const gBattlescriptsForRunningByItem[]; extern const u8 *const gBattlescriptsForUsingItem[]; extern const u8 *const gBattlescriptsForSafariActions[]; @@ -393,7 +392,7 @@ void HandleAction_UseMove(void) } else { - gBattlescriptCurrInstr = gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect]; + gBattlescriptCurrInstr = GET_MOVE_BATTLESCRIPT(gCurrentMove); } if (gBattleTypeFlags & BATTLE_TYPE_ARENA) diff --git a/src/data/battle_move_effects.h b/src/data/battle_move_effects.h new file mode 100644 index 0000000000..a70ce8fdbd --- /dev/null +++ b/src/data/battle_move_effects.h @@ -0,0 +1,2226 @@ +#include "battle.h" +#include "battle_scripts.h" +#include "constants/battle_move_effects.h" + +const struct BattleMoveEffect gBattleMoveEffects[NUM_BATTLE_MOVE_EFFECTS] = +{ + [EFFECT_HIT] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 1, + }, + + [EFFECT_SLEEP] = + { + .battleScript = BattleScript_EffectSleep, + .battleTvScore = 1, + }, + + [EFFECT_ABSORB] = + { + .battleScript = BattleScript_EffectAbsorb, + .battleTvScore = 4, + }, + + [EFFECT_EXPLOSION] = + { + .battleScript = BattleScript_EffectExplosion, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_DREAM_EATER] = + { + .battleScript = BattleScript_EffectDreamEater, + .battleTvScore = 5, + .encourageEncore = TRUE, + }, + + [EFFECT_MIRROR_MOVE] = + { + .battleScript = BattleScript_EffectMirrorMove, + .battleTvScore = 1, + }, + + [EFFECT_ATTACK_UP] = + { + .battleScript = BattleScript_EffectAttackUp, + .battleTvScore = 1, + .encourageEncore = TRUE, + }, + + [EFFECT_DEFENSE_UP] = + { + .battleScript = BattleScript_EffectDefenseUp, + .battleTvScore = 1, + .encourageEncore = TRUE, + }, + + [EFFECT_SPEED_UP] = + { + .battleScript = BattleScript_EffectSpeedUp, + .battleTvScore = 1, + .encourageEncore = TRUE, + }, + + [EFFECT_SPECIAL_ATTACK_UP] = + { + .battleScript = BattleScript_EffectSpecialAttackUp, + .battleTvScore = 1, + .encourageEncore = TRUE, + }, + + [EFFECT_SPECIAL_DEFENSE_UP] = + { + .battleScript = BattleScript_EffectSpecialDefenseUp, + .battleTvScore = 1, + .encourageEncore = TRUE, + }, + + [EFFECT_ACCURACY_UP] = + { + .battleScript = BattleScript_EffectAccuracyUp, + .battleTvScore = 1, + .encourageEncore = TRUE, + }, + + [EFFECT_EVASION_UP] = + { + .battleScript = BattleScript_EffectEvasionUp, + .battleTvScore = 1, + }, + + [EFFECT_SPECIAL_ATTACK_UP_3] = + { + .battleScript = BattleScript_EffectSpecialAttackUp3, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_ATTACK_DOWN] = + { + .battleScript = BattleScript_EffectAttackDown, + .battleTvScore = 1, + }, + + [EFFECT_DEFENSE_DOWN] = + { + .battleScript = BattleScript_EffectDefenseDown, + .battleTvScore = 1, + }, + + [EFFECT_SPEED_DOWN] = + { + .battleScript = BattleScript_EffectSpeedDown, + .battleTvScore = 1, + }, + + [EFFECT_SPECIAL_ATTACK_DOWN] = + { + .battleScript = BattleScript_EffectSpecialAttackDown, + .battleTvScore = 1, + }, + + [EFFECT_SPECIAL_DEFENSE_DOWN] = + { + .battleScript = BattleScript_EffectSpecialDefenseDown, + .battleTvScore = 1, + }, + + [EFFECT_ACCURACY_DOWN] = + { + .battleScript = BattleScript_EffectAccuracyDown, + .battleTvScore = 1, + }, + + [EFFECT_EVASION_DOWN] = + { + .battleScript = BattleScript_EffectEvasionDown, + .battleTvScore = 1, + }, + + [EFFECT_HAZE] = + { + .battleScript = BattleScript_EffectHaze, + .battleTvScore = 5, + .encourageEncore = TRUE, + }, + + [EFFECT_BIDE] = + { + .battleScript = BattleScript_EffectBide, + .battleTvScore = 5, + }, + + [EFFECT_ROAR] = + { + .battleScript = BattleScript_EffectRoar, + .battleTvScore = 5, + .encourageEncore = TRUE, + }, + + [EFFECT_MULTI_HIT] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 1, + }, + + [EFFECT_CONVERSION] = + { + .battleScript = BattleScript_EffectConversion, + .battleTvScore = 3, + .encourageEncore = TRUE, + }, + + [EFFECT_RESTORE_HP] = + { + .battleScript = BattleScript_EffectRestoreHp, + .battleTvScore = 3, + .encourageEncore = TRUE, + }, + + [EFFECT_TOXIC] = + { + .battleScript = BattleScript_EffectToxic, + .battleTvScore = 5, + .encourageEncore = TRUE, + }, + + [EFFECT_LIGHT_SCREEN] = + { + .battleScript = BattleScript_EffectLightScreen, + .battleTvScore = 7, + .encourageEncore = TRUE, + }, + + [EFFECT_REST] = + { + .battleScript = BattleScript_EffectRest, + .battleTvScore = 7, + .encourageEncore = TRUE, + }, + + [EFFECT_OHKO] = + { + .battleScript = BattleScript_EffectOHKO, + .battleTvScore = 7, + }, + + [EFFECT_FUSION_COMBO] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_SUPER_FANG] = + { + .battleScript = BattleScript_EffectSuperFang, + .battleTvScore = 5, + .encourageEncore = TRUE, + }, + + [EFFECT_FIXED_DAMAGE_ARG] = + { + .battleScript = BattleScript_EffectFixedDamageArg, + .battleTvScore = 1, + }, + + [EFFECT_HEAL_BLOCK] = + { + .battleScript = BattleScript_EffectHealBlock, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_RECOIL_IF_MISS] = + { + .battleScript = BattleScript_EffectRecoilIfMiss, + .battleTvScore = 1, + }, + + [EFFECT_MIST] = + { + .battleScript = BattleScript_EffectMist, + .battleTvScore = 5, + .encourageEncore = TRUE, + }, + + [EFFECT_FOCUS_ENERGY] = + { + .battleScript = BattleScript_EffectFocusEnergy, + .battleTvScore = 1, + .encourageEncore = TRUE, + }, + + [EFFECT_CONFUSE] = + { + .battleScript = BattleScript_EffectConfuse, + .battleTvScore = 4, + .encourageEncore = TRUE, + }, + + [EFFECT_ATTACK_UP_2] = + { + .battleScript = BattleScript_EffectAttackUp2, + .battleTvScore = 1, + .encourageEncore = TRUE, + }, + + [EFFECT_DEFENSE_UP_2] = + { + .battleScript = BattleScript_EffectDefenseUp2, + .battleTvScore = 1, + .encourageEncore = TRUE, + }, + + [EFFECT_SPEED_UP_2] = + { + .battleScript = BattleScript_EffectSpeedUp2, + .battleTvScore = 1, + .encourageEncore = TRUE, + }, + + [EFFECT_SPECIAL_ATTACK_UP_2] = + { + .battleScript = BattleScript_EffectSpecialAttackUp2, + .battleTvScore = 1, + .encourageEncore = TRUE, + }, + + [EFFECT_SPECIAL_DEFENSE_UP_2] = + { + .battleScript = BattleScript_EffectSpecialDefenseUp2, + .battleTvScore = 1, + .encourageEncore = TRUE, + }, + + [EFFECT_ACCURACY_UP_2] = + { + .battleScript = BattleScript_EffectAccuracyUp2, + .battleTvScore = 1, + .encourageEncore = TRUE, + }, + + [EFFECT_EVASION_UP_2] = + { + .battleScript = BattleScript_EffectEvasionUp2, + .battleTvScore = 1, + }, + + [EFFECT_TRANSFORM] = + { + .battleScript = BattleScript_EffectTransform, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_ATTACK_DOWN_2] = + { + .battleScript = BattleScript_EffectAttackDown2, + .battleTvScore = 1, + }, + + [EFFECT_DEFENSE_DOWN_2] = + { + .battleScript = BattleScript_EffectDefenseDown2, + .battleTvScore = 1, + }, + + [EFFECT_SPEED_DOWN_2] = + { + .battleScript = BattleScript_EffectSpeedDown2, + .battleTvScore = 1, + }, + + [EFFECT_SPECIAL_ATTACK_DOWN_2] = + { + .battleScript = BattleScript_EffectSpecialAttackDown2, + .battleTvScore = 1, + }, + + [EFFECT_SPECIAL_DEFENSE_DOWN_2] = + { + .battleScript = BattleScript_EffectSpecialDefenseDown2, + .battleTvScore = 1, + }, + + [EFFECT_ACCURACY_DOWN_2] = + { + .battleScript = BattleScript_EffectAccuracyDown2, + .battleTvScore = 1, + }, + + [EFFECT_EVASION_DOWN_2] = + { + .battleScript = BattleScript_EffectEvasionDown2, + .battleTvScore = 1, + }, + + [EFFECT_REFLECT] = + { + .battleScript = BattleScript_EffectReflect, + .battleTvScore = 7, + .encourageEncore = TRUE, + }, + + [EFFECT_POISON] = + { + .battleScript = BattleScript_EffectPoison, + .battleTvScore = 4, + .encourageEncore = TRUE, + }, + + [EFFECT_PARALYZE] = + { + .battleScript = BattleScript_EffectParalyze, + .battleTvScore = 4, + .encourageEncore = TRUE, + }, + + [EFFECT_TWO_TURNS_ATTACK] = + { + .battleScript = BattleScript_EffectTwoTurnsAttack, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_SUBSTITUTE] = + { + .battleScript = BattleScript_EffectSubstitute, + .battleTvScore = 4, + }, + + [EFFECT_RAGE] = + { + .battleScript = BattleScript_EffectRage, + .battleTvScore = 2, + }, + + [EFFECT_MIMIC] = + { + .battleScript = BattleScript_EffectMimic, + .battleTvScore = 4, + }, + + [EFFECT_METRONOME] = + { + .battleScript = BattleScript_EffectMetronome, + .battleTvScore = 1, + }, + + [EFFECT_LEECH_SEED] = + { + .battleScript = BattleScript_EffectLeechSeed, + .battleTvScore = 4, + .encourageEncore = TRUE, + }, + + [EFFECT_DO_NOTHING] = + { + .battleScript = BattleScript_EffectDoNothing, + .battleTvScore = 1, + .encourageEncore = TRUE, + }, + + [EFFECT_DISABLE] = + { + .battleScript = BattleScript_EffectDisable, + .battleTvScore = 7, + }, + + [EFFECT_LEVEL_DAMAGE] = + { + .battleScript = BattleScript_EffectLevelDamage, + .battleTvScore = 2, + }, + + [EFFECT_PSYWAVE] = + { + .battleScript = BattleScript_EffectPsywave, + .battleTvScore = 1, + }, + + [EFFECT_COUNTER] = + { + .battleScript = BattleScript_EffectCounter, + .battleTvScore = 5, + .encourageEncore = TRUE, + }, + + [EFFECT_ENCORE] = + { + .battleScript = BattleScript_EffectEncore, + .battleTvScore = 7, + }, + + [EFFECT_PAIN_SPLIT] = + { + .battleScript = BattleScript_EffectPainSplit, + .battleTvScore = 3, + }, + + [EFFECT_SNORE] = + { + .battleScript = BattleScript_EffectSnore, + .battleTvScore = 3, + }, + + [EFFECT_CONVERSION_2] = + { + .battleScript = BattleScript_EffectConversion2, + .battleTvScore = 4, + .encourageEncore = TRUE, + }, + + [EFFECT_LOCK_ON] = + { + .battleScript = BattleScript_EffectLockOn, + .battleTvScore = 3, + .encourageEncore = TRUE, + }, + + [EFFECT_SKETCH] = + { + .battleScript = BattleScript_EffectSketch, + .battleTvScore = 3, + }, + + [EFFECT_SLEEP_TALK] = + { + .battleScript = BattleScript_EffectSleepTalk, + .battleTvScore = 3, + .encourageEncore = TRUE, + }, + + [EFFECT_DESTINY_BOND] = + { + .battleScript = BattleScript_EffectDestinyBond, + .battleTvScore = 3, + }, + + [EFFECT_FLAIL] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 2, + }, + + [EFFECT_SPITE] = + { + .battleScript = BattleScript_EffectSpite, + .battleTvScore = 4, + }, + + [EFFECT_FALSE_SWIPE] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 1, + }, + + [EFFECT_HEAL_BELL] = + { + .battleScript = BattleScript_EffectHealBell, + .battleTvScore = 5, + .encourageEncore = TRUE, + }, + + [EFFECT_TRIPLE_KICK] = + { + .battleScript = BattleScript_EffectTripleKick, + .battleTvScore = 1, + }, + + [EFFECT_MEAN_LOOK] = + { + .battleScript = BattleScript_EffectMeanLook, + .battleTvScore = 5, + .encourageEncore = TRUE, + }, + + [EFFECT_NIGHTMARE] = + { + .battleScript = BattleScript_EffectNightmare, + .battleTvScore = 3, + .encourageEncore = TRUE, + }, + + [EFFECT_MINIMIZE] = + { + .battleScript = BattleScript_EffectMinimize, + .battleTvScore = 1, + }, + + [EFFECT_CURSE] = + { + .battleScript = BattleScript_EffectCurse, + .battleTvScore = 2, + .encourageEncore = TRUE, + }, + + [EFFECT_HEALING_WISH] = + { + .battleScript = BattleScript_EffectHealingWish, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_PROTECT] = + { + .battleScript = BattleScript_EffectProtect, + .battleTvScore = 5, + .encourageEncore = TRUE, + }, + + [EFFECT_SPIKES] = + { + .battleScript = BattleScript_EffectSpikes, + .battleTvScore = 4, + }, + + [EFFECT_FORESIGHT] = + { + .battleScript = BattleScript_EffectForesight, + .battleTvScore = 3, + .encourageEncore = TRUE, + }, + + [EFFECT_PERISH_SONG] = + { + .battleScript = BattleScript_EffectPerishSong, + .battleTvScore = 6, + .encourageEncore = TRUE, + }, + + [EFFECT_SANDSTORM] = + { + .battleScript = BattleScript_EffectSandstorm, + .battleTvScore = 4, + .encourageEncore = TRUE, + }, + + [EFFECT_ENDURE] = + { + .battleScript = BattleScript_EffectEndure, + .battleTvScore = 3, + .encourageEncore = TRUE, + }, + + [EFFECT_ROLLOUT] = + { + .battleScript = BattleScript_EffectRollout, + .battleTvScore = 3, + }, + + [EFFECT_SWAGGER] = + { + .battleScript = BattleScript_EffectSwagger, + .battleTvScore = 3, + .encourageEncore = TRUE, + }, + + [EFFECT_FURY_CUTTER] = + { + .battleScript = BattleScript_EffectFuryCutter, + .battleTvScore = 2, + }, + + [EFFECT_ATTRACT] = + { + .battleScript = BattleScript_EffectAttract, + .battleTvScore = 4, + .encourageEncore = TRUE, + }, + + [EFFECT_RETURN] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 1, + }, + + [EFFECT_PRESENT] = + { + .battleScript = BattleScript_EffectPresent, + .battleTvScore = 1, + }, + + [EFFECT_FRUSTRATION] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 1, + }, + + [EFFECT_SAFEGUARD] = + { + .battleScript = BattleScript_EffectSafeguard, + .battleTvScore = 5, + .encourageEncore = TRUE, + }, + + [EFFECT_MAGNITUDE] = + { + .battleScript = BattleScript_EffectMagnitude, + .battleTvScore = 1, + }, + + [EFFECT_BATON_PASS] = + { + .battleScript = BattleScript_EffectBatonPass, + .battleTvScore = 7, + }, + + [EFFECT_PURSUIT] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 2, + }, + + [EFFECT_CAPTIVATE] = + { + .battleScript = BattleScript_EffectCaptivate, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_MORNING_SUN] = + { + .battleScript = BattleScript_EffectMorningSun, + .battleTvScore = 4, + .encourageEncore = TRUE, + }, + + [EFFECT_SYNTHESIS] = + { + .battleScript = BattleScript_EffectSynthesis, + .battleTvScore = 4, + .encourageEncore = TRUE, + }, + + [EFFECT_MOONLIGHT] = + { + .battleScript = BattleScript_EffectMoonlight, + .battleTvScore = 4, + .encourageEncore = TRUE, + }, + + [EFFECT_HIDDEN_POWER] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 1, + }, + + [EFFECT_RAIN_DANCE] = + { + .battleScript = BattleScript_EffectRainDance, + .battleTvScore = 4, + .encourageEncore = TRUE, + }, + + [EFFECT_SUNNY_DAY] = + { + .battleScript = BattleScript_EffectSunnyDay, + .battleTvScore = 4, + .encourageEncore = TRUE, + }, + + [EFFECT_FELL_STINGER] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_BELLY_DRUM] = + { + .battleScript = BattleScript_EffectBellyDrum, + .battleTvScore = 7, + .encourageEncore = TRUE, + }, + + [EFFECT_PSYCH_UP] = + { + .battleScript = BattleScript_EffectPsychUp, + .battleTvScore = 7, + .encourageEncore = TRUE, + }, + + [EFFECT_MIRROR_COAT] = + { + .battleScript = BattleScript_EffectMirrorCoat, + .battleTvScore = 6, + .encourageEncore = TRUE, + }, + + [EFFECT_SKULL_BASH] = + { + .battleScript = BattleScript_EffectSkullBash, + .battleTvScore = 3, + }, + + [EFFECT_EARTHQUAKE] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 1, + }, + + [EFFECT_FUTURE_SIGHT] = + { + .battleScript = BattleScript_EffectFutureSight, + .battleTvScore = 1, + .encourageEncore = TRUE, + }, + + [EFFECT_GUST] = + { + .battleScript = BattleScript_EffectGust, + .battleTvScore = 1, + }, + + [EFFECT_SOLAR_BEAM] = + { + .battleScript = BattleScript_EffectSolarBeam, + .battleTvScore = 1, + }, + + [EFFECT_THUNDER] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 1, + }, + + [EFFECT_TELEPORT] = + { + .battleScript = BattleScript_EffectTeleport, + .battleTvScore = 1, + }, + + [EFFECT_BEAT_UP] = + { + .battleScript = BattleScript_EffectBeatUp, + .battleTvScore = 2, + }, + + [EFFECT_SEMI_INVULNERABLE] = + { + .battleScript = BattleScript_EffectSemiInvulnerable, + .battleTvScore = 3, + }, + + [EFFECT_DEFENSE_CURL] = + { + .battleScript = BattleScript_EffectDefenseCurl, + .battleTvScore = 1, + .encourageEncore = TRUE, + }, + + [EFFECT_SOFTBOILED] = + { + .battleScript = BattleScript_EffectSoftboiled, + .battleTvScore = 1, + .encourageEncore = TRUE, + }, + + [EFFECT_FAKE_OUT] = + { + .battleScript = BattleScript_EffectFakeOut, + .battleTvScore = 4, + .encourageEncore = TRUE, + }, + + [EFFECT_UPROAR] = + { + .battleScript = BattleScript_EffectUproar, + .battleTvScore = 4, + }, + + [EFFECT_STOCKPILE] = + { + .battleScript = BattleScript_EffectStockpile, + .battleTvScore = 3, + .encourageEncore = TRUE, + }, + + [EFFECT_SPIT_UP] = + { + .battleScript = BattleScript_EffectSpitUp, + .battleTvScore = 3, + .encourageEncore = TRUE, + }, + + [EFFECT_SWALLOW] = + { + .battleScript = BattleScript_EffectSwallow, + .battleTvScore = 3, + .encourageEncore = TRUE, + }, + + [EFFECT_WORRY_SEED] = + { + .battleScript = BattleScript_EffectWorrySeed, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_HAIL] = + { + .battleScript = BattleScript_EffectHail, + .battleTvScore = 4, + .encourageEncore = TRUE, + }, + + [EFFECT_TORMENT] = + { + .battleScript = BattleScript_EffectTorment, + .battleTvScore = 7, + .encourageEncore = TRUE, + }, + + [EFFECT_FLATTER] = + { + .battleScript = BattleScript_EffectFlatter, + .battleTvScore = 7, + }, + + [EFFECT_WILL_O_WISP] = + { + .battleScript = BattleScript_EffectWillOWisp, + .battleTvScore = 5, + .encourageEncore = TRUE, + }, + + [EFFECT_MEMENTO] = + { + .battleScript = BattleScript_EffectMemento, + .battleTvScore = 7, + }, + + [EFFECT_FACADE] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 1, + }, + + [EFFECT_FOCUS_PUNCH] = + { + .battleScript = BattleScript_EffectFocusPunch, + .battleTvScore = 7, + }, + + [EFFECT_DOUBLE_POWER_ON_ARG_STATUS] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 1, + }, + + [EFFECT_FOLLOW_ME] = + { + .battleScript = BattleScript_EffectFollowMe, + .battleTvScore = 5, + .encourageEncore = TRUE, + }, + + [EFFECT_NATURE_POWER] = + { + .battleScript = BattleScript_EffectNaturePower, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_CHARGE] = + { + .battleScript = BattleScript_EffectCharge, + .battleTvScore = 4, + .encourageEncore = TRUE, + }, + + [EFFECT_TAUNT] = + { + .battleScript = BattleScript_EffectTaunt, + .battleTvScore = 4, + }, + + [EFFECT_HELPING_HAND] = + { + .battleScript = BattleScript_EffectHelpingHand, + .battleTvScore = 4, + }, + + [EFFECT_TRICK] = + { + .battleScript = BattleScript_EffectTrick, + .battleTvScore = 4, + .encourageEncore = TRUE, + }, + + [EFFECT_ROLE_PLAY] = + { + .battleScript = BattleScript_EffectRolePlay, + .battleTvScore = 4, + .encourageEncore = TRUE, + }, + + [EFFECT_WISH] = + { + .battleScript = BattleScript_EffectWish, + .battleTvScore = 2, + }, + + [EFFECT_ASSIST] = + { + .battleScript = BattleScript_EffectAssist, + .battleTvScore = 2, + }, + + [EFFECT_INGRAIN] = + { + .battleScript = BattleScript_EffectIngrain, + .battleTvScore = 6, + .encourageEncore = TRUE, + }, + + [EFFECT_MAGIC_COAT] = + { + .battleScript = BattleScript_EffectMagicCoat, + .battleTvScore = 6, + }, + + [EFFECT_RECYCLE] = + { + .battleScript = BattleScript_EffectRecycle, + .battleTvScore = 4, + .encourageEncore = TRUE, + }, + + [EFFECT_REVENGE] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 4, + }, + + [EFFECT_BRICK_BREAK] = + { + .battleScript = BattleScript_EffectBrickBreak, + .battleTvScore = 2, + }, + + [EFFECT_YAWN] = + { + .battleScript = BattleScript_EffectYawn, + .battleTvScore = 5, + }, + + [EFFECT_KNOCK_OFF] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 2, + }, + + [EFFECT_ENDEAVOR] = + { + .battleScript = BattleScript_EffectEndeavor, + .battleTvScore = 1, + }, + + [EFFECT_ERUPTION] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 1, + }, + + [EFFECT_SKILL_SWAP] = + { + .battleScript = BattleScript_EffectSkillSwap, + .battleTvScore = 6, + .encourageEncore = TRUE, + }, + + [EFFECT_IMPRISON] = + { + .battleScript = BattleScript_EffectImprison, + .battleTvScore = 6, + .encourageEncore = TRUE, + }, + + [EFFECT_REFRESH] = + { + .battleScript = BattleScript_EffectRefresh, + .battleTvScore = 6, + .encourageEncore = TRUE, + }, + + [EFFECT_GRUDGE] = + { + .battleScript = BattleScript_EffectGrudge, + .battleTvScore = 1, + .encourageEncore = TRUE, + }, + + [EFFECT_SNATCH] = + { + .battleScript = BattleScript_EffectSnatch, + .battleTvScore = 1, + }, + + [EFFECT_LOW_KICK] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 1, + }, + + [EFFECT_TEETER_DANCE] = + { + .battleScript = BattleScript_EffectTeeterDance, + .battleTvScore = 6, + }, + + [EFFECT_HIT_ESCAPE] = + { + .battleScript = BattleScript_EffectHitEscape, + .battleTvScore = 4, + }, + + [EFFECT_MUD_SPORT] = + { + .battleScript = BattleScript_EffectMudSport, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_WEATHER_BALL] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 1, + }, + + [EFFECT_TICKLE] = + { + .battleScript = BattleScript_EffectTickle, + .battleTvScore = 1, + }, + + [EFFECT_COSMIC_POWER] = + { + .battleScript = BattleScript_EffectCosmicPower, + .battleTvScore = 1, + .encourageEncore = TRUE, + }, + + [EFFECT_SKY_UPPERCUT] = + { + .battleScript = BattleScript_EffectSkyUppercut, + .battleTvScore = 1, + }, + + [EFFECT_BULK_UP] = + { + .battleScript = BattleScript_EffectBulkUp, + .battleTvScore = 1, + .encourageEncore = TRUE, + }, + + [EFFECT_PLACEHOLDER] = + { + .battleScript = BattleScript_EffectPlaceholder, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_WATER_SPORT] = + { + .battleScript = BattleScript_EffectWaterSport, + .battleTvScore = 4, + .encourageEncore = TRUE, + }, + + [EFFECT_CALM_MIND] = + { + .battleScript = BattleScript_EffectCalmMind, + .battleTvScore = 1, + .encourageEncore = TRUE, + }, + + [EFFECT_DRAGON_DANCE] = + { + .battleScript = BattleScript_EffectDragonDance, + .battleTvScore = 1, + .encourageEncore = TRUE, + }, + + [EFFECT_CAMOUFLAGE] = + { + .battleScript = BattleScript_EffectCamouflage, + .battleTvScore = 3, + .encourageEncore = TRUE, + }, + + [EFFECT_PLEDGE] = + { + .battleScript = BattleScript_EffectPledge, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_FLING] = + { + .battleScript = BattleScript_EffectFling, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_NATURAL_GIFT] = + { + .battleScript = BattleScript_EffectNaturalGift, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_WRING_OUT] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_ASSURANCE] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_TRUMP_CARD] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_ACROBATICS] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_HEAT_CRASH] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_PUNISHMENT] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_STORED_POWER] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_ELECTRO_BALL] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_GYRO_BALL] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_ECHOED_VOICE] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_PAYBACK] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_ROUND] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_BRINE] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_RETALIATE] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_BULLDOZE] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_FOUL_PLAY] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_PSYSHOCK] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_ROOST] = + { + .battleScript = BattleScript_EffectRoost, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_GRAVITY] = + { + .battleScript = BattleScript_EffectGravity, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_MIRACLE_EYE] = + { + .battleScript = BattleScript_EffectMircleEye, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_TAILWIND] = + { + .battleScript = BattleScript_EffectTailwind, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_EMBARGO] = + { + .battleScript = BattleScript_EffectEmbargo, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_AQUA_RING] = + { + .battleScript = BattleScript_EffectAquaRing, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_TRICK_ROOM] = + { + .battleScript = BattleScript_EffectTrickRoom, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_WONDER_ROOM] = + { + .battleScript = BattleScript_EffectWonderRoom, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_MAGIC_ROOM] = + { + .battleScript = BattleScript_EffectMagicRoom, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_MAGNET_RISE] = + { + .battleScript = BattleScript_EffectMagnetRise, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_TOXIC_SPIKES] = + { + .battleScript = BattleScript_EffectToxicSpikes, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_GASTRO_ACID] = + { + .battleScript = BattleScript_EffectGastroAcid, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_STEALTH_ROCK] = + { + .battleScript = BattleScript_EffectStealthRock, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_TELEKINESIS] = + { + .battleScript = BattleScript_EffectTelekinesis, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_POWER_SWAP] = + { + .battleScript = BattleScript_EffectPowerSwap, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_GUARD_SWAP] = + { + .battleScript = BattleScript_EffectGuardSwap, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_HEART_SWAP] = + { + .battleScript = BattleScript_EffectHeartSwap, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_POWER_SPLIT] = + { + .battleScript = BattleScript_EffectPowerSplit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_GUARD_SPLIT] = + { + .battleScript = BattleScript_EffectGuardSplit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_STICKY_WEB] = + { + .battleScript = BattleScript_EffectStickyWeb, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_METAL_BURST] = + { + .battleScript = BattleScript_EffectMetalBurst, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_LUCKY_CHANT] = + { + .battleScript = BattleScript_EffectLuckyChant, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_SUCKER_PUNCH] = + { + .battleScript = BattleScript_EffectSuckerPunch, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_SIMPLE_BEAM] = + { + .battleScript = BattleScript_EffectSimpleBeam, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_ENTRAINMENT] = + { + .battleScript = BattleScript_EffectEntrainment, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_HEAL_PULSE] = + { + .battleScript = BattleScript_EffectHealPulse, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_QUASH] = + { + .battleScript = BattleScript_EffectQuash, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_ION_DELUGE] = + { + .battleScript = BattleScript_EffectIonDeluge, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_FREEZE_DRY] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_TOPSY_TURVY] = + { + .battleScript = BattleScript_EffectTopsyTurvy, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_MISTY_TERRAIN] = + { + .battleScript = BattleScript_EffectMistyTerrain, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_GRASSY_TERRAIN] = + { + .battleScript = BattleScript_EffectGrassyTerrain, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_ELECTRIC_TERRAIN] = + { + .battleScript = BattleScript_EffectElectricTerrain, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_PSYCHIC_TERRAIN] = + { + .battleScript = BattleScript_EffectPsychicTerrain, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_ATTACK_ACCURACY_UP] = + { + .battleScript = BattleScript_EffectAttackAccUp, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_ATTACK_SPATK_UP] = + { + .battleScript = BattleScript_EffectAttackSpAttackUp, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_TWO_TYPED_MOVE] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_ME_FIRST] = + { + .battleScript = BattleScript_EffectMeFirst, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_QUIVER_DANCE] = + { + .battleScript = BattleScript_EffectQuiverDance, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_COIL] = + { + .battleScript = BattleScript_EffectCoil, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_ELECTRIFY] = + { + .battleScript = BattleScript_EffectElectrify, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_REFLECT_TYPE] = + { + .battleScript = BattleScript_EffectReflectType, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_SOAK] = + { + .battleScript = BattleScript_EffectSoak, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_GROWTH] = + { + .battleScript = BattleScript_EffectGrowth, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_LAST_RESORT] = + { + .battleScript = BattleScript_EffectLastResort, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_SHELL_SMASH] = + { + .battleScript = BattleScript_EffectShellSmash, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_SHIFT_GEAR] = + { + .battleScript = BattleScript_EffectShiftGear, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_DEFENSE_UP_3] = + { + .battleScript = BattleScript_EffectDefenseUp3, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_NOBLE_ROAR] = + { + .battleScript = BattleScript_EffectNobleRoar, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_VENOM_DRENCH] = + { + .battleScript = BattleScript_EffectVenomDrench, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_TOXIC_THREAD] = + { + .battleScript = BattleScript_EffectToxicThread, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_HIT_SWITCH_TARGET] = + { + .battleScript = BattleScript_EffectHitSwitchTarget, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_FINAL_GAMBIT] = + { + .battleScript = BattleScript_EffectFinalGambit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_CHANGE_TYPE_ON_ITEM] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_AUTOTOMIZE] = + { + .battleScript = BattleScript_EffectAutotomize, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_COPYCAT] = + { + .battleScript = BattleScript_EffectCopycat, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_DEFOG] = + { + .battleScript = BattleScript_EffectDefog, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_HIT_ENEMY_HEAL_ALLY] = + { + .battleScript = BattleScript_EffectHitEnemyHealAlly, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_SYNCHRONOISE] = + { + .battleScript = BattleScript_EffectSynchronoise, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_PSYCHO_SHIFT] = + { + .battleScript = BattleScript_EffectPsychoShift, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_POWER_TRICK] = + { + .battleScript = BattleScript_EffectPowerTrick, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_AFTER_YOU] = + { + .battleScript = BattleScript_EffectAfterYou, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_BESTOW] = + { + .battleScript = BattleScript_EffectBestow, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_ROTOTILLER] = + { + .battleScript = BattleScript_EffectRototiller, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_FLOWER_SHIELD] = + { + .battleScript = BattleScript_EffectFlowerShield, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_SPEED_SWAP] = + { + .battleScript = BattleScript_EffectSpeedSwap, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_REVELATION_DANCE] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_AURORA_VEIL] = + { + .battleScript = BattleScript_EffectAuroraVeil, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_THIRD_TYPE] = + { + .battleScript = BattleScript_EffectThirdType, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_ACUPRESSURE] = + { + .battleScript = BattleScript_EffectAcupressure, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_AROMATIC_MIST] = + { + .battleScript = BattleScript_EffectAromaticMist, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_POWDER] = + { + .battleScript = BattleScript_EffectPowder, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_BELCH] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_PARTING_SHOT] = + { + .battleScript = BattleScript_EffectPartingShot, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_MAT_BLOCK] = + { + .battleScript = BattleScript_EffectMatBlock, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_STOMPING_TANTRUM] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_INSTRUCT] = + { + .battleScript = BattleScript_EffectInstruct, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_LASER_FOCUS] = + { + .battleScript = BattleScript_EffectLaserFocus, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_MAGNETIC_FLUX] = + { + .battleScript = BattleScript_EffectMagneticFlux, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_GEAR_UP] = + { + .battleScript = BattleScript_EffectGearUp, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_STRENGTH_SAP] = + { + .battleScript = BattleScript_EffectStrengthSap, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_MIND_BLOWN] = + { + .battleScript = BattleScript_EffectMindBlown, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_PURIFY] = + { + .battleScript = BattleScript_EffectPurify, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_FAIL_IF_NOT_ARG_TYPE] = + { + .battleScript = BattleScript_FailIfNotArgType, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_SHORE_UP] = + { + .battleScript = BattleScript_EffectShoreUp, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_GEOMANCY] = + { + .battleScript = BattleScript_EffectGeomancy, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_FAIRY_LOCK] = + { + .battleScript = BattleScript_EffectFairyLock, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_ALLY_SWITCH] = + { + .battleScript = BattleScript_EffectAllySwitch, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_RELIC_SONG] = + { + .battleScript = BattleScript_EffectRelicSong, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_BODY_PRESS] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_EERIE_SPELL] = + { + .battleScript = BattleScript_EffectEerieSpell, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_JUNGLE_HEALING] = + { + .battleScript = BattleScript_EffectJungleHealing, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_COACHING] = + { + .battleScript = BattleScript_EffectCoaching, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_LASH_OUT] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_GRASSY_GLIDE] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_DYNAMAX_DOUBLE_DMG] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_DECORATE] = + { + .battleScript = BattleScript_EffectDecorate, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_SNIPE_SHOT] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_RECOIL_HP_25] = + { + .battleScript = BattleScript_EffectRecoilHP25, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_STUFF_CHEEKS] = + { + .battleScript = BattleScript_EffectStuffCheeks, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_GRAV_APPLE] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_GLITZY_GLOW] = + { + .battleScript = BattleScript_EffectGlitzyGlow, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_BADDY_BAD] = + { + .battleScript = BattleScript_EffectBaddyBad, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_SAPPY_SEED] = + { + .battleScript = BattleScript_EffectSappySeed, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_FREEZY_FROST] = + { + .battleScript = BattleScript_EffectFreezyFrost, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_SPARKLY_SWIRL] = + { + .battleScript = BattleScript_EffectSparklySwirl, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_PLASMA_FISTS] = + { + .battleScript = BattleScript_EffectPlasmaFists, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_HYPERSPACE_FURY] = + { + .battleScript = BattleScript_EffectHyperspaceFury, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_AURA_WHEEL] = + { + .battleScript = BattleScript_EffectAuraWheel, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_PHOTON_GEYSER] = + { + .battleScript = BattleScript_EffectPhotonGeyser, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_SHELL_SIDE_ARM] = + { + .battleScript = BattleScript_EffectShellSideArm, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_TERRAIN_PULSE] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_NO_RETREAT] = + { + .battleScript = BattleScript_EffectNoRetreat, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_TAR_SHOT] = + { + .battleScript = BattleScript_EffectTarShot, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_POLTERGEIST] = + { + .battleScript = BattleScript_EffectPoltergeist, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_OCTOLOCK] = + { + .battleScript = BattleScript_EffectOctolock, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_CLANGOROUS_SOUL] = + { + .battleScript = BattleScript_EffectClangorousSoul, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_BOLT_BEAK] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_SKY_DROP] = + { + .battleScript = BattleScript_EffectSkyDrop, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_EXPANDING_FORCE] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_METEOR_BEAM] = + { + .battleScript = BattleScript_EffectMeteorBeam, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_RISING_VOLTAGE] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_BEAK_BLAST] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_COURT_CHANGE] = + { + .battleScript = BattleScript_EffectCourtChange, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_STEEL_BEAM] = + { + .battleScript = BattleScript_EffectSteelBeam, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_EXTREME_EVOBOOST] = + { + .battleScript = BattleScript_EffectExtremeEvoboost, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_HIT_SET_REMOVE_TERRAIN] = + { + .battleScript = BattleScript_EffectHitSetRemoveTerrain, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_DARK_VOID] = + { + .battleScript = BattleScript_EffectDarkVoid, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_VICTORY_DANCE] = + { + .battleScript = BattleScript_EffectVictoryDance, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_TEATIME] = + { + .battleScript = BattleScript_EffectTeatime, + .battleTvScore = 0, // TODO: Assign points + .encourageEncore = TRUE, + }, + + [EFFECT_ATTACK_UP_USER_ALLY] = + { + .battleScript = BattleScript_EffectAttackUpUserAlly, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_SHELL_TRAP] = + { + .battleScript = BattleScript_EffectShellTrap, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_PSYBLADE] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_HYDRO_STEAM] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_REVIVAL_BLESSING] = + { + .battleScript = BattleScript_EffectRevivalBlessing, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_SNOWSCAPE] = + { + .battleScript = BattleScript_EffectSnow, + .battleTvScore = 4, + }, + + [EFFECT_TAKE_HEART] = + { + .battleScript = BattleScript_EffectTakeHeart, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_COLLISION_COURSE] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_CORROSIVE_GAS] = + { + .battleScript = BattleScript_EffectCorrosiveGas, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_POPULATION_BOMB] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_SALT_CURE] = + { + .battleScript = BattleScript_EffectSaltCure, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_CHILLY_RECEPTION] = + { + .battleScript = BattleScript_EffectChillyReception, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_MAX_MOVE] = + { + .battleScript = BattleScript_EffectMaxMove, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_GLAIVE_RUSH] = + { + .battleScript = BattleScript_EffectGlaiveRush, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_RAGING_BULL] = + { + .battleScript = BattleScript_EffectBrickBreak, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_RAGE_FIST] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_DOODLE] = + { + .battleScript = BattleScript_EffectDoodle, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_FILLET_AWAY] = + { + .battleScript = BattleScript_EffectFilletAway, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_IVY_CUDGEL] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_FICKLE_BEAM] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_BLIZZARD] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_RAIN_ALWAYS_HIT] = + { + .battleScript = BattleScript_EffectHit, + .battleTvScore = 0, // TODO: Assign points + }, + + [EFFECT_SHED_TAIL] = + { + .battleScript = BattleScript_EffectShedTail, + .battleTvScore = 0, // TODO: Assign points + }, +};