From 648f7343a883925c7fb3aacf454bad4c9356d4ba Mon Sep 17 00:00:00 2001 From: amiosi <44352097+amiosi@users.noreply.github.com> Date: Wed, 10 Feb 2021 18:41:49 -0500 Subject: [PATCH] old gen fixes + lock-on & psych up fix beat up config option as well --- src/data/battle_moves.h | 130 +++++++++++++++++++++++++++------------- 1 file changed, 87 insertions(+), 43 deletions(-) diff --git a/src/data/battle_moves.h b/src/data/battle_moves.h index cb2f633e8..a1d5ce694 100644 --- a/src/data/battle_moves.h +++ b/src/data/battle_moves.h @@ -265,12 +265,12 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = #if B_UPDATED_MOVE_DATA >= GEN_6 .accuracy = 0, .flags = FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, - #elif B_UPDATED_MOVE_DATA >= GEN_5 + #elif B_UPDATED_MOVE_DATA == GEN_5 .accuracy = 100, - .flags = FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, + .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, #else .accuracy = 100, - .flags = FLAG_MIRROR_MOVE_AFFECTED, + .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, #endif .effect = EFFECT_ROAR, .power = 0, @@ -337,7 +337,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = #if B_UPDATED_MOVE_DATA >= GEN_6 .power = 45, .pp = 25, - #elif B_UPDATED_MOVE_DATA >= GEN_4 + #elif B_UPDATED_MOVE_DATA == GEN_4 || B_UPDATED_MOVE_DATA == GEN_5 .power = 35, .pp = 15, #else @@ -511,7 +511,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = #if B_UPDATED_MOVE_DATA >= GEN_7 .power = 40, .accuracy = 100, - #elif B_UPDATED_MOVE_DATA >= GEN_5 + #elif B_UPDATED_MOVE_DATA == GEN_5 || B_UPDATED_MOVE_DATA == GEN_6 .power = 50, .accuracy = 100, #else @@ -719,12 +719,12 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = #if B_UPDATED_MOVE_DATA >= GEN_6 .accuracy = 0, .flags = FLAG_MIRROR_MOVE_AFFECTED | FLAG_SOUND | FLAG_MAGIC_COAT_AFFECTED, - #elif B_UPDATED_MOVE_DATA >= GEN_5 + #elif B_UPDATED_MOVE_DATA == GEN_5 .accuracy = 100, - .flags = FLAG_MIRROR_MOVE_AFFECTED | FLAG_SOUND | FLAG_MAGIC_COAT_AFFECTED, + .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SOUND | FLAG_MAGIC_COAT_AFFECTED, #else .accuracy = 100, - .flags = FLAG_MIRROR_MOVE_AFFECTED | FLAG_SOUND, + .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SOUND, #endif .effect = EFFECT_ROAR, .power = 0, @@ -901,7 +901,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = #if B_UPDATED_MOVE_DATA >= GEN_6 .power = 90, .target = MOVE_TARGET_FOES_AND_ALLY, - #elif B_UPDATED_MOVE_DATA >= GEN_4 + #elif B_UPDATED_MOVE_DATA == GEN_4 || B_UPDATED_MOVE_DATA == GEN_5 .power = 95, .target = MOVE_TARGET_FOES_AND_ALLY, #else @@ -1072,8 +1072,10 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = [MOVE_COUNTER] = { - #if B_UPDATED_MOVE_DATA >= GEN_4 + #if B_UPDATED_MOVE_DATA >= GEN_5 .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED, + #elif B_UPDATED_MOVE_DATA == GEN_4 + .flags = FLAG_MAKES_CONTACT, #else .flags = FLAG_MAKES_CONTACT | FLAG_MIRROR_MOVE_AFFECTED, #endif @@ -1278,7 +1280,11 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = [MOVE_STRING_SHOT] = { - .effect = EFFECT_SPEED_DOWN_2, + #if B_UPDATED_MOVE_DATA >= GEN_6 + .effect = EFFECT_SPEED_DOWN_2, + #else + .effect = EFFECT_SPEED_DOWN, + #endif .power = 0, .type = TYPE_BUG, .accuracy = 95, @@ -1976,9 +1982,12 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = [MOVE_WATERFALL] = { - #if B_UPDATED_MOVE_DATA >= GEN_4 + #if B_UPDATED_MOVE_DATA >= GEN_5 .effect = EFFECT_FLINCH_HIT, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, + #elif B_UPDATED_MOVE_DATA == GEN_4 + .effect = EFFECT_FLINCH_HIT, + .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, #else .effect = EFFECT_HIT, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST, @@ -2689,14 +2698,10 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = [MOVE_NIGHTMARE] = { - #if B_UPDATED_MOVE_DATA >= GEN_4 - .accuracy = 100, - #else - .accuracy = 0, - #endif .effect = EFFECT_NIGHTMARE, .power = 0, .type = TYPE_GHOST, + .accuracy = 100, .pp = 15, .secondaryEffectChance = 0, .target = MOVE_TARGET_SELECTED, @@ -2812,10 +2817,10 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = .target = MOVE_TARGET_BOTH, #elif B_UPDATED_MOVE_DATA == GEN_5 .accuracy = 100, - .target = MOVE_TARGET_FOES_AND_ALLY, + .target = MOVE_TARGET_SELECTED, #else .accuracy = 85, - .target = MOVE_TARGET_FOES_AND_ALLY, + .target = MOVE_TARGET_SELECTED, #endif .effect = EFFECT_SPEED_DOWN_2, .power = 0, @@ -2875,6 +2880,11 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = [MOVE_PROTECT] = { + #if B_UPDATED_MOVE_DATA >= GEN_5 + .priority = 4, + #else + .priority = 3, + #endif .effect = EFFECT_PROTECT, .power = 0, .type = TYPE_NORMAL, @@ -2882,7 +2892,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = .pp = 10, .secondaryEffectChance = 0, .target = MOVE_TARGET_USER, - .priority = 4, .flags = FLAG_PROTECTION_MOVE, .split = SPLIT_STATUS, }, @@ -3052,7 +3061,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = #if B_UPDATED_MOVE_DATA >= GEN_5 .accuracy = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_MAGIC_COAT_AFFECTED, - #elif B_UPDATED_MOVE_DATA >= GEN_4 + #elif B_UPDATED_MOVE_DATA == GEN_4 .accuracy = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, #else @@ -3113,6 +3122,11 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = [MOVE_DETECT] = { + #if B_UPDATED_MOVE_DATA >= GEN_5 + .priority = 4, + #else + .priority = 3, + #endif .effect = EFFECT_PROTECT, .power = 0, .type = TYPE_FIGHTING, @@ -3120,7 +3134,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = .pp = 5, .secondaryEffectChance = 0, .target = MOVE_TARGET_USER, - .priority = 4, .flags = FLAG_PROTECTION_MOVE, .split = SPLIT_STATUS, }, @@ -3146,9 +3159,9 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = [MOVE_LOCK_ON] = { #if B_UPDATED_MOVE_DATA >= GEN_4 - .accuracy = 100, - #else .accuracy = 0, + #else + .accuracy = 100, #endif .effect = EFFECT_LOCK_ON, .power = 0, @@ -3221,6 +3234,11 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = [MOVE_ENDURE] = { + #if B_UPDATED_MOVE_DATA >= GEN_5 + .priority = 4, + #else + .priority = 3, + #endif .effect = EFFECT_ENDURE, .power = 0, .type = TYPE_NORMAL, @@ -3228,7 +3246,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = .pp = 10, .secondaryEffectChance = 0, .target = MOVE_TARGET_USER, - .priority = 4, .flags = FLAG_PROTECTION_MOVE, .split = SPLIT_STATUS, }, @@ -3625,7 +3642,11 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = [MOVE_SWEET_SCENT] = { - .effect = EFFECT_EVASION_DOWN_2, + #if B_UPDATED_MOVE_DATA >= GEN_6 + .effect = EFFECT_EVASION_DOWN_2, + #else + .effect = EFFECT_EVASION_DOWN, + #endif .power = 0, .type = TYPE_NORMAL, .accuracy = 100, @@ -3727,8 +3748,12 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = [MOVE_HIDDEN_POWER] = { + #if B_UPDATED_MOVE_DATA >= GEN_6 + .power = 60, + #else + .power = 1, + #endif .effect = EFFECT_HIDDEN_POWER, - .power = 60, .type = TYPE_NORMAL, .accuracy = 100, .pp = 15, @@ -3819,8 +3844,10 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = [MOVE_MIRROR_COAT] = { - #if B_UPDATED_MOVE_DATA >= GEN_4 + #if B_UPDATED_MOVE_DATA >= GEN_5 .flags = FLAG_PROTECT_AFFECTED, + #if B_UPDATED_MOVE_DATA == GEN_4 + .flags = 0, #else .flags = FLAG_MIRROR_MOVE_AFFECTED, #endif @@ -3838,9 +3865,9 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = [MOVE_PSYCH_UP] = { #if B_UPDATED_MOVE_DATA >= GEN_5 - .flags = FLAG_SNATCH_AFFECTED, - #else .flags = 0, + #else + .flags = FLAG_SNATCH_AFFECTED, #endif .effect = EFFECT_PSYCH_UP, .power = 0, @@ -3966,12 +3993,12 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = [MOVE_BEAT_UP] = { - .effect = EFFECT_BEAT_UP, - #if B_BEAT_UP_DMG >= GEN_5 + #if B_UPDATED_MOVE_DATA >= GEN_5 .power = 1, #else .power = 10, #endif + .effect = EFFECT_BEAT_UP, .type = TYPE_DARK, .accuracy = 100, .pp = 10, @@ -3984,9 +4011,14 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = [MOVE_FAKE_OUT] = { - #if B_UPDATED_MOVE_DATA >= GEN_4 + #if B_UPDATED_MOVE_DATA >= GEN_5 + .priority = 3, + .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, + #if B_UPDATED_MOVE_DATA >= GEN_5 + .priority = 1, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, #else + .priority = 1, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST, #endif .effect = EFFECT_FAKE_OUT, @@ -3996,7 +4028,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = .pp = 10, .secondaryEffectChance = 100, .target = MOVE_TARGET_SELECTED, - .priority = 3, .split = SPLIT_PHYSICAL, }, @@ -4213,6 +4244,11 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = [MOVE_FOLLOW_ME] = { + #if B_UPDATED_MOVE_DATA >= GEN_6 + .priority = 2, + #else + .priority = 3, + #endif .effect = EFFECT_FOLLOW_ME, .power = 0, .type = TYPE_NORMAL, @@ -4220,7 +4256,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = .pp = 20, .secondaryEffectChance = 0, .target = MOVE_TARGET_USER, - .priority = 2, .flags = 0, .split = SPLIT_STATUS, }, @@ -4230,7 +4265,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = .effect = EFFECT_NATURE_POWER, .power = 0, .type = TYPE_NORMAL, - .accuracy = 95, + .accuracy = 0, .pp = 20, .secondaryEffectChance = 0, .target = MOVE_TARGET_DEPENDS, @@ -4257,6 +4292,8 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = { #if B_UPDATED_MOVE_DATA >= GEN_5 .flags = FLAG_PROTECT_AFFECTED | FLAG_MAGIC_COAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, + #elif B_UPDATED_MOVE_DATA == GEN_4 + .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, #else .flags = FLAG_PROTECT_AFFECTED, #endif @@ -4320,9 +4357,9 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = [MOVE_WISH] = { #if B_UPDATED_MOVE_DATA >= GEN_5 - .flags = FLAG_SNATCH_AFFECTED, + .flags = FLAG_PROTECT_AFFECTED | FLAG_SNATCH_AFFECTED, #else - .flags = 0, + .flags = FLAG_PROTECT_AFFECTED, #endif .effect = EFFECT_WISH, .power = 0, @@ -4633,7 +4670,11 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = [MOVE_TAIL_GLOW] = { - .effect = EFFECT_SPECIAL_ATTACK_UP_3, + #if B_UPDATED_MOVE_DATA >= GEN_4 + .effect = EFFECT_SPECIAL_ATTACK_UP_3, + #else + .effect = EFFECT_SPECIAL_ATTACK_UP_2, + #endif .power = 0, .type = TYPE_BUG, .accuracy = 100, @@ -4795,7 +4836,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = [MOVE_POISON_FANG] = { - #if B_UPDATED_MOVE_DATA >= GEN_4 + #if B_UPDATED_MOVE_DATA >= GEN_6 .secondaryEffectChance = 50, #else .secondaryEffectChance = 30, @@ -4955,9 +4996,9 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = #if B_UPDATED_MOVE_DATA >= GEN_6 .power = 130, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, - #elif B_UPDATED_MOVE_DATA >= GEN_4 + #elif B_UPDATED_MOVE_DATA == GEN_4 || B_UPDATED_MOVE_DATA == GEN_5 .power = 130, - .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, + .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, #else .power = 140, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, @@ -4974,9 +5015,12 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = [MOVE_ODOR_SLEUTH] = { - #if B_UPDATED_MOVE_DATA >= GEN_4 + #if B_UPDATED_MOVE_DATA >= GEN_5 .accuracy = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_MAGIC_COAT_AFFECTED, + #if B_UPDATED_MOVE_DATA == GEN_4 + .accuracy = 0, + .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, #else .accuracy = 100, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED,