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

KDL3: Fix invalid animal placements and fill error #3152

Merged
merged 2 commits into from
Apr 18, 2024

Conversation

Silvris
Copy link
Collaborator

@Silvris Silvris commented Apr 15, 2024

What is this fixing or adding?

Addresses two bugs found through tests.

  • If "Kine Spawn" is the last item to be placed by our fill_restrictive in pre_fill, it could return an invalid placement that would render the world uncompleteable.
  • On closed world and strict bosses, placing more than one restrictive stage in world one could cause an impossible layout.

How was this tested?

Unittests, including running the failing seeds as well as several random seeds.
Also confirmed on test generation of shuffled animals that the animals were still properly shuffled with this change.

@github-actions github-actions bot added the waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. label Apr 15, 2024
@ScipioWright ScipioWright added the is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs. label Apr 15, 2024
elif (not (world.multiworld.players > 1 or world.options.consumables or world.options.starsanity) and
new_stage in first_world_limit and
sum(p_stage in first_world_limit for p_stage in placed_stages)
>= (2 if world.options.open_world else 1)):
Copy link
Collaborator

Choose a reason for hiding this comment

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

This condition is already huge and hard to read, I'd put at least the 2 if world.options.open_world else 1 in a local variable "max_first_world_stages" (or however you'd prefer to call it)

@Berserker66 Berserker66 merged commit 6f7c2fa into ArchipelagoMW:main Apr 18, 2024
15 checks passed
qwint pushed a commit to qwint/Archipelago that referenced this pull request Jun 24, 2024
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. waiting-on: peer-review Issue/PR has not been reviewed by enough people yet.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants