Merge pull request #1904 from GriffinRichards/temp-alias
Add temp flag and var aliases
This commit is contained in:
12
src/tv.c
12
src/tv.c
@@ -940,9 +940,8 @@ void GabbyAndTyBeforeInterview(void)
|
||||
gSaveBlock1Ptr->gabbyAndTyData.mon2 = gBattleResults.playerMon2Species;
|
||||
gSaveBlock1Ptr->gabbyAndTyData.lastMove = gBattleResults.lastUsedMovePlayer;
|
||||
if (gSaveBlock1Ptr->gabbyAndTyData.battleNum != 0xFF)
|
||||
{
|
||||
gSaveBlock1Ptr->gabbyAndTyData.battleNum++;
|
||||
}
|
||||
|
||||
gSaveBlock1Ptr->gabbyAndTyData.battleTookMoreThanOneTurn = gBattleResults.playerMonWasDamaged;
|
||||
|
||||
if (gBattleResults.playerFaintCounter != 0)
|
||||
@@ -974,9 +973,7 @@ void GabbyAndTyBeforeInterview(void)
|
||||
|
||||
TakeGabbyAndTyOffTheAir();
|
||||
if (gSaveBlock1Ptr->gabbyAndTyData.lastMove == MOVE_NONE)
|
||||
{
|
||||
FlagSet(FLAG_TEMP_1);
|
||||
}
|
||||
FlagSet(FLAG_TEMP_SKIP_GABBY_INTERVIEW);
|
||||
}
|
||||
|
||||
void GabbyAndTyAfterInterview(void)
|
||||
@@ -3386,6 +3383,7 @@ u8 CheckForPlayersHouseNews(void)
|
||||
|
||||
void GetMomOrDadStringForTVMessage(void)
|
||||
{
|
||||
// If the player is checking the TV in their house it will only refer to their Mom.
|
||||
if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(LITTLEROOT_TOWN_BRENDANS_HOUSE_1F))
|
||||
{
|
||||
if (gSaveBlock2Ptr->playerGender == MALE)
|
||||
@@ -3415,6 +3413,7 @@ void GetMomOrDadStringForTVMessage(void)
|
||||
}
|
||||
else if (VarGet(VAR_TEMP_3) > 2)
|
||||
{
|
||||
// Should only happen if VAR_TEMP_3 is already in use by something else.
|
||||
if (VarGet(VAR_TEMP_3) % 2 == 0)
|
||||
StringCopy(gStringVar1, gText_Mom);
|
||||
else
|
||||
@@ -3422,6 +3421,9 @@ void GetMomOrDadStringForTVMessage(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
// Randomly choose whether to refer to Mom or Dad.
|
||||
// NOTE: Because of this, any map that has a TV in it shouldn't rely on VAR_TEMP_3.
|
||||
// If its value is 0, checking the TV will set it to 1 or 2.
|
||||
if (Random() % 2 != 0)
|
||||
{
|
||||
StringCopy(gStringVar1, gText_Mom);
|
||||
|
||||
Reference in New Issue
Block a user