@@ -157,7 +157,7 @@ def kh2_has_any(self, items: list, state: CollectionState):
157
157
158
158
def form_list_unlock (self , state : CollectionState , parent_form_list , level_required , fight_logic = False ) -> bool :
159
159
form_access = {parent_form_list }
160
- if self .multiworld . AutoFormLogic [ self . player ] and state .has (ItemName .SecondChance , self .player ) and not fight_logic :
160
+ if self .world . options . AutoFormLogic and state .has (ItemName .SecondChance , self .player ) and not fight_logic :
161
161
if parent_form_list == ItemName .MasterForm :
162
162
if state .has (ItemName .DriveConverter , self .player ):
163
163
form_access .add (auto_form_dict [parent_form_list ])
@@ -170,8 +170,8 @@ def get_form_level_requirement(self, state, amount):
170
170
forms_available = 0
171
171
form_list = [ItemName .ValorForm , ItemName .WisdomForm , ItemName .LimitForm , ItemName .MasterForm ,
172
172
ItemName .FinalForm ]
173
- if self .world .multiworld .FinalFormLogic [ self . player ] != "no_light_and_darkness" :
174
- if self .world .multiworld .FinalFormLogic [ self . player ] == "light_and_darkness" :
173
+ if self .world .options .FinalFormLogic != "no_light_and_darkness" :
174
+ if self .world .options .FinalFormLogic == "light_and_darkness" :
175
175
if state .has (ItemName .LightDarkness , self .player ) and state .has_any (set (form_list ), self .player ):
176
176
forms_available += 1
177
177
form_list .remove (ItemName .FinalForm )
@@ -273,34 +273,35 @@ def set_kh2_rules(self) -> None:
273
273
274
274
def set_kh2_goal (self ):
275
275
final_xemnas_location = self .multiworld .get_location (LocationName .FinalXemnasEventLocation , self .player )
276
- if self .multiworld . Goal [ self . player ] == "three_proofs" :
276
+ if self .world . options . Goal == "three_proofs" :
277
277
final_xemnas_location .access_rule = lambda state : self .kh2_has_all (three_proofs , state )
278
- if self .multiworld . FinalXemnas [ self . player ] :
278
+ if self .world . options . FinalXemnas :
279
279
self .multiworld .completion_condition [self .player ] = lambda state : state .has (ItemName .Victory , self .player , 1 )
280
280
else :
281
281
self .multiworld .completion_condition [self .player ] = lambda state : self .kh2_has_all (three_proofs , state )
282
282
# lucky emblem hunt
283
- elif self .multiworld . Goal [ self . player ] == "lucky_emblem_hunt" :
284
- final_xemnas_location .access_rule = lambda state : state .has (ItemName .LuckyEmblem , self .player , self .multiworld . LuckyEmblemsRequired [ self . player ] .value )
285
- if self .multiworld . FinalXemnas [ self . player ] :
283
+ elif self .world . options . Goal == "lucky_emblem_hunt" :
284
+ final_xemnas_location .access_rule = lambda state : state .has (ItemName .LuckyEmblem , self .player , self .world . options . LuckyEmblemsRequired .value )
285
+ if self .world . options . FinalXemnas :
286
286
self .multiworld .completion_condition [self .player ] = lambda state : state .has (ItemName .Victory , self .player , 1 )
287
287
else :
288
- self .multiworld .completion_condition [self .player ] = lambda state : state .has (ItemName .LuckyEmblem , self .player , self .multiworld . LuckyEmblemsRequired [ self . player ] .value )
288
+ self .multiworld .completion_condition [self .player ] = lambda state : state .has (ItemName .LuckyEmblem , self .player , self .world . options . LuckyEmblemsRequired .value )
289
289
# hitlist if == 2
290
- elif self .multiworld . Goal [ self . player ] == "hitlist" :
291
- final_xemnas_location .access_rule = lambda state : state .has (ItemName .Bounty , self .player , self .multiworld . BountyRequired [ self . player ] .value )
292
- if self .multiworld . FinalXemnas [ self . player ] :
290
+ elif self .world . options . Goal == "hitlist" :
291
+ final_xemnas_location .access_rule = lambda state : state .has (ItemName .Bounty , self .player , self .world . options . BountyRequired .value )
292
+ if self .world . options . FinalXemnas :
293
293
self .multiworld .completion_condition [self .player ] = lambda state : state .has (ItemName .Victory , self .player , 1 )
294
294
else :
295
- self .multiworld .completion_condition [self .player ] = lambda state : state .has (ItemName .Bounty , self .player , self .multiworld . BountyRequired [ self . player ] .value )
295
+ self .multiworld .completion_condition [self .player ] = lambda state : state .has (ItemName .Bounty , self .player , self .world . options . BountyRequired .value )
296
296
else :
297
- final_xemnas_location .access_rule = lambda state : state .has (ItemName .Bounty , self .player , self .multiworld .BountyRequired [self .player ].value ) and \
298
- state .has (ItemName .LuckyEmblem , self .player , self .multiworld .LuckyEmblemsRequired [self .player ].value )
299
- if self .multiworld .FinalXemnas [self .player ]:
297
+
298
+ final_xemnas_location .access_rule = lambda state : state .has (ItemName .Bounty , self .player , self .world .options .BountyRequired .value ) and \
299
+ state .has (ItemName .LuckyEmblem , self .player , self .world .options .LuckyEmblemsRequired .value )
300
+ if self .world .options .FinalXemnas :
300
301
self .multiworld .completion_condition [self .player ] = lambda state : state .has (ItemName .Victory , self .player , 1 )
301
302
else :
302
- self .multiworld .completion_condition [self .player ] = lambda state : state .has (ItemName .Bounty , self .player , self .multiworld . BountyRequired [ self . player ] .value ) and \
303
- state .has (ItemName .LuckyEmblem , self .player , self .multiworld . LuckyEmblemsRequired [ self . player ] .value )
303
+ self .multiworld .completion_condition [self .player ] = lambda state : state .has (ItemName .Bounty , self .player , self .world . options . BountyRequired .value ) and \
304
+ state .has (ItemName .LuckyEmblem , self .player , self .world . options . LuckyEmblemsRequired .value )
304
305
305
306
306
307
class KH2FormRules (KH2Rules ):
@@ -409,7 +410,7 @@ class KH2FightRules(KH2Rules):
409
410
# if skip rules are of return false
410
411
def __init__ (self , world : KH2World ) -> None :
411
412
super ().__init__ (world )
412
- self .fight_logic = self . multiworld .FightLogic [ self . player ] .current_key
413
+ self .fight_logic = world . options .FightLogic .current_key
413
414
414
415
self .fight_region_rules = {
415
416
RegionName .ShanYu : lambda state : self .get_shan_yu_rules (state ),
@@ -935,7 +936,7 @@ def get_cor_first_fight_rules(self, state: CollectionState) -> bool:
935
936
936
937
def get_cor_skip_first_rules (self , state : CollectionState ) -> bool :
937
938
# if option is not allow skips return false else run rules
938
- if not self .multiworld . CorSkipToggle [ self . player ] :
939
+ if not self .world . options . CorSkipToggle :
939
940
return False
940
941
# easy: aerial dodge 3,master form,fire
941
942
# normal: aerial dodge 2, master form,fire
0 commit comments