Skip to content
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

Merged
merged 117 commits into from
Nov 25, 2023
Merged

KH2: Version 2 #2009

merged 117 commits into from
Nov 25, 2023

Conversation

JaredWeakStrike
Copy link
Collaborator

@JaredWeakStrike JaredWeakStrike commented Jul 22, 2023

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?

  • Ship as apworld
  • Bug Fixes for bounties not tracking correctly and hp increases not being applied if they start on the title screen
  • moved mod.yml to be yaml dumped instead of copying the file
  • moved client to client.py and kh2client just runs that file
  • added atlantica support
  • added summon levels as locations
  • added fill restrictive for Weapon slots and donald and goofy get bonuses
  • added option to unlock party get bonuses for more locations
  • added lucky emblem + hitlist wincon
  • added fight logic for every boss fight in the game with 3 different difficulty options
  • added consumables back into the pool
  • fixed fake slot being sent out when hovering over the summon menu.
  • added light and darkness form logic
  • added auto form logic
  • added unit tests for form logic
  • added unit tests for easy,normal and hard fight logic
  • added unit tests for no final xemnas and hitlist+lucky emblem
  • cleaned up pretty much every file touched
  • added way to the dawn locking roxas. post saix now needs 2 way to the dawns
  • removed critical starting locations
  • added anti form into the pool as a toggle
  • added toggle for weapon slots to be pre-hinted
  • added toggle for bounties to be pre hinted
  • made same slot co-op open chests for one another (also opens on collect)
  • added itemdict option for adding more of selected items into the pool
  • client now tells you when the final door unlocks in twtnw (not for three proofs)
  • added toggle for consumable filler items to be local.
  • switched item flags to remote
  • No Experience ability desc now tells level depth option

How was this tested?

over 10 syncs and ran unit tests probably over 100 times.

If this makes graphical changes, please attach screenshots.

Copy link
Collaborator

@alwaysintreble alwaysintreble left a 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.

worlds/kh2/Names/RegionName.py Outdated Show resolved Hide resolved
worlds/kh2/test/test_fight_logic.py Outdated Show resolved Hide resolved
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)
Copy link
Collaborator

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

Copy link
Collaborator

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.

Copy link
Collaborator

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

Copy link
Collaborator Author

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?

Copy link
Collaborator

@alwaysintreble alwaysintreble Nov 7, 2023

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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

worlds/kh2/test/test_form_logic.py Outdated Show resolved Hide resolved
worlds/kh2/Rules.py Show resolved Hide resolved
worlds/kh2/Rules.py Outdated Show resolved Hide resolved
worlds/kh2/Rules.py Show resolved Hide resolved
worlds/kh2/Rules.py Show resolved Hide resolved
worlds/kh2/Rules.py Show resolved Hide resolved
JaredWeakStrike and others added 5 commits October 28, 2023 22:52
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
@JaredWeakStrike
Copy link
Collaborator Author

accidently closed it

Copy link
Collaborator

@alwaysintreble alwaysintreble left a 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

worlds/kh2/__init__.py Outdated Show resolved Hide resolved
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:
Copy link
Collaborator

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 Show resolved Hide resolved
# 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
Copy link
Collaborator

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 Show resolved Hide resolved

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
Copy link
Collaborator

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.

@ThePhar ThePhar merged commit 2ccf11f into ArchipelagoMW:main Nov 25, 2023
14 checks passed
@JaredWeakStrike JaredWeakStrike deleted the kh2-regionrework branch December 16, 2023 02:31
Jouramie pushed a commit to Jouramie/Archipelago that referenced this pull request Feb 28, 2024
Co-authored-by: Aaron Wagener <[email protected]>
Co-authored-by: Joe Prochaska <[email protected]>
Comment on lines +236 to +240
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)
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs. is: enhancement Issues requesting new features or pull requests implementing new features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants