IS_MOVE_PHYSICAL to IS_TYPE_PHYSIAL

This commit is contained in:
DizzyEggg 2018-07-16 22:00:27 +02:00
parent bf0178238a
commit 118fa3afce
3 changed files with 8 additions and 8 deletions

View File

@ -555,8 +555,8 @@ struct BattleStruct
typeArg = gBattleMoves[move].type; \ typeArg = gBattleMoves[move].type; \
} }
#define IS_MOVE_PHYSICAL(moveType)(moveType < TYPE_MYSTERY) #define IS_TYPE_PHYSICAL(moveType)(moveType < TYPE_MYSTERY)
#define IS_MOVE_SPECIAL(moveType)(moveType > TYPE_MYSTERY) #define IS_TYPE_SPECIAL(moveType)(moveType > TYPE_MYSTERY)
#define TARGET_TURN_DAMAGED ((gSpecialStatuses[gBattlerTarget].physicalDmg != 0 || gSpecialStatuses[gBattlerTarget].specialDmg != 0)) #define TARGET_TURN_DAMAGED ((gSpecialStatuses[gBattlerTarget].physicalDmg != 0 || gSpecialStatuses[gBattlerTarget].specialDmg != 0))

View File

@ -1173,7 +1173,7 @@ static void atk01_accuracycheck(void)
calc = (calc * 130) / 100; // 1.3 compound eyes boost calc = (calc * 130) / 100; // 1.3 compound eyes boost
if (WEATHER_HAS_EFFECT && gBattleMons[gBattlerTarget].ability == ABILITY_SAND_VEIL && gBattleWeather & WEATHER_SANDSTORM_ANY) if (WEATHER_HAS_EFFECT && gBattleMons[gBattlerTarget].ability == ABILITY_SAND_VEIL && gBattleWeather & WEATHER_SANDSTORM_ANY)
calc = (calc * 80) / 100; // 1.2 sand veil loss 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_TYPE_PHYSICAL(type))
calc = (calc * 80) / 100; // 1.2 hustle loss calc = (calc * 80) / 100; // 1.2 hustle loss
if (gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY) if (gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY)
@ -1945,7 +1945,7 @@ static void atk0C_datahpupdate(void)
if (!gSpecialStatuses[gActiveBattler].dmg && !(gHitMarker & HITMARKER_x100000)) if (!gSpecialStatuses[gActiveBattler].dmg && !(gHitMarker & HITMARKER_x100000))
gSpecialStatuses[gActiveBattler].dmg = gHpDealt; gSpecialStatuses[gActiveBattler].dmg = gHpDealt;
if (IS_MOVE_PHYSICAL(moveType) && !(gHitMarker & HITMARKER_x100000) && gCurrentMove != MOVE_PAIN_SPLIT) if (IS_TYPE_PHYSICAL(moveType) && !(gHitMarker & HITMARKER_x100000) && gCurrentMove != MOVE_PAIN_SPLIT)
{ {
gProtectStructs[gActiveBattler].physicalDmg = gHpDealt; gProtectStructs[gActiveBattler].physicalDmg = gHpDealt;
gSpecialStatuses[gActiveBattler].physicalDmg = gHpDealt; gSpecialStatuses[gActiveBattler].physicalDmg = gHpDealt;
@ -1960,7 +1960,7 @@ static void atk0C_datahpupdate(void)
gSpecialStatuses[gActiveBattler].physicalBattlerId = gBattlerTarget; gSpecialStatuses[gActiveBattler].physicalBattlerId = gBattlerTarget;
} }
} }
else if (!IS_MOVE_PHYSICAL(moveType) && !(gHitMarker & HITMARKER_x100000)) else if (!IS_TYPE_PHYSICAL(moveType) && !(gHitMarker & HITMARKER_x100000))
{ {
gProtectStructs[gActiveBattler].specialDmg = gHpDealt; gProtectStructs[gActiveBattler].specialDmg = gHpDealt;
gSpecialStatuses[gActiveBattler].specialDmg = gHpDealt; gSpecialStatuses[gActiveBattler].specialDmg = gHpDealt;

View File

@ -2265,7 +2265,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de
if (attackerHoldEffect == sHoldEffectToType[i][0] if (attackerHoldEffect == sHoldEffectToType[i][0]
&& type == sHoldEffectToType[i][1]) && type == sHoldEffectToType[i][1])
{ {
if (IS_MOVE_PHYSICAL(type)) if (IS_TYPE_PHYSICAL(type))
attack = (attack * (attackerHoldEffectParam + 100)) / 100; attack = (attack * (attackerHoldEffectParam + 100)) / 100;
else else
spAttack = (spAttack * (attackerHoldEffectParam + 100)) / 100; spAttack = (spAttack * (attackerHoldEffectParam + 100)) / 100;
@ -2316,7 +2316,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de
if (gBattleMoves[gCurrentMove].effect == EFFECT_EXPLOSION) if (gBattleMoves[gCurrentMove].effect == EFFECT_EXPLOSION)
defense /= 2; defense /= 2;
if (IS_MOVE_PHYSICAL(type) && type != TYPE_MYSTERY) if (IS_TYPE_PHYSICAL(type))
{ {
if (gCritMultiplier == 2) if (gCritMultiplier == 2)
{ {
@ -2366,7 +2366,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de
if (type == TYPE_MYSTERY) if (type == TYPE_MYSTERY)
damage = 0; // is ??? type. does 0 damage. damage = 0; // is ??? type. does 0 damage.
if (IS_MOVE_SPECIAL(type)) if (IS_TYPE_SPECIAL(type))
{ {
if (gCritMultiplier == 2) if (gCritMultiplier == 2)
{ {