-
Notifications
You must be signed in to change notification settings - Fork 671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KH2: Version 2 #2009
KH2: Version 2 #2009
Conversation
…/Archipelago into kh2-regionrework
TODO:make usefull list and make events
This reverts commit 3e9581f.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a bit confused on why you moved your options file over to the new api but nothing else. rule creation here is incredibly slow as is so that needs to be changed.
def test_default_Auto_Form_Logic(self): | ||
allPossibleForms = global_all_possible_forms | ||
# this tests with a light and darkness in the inventory. | ||
self.collect_all_but(allPossibleForms) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you need to collect all the other items for these tests? it seems like they aren't relevant to the locations being tested here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same situation as the earlier question about drive form logic. Drive form regions have logic to require having a requisite world to be able to level the drive form in. See multi_form_region_access
, limit_form_region_access
, and final_form_region_access
in Rules.py.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah right. in that case it should be probably done as part of the setUp of the base class instead of hard coding it in every single test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what exactly would that look like? would I overwride the setUp in the init.py?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no in the base class. something like
def setUp(self):
super().setUp()
self.collect_all_but(global_all_possible_forms)```
|
||
def test_default_Final_Form(self): | ||
allPossibleForms = global_all_possible_forms | ||
self.collect_all_but(allPossibleForms) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
also removed forbid items for statups and moved them to maps so the client handles the dummy items
updated init to be cleaner and more optimal. Changed KH2Rules from having the world rules to KH2WorldRules Moved all logic tools dicts from in the function to Logic.py Changed all get_regions to get_region optimized weapon slot rules cleaned up tests
28c77f9
to
8d41430
Compare
…/Archipelago into kh2-regionrework
accidently closed it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few things I probably missed earlier that are mostly just style suggestions other than the World attributes
data = item_dictionary_table[name] | ||
if name in Progression_Dicts["Progression"]: | ||
for ability in self.slot_data_sora_weapon: | ||
if ability in self.sora_ability_dict and self.sora_ability_dict[ability] >= 1: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if self.sora_ability_dict.get(ability, 0):
worlds/kh2/__init__.py
Outdated
# Option to turn off Promise Charm Item | ||
if not self.multiworld.Promise_Charm[self.player]: | ||
if not self.options.Promise_Charm: | ||
self.item_quantity_dict[ItemName.PromiseCharm] = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can these just be del self.item_quantity_dict[Itemname.PromiseCharm]
?
worlds/kh2/__init__.py
Outdated
|
||
self.item_quantity_dict[ItemName.LuckyEmblem] = self.multiworld.LuckyEmblemsAmount[self.player].value | ||
self.item_quantity_dict[ItemName.LuckyEmblem] = self.options.LuckyEmblemsAmount.value | ||
# give this proof to unlock the final door once the player has the amount of lucky emblem required | ||
self.item_quantity_dict[ItemName.ProofofNonexistence] = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here too, it's better to just del the key instead of setting the value to 0 since it frees up memory unless you still need it in the dictionary for some reason.
Co-authored-by: Aaron Wagener <[email protected]> Co-authored-by: Joe Prochaska <[email protected]>
prio_hitlist = [location for location in self.multiworld.priority_locations[self.player].value if | ||
location in self.random_super_boss_list] | ||
for bounty in range(self.options.BountyAmount.value): | ||
if prio_hitlist: | ||
random_boss = self.random.choice(prio_hitlist) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like it's not deterministic.
priority_locations.value
is a set
The order of iteration goes into prio_hitlist
Please format your title with what portion of the project this pull request is
targeting and what it's changing.
ex. "MyGame4: implement new game" or "Docs: add new guide for customizing MyGame3"
What is this fixing or adding?
How was this tested?
over 10 syncs and ran unit tests probably over 100 times.
If this makes graphical changes, please attach screenshots.