added #ifdef TX_DEBUGGING for wild encounter, bag use and catching flags

This commit is contained in:
TheXaman 2021-11-28 20:53:23 +01:00
parent 5780560007
commit df8dfd9a65
3 changed files with 18 additions and 3 deletions

View file

@ -15,6 +15,7 @@
#include "berry.h"
#include "bg.h"
#include "data.h"
#include "debug.h"
#include "decompress.h"
#include "dma3.h"
#include "event_data.h"
@ -4187,11 +4188,19 @@ static void HandleTurnActionSelectionState(void)
}
break;
case B_ACTION_USE_ITEM:
#ifdef TX_DEBUGGING
if (FlagGet(FLAG_SYS_NO_BAG_USE) || gBattleTypeFlags & (BATTLE_TYPE_LINK //DEBUG
| BATTLE_TYPE_FRONTIER_NO_PYRAMID
| BATTLE_TYPE_EREADER_TRAINER
| BATTLE_TYPE_RECORDED_LINK))
{
#else
if (gBattleTypeFlags & (BATTLE_TYPE_LINK //DEBUG
| BATTLE_TYPE_FRONTIER_NO_PYRAMID
| BATTLE_TYPE_EREADER_TRAINER
| BATTLE_TYPE_RECORDED_LINK))
{
#endif
RecordedBattle_ClearBattlerAction(gActiveBattler, 1);
gSelectionBattleScripts[gActiveBattler] = BattleScript_ActionSelectionItemsCantBeUsed;
gBattleCommunication[gActiveBattler] = STATE_SELECTION_SCRIPT;

View file

@ -713,8 +713,10 @@ void RestartWildEncounterImmunitySteps(void)
static bool8 CheckStandardWildEncounter(u16 metatileBehavior)
{
#ifdef TX_DEBUGGING
if (FlagGet(FLAG_SYS_NO_ENCOUNTER)) //DEBUG
return FALSE;//
#endif
if (sWildEncounterImmunitySteps < 4)
{

View file

@ -8,6 +8,7 @@
#include "bike.h"
#include "coins.h"
#include "data.h"
#include "debug.h"
#include "event_data.h"
#include "event_object_lock.h"
#include "event_object_movement.h"
@ -941,11 +942,14 @@ void ItemUseOutOfBattle_EvolutionStone(u8 taskId)
void ItemUseInBattle_PokeBall(u8 taskId)
{
#ifdef TX_DEBUGGING
if (FlagGet(FLAG_SYS_NO_CATCHING)){ //DEBUG
static const u8 sText_BallsCannotBeUsed[] = _("Poké Balls cannot be used\nright now!\p");
DisplayItemMessage(taskId, 1, sText_BallsCannotBeUsed, CloseItemMessage);
} //
else if (IsPlayerPartyAndPokemonStorageFull() == FALSE) // have room for mon?
DisplayItemMessage(taskId, 1, sText_BallsCannotBeUsed, CloseItemMessage);
return;
}
#endif
if (IsPlayerPartyAndPokemonStorageFull() == FALSE) // have room for mon?
{
RemoveBagItem(gSpecialVar_ItemId, 1);
if (!InBattlePyramid())