Merge pull request #1321 from amiosi/battle_engine

remove redundant minimize interactions and add move config ifs
This commit is contained in:
ghoulslash 2021-01-29 12:24:56 -07:00 committed by GitHub
commit 00085d9d90
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -356,7 +356,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
[MOVE_STOMP] =
{
.effect = EFFECT_FLINCH_MINIMIZE_HIT,
.effect = EFFECT_FLINCH_HIT,
.power = 65,
.type = TYPE_NORMAL,
.accuracy = 100,
@ -526,6 +526,11 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
[MOVE_BODY_SLAM] =
{
#if B_UPDATED_MOVE_DATA >= GEN_6
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_DMG_MINIMIZE,
#else
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST,
#endif
.effect = EFFECT_PARALYZE_HIT,
.power = 85,
.type = TYPE_NORMAL,
@ -534,7 +539,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
.secondaryEffectChance = 30,
.target = MOVE_TARGET_SELECTED,
.priority = 0,
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_DMG_MINIMIZE,
.split = SPLIT_PHYSICAL,
},
@ -4728,7 +4732,12 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
[MOVE_NEEDLE_ARM] =
{
.effect = EFFECT_FLINCH_MINIMIZE_HIT,
#if B_UPDATED_MOVE_DATA >= GEN_4
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST,
#else
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_DMG_MINIMIZE,
#endif
.effect = EFFECT_FLINCH_HIT,
.power = 60,
.type = TYPE_GRASS,
.accuracy = 100,
@ -4736,7 +4745,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
.secondaryEffectChance = 30,
.target = MOVE_TARGET_SELECTED,
.priority = 0,
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST,
.split = SPLIT_PHYSICAL,
},
@ -4849,7 +4857,12 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
[MOVE_ASTONISH] =
{
.effect = EFFECT_FLINCH_MINIMIZE_HIT,
#if B_UPDATED_MOVE_DATA >= GEN_4
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST,
#else
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_DMG_MINIMIZE,
#endif
.effect = EFFECT_FLINCH_HIT,
.power = 30,
.type = TYPE_GHOST,
.accuracy = 100,
@ -4857,7 +4870,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
.secondaryEffectChance = 30,
.target = MOVE_TARGET_SELECTED,
.priority = 0,
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST,
.split = SPLIT_PHYSICAL,
},
@ -5098,17 +5110,21 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
{
#if B_UPDATED_MOVE_DATA >= GEN_6
.pp = 20,
.flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST,
#elif B_UPDATED_MOVE_DATA == GEN_4 || B_UPDATED_MOVE_DATA == GEN_5
.pp = 30,
.flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST,
#else
.pp = 30,
.flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_DMG_MINIMIZE,
#endif
.effect = EFFECT_FLINCH_MINIMIZE_HIT,
.effect = EFFECT_FLINCH_HIT,
.power = 80,
.type = TYPE_PSYCHIC,
.accuracy = 100,
.secondaryEffectChance = 10,
.target = MOVE_TARGET_SELECTED,
.priority = 0,
.flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST,
.split = SPLIT_SPECIAL,
},
@ -6378,6 +6394,11 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
[MOVE_DRAGON_RUSH] =
{
#if B_UPDATED_MOVE_DATA >= GEN_6
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_DMG_MINIMIZE,
#else
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST,
#endif
.effect = EFFECT_FLINCH_HIT,
.power = 100,
.type = TYPE_DRAGON,
@ -6386,7 +6407,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
.secondaryEffectChance = 20,
.target = MOVE_TARGET_SELECTED,
.priority = 0,
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_DMG_MINIMIZE,
.split = SPLIT_PHYSICAL,
},
@ -7275,6 +7295,11 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
[MOVE_SHADOW_FORCE] =
{
#if B_UPDATED_MOVE_DATA == GEN_6
.flags = FLAG_MAKES_CONTACT | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED | FLAG_DMG_MINIMIZE,
#else
.flags = FLAG_MAKES_CONTACT | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED,
#endif
.effect = EFFECT_SEMI_INVULNERABLE,
.power = 120,
.type = TYPE_GHOST,
@ -7283,7 +7308,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
.secondaryEffectChance = 0,
.target = MOVE_TARGET_SELECTED,
.priority = 0,
.flags = FLAG_MAKES_CONTACT | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED,
.split = SPLIT_PHYSICAL,
},
@ -7530,6 +7554,11 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
[MOVE_HEAVY_SLAM] =
{
#if B_UPDATED_MOVE_DATA >= GEN_7
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED | FLAG_DMG_MINIMIZE,
#else
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED,
#endif
.effect = EFFECT_HEAT_CRASH,
.power = 1,
.type = TYPE_STEEL,
@ -7538,7 +7567,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
.secondaryEffectChance = 0,
.target = MOVE_TARGET_SELECTED,
.priority = 0,
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_DMG_MINIMIZE,
.split = SPLIT_PHYSICAL,
},
@ -8294,6 +8322,11 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
[MOVE_HEAT_CRASH] =
{
#if B_UPDATED_MOVE_DATA >= GEN_6
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED | FLAG_DMG_MINIMIZE,
#else
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED,
#endif
.effect = EFFECT_HEAT_CRASH,
.power = 1,
.type = TYPE_FIRE,
@ -8302,7 +8335,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
.secondaryEffectChance = 0,
.target = MOVE_TARGET_SELECTED,
.priority = 0,
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_DMG_MINIMIZE,
.split = SPLIT_PHYSICAL,
},
@ -8322,7 +8354,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
[MOVE_STEAMROLLER] =
{
.effect = EFFECT_FLINCH_MINIMIZE_HIT,
.effect = EFFECT_FLINCH_HIT,
.power = 65,
.type = TYPE_BUG,
.accuracy = 100,
@ -8330,8 +8362,8 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
.secondaryEffectChance = 30,
.target = MOVE_TARGET_SELECTED,
.priority = 0,
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_DMG_MINIMIZE | FLAG_SHEER_FORCE_BOOST,
.split = SPLIT_PHYSICAL,
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_SHEER_FORCE_BOOST | FLAG_DMG_MINIMIZE,
},
[MOVE_COTTON_GUARD] =
@ -8749,6 +8781,11 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
[MOVE_PHANTOM_FORCE] =
{
#if B_UPDATED_MOVE_DATA == GEN_6
.flags = FLAG_MAKES_CONTACT | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED | FLAG_DMG_MINIMIZE,
#else
.flags = FLAG_MAKES_CONTACT | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED,
#endif
.effect = EFFECT_SEMI_INVULNERABLE,
.power = 90,
.type = TYPE_GHOST,
@ -8757,7 +8794,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
.secondaryEffectChance = 100,
.target = MOVE_TARGET_SELECTED,
.priority = 0,
.flags = FLAG_MAKES_CONTACT | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED,
.split = SPLIT_PHYSICAL,
.argument = MOVE_EFFECT_FEINT,
},
@ -10577,6 +10613,11 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
[MOVE_DOUBLE_IRON_BASH] =
{
#if B_UPDATED_MOVE_DATA >= GEN_8
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_IRON_FIST_BOOST,
#else
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_DMG_MINIMIZE | FLAG_IRON_FIST_BOOST,
#endif
.effect = EFFECT_PLACEHOLDER, //TODO (EFFECT_FLINCH_HIT + EFFECT_DOUBLE_HIT)
.power = 60,
.type = TYPE_STEEL,
@ -10585,7 +10626,6 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
.secondaryEffectChance = 30,
.target = MOVE_TARGET_SELECTED,
.priority = 0,
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_DMG_MINIMIZE | FLAG_IRON_FIST_BOOST,
.split = SPLIT_PHYSICAL,
},