mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 04:01:32 -06:00
KH2: Fix lambda capture issue with weapon slot logic (#4604)
* KH2: Fix lambda capture issue with weapon slot logic * Update Rules.py * Improved by JaredWeakStrike (#4605) * Apparently this wasn't meant to be indented --------- Co-authored-by: JaredWeakStrike <96694163+JaredWeakStrike@users.noreply.github.com>
This commit is contained in:
@@ -263,7 +263,10 @@ class KH2WorldRules(KH2Rules):
|
||||
|
||||
weapon_region = self.multiworld.get_region(RegionName.Keyblade, self.player)
|
||||
for location in weapon_region.locations:
|
||||
add_rule(location, lambda state: state.has(exclusion_table["WeaponSlots"][location.name], self.player))
|
||||
if location.name in exclusion_table["WeaponSlots"]: # shop items and starting items are not in this list
|
||||
exclusion_item = exclusion_table["WeaponSlots"][location.name]
|
||||
add_rule(location, lambda state, e_item=exclusion_item: state.has(e_item, self.player))
|
||||
|
||||
if location.name in Goofy_Checks:
|
||||
add_item_rule(location, lambda item: item.player == self.player and item.name in GoofyAbility_Table.keys())
|
||||
elif location.name in Donald_Checks:
|
||||
|
Reference in New Issue
Block a user