create more battle constants

This commit is contained in:
DizzyEggg
2018-02-08 00:35:13 +01:00
parent caf9af321d
commit a10fd5a7c4
19 changed files with 485 additions and 1114 deletions
+6 -6
View File
@@ -43,7 +43,7 @@
#include "roamer.h"
#include "tv.h"
#include "safari_zone.h"
#include "battle_string_ids.h"
#include "constants/battle_string_ids.h"
#include "data2.h"
#include "decompress.h"
@@ -330,11 +330,11 @@ static void (* const sEndTurnFuncsTable[])(void) =
HandleEndTurn_BattleLost, // B_OUTCOME_DREW
HandleEndTurn_RanFromBattle, // B_OUTCOME_RAN
HandleEndTurn_FinishBattle, // B_OUTCOME_PLAYER_TELEPORTED
HandleEndTurn_MonFled, // B_OUTCOME_POKE_FLED
HandleEndTurn_FinishBattle, // B_OUTCOME_CAUGHT_POKE
HandleEndTurn_MonFled, // B_OUTCOME_MON_FLED
HandleEndTurn_FinishBattle, // B_OUTCOME_CAUGHT
HandleEndTurn_FinishBattle, // battle outcome 8
HandleEndTurn_FinishBattle, // B_OUTCOME_FORFEITED
HandleEndTurn_FinishBattle, // B_OUTCOME_POKE_TELEPORTED
HandleEndTurn_FinishBattle, // B_OUTCOME_MON_TELEPORTED
};
const u8 gStatusConditionString_PoisonJpn[8] = _("どく$$$$$");
@@ -5025,7 +5025,7 @@ static void ReturnFromBattleToOverworld(void)
if (gBattleTypeFlags & BATTLE_TYPE_ROAMER)
{
UpdateRoamerHPStatus(&gEnemyParty[0]);
if ((gBattleOutcome & B_OUTCOME_WON) || gBattleOutcome == B_OUTCOME_CAUGHT_POKE)
if ((gBattleOutcome & B_OUTCOME_WON) || gBattleOutcome == B_OUTCOME_CAUGHT)
SetRoamerInactive();
}
@@ -5496,7 +5496,7 @@ static void HandleAction_Run(void)
else
{
gCurrentTurnActionNumber = gBattlersCount;
gBattleOutcome = B_OUTCOME_POKE_FLED;
gBattleOutcome = B_OUTCOME_MON_FLED;
}
}
}
+1 -1
View File
@@ -1,7 +1,7 @@
#include "global.h"
#include "battle.h"
#include "battle_message.h"
#include "battle_string_ids.h"
#include "constants/battle_string_ids.h"
#include "constants/moves.h"
#include "text.h"
#include "string_util.h"
+2 -2
View File
@@ -38,7 +38,7 @@
#include "pokemon_storage_system.h"
#include "task.h"
#include "naming_screen.h"
#include "battle_string_ids.h"
#include "constants/battle_string_ids.h"
#include "battle_setup.h"
#include "overworld.h"
@@ -7053,7 +7053,7 @@ static void atk76_various(void)
if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER)
gBattleOutcome = B_OUTCOME_PLAYER_TELEPORTED;
else
gBattleOutcome = B_OUTCOME_POKE_TELEPORTED;
gBattleOutcome = B_OUTCOME_MON_TELEPORTED;
break;
case VARIOUS_PLAY_TRAINER_DEFEATED_MUSIC:
BtlController_EmitPlayFanfareOrBGM(0, MUS_KACHI1, TRUE);
+2 -2
View File
@@ -993,8 +993,8 @@ static bool32 IsPlayerDefeated(u32 battleOutcome)
case B_OUTCOME_WON:
case B_OUTCOME_RAN:
case B_OUTCOME_PLAYER_TELEPORTED:
case B_OUTCOME_POKE_FLED:
case B_OUTCOME_CAUGHT_POKE:
case B_OUTCOME_MON_FLED:
case B_OUTCOME_CAUGHT:
return FALSE;
default:
return FALSE;
+1 -1
View File
@@ -15,7 +15,7 @@
#include "text.h"
#include "string_util.h"
#include "battle_message.h"
#include "battle_string_ids.h"
#include "constants/battle_string_ids.h"
#include "battle_ai_script_commands.h"
#include "battle_controllers.h"
#include "event_data.h"
+1 -1
View File
@@ -21,7 +21,7 @@
#include "constants/songs.h"
#include "overworld.h"
#include "battle_message.h"
#include "battle_string_ids.h"
#include "constants/battle_string_ids.h"
#include "gpu_regs.h"
#include "bg.h"
#include "link.h"
+2 -2
View File
@@ -108,7 +108,7 @@ void SafariZoneRetirePrompt(void)
void CB2_EndSafariBattle(void)
{
sSafariZoneFleedMons += gBattleResults.field_1F;
if (gBattleOutcome == B_OUTCOME_CAUGHT_POKE)
if (gBattleOutcome == B_OUTCOME_CAUGHT)
sSafariZoneCaughtMons++;
if (gNumSafariBalls != 0)
{
@@ -121,7 +121,7 @@ void CB2_EndSafariBattle(void)
gFieldCallback = sub_80AF6F0;
SetMainCallback2(c2_load_new_map);
}
else if (gBattleOutcome == B_OUTCOME_CAUGHT_POKE)
else if (gBattleOutcome == B_OUTCOME_CAUGHT)
{
ScriptContext1_SetupScript(EventScript_2A4B9B);
ScriptContext1_Stop();
+4 -4
View File
@@ -1208,7 +1208,7 @@ void PutPokemonTodayFailedOnTheAir(void)
{
ct = 0xFF;
}
if (ct > 2 && (gBattleOutcome == B_OUTCOME_POKE_FLED || gBattleOutcome == B_OUTCOME_WON))
if (ct > 2 && (gBattleOutcome == B_OUTCOME_MON_FLED || gBattleOutcome == B_OUTCOME_WON))
{
sCurTVShowSlot = FindEmptyTVSlotBeyondFirstFiveShowsOfArray(gSaveBlock1Ptr->tvShows);
if (sCurTVShowSlot != -1 && HasMixableShowAlreadyBeenSpawnedWithPlayerID(TVSHOW_POKEMON_TODAY_FAILED, FALSE) != TRUE)
@@ -2406,7 +2406,7 @@ void sub_80EE184(void)
case B_OUTCOME_DREW:
show->breakingNews.kind = TVSHOW_OFF_AIR;
return;
case B_OUTCOME_CAUGHT_POKE:
case B_OUTCOME_CAUGHT:
show->breakingNews.outcome = 0;
break;
case B_OUTCOME_WON:
@@ -2417,8 +2417,8 @@ void sub_80EE184(void)
case B_OUTCOME_NO_SAFARI_BALLS:
show->breakingNews.outcome = 2;
break;
case B_OUTCOME_POKE_FLED:
case B_OUTCOME_POKE_TELEPORTED:
case B_OUTCOME_MON_FLED:
case B_OUTCOME_MON_TELEPORTED:
show->breakingNews.outcome = 3;
break;
}