remove unreferenced code and ban shishi from tower

This commit is contained in:
Llinos Evans 2024-07-29 22:30:16 +01:00
parent f89d5b33d6
commit 4417b67d18
3 changed files with 1 additions and 305 deletions

View file

@ -68,116 +68,6 @@ Function170114:
call Function170c8b
ret
Function170139: ; unreferenced
; Convert the 4-digit decimal number at s5_aa41 into binary
ld a, BANK(s5_aa41)
call OpenSRAM
ld de, s5_aa41
ld h, 0
ld l, h
ld bc, 1000
call .DecToBin
ld bc, 100
call .DecToBin
ld bc, 10
call .DecToBin
ld a, [de]
ld c, a
ld b, 0
add hl, bc
call CloseSRAM
; Store that number in wc608
ld a, h
ld [wc608], a
ld a, l
ld [wc608 + 1], a
ld hl, wBT_OTTempMon1DVs
ld a, [wPlayerID]
ld [hli], a
ld a, [wPlayerID + 1]
ld [hli], a
ld a, [wSecretID]
ld [hli], a
ld a, [wSecretID + 1]
ld [hli], a
ld e, l
ld d, h
ld hl, wPlayerName
ld bc, NAME_LENGTH_JAPANESE - 1
call CopyBytes
ld bc, wPlayerID
ld de, wPlayerGender
farcall GetMobileOTTrainerClass
ld de, wBT_OTTempMon1CaughtGender
ld a, c
ld [de], a
inc de
ld a, LOW(wPartyMons)
ld [wcd49], a
ld a, HIGH(wPartyMons)
ld [wcd4a], a
ld a, LOW(wPartyMonNicknames)
ld [wcd4b], a
ld a, HIGH(wPartyMonNicknames)
ld [wcd4c], a
ld a, 3
.CopyLoop:
push af
ld a, [wcd49]
ld l, a
ld a, [wcd4a]
ld h, a
ld bc, PARTYMON_STRUCT_LENGTH
call CopyBytes
ld a, l
ld [wcd49], a
ld a, h
ld [wcd4a], a
ld a, [wcd4b]
ld l, a
ld a, [wcd4c]
ld h, a
ld bc, 6
call CopyBytes
ld a, l
ld [wcd4b], a
ld a, h
ld [wcd4c], a
pop af
dec a
jr nz, .CopyLoop
ld a, BANK(sEZChatBeginBattleMessage)
call OpenSRAM
ld hl, sEZChatBattleMessages
ld bc, EASY_CHAT_MESSAGE_LENGTH * 3
call CopyBytes
call CloseSRAM
ld a, BANK(s5_a894) ; aka BANK(s5_a948)
call OpenSRAM
ld hl, s5_a894
ld bc, 6
call CopyBytes
ld hl, wc608
ld de, s5_a948
ld bc, 246
call CopyBytes
call CloseSRAM
ret
.DecToBin:
ld a, [de]
inc de
and a
ret z
.digit_loop
add hl, bc
dec a
jr nz, .digit_loop
ret
BattleTowerBattle:
xor a ; FALSE
ld [wBattleTowerBattleEnded], a

View file

@ -155,75 +155,11 @@ Script_BattleTowerHopeToServeYouAgain:
closetext
end
Script_MobileError2: ; unreferenced
special BattleTowerMobileError
closetext
end
Script_WaitButton:
waitbutton
closetext
end
Script_ChooseChallenge2: ; unreferenced
writetext Text_SaveBeforeEnteringBattleRoom
yesorno
iffalse Script_Menu_ChallengeExplanationCancel
special TryQuickSave
iffalse Script_Menu_ChallengeExplanationCancel
setval BATTLETOWERACTION_SET_EXPLANATION_READ
special BattleTowerAction
special Function1700ba
ifequal $a, Script_Menu_ChallengeExplanationCancel
ifnotequal $0, Script_MobileError
writetext Text_ReceivedAListOfLeadersOnTheHonorRoll
turnobject BATTLETOWER1F_RECEPTIONIST, LEFT
writetext Text_PleaseConfirmOnThisMonitor
waitbutton
turnobject BATTLETOWER1F_RECEPTIONIST, DOWN
closetext
end
Script_StartChallenge: ; unreferenced
setval BATTLETOWERACTION_LEVEL_CHECK
special BattleTowerAction
ifnotequal $0, Script_AMonLevelExceeds
setval BATTLETOWERACTION_UBERS_CHECK
special BattleTowerAction
ifnotequal $0, Script_MayNotEnterABattleRoomUnderL70
special CheckForBattleTowerRules
ifnotequal FALSE, Script_WaitButton
setval BATTLETOWERACTION_05
special BattleTowerAction
ifequal $0, .zero
writetext Text_CantBeRegistered_PreviousRecordDeleted
sjump .continue
.zero
writetext Text_CantBeRegistered
.continue
yesorno
iffalse Script_Menu_ChallengeExplanationCancel
writetext Text_SaveBeforeReentry
yesorno
iffalse Script_Menu_ChallengeExplanationCancel
setscene SCENE_BATTLETOWER1F_CHECKSTATE
special TryQuickSave
iffalse Script_Menu_ChallengeExplanationCancel
setscene SCENE_BATTLETOWER1F_NOOP
setval BATTLETOWERACTION_06
special BattleTowerAction
setval BATTLETOWERACTION_12
special BattleTowerAction
writetext Text_RightThisWayToYourBattleRoom
waitbutton
sjump Script_ResumeBattleTowerChallenge
Script_ReachedBattleLimit: ; unreferenced
writetext Text_FiveDayBattleLimit_Mobile
waitbutton
sjump Script_BattleTowerHopeToServeYouAgain
Script_AMonLevelExceeds:
writetext Text_AMonLevelExceeds
waitbutton
@ -365,66 +301,6 @@ Text_RightThisWayToYourBattleRoom:
line "your BATTLE ROOM."
done
Text_BattleTowerIntroduction_1: ; unreferenced
text "BATTLE TOWER is a"
line "facility made for"
cont "#MON battles."
para "Countless #MON"
line "trainers gather"
para "from all over to"
line "hold battles in"
para "specially designed"
line "BATTLE ROOMS."
para "There are many"
line "BATTLE ROOMS in"
cont "the BATTLE TOWER."
para "Each ROOM holds"
line "seven trainers."
para "If you defeat the"
line "seven in a ROOM,"
para "and you have a"
line "good record, you"
para "could become the"
line "ROOM's LEADER."
para "All LEADERS will"
line "be recorded in the"
para "HONOR ROLL for"
line "posterity."
para "You may challenge"
line "in up to five"
para "BATTLE ROOMS each"
line "day."
para "However, you may"
line "battle only once a"
para "day in any given"
line "ROOM."
para "To interrupt a"
line "session, you must"
para "SAVE. If not, you"
line "won't be able to"
para "resume your ROOM"
line "challenge."
para ""
done
Text_BattleTowerIntroduction_2:
text "BATTLE TOWER is a"
line "facility made for"
@ -485,24 +361,6 @@ Text_ThanksForVisiting:
line "visiting!"
done
Text_BeatenAllTheTrainers_Mobile: ; unreferenced
text "Congratulations!"
para "You've beaten all"
line "the trainers!"
para "Your feat may be"
line "worth registering,"
para "<PLAYER>. With your"
line "results, you may"
para "be chosen as a"
line "ROOM LEADER."
para ""
done
Text_CongratulationsYouveBeatenAllTheTrainers:
text "Congratulations!"
@ -515,14 +373,6 @@ Text_CongratulationsYouveBeatenAllTheTrainers:
para ""
done
Text_AskRegisterRecord_Mobile: ; unreferenced
text "Would you like to"
line "register your"
para "record with the"
line "CENTER?"
done
Text_PlayerGotFive:
text "<PLAYER> got five"
line "@"
@ -540,13 +390,6 @@ Text_YourPackIsStuffedFull:
line "and come back."
done
Text_YourRegistrationIsComplete: ; unreferenced
text "Your registration"
line "is complete."
para "Please come again!"
done
Text_WeHopeToServeYouAgain:
text "We hope to serve"
line "you again."
@ -583,11 +426,6 @@ Text_CantBeRegistered_PreviousRecordDeleted:
cont "deleted. OK?"
done
Text_CheckTheLeaderHonorRoll: ; unreferenced
text "Check the LEADER"
line "HONOR ROLL?"
done
Text_ReadBattleTowerRules:
text "BATTLE TOWER rules"
line "are written here."
@ -640,14 +478,6 @@ Text_NextUpOpponentNo:
text ". Ready?"
done
Text_SaveBeforeConnecting_Mobile: ; unreferenced
text "Your session will"
line "be SAVED before"
para "connecting with"
line "the CENTER."
done
Text_SaveBeforeEnteringBattleRoom:
text "Before entering"
line "the BATTLE ROOM,"
@ -674,15 +504,6 @@ Text_CancelYourBattleRoomChallenge:
line "ROOM challenge?"
done
Text_RegisterRecordOnFile_Mobile: ; unreferenced
text "We have your"
line "previous record on"
para "file. Would you"
line "like to register"
cont "it at the CENTER?"
done
Text_WeveBeenWaitingForYou:
text "We've been waiting"
line "for you. This way"
@ -715,22 +536,6 @@ Text_TooMuchTimeElapsedNoRegister:
cont "challenge."
done
Text_RegisterRecordTimedOut_Mobile: ; unreferenced
; duplicate of Text_TooMuchTimeElapsedNoRegister
text "Sorry, but it's"
line "not possible to"
para "register your most"
line "recent record at"
para "the CENTER because"
line "too much time has"
para "elapsed since the"
line "start of your"
cont "challenge."
done
Text_AMonLevelExceeds:
text "One or more of"
line "your #MON's"

View file

@ -3987,6 +3987,7 @@ BattleTower_UbersCheck:
dw LUGIA
dw HO_OH
dw CELEBI
dw SHI_SHI
dw -1
.uber_under_70