mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-16 00:22:10 +01:00
Working physical special split
This commit is contained in:
parent
5318cc656a
commit
f250436db0
@ -584,8 +584,8 @@ struct BattleStruct
|
||||
typeArg = gBattleMoves[move].type; \
|
||||
}
|
||||
|
||||
#define IS_MOVE_PHYSICAL(moveType)(moveType < TYPE_MYSTERY)
|
||||
#define IS_MOVE_SPECIAL(moveType)(moveType > TYPE_MYSTERY)
|
||||
#define IS_MOVE_PHYSICAL(move)(gBattleMoves[move].split == SPLIT_PHYSICAL)
|
||||
#define IS_MOVE_SPECIAL(move)(gBattleMoves[move].split == SPLIT_SPECIAL)
|
||||
|
||||
#define BATTLER_MAX_HP(battlerId)(gBattleMons[battlerId].hp == gBattleMons[battlerId].maxHP)
|
||||
#define TARGET_TURN_DAMAGED ((gSpecialStatuses[gBattlerTarget].physicalDmg != 0 || gSpecialStatuses[gBattlerTarget].specialDmg != 0))
|
||||
|
@ -1151,7 +1151,7 @@ static void atk01_accuracycheck(void)
|
||||
calc = (calc * 130) / 100; // 1.3 compound eyes boost
|
||||
if (WEATHER_HAS_EFFECT && gBattleMons[gBattlerTarget].ability == ABILITY_SAND_VEIL && gBattleWeather & WEATHER_SANDSTORM_ANY)
|
||||
calc = (calc * 80) / 100; // 1.2 sand veil loss
|
||||
if (gBattleMons[gBattlerAttacker].ability == ABILITY_HUSTLE && IS_MOVE_PHYSICAL(type))
|
||||
if (gBattleMons[gBattlerAttacker].ability == ABILITY_HUSTLE && IS_MOVE_PHYSICAL(move))
|
||||
calc = (calc * 80) / 100; // 1.2 hustle loss
|
||||
|
||||
if (gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY)
|
||||
@ -1607,7 +1607,7 @@ static void atk0C_datahpupdate(void)
|
||||
if (!gSpecialStatuses[gActiveBattler].dmg && !(gHitMarker & HITMARKER_x100000))
|
||||
gSpecialStatuses[gActiveBattler].dmg = gHpDealt;
|
||||
|
||||
if (IS_MOVE_PHYSICAL(moveType) && !(gHitMarker & HITMARKER_x100000) && gCurrentMove != MOVE_PAIN_SPLIT)
|
||||
if (IS_MOVE_PHYSICAL(gCurrentMove) && !(gHitMarker & HITMARKER_x100000) && gCurrentMove != MOVE_PAIN_SPLIT)
|
||||
{
|
||||
gProtectStructs[gActiveBattler].physicalDmg = gHpDealt;
|
||||
gSpecialStatuses[gActiveBattler].physicalDmg = gHpDealt;
|
||||
@ -1622,7 +1622,7 @@ static void atk0C_datahpupdate(void)
|
||||
gSpecialStatuses[gActiveBattler].physicalBattlerId = gBattlerTarget;
|
||||
}
|
||||
}
|
||||
else if (!IS_MOVE_PHYSICAL(moveType) && !(gHitMarker & HITMARKER_x100000))
|
||||
else if (!IS_MOVE_PHYSICAL(gCurrentMove) && !(gHitMarker & HITMARKER_x100000))
|
||||
{
|
||||
gProtectStructs[gActiveBattler].specialDmg = gHpDealt;
|
||||
gSpecialStatuses[gActiveBattler].specialDmg = gHpDealt;
|
||||
|
Loading…
x
Reference in New Issue
Block a user