Skip to content

Commit

Permalink
Updated logic/victory condition
Browse files Browse the repository at this point in the history
  • Loading branch information
gaithern committed Jan 2, 2024
1 parent 847bffd commit cab85c4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion worlds/khrecom/Items.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ def get_items_by_category(category: str, disclude: list) -> Dict[str, KHRECOMIte


item_table: Dict[str, KHRECOMItemData] = {
#Victory
"Victory": KHRECOMItemData("Victory", code = 268_0000, classification = ItemClassification.progression, max_quantity = 1, weight = 10),
#Battle Cards
"Card Set Kingdom Key 1-3": KHRECOMItemData("Sets", code = 268_1011, classification = ItemClassification.filler, max_quantity = 1, weight = 10),
#"Card Set Kingdom Key 4-6": KHRECOMItemData("Sets", code = 268_1012, classification = ItemClassification.filler, max_quantity = 1, weight = 10), Starting Deck
Expand Down Expand Up @@ -280,7 +282,7 @@ def get_items_by_category(category: str, disclude: list) -> Dict[str, KHRECOMIte
"World Card 100 Acre Wood": KHRECOMItemData("World Unlocks", code = 268_3010, classification = ItemClassification.progression, max_quantity = 1, weight = 1),
"World Card Twilight Town": KHRECOMItemData("World Unlocks", code = 268_3011, classification = ItemClassification.progression, max_quantity = 1, weight = 1),
"World Card Destiny Islands": KHRECOMItemData("World Unlocks", code = 268_3012, classification = ItemClassification.progression, max_quantity = 1, weight = 1),
"World Card Castle Oblivion": KHRECOMItemData("World Unlocks", code = 268_3013, classification = ItemClassification.progression, max_quantity = 1, weight = 1),
#"World Card Castle Oblivion": KHRECOMItemData("World Unlocks", code = 268_3013, classification = ItemClassification.progression, max_quantity = 1, weight = 1),
"Key to Rewards Traverse Town": KHRECOMItemData("Gold Map Cards", code = 268_3301, classification = ItemClassification.progression, max_quantity = 1, weight = 1),
"Key to Rewards Wonderland": KHRECOMItemData("Gold Map Cards", code = 268_3302, classification = ItemClassification.progression, max_quantity = 1, weight = 1),
"Key to Rewards Olympus Coliseum": KHRECOMItemData("Gold Map Cards", code = 268_3303, classification = ItemClassification.progression, max_quantity = 1, weight = 1),
Expand Down
4 changes: 2 additions & 2 deletions worlds/khrecom/Rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ def set_rules(multiworld: MultiWorld, player: int, days: bool):
multiworld.get_entrance("Floor 10" , player).access_rule = lambda state: has_item(state, player,"World Card 100 Acre Wood")
multiworld.get_entrance("Floor 11" , player).access_rule = lambda state: has_item(state, player,"World Card Twilight Town") and has_x_worlds(state, player, 5)
multiworld.get_entrance("Floor 12" , player).access_rule = lambda state: has_item(state, player,"World Card Destiny Islands") and has_x_worlds(state, player, 7)
multiworld.get_entrance("Floor 13" , player).access_rule = lambda state: has_item(state, player,"World Card Castle Oblivion") and has_x_worlds(state, player, 9)
multiworld.get_entrance("Floor 13" , player).access_rule = lambda state: state.has_all({"Friend Card Donald", "Friend Card Goofy", "Friend Card Aladdin", "Friend Card Ariel", "Friend Card Beast", "Friend Card Jack", "Friend Card Peter Pan", "World Card Halloween Town", "World Card Atlantica", "World Card Destiny Islands"}, player) and has_x_worlds(state, player, 9)



# Win condition.
multiworld.completion_condition[player] = lambda state: state.has_all({"Friend Card Donald", "Friend Card Goofy", "Friend Card Aladdin", "Friend Card Ariel", "Friend Card Beast", "Friend Card Jack", "Friend Card Peter Pan"}, player)
multiworld.completion_condition[player] = lambda state: has_item(state, player,"Victory")
1 change: 1 addition & 0 deletions worlds/khrecom/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def fill_slot_data(self) -> dict:

def create_items(self):
item_pool: List[KHRECOMItem] = []
self.multiworld.get_location("Castle Oblivion Field Marluxia", self.player).place_locked_item(self.create_item("Victory"))
starting_locations = get_locations_by_category("Starting")
starting_locations = random.sample(list(starting_locations.keys()),4)
starting_worlds = get_items_by_category("World Unlocks", [])
Expand Down

0 comments on commit cab85c4

Please sign in to comment.