TRAINER_SECRET_BASE propagation
This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
#include "constants/species.h"
|
#include "constants/species.h"
|
||||||
#include "constants/pokemon.h"
|
#include "constants/pokemon.h"
|
||||||
#include "constants/songs.h"
|
#include "constants/songs.h"
|
||||||
|
#include "constants/trainers.h"
|
||||||
#include "constants/game_stat.h"
|
#include "constants/game_stat.h"
|
||||||
#include "battle_string_ids.h"
|
#include "battle_string_ids.h"
|
||||||
.include "asm/macros/battle_script.inc"
|
.include "asm/macros/battle_script.inc"
|
||||||
@@ -2931,7 +2932,7 @@ BattleScript_PayDayMoneyAndPickUpItems::
|
|||||||
BattleScript_LocalBattleLost::
|
BattleScript_LocalBattleLost::
|
||||||
jumpifbattletype BATTLE_TYPE_TRAINER_TOWER, BattleScript_BattleTowerLost
|
jumpifbattletype BATTLE_TYPE_TRAINER_TOWER, BattleScript_BattleTowerLost
|
||||||
jumpifbattletype BATTLE_TYPE_EREADER_TRAINER, BattleScript_EReaderOrSecretBaseTrainerEnd
|
jumpifbattletype BATTLE_TYPE_EREADER_TRAINER, BattleScript_EReaderOrSecretBaseTrainerEnd
|
||||||
jumpifhalfword CMP_EQUAL, gTrainerBattleOpponent_A, 1024, BattleScript_EReaderOrSecretBaseTrainerEnd
|
jumpifhalfword CMP_EQUAL, gTrainerBattleOpponent_A, TRAINER_SECRET_BASE, BattleScript_EReaderOrSecretBaseTrainerEnd
|
||||||
jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, 0, BattleScript_RivalBattleLost
|
jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, 0, BattleScript_RivalBattleLost
|
||||||
BattleScript_LocalBattleLostPrintWhiteOut::
|
BattleScript_LocalBattleLostPrintWhiteOut::
|
||||||
jumpifbattletype BATTLE_TYPE_TRAINER, BattleScript_LocalBattleLostEnd
|
jumpifbattletype BATTLE_TYPE_TRAINER, BattleScript_LocalBattleLostEnd
|
||||||
|
|||||||
@@ -165,6 +165,7 @@
|
|||||||
#define TRAINER_PIC_LADY 146
|
#define TRAINER_PIC_LADY 146
|
||||||
#define TRAINER_PIC_PAINTER 147
|
#define TRAINER_PIC_PAINTER 147
|
||||||
|
|
||||||
|
// Leftover from R/S
|
||||||
#define TRAINER_SECRET_BASE 1024
|
#define TRAINER_SECRET_BASE 1024
|
||||||
|
|
||||||
#define F_TRAINER_FEMALE (1 << 7)
|
#define F_TRAINER_FEMALE (1 << 7)
|
||||||
|
|||||||
@@ -5176,7 +5176,7 @@ static void atk5D_getmoneyreward(void)
|
|||||||
// The whole function is using wrong registers.
|
// The whole function is using wrong registers.
|
||||||
if (gBattleOutcome == B_OUTCOME_WON)
|
if (gBattleOutcome == B_OUTCOME_WON)
|
||||||
{
|
{
|
||||||
if (gTrainerBattleOpponent_A == 0x400)
|
if (gTrainerBattleOpponent_A == TRAINER_SECRET_BASE)
|
||||||
{
|
{
|
||||||
moneyReward = 20 * gBattleResources->secretBase->party.levels[0] * gBattleStruct->moneyMultiplier;
|
moneyReward = 20 * gBattleResources->secretBase->party.levels[0] * gBattleStruct->moneyMultiplier;
|
||||||
}
|
}
|
||||||
@@ -8810,7 +8810,7 @@ static void atkD2_tryswapitems(void) // trick
|
|||||||
if (gBattleTypeFlags & BATTLE_TYPE_TRAINER_TOWER
|
if (gBattleTypeFlags & BATTLE_TYPE_TRAINER_TOWER
|
||||||
|| (GetBattlerSide(gBattlerAttacker) == B_SIDE_OPPONENT
|
|| (GetBattlerSide(gBattlerAttacker) == B_SIDE_OPPONENT
|
||||||
&& !(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_BATTLE_TOWER | BATTLE_TYPE_EREADER_TRAINER))
|
&& !(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_BATTLE_TOWER | BATTLE_TYPE_EREADER_TRAINER))
|
||||||
&& gTrainerBattleOpponent_A != 0x400))
|
&& gTrainerBattleOpponent_A != TRAINER_SECRET_BASE))
|
||||||
{
|
{
|
||||||
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1);
|
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1);
|
||||||
}
|
}
|
||||||
@@ -8821,7 +8821,7 @@ static void atkD2_tryswapitems(void) // trick
|
|||||||
|
|
||||||
// you can't swap items if they were knocked off in regular battles
|
// you can't swap items if they were knocked off in regular battles
|
||||||
if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_BATTLE_TOWER | BATTLE_TYPE_EREADER_TRAINER))
|
if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_BATTLE_TOWER | BATTLE_TYPE_EREADER_TRAINER))
|
||||||
&& gTrainerBattleOpponent_A != 0x400
|
&& gTrainerBattleOpponent_A != TRAINER_SECRET_BASE
|
||||||
&& (gWishFutureKnock.knockedOffMons[sideAttacker] & gBitTable[gBattlerPartyIndexes[gBattlerAttacker]]
|
&& (gWishFutureKnock.knockedOffMons[sideAttacker] & gBitTable[gBattlerPartyIndexes[gBattlerAttacker]]
|
||||||
|| gWishFutureKnock.knockedOffMons[sideTarget] & gBitTable[gBattlerPartyIndexes[gBattlerTarget]]))
|
|| gWishFutureKnock.knockedOffMons[sideTarget] & gBitTable[gBattlerPartyIndexes[gBattlerTarget]]))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user