Skip to content

Commit

Permalink
Merge pull request #23 from gaithernOrg/dev
Browse files Browse the repository at this point in the history
Added Final Ansem Goal
  • Loading branch information
gaithern authored Jan 26, 2024
2 parents 55ae070 + 8734f38 commit 28db11c
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 11 deletions.
5 changes: 3 additions & 2 deletions worlds/kh1/Locations.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,9 @@ def get_locations_by_category(category: str) -> Dict[str, KH1LocationData]:
"Hades Cup Defeat Cerberus Event": KH1LocationData("Cups", 265_9015),
"Hades Cup Defeat Behemoth Event": KH1LocationData("Cups", 265_9016),
"Hades Cup Defeat Hades Event": KH1LocationData("Cups", 265_9017),
"Hercules Cup Defeat Cloud Event": KH1LocationData("Cups", 265_9018),
"Hercules Cup Yellow Trinity Event": KH1LocationData("Cups", 265_9019)
"Hercules Cup Defeat Cloud Event": KH1LocationData("Cups", 265_9018),
"Hercules Cup Yellow Trinity Event": KH1LocationData("Cups", 265_9019),
"Final Ansem": KH1LocationData("Final", 265_9999)
}

event_location_table: Dict[str, KH1LocationData] = {
Expand Down
19 changes: 12 additions & 7 deletions worlds/kh1/Options.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,21 +80,26 @@ class Goal(Choice):
option_sephiroth = 8
option_unknown = 9
option_postcards = 10
default = 0
option_final_ansem = 11
default = 11

class EXPMultiplier(NamedRange):
"""
Determines the multiplier to apply to EXP gained
"""
display_name = "EXP Multiplier"
default = 16
range_start = default / 2
range_end = 48
range_start = default / 4
range_end = 160
special_range_names = {
"half": default / 2,
"normal": default,
"double": default * 2,
"triple": default * 3,
"0.25x": default / 4,
"0.5x": default / 2,
"1x": default,
"2x": default * 2,
"3x": default * 3,
"4x": default * 4,
"8x": default * 8,
"10x": default * 10,
}

@dataclass
Expand Down
3 changes: 3 additions & 0 deletions worlds/kh1/Regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,9 @@ def create_regions(multiworld: MultiWorld, player: int, goal: str, atlantica: bo
regions["Olympus Coliseum"].locations.append("Hades Cup Defeat Hades Event")
regions["Olympus Coliseum"].locations.append("Hercules Cup Defeat Cloud Event")
regions["Olympus Coliseum"].locations.append("Hercules Cup Yellow Trinity Event")

if goal == "final_ansem":
regions["End of the World"].locations.append("Final Ansem")

# Set up the regions correctly.
for name, data in regions.items():
Expand Down
4 changes: 3 additions & 1 deletion worlds/kh1/Rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def set_rules(multiworld: MultiWorld, player: int, goal: str, atlantica: bool):
#multiworld.get_location("Monstro Mouth Boat Deck Chest" , player).access_rule = lambda state: has_item(state, player, "")
multiworld.get_location("Monstro Mouth High Platform Boat Side Chest" , player).access_rule = lambda state: has_item(state, player, "High Jump") or can_glide(state, player)
multiworld.get_location("Monstro Mouth High Platform Across from Boat Chest" , player).access_rule = lambda state: has_item(state, player, "High Jump") or can_glide(state, player)
multiworld.get_location("Monstro Mouth Near Ship Chest" , player).access_rule = lambda state: has_item(state, player, "High Jump") or can_glide(state, player)
#multiworld.get_location("Monstro Mouth Near Ship Chest" , player).access_rule = lambda state: has_item(state, player, "High Jump") or can_glide(state, player)
multiworld.get_location("Monstro Mouth Green Trinity Top of Boat Chest" , player).access_rule = lambda state: (has_item(state, player, "High Jump") or can_glide(state, player)) and has_item(state, player, "Green Trinity")
#multiworld.get_location("Monstro Chamber 2 Ground Chest" , player).access_rule = lambda state: has_item(state, player, "")
#multiworld.get_location("Monstro Chamber 2 Platform Chest" , player).access_rule = lambda state: has_item(state, player, "")
Expand Down Expand Up @@ -377,6 +377,8 @@ def set_rules(multiworld: MultiWorld, player: int, goal: str, atlantica: bool):
multiworld.get_location("Hades Cup Defeat Hades Event" , player).access_rule = lambda state: has_item(state, player, "Phil Cup") and has_item(state, player, "Pegasus Cup") and has_item(state, player, "Hercules Cup")
multiworld.get_location("Hercules Cup Defeat Cloud Event" , player).access_rule = lambda state: has_item(state, player, "Hercules Cup")
multiworld.get_location("Hercules Cup Yellow Trinity Event" , player).access_rule = lambda state: has_item(state, player, "Hercules Cup")

#multiworld.get_location("Final Ansem" , player).access_rule = lambda state: has_item(state, player, "")

# Region rules.
multiworld.get_entrance("Wonderland" , player).access_rule = lambda state: has_item(state, player,"Wonderland")
Expand Down
3 changes: 2 additions & 1 deletion worlds/kh1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ def pre_fill(self) -> None:
"neverland": "Neverland Fairy Harp Event",
"unknown": "Ansem's Secret Report 13",
"final_rest": "End of the World Final Rest Chest",
"postcards": "Traverse Town Mail Postcard 10 Event"
"postcards": "Traverse Town Mail Postcard 10 Event",
"final_ansem": "Final Ansem"
}
self.multiworld.get_location(goal_dict[self.options.goal.current_key], self.player).place_locked_item(self.create_item("Victory"))

Expand Down
5 changes: 5 additions & 0 deletions worlds/kh1/test/test_goal.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,8 @@ class TestPostcards(KH1TestBase):
options = {
"Goal": 10,
}

class TestFinalRest(KH1TestBase):
options = {
"Goal": 11,
}

0 comments on commit 28db11c

Please sign in to comment.