Skip to content

Resource collection obeys HUD limits - #365

Open
aquanight wants to merge 2 commits into
blkerby:mainfrom
aquanight:resource_collection_hudcap
Open

Resource collection obeys HUD limits#365
aquanight wants to merge 2 commits into
blkerby:mainfrom
aquanight:resource_collection_hudcap

Conversation

@aquanight

Copy link
Copy Markdown
Contributor

Adds patch and randomizer/logic support for in-game limitation of resource collection based on HUD display limits:

  • If a resource expansion causes the max capacity to exceed the HUD's display limit, the amount is capped at that limit (999 missiles, 99 supers/power bombs)
  • "Current" resource added is still the full amount, up to the HUD limit
  • Removes enforcement of the HUD caps via "pruning" the item pool.

Example logic, based on a 400-unit Missile Expansion:
1st pack: 000/000 -> 400/400, 2nd pack: 400/400 -> 800/800
3rd pack:

  • At full missiles: 800/800 -> 999/999
  • Some missiles used: 643/800 -> 999/999
  • Many missiles used: 143/800 -> 543/999

@aquanight
aquanight marked this pull request as ready for review July 28, 2026 02:42

add_max_energy_capped:
adc $0000,Y
cmp #$05D8 ;1499 energy

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should be 0x5DB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants