Skip to content

Commit

Permalink
PR updates
Browse files Browse the repository at this point in the history
  • Loading branch information
gaithern committed Aug 20, 2024
1 parent e5e8ec8 commit 1053558
Show file tree
Hide file tree
Showing 5 changed files with 122 additions and 98 deletions.
6 changes: 1 addition & 5 deletions worlds/khrecom/Locations.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from typing import Dict, NamedTuple, Optional
import typing


from BaseClasses import Location
Expand Down Expand Up @@ -307,7 +306,4 @@ def get_locations_by_category(category: str) -> Dict[str, KHRECOMLocationData]:
"Final Marluxia": KHRECOMLocationData("Final" , 269_9999),
}

event_location_table: Dict[str, KHRECOMLocationData] = {
}

lookup_id_to_name: typing.Dict[int, str] = {data.code: item_name for item_name, data in location_table.items() if data.code}
lookup_id_to_name: Dict[int, str] = {data.code: item_name for item_name, data in location_table.items() if data.code}
200 changes: 114 additions & 86 deletions worlds/khrecom/Rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,21 +95,24 @@ def set_rules(khrecomworld):
lambda state: state.has("World Card Neverland", player))
add_rule(khrecomworld.get_location("Defeat 1 Heartless Air Soldier"),
lambda state: (
state.has("World Card Monstro", player)
or state.has("World Card Agrabah", player)
or state.has("World Card Twilight Town", player)
state.has_any({
"World Card Monstro",
"World Card Agrabah",
"World Card Twilight Town"}, player)
))
add_rule(khrecomworld.get_location("Defeat 2 Heartless Air Soldier"),
lambda state: (
state.has("World Card Monstro", player)
or state.has("World Card Agrabah", player)
or state.has("World Card Twilight Town", player)
state.has_any({
"World Card Monstro",
"World Card Agrabah",
"World Card Twilight Town"}, player)
))
add_rule(khrecomworld.get_location("Defeat 3 Heartless Air Soldier"),
lambda state: (
state.has("World Card Monstro", player)
or state.has("World Card Agrabah", player)
or state.has("World Card Twilight Town", player)
state.has_any({
"World Card Monstro",
"World Card Agrabah",
"World Card Twilight Town"}, player)
))
add_rule(khrecomworld.get_location("Defeat 1 Heartless Aquatank"),
lambda state: state.has("World Card Atlantica", player))
Expand All @@ -125,21 +128,24 @@ def set_rules(khrecomworld):
lambda state: state.has("World Card Agrabah", player))
add_rule(khrecomworld.get_location("Defeat 1 Heartless Barrel Spider"),
lambda state: (
state.has("World Card Monstro", player)
or state.has("World Card Agrabah", player)
or state.has("World Card Neverland", player)
state.has_any({
"World Card Monstro",
"World Card Agrabah",
"World Card Neverland"}, player)
))
add_rule(khrecomworld.get_location("Defeat 2 Heartless Barrel Spider"),
lambda state: (
state.has("World Card Monstro", player)
or state.has("World Card Agrabah", player)
or state.has("World Card Neverland", player)
state.has_any({
"World Card Monstro",
"World Card Agrabah",
"World Card Neverland"}, player)
))
add_rule(khrecomworld.get_location("Defeat 3 Heartless Barrel Spider"),
lambda state: (
state.has("World Card Monstro", player)
or state.has("World Card Agrabah", player)
or state.has("World Card Neverland", player)
state.has_any({
"World Card Monstro",
"World Card Agrabah",
"World Card Neverland"}, player)
))
add_rule(khrecomworld.get_location("Defeat 1 Heartless Bouncywild"),
lambda state: state.has("World Card Olympus Coliseum", player))
Expand All @@ -149,59 +155,68 @@ def set_rules(khrecomworld):
lambda state: state.has("World Card Olympus Coliseum", player))
add_rule(khrecomworld.get_location("Defeat 1 Heartless Creeper Plant"),
lambda state: (
state.has("World Card Wonderland", player)
or state.has("World Card Halloween Town", player)
or state.has("World Card Destiny Islands", player)
state.has_any({
"World Card Wonderland",
"World Card Halloween Town",
"World Card Destiny Islands"}, player)
))
add_rule(khrecomworld.get_location("Defeat 2 Heartless Creeper Plant"),
lambda state: (
state.has("World Card Wonderland", player)
or state.has("World Card Halloween Town", player)
or state.has("World Card Destiny Islands", player)
state.has_any({
"World Card Wonderland",
"World Card Halloween Town",
"World Card Destiny Islands"}, player)
))
add_rule(khrecomworld.get_location("Defeat 3 Heartless Creeper Plant"),
lambda state: (
state.has("World Card Wonderland", player)
or state.has("World Card Halloween Town", player)
or state.has("World Card Destiny Islands", player)
state.has_any({
"World Card Wonderland",
"World Card Halloween Town",
"World Card Destiny Islands"}, player)
))
add_rule(khrecomworld.get_location("Defeat 1 Heartless Crescendo"),
lambda state: (
state.has("World Card Wonderland", player)
or state.has("World Card Neverland", player)
or state.has("World Card Destiny Islands", player)
state.has_any({
"World Card Wonderland",
"World Card Neverland",
"World Card Destiny Islands"}, player)
))
add_rule(khrecomworld.get_location("Defeat 2 Heartless Crescendo"),
lambda state: (
state.has("World Card Wonderland", player)
or state.has("World Card Neverland", player)
or state.has("World Card Destiny Islands", player)
state.has_any({
"World Card Wonderland",
"World Card Neverland",
"World Card Destiny Islands"}, player)
))
add_rule(khrecomworld.get_location("Defeat 3 Heartless Crescendo"),
lambda state: (
state.has("World Card Wonderland", player)
or state.has("World Card Neverland", player)
or state.has("World Card Destiny Islands", player)
state.has_any({
"World Card Wonderland",
"World Card Neverland",
"World Card Destiny Islands"}, player)
))
add_rule(khrecomworld.get_location("Defeat 1 Heartless Darkball"),
lambda state: (
state.has("World Card Atlantica", player)
or state.has("World Card Neverland", player)
or state.has("World Card Destiny Islands", player)
state.has_any({
"World Card Atlantica",
"World Card Neverland",
"World Card Destiny Islands"}, player)
or has_castle_oblivion(state, player)
))
add_rule(khrecomworld.get_location("Defeat 2 Heartless Darkball"),
lambda state: (
state.has("World Card Atlantica", player)
or state.has("World Card Neverland", player)
or state.has("World Card Destiny Islands", player)
state.has_any({
"World Card Atlantica",
"World Card Neverland",
"World Card Destiny Islands"}, player)
or has_castle_oblivion(state, player)
))
add_rule(khrecomworld.get_location("Defeat 3 Heartless Darkball"),
lambda state: (
state.has("World Card Atlantica", player)
or state.has("World Card Neverland", player)
or state.has("World Card Destiny Islands", player)
state.has_any({
"World Card Atlantica",
"World Card Neverland",
"World Card Destiny Islands"}, player)
or has_castle_oblivion(state, player)
))
add_rule(khrecomworld.get_location("Defeat 1 Heartless Defender"),
Expand All @@ -227,39 +242,45 @@ def set_rules(khrecomworld):
lambda state: state.has("World Card Halloween Town", player))
add_rule(khrecomworld.get_location("Defeat 1 Heartless Green Requiem"),
lambda state: (
state.has("World Card Monstro", player)
or state.has("World Card Agrabah", player)
state.has_any({
"World Card Monstro",
"World Card Agrabah"}, player)
or has_castle_oblivion(state, player)
))
add_rule(khrecomworld.get_location("Defeat 2 Heartless Green Requiem"),
lambda state: (
state.has("World Card Monstro", player)
or state.has("World Card Agrabah", player)
state.has_any({
"World Card Monstro",
"World Card Agrabah"}, player)
or has_castle_oblivion(state, player)
))
add_rule(khrecomworld.get_location("Defeat 3 Heartless Green Requiem"),
lambda state: (
state.has("World Card Monstro", player)
or state.has("World Card Agrabah", player)
state.has_any({
"World Card Monstro",
"World Card Agrabah"}, player)
or has_castle_oblivion(state, player)
))
add_rule(khrecomworld.get_location("Defeat 1 Heartless Large Body"),
lambda state: (
state.has("World Card Wonderland", player)
or state.has("World Card Olympus Coliseum", player)
or state.has("World Card Monstro", player)
state.has_any({
"World Card Wonderland",
"World Card Olympus Coliseum",
"World Card Monstro"}, player)
))
add_rule(khrecomworld.get_location("Defeat 2 Heartless Large Body"),
lambda state: (
state.has("World Card Wonderland", player)
or state.has("World Card Olympus Coliseum", player)
or state.has("World Card Monstro", player)
state.has_any({
"World Card Wonderland",
"World Card Olympus Coliseum",
"World Card Monstro"}, player)
))
add_rule(khrecomworld.get_location("Defeat 3 Heartless Large Body"),
lambda state: (
state.has("World Card Wonderland", player)
or state.has("World Card Olympus Coliseum", player)
or state.has("World Card Monstro", player)
state.has_any({
"World Card Wonderland",
"World Card Olympus Coliseum",
"World Card Monstro"}, player)
))
add_rule(khrecomworld.get_location("Defeat 1 Heartless Neoshadow"),
lambda state: has_castle_oblivion(state, player))
Expand Down Expand Up @@ -293,36 +314,42 @@ def set_rules(khrecomworld):
lambda state: state.has("World Card Atlantica", player))
add_rule(khrecomworld.get_location("Defeat 1 Heartless Search Ghost"),
lambda state: (
state.has("World Card Monstro", player)
or state.has("World Card Atlantica", player)
state.has_any({
"World Card Monstro",
"World Card Atlantica"}, player)
))
add_rule(khrecomworld.get_location("Defeat 2 Heartless Search Ghost"),
lambda state: (
state.has("World Card Monstro", player)
or state.has("World Card Atlantica", player)
state.has_any({
"World Card Monstro",
"World Card Atlantica"}, player)
))
add_rule(khrecomworld.get_location("Defeat 3 Heartless Search Ghost"),
lambda state: (
state.has("World Card Monstro", player)
or state.has("World Card Atlantica", player)
state.has_any({
"World Card Monstro",
"World Card Atlantica"}, player)
))
add_rule(khrecomworld.get_location("Defeat 1 Heartless Tornado Step"),
lambda state: (
state.has("World Card Monstro", player)
or state.has("World Card Hollow Bastion", player)
or state.has("World Card Destiny Islands", player)
state.has_any({
"World Card Monstro",
"World Card Hollow Bastion",
"World Card Destiny Islands"}, player)
))
add_rule(khrecomworld.get_location("Defeat 2 Heartless Tornado Step"),
lambda state: (
state.has("World Card Monstro", player)
or state.has("World Card Hollow Bastion", player)
or state.has("World Card Destiny Islands", player)
state.has_any({
"World Card Monstro",
"World Card Hollow Bastion",
"World Card Destiny Islands"}, player)
))
add_rule(khrecomworld.get_location("Defeat 3 Heartless Tornado Step"),
lambda state: (
state.has("World Card Monstro", player)
or state.has("World Card Hollow Bastion", player)
or state.has("World Card Destiny Islands", player)
state.has_any({
"World Card Monstro",
"World Card Hollow Bastion",
"World Card Destiny Islands"}, player)
))
add_rule(khrecomworld.get_location("Defeat 1 Heartless Wight Knight"),
lambda state: state.has("World Card Halloween Town", player))
Expand Down Expand Up @@ -362,23 +389,26 @@ def set_rules(khrecomworld):
))
add_rule(khrecomworld.get_location("Defeat 1 Heartless Yellow Opera"),
lambda state: (
state.has("World Card Monstro", player)
or state.has("World Card Agrabah", player)
or state.has("World Card Neverland", player)
state.has_any({
"World Card Monstro",
"World Card Agrabah",
"World Card Neverland"}, player)
or has_castle_oblivion(state, player)
))
add_rule(khrecomworld.get_location("Defeat 2 Heartless Yellow Opera"),
lambda state: (
state.has("World Card Monstro", player)
or state.has("World Card Agrabah", player)
or state.has("World Card Neverland", player)
state.has_any({
"World Card Monstro",
"World Card Agrabah",
"World Card Neverland"}, player)
or has_castle_oblivion(state, player)
))
add_rule(khrecomworld.get_location("Defeat 3 Heartless Yellow Opera"),
lambda state: (
state.has("World Card Monstro", player)
or state.has("World Card Agrabah", player)
or state.has("World Card Neverland", player)
state.has_any({
"World Card Monstro",
"World Card Agrabah",
"World Card Neverland"}, player)
or has_castle_oblivion(state, player)
))

Expand Down Expand Up @@ -460,7 +490,5 @@ def set_rules(khrecomworld):
add_rule(khrecomworld.get_entrance("Castle Oblivion"),
lambda state: has_castle_oblivion(state, player))



# Win condition.
multiworld.completion_condition[player] = lambda state: state.has("Victory", player)
2 changes: 1 addition & 1 deletion worlds/khrecom/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import List

from BaseClasses import Tutorial
from BaseClasses import Tutorial, MultiWorld
from worlds.AutoWorld import WebWorld, World
from .Items import KHRECOMItem, KHRECOMItemData, get_items_by_category, item_table
from .Locations import location_table
Expand Down
8 changes: 4 additions & 4 deletions worlds/khrecom/docs/en_Kingdom Hearts RE Chain of Memories.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Kingdom Hearts RE Chain of Memories (PC)

## Where is the settings page?
## Where is the options page?

The [player settings page for this game](../player-settings) contains most of the options you need to
The [player settings page for this game](../player-options) contains most of the options you need to
configure and export a config file.

## What does randomization do to this game?
Expand All @@ -23,13 +23,13 @@ allowing you to challenge Marluxia.

## What items and locations get shuffled?

###Items
### Items

World Unlocks, Key to Rewards for each floor, Enemy Cards, Sleights, and Card Sets are shuffled into the item pool.

Card Sets are comprised of a card type and a value range which is defined in your settings.

###Locations
### Locations

Acquiring certain cards and sleights for the first time are locations which yield a randomized multiworld item.

Expand Down
4 changes: 2 additions & 2 deletions worlds/khrecom/docs/khrecom_en.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Kingdom Hearts RECOM Randomizer Setup Guide

##Setting up the required mods
## Setting up the required mods
1. Install OpenKH and the LUA Backend.

Download the [latest release of OpenKH](https://github.com/OpenKH/OpenKh/releases/tag/latest)
Expand Down Expand Up @@ -29,7 +29,7 @@

5. In `Add a new mod from GitHub` paste `gaithern/KH-RECOM-AP-LUA`

6. Click Install
6. Click `Install`

7. Navigate to Mod Loader and click `Build Only`

Expand Down

0 comments on commit 1053558

Please sign in to comment.