mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
Implemented Costar's effect
This commit is contained in:
parent
7a52404fd3
commit
aa051dab02
@ -8451,6 +8451,13 @@ BattleScript_SupremeOverlordActivates::
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
end3
|
||||
|
||||
BattleScript_CostarActivates::
|
||||
pause B_WAIT_TIME_SHORT
|
||||
call BattleScript_AbilityPopUp
|
||||
printstring STRINGID_PKMNCOPIEDSTATCHANGES
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
end3
|
||||
|
||||
BattleScript_AttackWeakenedByStrongWinds::
|
||||
pause B_WAIT_TIME_SHORT
|
||||
printstring STRINGID_ATTACKWEAKENEDBSTRONGWINDS
|
||||
|
@ -446,6 +446,7 @@ extern const u8 BattleScript_GoodAsGoldActivates[];
|
||||
extern const u8 BattleScript_RuinAbilityActivates[];
|
||||
extern const u8 BattleScript_CudChewActivates[];
|
||||
extern const u8 BattleScript_SupremeOverlordActivates[];
|
||||
extern const u8 BattleScript_CostarActivates[];
|
||||
|
||||
// zmoves
|
||||
extern const u8 BattleScript_ZMoveActivateDamaging[];
|
||||
|
@ -204,5 +204,6 @@ bool32 CanBeFrozen(u8 battlerId);
|
||||
bool32 CanBeConfused(u8 battlerId);
|
||||
bool32 IsBattlerTerrainAffected(u8 battlerId, u32 terrainFlag);
|
||||
u32 GetBattlerFriendshipScore(u8 battlerId);
|
||||
u32 CountBattlerStatIncreases(u8 battlerId, bool32 countEvasionAcc);
|
||||
|
||||
#endif // GUARD_BATTLE_UTIL_H
|
||||
|
@ -4965,6 +4965,20 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
case ABILITY_COSTAR:
|
||||
if (!gSpecialStatuses[battler].switchInAbilityDone
|
||||
&& IsDoubleBattle()
|
||||
&& IsBattlerAlive(BATTLE_PARTNER(battler))
|
||||
&& CountBattlerStatIncreases(BATTLE_PARTNER(battler), FALSE))
|
||||
{
|
||||
gSpecialStatuses[battler].switchInAbilityDone = TRUE;
|
||||
for (i = 0; i < NUM_BATTLE_STATS; i++)
|
||||
gBattleMons[battler].statStages[i] = gBattleMons[BATTLE_PARTNER(battler)].statStages[i];
|
||||
gBattlerTarget = BATTLE_PARTNER(battler);
|
||||
BattleScriptPushCursorAndCallback(BattleScript_CostarActivates);
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
#if B_WEATHER_FORMS < GEN_5
|
||||
default:
|
||||
if (gBattleMons[battler].species == SPECIES_CHERRIM)
|
||||
|
Loading…
Reference in New Issue
Block a user