diff --git a/constants/objectives/results.py b/constants/objectives/results.py index 2606d9b2..6c91a88b 100644 --- a/constants/objectives/results.py +++ b/constants/objectives/results.py @@ -15,7 +15,7 @@ "Kefka's Tower" : [ ResultType(1, "Kefka's Tower", "Random", None), ResultType(2, "Unlock Final Kefka", "Unlock Final Kefka", None), - ResultType(3, "Unlock KT Skip", "Unlock KT Skip", None), + ResultType(3, "Unlock One KT Skip", "Unlock One KT Skip", None), ], "Auto" : [ ResultType(4, "Auto", "Random", None), @@ -85,6 +85,8 @@ ], } +category_types["Kefka's Tower"] += [ResultType(61, "Unlock Perma KT Skip", "Unlock Perma KT Skip", None)] + categories = list(category_types.keys()) id_type = {} diff --git a/data/event_bit.py b/data/event_bit.py index b8775c9d..20ed344c 100644 --- a/data/event_bit.py +++ b/data/event_bit.py @@ -1,5 +1,5 @@ # NOTE: (address - 1e80) * 0x8 + bit -# e.g. (1eb7 - 1e80) * 0x8 + 0x1 = 1b9 (airship visible) +# e.g. (1eb7 - 1e80) * 0x8 + 0x1 = 1b9 (airship visible) # (1f43 - 1e80) * 0x8 + 0x3 = 61b (characters on narshe battlefield) DISABLE_SAVE_POINT_TUTORIAL = 0x133 @@ -202,6 +202,14 @@ ENABLE_Y_PARTY_SWITCHING = 0x1ce ALWAYS_CLEAR = 0x176 # this event_bit is always clear, used for branching +# Unused Bits +# bits 0x200-0x22e Used for banquet soldiers +# 2 bits 0x1bc-0x1bd Unused +# 3 bits 0x1c7-0x1c9 Unused +# 3 bits 0x2c1-0x2c3 Unused +UNLOCKED_PERMA_KT_SKIP = 0x2c1 +# 8 bits 0x1e6-0x1ed Unused, as the SNES versions feature 20 rare item slots rather than 30 + from constants.objectives import MAX_OBJECTIVES for index in range(MAX_OBJECTIVES): globals()["OBJECTIVE" + str(index)] = 0xe0 + index diff --git a/event/kefka_tower.py b/event/kefka_tower.py index ba1b1264..f289f27d 100644 --- a/event/kefka_tower.py +++ b/event/kefka_tower.py @@ -148,6 +148,7 @@ def entrance_landing_mod(self): space.add_label("ENTRANCE_LANDING", space.end_address + 1) space.write( field.BranchIfEventWordLess(event_word.CHARACTERS_AVAILABLE, 3, "NEED_MORE_ALLIES"), + field.BranchIfEventBitSet(event_bit.UNLOCKED_PERMA_KT_SKIP, "LANDING_MENU"), field.BranchIfEventBitSet(event_bit.UNLOCKED_KT_SKIP, "LANDING_MENU"), field.Pause(2), # NOTE: load-bearing pause, without a pause or dialog before party select the game diff --git a/objectives/results/unlock_kt_skip.py b/objectives/results/unlock_one_kt_skip.py similarity index 94% rename from objectives/results/unlock_kt_skip.py rename to objectives/results/unlock_one_kt_skip.py index 57b21dfb..6ae3c0e7 100644 --- a/objectives/results/unlock_kt_skip.py +++ b/objectives/results/unlock_one_kt_skip.py @@ -14,6 +14,6 @@ def src(self): ] class Result(ObjectiveResult): - NAME = "Unlock KT Skip" + NAME = "Unlock One KT Skip" def __init__(self): super().__init__(Field, Battle) diff --git a/objectives/results/unlock_perma_kt_skip.py b/objectives/results/unlock_perma_kt_skip.py new file mode 100644 index 00000000..11b35dda --- /dev/null +++ b/objectives/results/unlock_perma_kt_skip.py @@ -0,0 +1,19 @@ +from objectives.results._objective_result import * +import data.event_bit as event_bit + +class Field(field_result.Result): + def src(self): + return [ + field.SetEventBit(event_bit.UNLOCKED_PERMA_KT_SKIP), + ] + +class Battle(battle_result.Result): + def src(self): + return [ + battle_result.SetBit(event_bit.address(event_bit.UNLOCKED_PERMA_KT_SKIP), event_bit.UNLOCKED_PERMA_KT_SKIP), + ] + +class Result(ObjectiveResult): + NAME = "Unlock Perma KT Skip" + def __init__(self): + super().__init__(Field, Battle)