added #ifdef TX_DEBUGGING for wild encounter, bag use and catching flags
This commit is contained in:
parent
5780560007
commit
df8dfd9a65
3 changed files with 18 additions and 3 deletions
|
@ -15,6 +15,7 @@
|
||||||
#include "berry.h"
|
#include "berry.h"
|
||||||
#include "bg.h"
|
#include "bg.h"
|
||||||
#include "data.h"
|
#include "data.h"
|
||||||
|
#include "debug.h"
|
||||||
#include "decompress.h"
|
#include "decompress.h"
|
||||||
#include "dma3.h"
|
#include "dma3.h"
|
||||||
#include "event_data.h"
|
#include "event_data.h"
|
||||||
|
@ -4187,11 +4188,19 @@ static void HandleTurnActionSelectionState(void)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case B_ACTION_USE_ITEM:
|
case B_ACTION_USE_ITEM:
|
||||||
|
#ifdef TX_DEBUGGING
|
||||||
if (FlagGet(FLAG_SYS_NO_BAG_USE) || gBattleTypeFlags & (BATTLE_TYPE_LINK //DEBUG
|
if (FlagGet(FLAG_SYS_NO_BAG_USE) || gBattleTypeFlags & (BATTLE_TYPE_LINK //DEBUG
|
||||||
| BATTLE_TYPE_FRONTIER_NO_PYRAMID
|
| BATTLE_TYPE_FRONTIER_NO_PYRAMID
|
||||||
| BATTLE_TYPE_EREADER_TRAINER
|
| BATTLE_TYPE_EREADER_TRAINER
|
||||||
| BATTLE_TYPE_RECORDED_LINK))
|
| 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);
|
RecordedBattle_ClearBattlerAction(gActiveBattler, 1);
|
||||||
gSelectionBattleScripts[gActiveBattler] = BattleScript_ActionSelectionItemsCantBeUsed;
|
gSelectionBattleScripts[gActiveBattler] = BattleScript_ActionSelectionItemsCantBeUsed;
|
||||||
gBattleCommunication[gActiveBattler] = STATE_SELECTION_SCRIPT;
|
gBattleCommunication[gActiveBattler] = STATE_SELECTION_SCRIPT;
|
||||||
|
|
|
@ -713,8 +713,10 @@ void RestartWildEncounterImmunitySteps(void)
|
||||||
|
|
||||||
static bool8 CheckStandardWildEncounter(u16 metatileBehavior)
|
static bool8 CheckStandardWildEncounter(u16 metatileBehavior)
|
||||||
{
|
{
|
||||||
|
#ifdef TX_DEBUGGING
|
||||||
if (FlagGet(FLAG_SYS_NO_ENCOUNTER)) //DEBUG
|
if (FlagGet(FLAG_SYS_NO_ENCOUNTER)) //DEBUG
|
||||||
return FALSE;//
|
return FALSE;//
|
||||||
|
#endif
|
||||||
|
|
||||||
if (sWildEncounterImmunitySteps < 4)
|
if (sWildEncounterImmunitySteps < 4)
|
||||||
{
|
{
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include "bike.h"
|
#include "bike.h"
|
||||||
#include "coins.h"
|
#include "coins.h"
|
||||||
#include "data.h"
|
#include "data.h"
|
||||||
|
#include "debug.h"
|
||||||
#include "event_data.h"
|
#include "event_data.h"
|
||||||
#include "event_object_lock.h"
|
#include "event_object_lock.h"
|
||||||
#include "event_object_movement.h"
|
#include "event_object_movement.h"
|
||||||
|
@ -941,11 +942,14 @@ void ItemUseOutOfBattle_EvolutionStone(u8 taskId)
|
||||||
|
|
||||||
void ItemUseInBattle_PokeBall(u8 taskId)
|
void ItemUseInBattle_PokeBall(u8 taskId)
|
||||||
{
|
{
|
||||||
|
#ifdef TX_DEBUGGING
|
||||||
if (FlagGet(FLAG_SYS_NO_CATCHING)){ //DEBUG
|
if (FlagGet(FLAG_SYS_NO_CATCHING)){ //DEBUG
|
||||||
static const u8 sText_BallsCannotBeUsed[] = _("Poké Balls cannot be used\nright now!\p");
|
static const u8 sText_BallsCannotBeUsed[] = _("Poké Balls cannot be used\nright now!\p");
|
||||||
DisplayItemMessage(taskId, 1, sText_BallsCannotBeUsed, CloseItemMessage);
|
DisplayItemMessage(taskId, 1, sText_BallsCannotBeUsed, CloseItemMessage);
|
||||||
} //
|
return;
|
||||||
else if (IsPlayerPartyAndPokemonStorageFull() == FALSE) // have room for mon?
|
}
|
||||||
|
#endif
|
||||||
|
if (IsPlayerPartyAndPokemonStorageFull() == FALSE) // have room for mon?
|
||||||
{
|
{
|
||||||
RemoveBagItem(gSpecialVar_ItemId, 1);
|
RemoveBagItem(gSpecialVar_ItemId, 1);
|
||||||
if (!InBattlePyramid())
|
if (!InBattlePyramid())
|
||||||
|
|
Loading…
Reference in a new issue