Fixed forfeit money for B_WHITEOUT_MONEY <= GEN_3 (#6942)
This commit is contained in:
parent
eb2121924d
commit
9554146738
@ -5396,18 +5396,17 @@ BattleScript_LocalBattleLost::
|
||||
jumpifhalfword CMP_EQUAL, gTrainerBattleParameter + 2, TRAINER_SECRET_BASE, BattleScript_LocalBattleLostEnd
|
||||
jumpifnowhiteout BattleScript_LocalBattleLostEnd_
|
||||
BattleScript_LocalBattleLostPrintWhiteOut::
|
||||
getmoneyreward
|
||||
.if B_WHITEOUT_MONEY >= GEN_4
|
||||
jumpifbattletype BATTLE_TYPE_TRAINER, BattleScript_LocalBattleLostEnd
|
||||
printstring STRINGID_PLAYERWHITEOUT
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
getmoneyreward
|
||||
printstring STRINGID_PLAYERWHITEOUT2
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
end2
|
||||
BattleScript_LocalBattleLostEnd::
|
||||
printstring STRINGID_PLAYERLOSTTOENEMYTRAINER
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
getmoneyreward
|
||||
printstring STRINGID_PLAYERPAIDPRIZEMONEY
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
end2
|
||||
@ -9998,7 +9997,11 @@ BattleScript_QuestionForfeitBattle::
|
||||
|
||||
BattleScript_ForfeitBattleGaveMoney::
|
||||
getmoneyreward
|
||||
.if B_WHITEOUT_MONEY >= GEN_4
|
||||
printstring STRINGID_FORFEITBATTLEGAVEMONEY
|
||||
.else
|
||||
printstring STRINGID_PLAYERWHITEOUT2
|
||||
.endif
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
end2
|
||||
|
||||
|
||||
@ -8808,22 +8808,29 @@ static void Cmd_getmoneyreward(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
s32 i, count;
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
if (B_WHITEOUT_MONEY <= GEN_3)
|
||||
{
|
||||
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE
|
||||
&& GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG)
|
||||
money = GetMoney(&gSaveBlock1Ptr->money) / 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
s32 i, count;
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
if (GetMonData(&gPlayerParty[i], MON_DATA_LEVEL) > sPartyLevel)
|
||||
sPartyLevel = GetMonData(&gPlayerParty[i], MON_DATA_LEVEL);
|
||||
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE
|
||||
&& GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG)
|
||||
{
|
||||
if (GetMonData(&gPlayerParty[i], MON_DATA_LEVEL) > sPartyLevel)
|
||||
sPartyLevel = GetMonData(&gPlayerParty[i], MON_DATA_LEVEL);
|
||||
}
|
||||
}
|
||||
for (count = 0, i = 0; i < ARRAY_COUNT(gBadgeFlags); i++)
|
||||
{
|
||||
if (FlagGet(gBadgeFlags[i]) == TRUE)
|
||||
++count;
|
||||
}
|
||||
money = sWhiteOutBadgeMoney[count] * sPartyLevel;
|
||||
}
|
||||
for (count = 0, i = 0; i < ARRAY_COUNT(gBadgeFlags); i++)
|
||||
{
|
||||
if (FlagGet(gBadgeFlags[i]) == TRUE)
|
||||
++count;
|
||||
}
|
||||
money = sWhiteOutBadgeMoney[count] * sPartyLevel;
|
||||
RemoveMoney(&gSaveBlock1Ptr->money, money);
|
||||
}
|
||||
|
||||
|
||||
@ -378,8 +378,6 @@ static void (*const sMovementStatusHandler[])(struct LinkPlayerObjectEvent *, st
|
||||
void DoWhiteOut(void)
|
||||
{
|
||||
RunScriptImmediately(EventScript_WhiteOut);
|
||||
if (B_WHITEOUT_MONEY == GEN_3)
|
||||
SetMoney(&gSaveBlock1Ptr->money, GetMoney(&gSaveBlock1Ptr->money) / 2);
|
||||
HealPlayerParty();
|
||||
Overworld_ResetStateAfterWhiteOut();
|
||||
SetWarpDestinationToLastHealLocation();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user