Implemented Mycelium Might's effect
This commit is contained in:
parent
d6b9f07681
commit
107ace784b
3 changed files with 21 additions and 0 deletions
|
@ -205,5 +205,6 @@ bool32 CanBeConfused(u8 battlerId);
|
|||
bool32 IsBattlerTerrainAffected(u8 battlerId, u32 terrainFlag);
|
||||
u32 GetBattlerFriendshipScore(u8 battlerId);
|
||||
u32 CountBattlerStatIncreases(u8 battlerId, bool32 countEvasionAcc);
|
||||
bool32 IsMyceliumMightOnField(void);
|
||||
|
||||
#endif // GUARD_BATTLE_UTIL_H
|
||||
|
|
|
@ -4673,6 +4673,10 @@ u8 GetWhoStrikesFirst(u8 battler1, u8 battler2, bool8 ignoreChosenMoves)
|
|||
strikesFirst = 1;
|
||||
else if (ability2 == ABILITY_STALL && ability1 != ABILITY_STALL)
|
||||
strikesFirst = 0;
|
||||
else if (ability1 == ABILITY_MYCELIUM_MIGHT && ability2 != ABILITY_MYCELIUM_MIGHT && IS_MOVE_STATUS(gCurrentMove))
|
||||
strikesFirst = 1;
|
||||
else if (ability2 == ABILITY_MYCELIUM_MIGHT && ability1 != ABILITY_MYCELIUM_MIGHT && IS_MOVE_STATUS(gCurrentMove))
|
||||
strikesFirst = 0;
|
||||
else
|
||||
{
|
||||
if (speedBattler1 == speedBattler2 && Random() & 1)
|
||||
|
|
|
@ -6338,6 +6338,19 @@ bool32 IsNeutralizingGasOnField(void)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
bool32 IsMyceliumMightOnField(void)
|
||||
{
|
||||
u32 i;
|
||||
|
||||
for (i = 0; i < gBattlersCount; i++)
|
||||
{
|
||||
if (IsBattlerAlive(i) && gBattleMons[i].ability == ABILITY_MYCELIUM_MIGHT && IS_MOVE_STATUS(gCurrentMove))
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
u32 GetBattlerAbility(u8 battlerId)
|
||||
{
|
||||
if (gStatuses3[battlerId] & STATUS3_GASTRO_ACID)
|
||||
|
@ -6346,6 +6359,9 @@ u32 GetBattlerAbility(u8 battlerId)
|
|||
if (IsNeutralizingGasOnField() && !IsNeutralizingGasBannedAbility(gBattleMons[battlerId].ability))
|
||||
return ABILITY_NONE;
|
||||
|
||||
if (IsMyceliumMightOnField())
|
||||
return ABILITY_NONE;
|
||||
|
||||
if ((((gBattleMons[gBattlerAttacker].ability == ABILITY_MOLD_BREAKER
|
||||
|| gBattleMons[gBattlerAttacker].ability == ABILITY_TERAVOLT
|
||||
|| gBattleMons[gBattlerAttacker].ability == ABILITY_TURBOBLAZE)
|
||||
|
|
Loading…
Reference in a new issue