Merge pull request #1471 from LOuroboros/magic_gaurd
Fixed a typo in the battle_engine
This commit is contained in:
commit
34cd23619f
@ -2138,7 +2138,7 @@ s32 GetDrainedBigRootHp(u32 battler, s32 hp)
|
|||||||
return hp * -1;
|
return hp * -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define MAGIC_GAURD_CHECK \
|
#define MAGIC_GUARD_CHECK \
|
||||||
if (ability == ABILITY_MAGIC_GUARD) \
|
if (ability == ABILITY_MAGIC_GUARD) \
|
||||||
{\
|
{\
|
||||||
RecordAbilityBattle(gActiveBattler, ability);\
|
RecordAbilityBattle(gActiveBattler, ability);\
|
||||||
@ -2213,7 +2213,7 @@ u8 DoBattlerEndTurnEffects(void)
|
|||||||
&& gBattleMons[gStatuses3[gActiveBattler] & STATUS3_LEECHSEED_BATTLER].hp != 0
|
&& gBattleMons[gStatuses3[gActiveBattler] & STATUS3_LEECHSEED_BATTLER].hp != 0
|
||||||
&& gBattleMons[gActiveBattler].hp != 0)
|
&& gBattleMons[gActiveBattler].hp != 0)
|
||||||
{
|
{
|
||||||
MAGIC_GAURD_CHECK;
|
MAGIC_GUARD_CHECK;
|
||||||
|
|
||||||
gBattlerTarget = gStatuses3[gActiveBattler] & STATUS3_LEECHSEED_BATTLER; // Notice gBattlerTarget is actually the HP receiver.
|
gBattlerTarget = gStatuses3[gActiveBattler] & STATUS3_LEECHSEED_BATTLER; // Notice gBattlerTarget is actually the HP receiver.
|
||||||
gBattleMoveDamage = gBattleMons[gActiveBattler].maxHP / 8;
|
gBattleMoveDamage = gBattleMons[gActiveBattler].maxHP / 8;
|
||||||
@ -2230,7 +2230,7 @@ u8 DoBattlerEndTurnEffects(void)
|
|||||||
if ((gBattleMons[gActiveBattler].status1 & STATUS1_POISON)
|
if ((gBattleMons[gActiveBattler].status1 & STATUS1_POISON)
|
||||||
&& gBattleMons[gActiveBattler].hp != 0)
|
&& gBattleMons[gActiveBattler].hp != 0)
|
||||||
{
|
{
|
||||||
MAGIC_GAURD_CHECK;
|
MAGIC_GUARD_CHECK;
|
||||||
|
|
||||||
if (ability == ABILITY_POISON_HEAL)
|
if (ability == ABILITY_POISON_HEAL)
|
||||||
{
|
{
|
||||||
@ -2259,7 +2259,7 @@ u8 DoBattlerEndTurnEffects(void)
|
|||||||
if ((gBattleMons[gActiveBattler].status1 & STATUS1_TOXIC_POISON)
|
if ((gBattleMons[gActiveBattler].status1 & STATUS1_TOXIC_POISON)
|
||||||
&& gBattleMons[gActiveBattler].hp != 0)
|
&& gBattleMons[gActiveBattler].hp != 0)
|
||||||
{
|
{
|
||||||
MAGIC_GAURD_CHECK;
|
MAGIC_GUARD_CHECK;
|
||||||
|
|
||||||
if (ability == ABILITY_POISON_HEAL)
|
if (ability == ABILITY_POISON_HEAL)
|
||||||
{
|
{
|
||||||
@ -2291,7 +2291,7 @@ u8 DoBattlerEndTurnEffects(void)
|
|||||||
if ((gBattleMons[gActiveBattler].status1 & STATUS1_BURN)
|
if ((gBattleMons[gActiveBattler].status1 & STATUS1_BURN)
|
||||||
&& gBattleMons[gActiveBattler].hp != 0)
|
&& gBattleMons[gActiveBattler].hp != 0)
|
||||||
{
|
{
|
||||||
MAGIC_GAURD_CHECK;
|
MAGIC_GUARD_CHECK;
|
||||||
|
|
||||||
gBattleMoveDamage = gBattleMons[gActiveBattler].maxHP / (B_BURN_DAMAGE >= GEN_7 ? 16 : 8);
|
gBattleMoveDamage = gBattleMons[gActiveBattler].maxHP / (B_BURN_DAMAGE >= GEN_7 ? 16 : 8);
|
||||||
if (ability == ABILITY_HEATPROOF)
|
if (ability == ABILITY_HEATPROOF)
|
||||||
@ -2311,7 +2311,7 @@ u8 DoBattlerEndTurnEffects(void)
|
|||||||
if ((gBattleMons[gActiveBattler].status2 & STATUS2_NIGHTMARE)
|
if ((gBattleMons[gActiveBattler].status2 & STATUS2_NIGHTMARE)
|
||||||
&& gBattleMons[gActiveBattler].hp != 0)
|
&& gBattleMons[gActiveBattler].hp != 0)
|
||||||
{
|
{
|
||||||
MAGIC_GAURD_CHECK;
|
MAGIC_GUARD_CHECK;
|
||||||
// R/S does not perform this sleep check, which causes the nightmare effect to
|
// R/S does not perform this sleep check, which causes the nightmare effect to
|
||||||
// persist even after the affected Pokemon has been awakened by Shed Skin.
|
// persist even after the affected Pokemon has been awakened by Shed Skin.
|
||||||
if (gBattleMons[gActiveBattler].status1 & STATUS1_SLEEP)
|
if (gBattleMons[gActiveBattler].status1 & STATUS1_SLEEP)
|
||||||
@ -2333,7 +2333,7 @@ u8 DoBattlerEndTurnEffects(void)
|
|||||||
if ((gBattleMons[gActiveBattler].status2 & STATUS2_CURSED)
|
if ((gBattleMons[gActiveBattler].status2 & STATUS2_CURSED)
|
||||||
&& gBattleMons[gActiveBattler].hp != 0)
|
&& gBattleMons[gActiveBattler].hp != 0)
|
||||||
{
|
{
|
||||||
MAGIC_GAURD_CHECK;
|
MAGIC_GUARD_CHECK;
|
||||||
gBattleMoveDamage = gBattleMons[gActiveBattler].maxHP / 4;
|
gBattleMoveDamage = gBattleMons[gActiveBattler].maxHP / 4;
|
||||||
if (gBattleMoveDamage == 0)
|
if (gBattleMoveDamage == 0)
|
||||||
gBattleMoveDamage = 1;
|
gBattleMoveDamage = 1;
|
||||||
@ -2347,7 +2347,7 @@ u8 DoBattlerEndTurnEffects(void)
|
|||||||
{
|
{
|
||||||
if (--gDisableStructs[gActiveBattler].wrapTurns != 0) // damaged by wrap
|
if (--gDisableStructs[gActiveBattler].wrapTurns != 0) // damaged by wrap
|
||||||
{
|
{
|
||||||
MAGIC_GAURD_CHECK;
|
MAGIC_GUARD_CHECK;
|
||||||
|
|
||||||
gBattleScripting.animArg1 = gBattleStruct->wrappedMove[gActiveBattler];
|
gBattleScripting.animArg1 = gBattleStruct->wrappedMove[gActiveBattler];
|
||||||
gBattleScripting.animArg2 = gBattleStruct->wrappedMove[gActiveBattler] >> 8;
|
gBattleScripting.animArg2 = gBattleStruct->wrappedMove[gActiveBattler] >> 8;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user