summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPikalaxALT <PikalaxALT@users.noreply.github.com>2020-01-16 15:51:18 -0500
committerGitHub <noreply@github.com>2020-01-16 15:51:18 -0500
commit2af612486334cddbbe7a7fe7cf04af175ff1302f (patch)
treeba5406d16a4b61dd270518859a5d3a254bcd5806 /src
parent7cddc40bbfcd45994f63db22af305dab4db5491c (diff)
parent8b2bf805eab3d1e7ca11eda11d6b409fac431248 (diff)
Merge pull request #226 from GriffinRichards/doc-lavender
Document Lavender Town scripts
Diffstat (limited to 'src')
-rw-r--r--src/battle_setup.c9
-rw-r--r--src/field_specials.c7
-rw-r--r--src/pokemon.c2
3 files changed, 10 insertions, 8 deletions
diff --git a/src/battle_setup.c b/src/battle_setup.c
index 994ed858a..a46191509 100644
--- a/src/battle_setup.c
+++ b/src/battle_setup.c
@@ -276,7 +276,7 @@ static void DoGhostBattle(void)
gMain.savedCallback = CB2_EndWildBattle;
gBattleTypeFlags = BATTLE_TYPE_GHOST;
CreateBattleStartTask(GetWildBattleTransition(), 0);
- SetMonData(&gEnemyParty[0], MON_DATA_NICKNAME, gUnknown_841D148);
+ SetMonData(&gEnemyParty[0], MON_DATA_NICKNAME, gText_Ghost);
IncrementGameStat(GAME_STAT_TOTAL_BATTLES);
IncrementGameStat(GAME_STAT_WILD_BATTLES);
}
@@ -321,7 +321,7 @@ void ScrSpecial_StartMarowakBattle(void)
gBattleTypeFlags = BATTLE_TYPE_GHOST;
}
CreateBattleStartTask(GetWildBattleTransition(), 0);
- SetMonData(&gEnemyParty[0], MON_DATA_NICKNAME, gUnknown_841D148);
+ SetMonData(&gEnemyParty[0], MON_DATA_NICKNAME, gText_Ghost);
IncrementGameStat(GAME_STAT_TOTAL_BATTLES);
IncrementGameStat(GAME_STAT_WILD_BATTLES);
}
@@ -444,10 +444,11 @@ static void CB2_EndMarowakBattle(void)
}
else
{
+ // If result is TRUE player didnt defeat Marowak, force player back from stairs
if (gBattleOutcome == B_OUTCOME_WON)
- gSpecialVar_Result = 0;
+ gSpecialVar_Result = FALSE;
else
- gSpecialVar_Result = 1;
+ gSpecialVar_Result = TRUE;
SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic);
}
}
diff --git a/src/field_specials.c b/src/field_specials.c
index 5f44a090d..8d6014fba 100644
--- a/src/field_specials.c
+++ b/src/field_specials.c
@@ -523,9 +523,10 @@ u16 Special_GetSpeciesOfPartySlot_x8004(void)
return GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_SPECIES2, NULL);
}
-bool8 Special_BufferMonOTNameAndCompareToPlayerName(void)
+bool8 Special_IsMonOTNameNotPlayers(void)
{
GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_OT_NAME, gStringVar1);
+
if (!StringCompare(gSaveBlock2Ptr->playerName, gStringVar1))
return FALSE;
else
@@ -1632,13 +1633,13 @@ static void ChangePokemonNickname_CB(void)
CB2_ReturnToFieldContinueScriptPlayMapMusic();
}
-void TV_CopyNicknameToStringVar1AndEnsureTerminated(void)
+void Special_GetMonNickname(void)
{
GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_NICKNAME, gStringVar1);
StringGetEnd10(gStringVar1);
}
-void TV_CheckMonOTIDEqualsPlayerID(void)
+void Special_IsMonOTIDNotPlayers(void)
{
if (GetPlayerTrainerId() == GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_OT_ID, NULL))
gSpecialVar_Result = FALSE;
diff --git a/src/pokemon.c b/src/pokemon.c
index 39019421c..1270a25ed 100644
--- a/src/pokemon.c
+++ b/src/pokemon.c
@@ -6059,7 +6059,7 @@ bool8 CheckBattleTypeGhost(struct Pokemon *mon, u8 battlerId)
{
GetMonData(mon, MON_DATA_NICKNAME, buffer);
StringGetEnd10(buffer);
- if (!StringCompare(buffer, gUnknown_841D148))
+ if (!StringCompare(buffer, gText_Ghost))
return TRUE;
}
return FALSE;