mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 11:44:17 +01:00
Even more review corrections
This commit is contained in:
parent
2cf2c00b29
commit
8bd7103b9d
@ -421,8 +421,7 @@ BattleScript_AffectionBasedEndurance::
|
||||
return
|
||||
|
||||
BattleScript_AffectionBasedStatusHeal::
|
||||
jumpifstatus BS_ATTACKER, STATUS1_POISON, BattleScript_AffectionBasedStatus_HealPoisonString
|
||||
jumpifstatus BS_ATTACKER, STATUS1_TOXIC_POISON, BattleScript_AffectionBasedStatus_HealPoisonString
|
||||
jumpifstatus BS_ATTACKER, STATUS1_POISON | STATUS1_TOXIC_POISON, BattleScript_AffectionBasedStatus_HealPoisonString
|
||||
jumpifstatus BS_ATTACKER, STATUS1_SLEEP, BattleScript_AffectionBasedStatus_HealSleepString
|
||||
jumpifstatus BS_ATTACKER, STATUS1_PARALYSIS, BattleScript_AffectionBasedStatus_HealParalysisString
|
||||
jumpifstatus BS_ATTACKER, STATUS1_BURN, BattleScript_AffectionBasedStatus_HealBurnString
|
||||
@ -442,7 +441,6 @@ BattleScript_AffectionBasedStatus_HealBurnString:
|
||||
goto BattleScript_AffectionBasedStatusHeal_Continue
|
||||
BattleScript_AffectionBasedStatus_HealFreezeString:
|
||||
printstring STRINGID_ATTACKERMELTEDTHEICE
|
||||
goto BattleScript_AffectionBasedStatusHeal_Continue
|
||||
BattleScript_AffectionBasedStatusHeal_Continue:
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
clearstatus BS_ATTACKER
|
||||
|
@ -178,13 +178,13 @@ struct SpecialStatus
|
||||
u8 dancerOriginalTarget:3;
|
||||
u8 announceNeutralizingGas:1; // See Cmd_switchineffects
|
||||
u8 neutralizingGasRemoved:1; // See VARIOUS_TRY_END_NEUTRALIZING_GAS
|
||||
u8 affectionEndured:1;
|
||||
s32 dmg;
|
||||
s32 physicalDmg;
|
||||
s32 specialDmg;
|
||||
u8 physicalBattlerId;
|
||||
u8 specialBattlerId;
|
||||
u8 changedStatsBattlerId; // Battler that was responsible for the latest stat change. Can be self.
|
||||
bool8 affectionEndured:1;
|
||||
};
|
||||
|
||||
struct SideTimer
|
||||
|
@ -7902,22 +7902,6 @@ void AnimTask_AffectionHangedOn(u8 taskId)
|
||||
int side = GetBattlerSide(gBattleAnimTarget);
|
||||
struct Pokemon *party = (side == B_SIDE_PLAYER) ? gPlayerParty : gEnemyParty;
|
||||
|
||||
switch (GetMonFriendshipScore(&party[gBattlerPartyIndexes[gBattleAnimTarget]]))
|
||||
{
|
||||
case FRIENDSHIP_MAX:
|
||||
gBattleAnimArgs[0] = FRIENDSHIP_MAX;
|
||||
break;
|
||||
case FRIENDSHIP_200_TO_254:
|
||||
gBattleAnimArgs[0] = FRIENDSHIP_200_TO_254;
|
||||
break;
|
||||
case FRIENDSHIP_150_TO_199:
|
||||
gBattleAnimArgs[0] = FRIENDSHIP_150_TO_199;
|
||||
break;
|
||||
case FRIENDSHIP_100_TO_149:
|
||||
gBattleAnimArgs[0] = FRIENDSHIP_100_TO_149;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
gBattleAnimArgs[0] = GetMonFriendshipScore(&party[gBattlerPartyIndexes[gBattleAnimTarget]]);
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
|
@ -2087,17 +2087,19 @@ void TryToRevertMimicry(void)
|
||||
|
||||
u32 GetMonFriendshipScore(struct Pokemon *pokemon)
|
||||
{
|
||||
if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) == MAX_FRIENDSHIP)
|
||||
u32 friendshipScore = GetMonData(pokemon, MON_DATA_FRIENDSHIP);
|
||||
|
||||
if (friendshipScore == MAX_FRIENDSHIP)
|
||||
return FRIENDSHIP_MAX;
|
||||
if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 200)
|
||||
if (friendshipScore >= 200)
|
||||
return FRIENDSHIP_200_TO_254;
|
||||
if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 150)
|
||||
if (friendshipScore >= 150)
|
||||
return FRIENDSHIP_150_TO_199;
|
||||
if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 100)
|
||||
if (friendshipScore >= 100)
|
||||
return FRIENDSHIP_100_TO_149;
|
||||
if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 50)
|
||||
if (friendshipScore >= 50)
|
||||
return FRIENDSHIP_50_TO_99;
|
||||
if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 1)
|
||||
if (friendshipScore >= 1)
|
||||
return FRIENDSHIP_1_TO_49;
|
||||
|
||||
return FRIENDSHIP_NONE;
|
||||
|
Loading…
Reference in New Issue
Block a user