-
Notifications
You must be signed in to change notification settings - Fork 842
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
The Messenger: implement new game #1494
Merged
black-sliver
merged 70 commits into
ArchipelagoMW:main
from
alwaysintreble:messenger_dev
Mar 12, 2023
Merged
Changes from 68 commits
Commits
Show all changes
70 commits
Select commit
Hold shift + click to select a range
befe63a
initial commit of messenger integration
alwaysintreble 58b71aa
setup no_logic and needed slot_data
alwaysintreble dbffbcf
fix some typos and determinism
alwaysintreble 514fd72
make all of it deterministic
alwaysintreble 638e0e4
add documentation
alwaysintreble 38fc3fb
swapped to non local items so change the fed data
alwaysintreble 48de769
~~deathlink~~
alwaysintreble 00d746d
satisfy the docs test
alwaysintreble 3872a10
update doc test to show expected name
alwaysintreble baff6c7
split custom classes into a separate file and fix an errant rule
alwaysintreble 77537fa
make access dependency test give more useful errors
alwaysintreble 109de2a
implement tests
alwaysintreble 422ed43
remove some unneccessary back entrances and make names clearer
alwaysintreble e1b87d8
fix some big dumbs
alwaysintreble 6798aec
successful unit tests are good also some slight reorganizing
alwaysintreble 73998d1
add astral tea quest line, and potentially power seals as items
alwaysintreble ff4e532
if TYPE_CHECKING... aahhhhhh
alwaysintreble 3ab2b8b
oop forgot to remove legacy code
alwaysintreble a16b9bb
having the seed and leaves as actual items doesn't seem to do anythin…
alwaysintreble 78020d0
update setup guide with some changes
alwaysintreble f2b8dad
Tower HQ was creating duplicate locations
alwaysintreble eaa5ccf
allow self locking items
alwaysintreble 26c5f0d
cleanup
alwaysintreble 6c21f44
move self_locking_items function to core
alwaysintreble 9d7d769
docstring
alwaysintreble def805b
implement choice of notes needed for music box
alwaysintreble bad0491
test the default value
alwaysintreble b10251c
don't create any starting inventory items
alwaysintreble 3694bb6
make item creation faster
alwaysintreble 60a84ae
Merge remote-tracking branch 'Main/main' into messenger
alwaysintreble daaca7c
change default accessibility and power seals options
alwaysintreble a0c939e
improve documentation
alwaysintreble dfe63b2
precollected_items is a dict of Items...
alwaysintreble c918c12
Merge remote-tracking branch 'Main/main' into messenger
alwaysintreble 9a201c9
implement shop chest goal
alwaysintreble 68fe6dd
tests
alwaysintreble c03e59d
Merge remote-tracking branch 'Main/main' into messenger_dev
alwaysintreble 8cad82a
always assign total and required seals
alwaysintreble 0e95d01
add new goals and set music box as requiring shop chest on shop chest…
alwaysintreble 2481529
fix dumb test quirk
alwaysintreble 2bc171e
implement music box skip as an option
alwaysintreble 415a37c
Merge remote-tracking branch 'Main/main' into messenger_dev
alwaysintreble 004ec08
world rewrite/cleanup
alwaysintreble 2acdbe0
default to apworld and add game to readme
alwaysintreble fd39e83
Merge branch 'main' into messenger_dev
alwaysintreble 406656e
revert bleeding commits from other PRs
alwaysintreble ed68f6d
Merge remote-tracking branch 'TrebleAP/messenger_dev' into messenger_dev
alwaysintreble 50abae6
more bleeds
alwaysintreble 603b941
fix some errors in options docstrings
alwaysintreble 676ac78
???
alwaysintreble 7f35902
make my set rules method not have an awful name
alwaysintreble b283cc6
test cleanup
alwaysintreble addb781
add a test for item accessibility
alwaysintreble c8a5c1d
fix issues with tests
alwaysintreble 5fb17f7
make the self locking item behavior work correctly
alwaysintreble 8123d79
misc cleanup
alwaysintreble e621411
Merge remote-tracking branch 'Main/main' into messenger_dev
alwaysintreble 11b7734
more general cleanup to be a good example
alwaysintreble 8e714d9
quick rules rewrite
alwaysintreble a147dea
more general cleanup and typing
alwaysintreble 35a2d0c
more speed, more clean
alwaysintreble 25d10f4
bump data version
alwaysintreble da0f045
make sure the locked item belongs to current player
alwaysintreble 3a88163
fix bad name and indent. call MessengerItem directly for events
alwaysintreble b2ec574
add poptracker pack to docs
alwaysintreble 14c8087
doc cleanup and "known issues" section that I probably won't be able …
alwaysintreble 00e9173
missed some spots
alwaysintreble 8dd5f1f
add another bug i forgot about
alwaysintreble 45fef55
Merge remote-tracking branch 'Main/main' into messenger_dev
alwaysintreble a11acaa
be consistently wrong
alwaysintreble File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,6 +52,7 @@ | |
"Super Mario World", | ||
"Stardew Valley", | ||
"Timespinner", | ||
"The Messenger", | ||
} | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,153 @@ | ||
# items | ||
# listing individual groups first for easy lookup | ||
NOTES = [ | ||
"Key of Hope", | ||
"Key of Chaos", | ||
"Key of Courage", | ||
"Key of Love", | ||
"Key of Strength", | ||
"Key of Symbiosis" | ||
] | ||
|
||
PROG_ITEMS = [ | ||
"Wingsuit", | ||
"Rope Dart", | ||
"Ninja Tabi", | ||
"Power Thistle", | ||
"Demon King Crown", | ||
"Ruxxtin's Amulet", | ||
"Fairy Bottle", | ||
"Sun Crest", | ||
"Moon Crest", | ||
# "Astral Seed", | ||
# "Astral Tea Leaves", | ||
] | ||
|
||
PHOBEKINS = [ | ||
"Necro", | ||
"Pyro", | ||
"Claustro", | ||
"Acro" | ||
] | ||
|
||
USEFUL_ITEMS = [ | ||
"Windmill Shuriken" | ||
] | ||
|
||
# item_name_to_id needs to be deterministic and match upstream | ||
ALL_ITEMS = [ | ||
*NOTES, | ||
"Windmill Shuriken", | ||
alwaysintreble marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"Wingsuit", | ||
"Rope Dart", | ||
"Ninja Tabi", | ||
# "Astral Seed", | ||
# "Astral Tea Leaves", | ||
"Candle", | ||
"Seashell", | ||
"Power Thistle", | ||
"Demon King Crown", | ||
"Ruxxtin's Amulet", | ||
"Fairy Bottle", | ||
"Sun Crest", | ||
"Moon Crest", | ||
*PHOBEKINS, | ||
"Power Seal", | ||
"Time Shard" # there's 45 separate instances of this in the client lookup, but hopefully we don't care? | ||
] | ||
|
||
# locations | ||
# the names of these don't actually matter, but using the upstream's names for now | ||
# order must be exactly the same as upstream | ||
ALWAYS_LOCATIONS = [ | ||
# notes | ||
"Key of Love", | ||
"Key of Courage", | ||
"Key of Chaos", | ||
"Key of Symbiosis", | ||
"Key of Strength", | ||
"Key of Hope", | ||
# upgrades | ||
"Wingsuit", | ||
"Rope Dart", | ||
"Ninja Tabi", | ||
"Climbing Claws", | ||
# quest items | ||
"Astral Seed", | ||
"Astral Tea Leaves", | ||
"Candle", | ||
"Seashell", | ||
"Power Thistle", | ||
"Demon King Crown", | ||
"Ruxxtin's Amulet", | ||
"Fairy Bottle", | ||
"Sun Crest", | ||
"Moon Crest", | ||
# phobekins | ||
"Necro", | ||
"Pyro", | ||
"Claustro", | ||
"Acro", | ||
alwaysintreble marked this conversation as resolved.
Show resolved
Hide resolved
|
||
] | ||
|
||
SEALS = [ | ||
"Ninja Village Seal - Tree House", | ||
|
||
"Autumn Hills Seal - Trip Saws", | ||
"Autumn Hills Seal - Double Swing Saws", | ||
"Autumn Hills Seal - Spike Ball Swing", | ||
"Autumn Hills Seal - Spike Ball Darts", | ||
|
||
"Catacombs Seal - Triple Spike Crushers", | ||
"Catacombs Seal - Crusher Gauntlet", | ||
"Catacombs Seal - Dirty Pond", | ||
|
||
"Bamboo Creek Seal - Spike Crushers and Doors", | ||
"Bamboo Creek Seal - Spike Ball Pits", | ||
"Bamboo Creek Seal - Spike Crushers and Doors v2", | ||
|
||
"Howling Grotto Seal - Windy Saws and Balls", | ||
"Howling Grotto Seal - Crushing Pits", | ||
"Howling Grotto Seal - Breezy Crushers", | ||
|
||
"Quillshroom Marsh Seal - Spikey Window", | ||
"Quillshroom Marsh Seal - Sand Trap", | ||
"Quillshroom Marsh Seal - Do the Spike Wave", | ||
|
||
"Searing Crags Seal - Triple Ball Spinner", | ||
"Searing Crags Seal - Raining Rocks", | ||
"Searing Crags Seal - Rhythm Rocks", | ||
|
||
"Glacial Peak Seal - Ice Climbers", | ||
"Glacial Peak Seal - Projectile Spike Pit", | ||
"Glacial Peak Seal - Glacial Air Swag", | ||
|
||
"Tower of Time Seal - Time Waster Seal", | ||
"Tower of Time Seal - Lantern Climb", | ||
"Tower of Time Seal - Arcane Orbs", | ||
|
||
"Cloud Ruins Seal - Ghost Pit", | ||
"Cloud Ruins Seal - Toothbrush Alley", | ||
"Cloud Ruins Seal - Saw Pit", | ||
"Cloud Ruins Seal - Money Farm Room", | ||
|
||
"Underworld Seal - Sharp and Windy Climb", | ||
"Underworld Seal - Spike Wall", | ||
"Underworld Seal - Fireball Wave", | ||
"Underworld Seal - Rising Fanta", | ||
|
||
"Forlorn Temple Seal - Rocket Maze", | ||
"Forlorn Temple Seal - Rocket Sunset", | ||
|
||
"Sunken Shrine Seal - Ultra Lifeguard", | ||
"Sunken Shrine Seal - Waterfall Paradise", | ||
"Sunken Shrine Seal - Tabi Gauntlet", | ||
|
||
"Riviere Turquoise Seal - Bounces and Balls", | ||
"Riviere Turquoise Seal - Launch of Faith", | ||
"Riviere Turquoise Seal - Flower Power", | ||
|
||
"Elemental Skylands Seal - Air", | ||
"Elemental Skylands Seal - Water", | ||
"Elemental Skylands Seal - Fire" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
from Options import DefaultOnToggle, DeathLink, Range, Accessibility, Choice | ||
|
||
|
||
class MessengerAccessibility(Accessibility): | ||
default = Accessibility.option_locations | ||
# defaulting to locations accessibility since items makes certain items self-locking | ||
__doc__ = Accessibility.__doc__.replace(f"default {Accessibility.default}", f"default {default}") | ||
|
||
|
||
class Logic(DefaultOnToggle): | ||
"""Whether the seed should be guaranteed completable.""" | ||
display_name = "Use Logic" | ||
|
||
|
||
class PowerSeals(DefaultOnToggle): | ||
"""Whether power seal locations should be randomized.""" | ||
display_name = "Shuffle Seals" | ||
|
||
|
||
class Goal(Choice): | ||
"""Requirement to finish the game. Power Seal Hunt will force power seal locations to be shuffled.""" | ||
display_name = "Goal" | ||
option_open_music_box = 0 | ||
option_power_seal_hunt = 1 | ||
|
||
|
||
class MusicBox(DefaultOnToggle): | ||
"""Whether the music box gauntlet needs to be done.""" | ||
display_name = "Music Box Gauntlet" | ||
alwaysintreble marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
|
||
class NotesNeeded(Range): | ||
"""How many notes are needed to access the Music Box.""" | ||
display_name = "Notes Needed" | ||
range_start = 1 | ||
range_end = 6 | ||
default = range_end | ||
|
||
|
||
class AmountSeals(Range): | ||
"""Number of power seals that exist in the item pool when power seal hunt is the goal.""" | ||
display_name = "Total Power Seals" | ||
range_start = 1 | ||
range_end = 45 | ||
default = range_end | ||
alwaysintreble marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
|
||
class RequiredSeals(Range): | ||
"""Percentage of total seals required to open the shop chest.""" | ||
display_name = "Percent Seals Required" | ||
range_start = 10 | ||
range_end = 100 | ||
default = range_end | ||
alwaysintreble marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
|
||
messenger_options = { | ||
"accessibility": MessengerAccessibility, | ||
alwaysintreble marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"enable_logic": Logic, | ||
"shuffle_seals": PowerSeals, | ||
"goal": Goal, | ||
"music_box": MusicBox, | ||
"notes_needed": NotesNeeded, | ||
"total_seals": AmountSeals, | ||
"percent_seals_required": RequiredSeals, | ||
"death_link": DeathLink, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
from typing import Dict, Set | ||
|
||
REGIONS: Dict[str, Set[str]] = { | ||
"Menu": set(), | ||
"Tower HQ": set(), | ||
"The Shop": set(), | ||
"Tower of Time": set(), | ||
"Ninja Village": {"Candle", "Astral Seed"}, | ||
"Autumn Hills": {"Climbing Claws", "Key of Hope"}, | ||
"Forlorn Temple": {"Demon King Crown"}, | ||
"Catacombs": {"Necro", "Ruxxtin's Amulet"}, | ||
"Bamboo Creek": {"Claustro"}, | ||
"Howling Grotto": {"Wingsuit"}, | ||
"Quillshroom Marsh": {"Seashell"}, | ||
"Searing Crags": {"Rope Dart"}, | ||
"Searing Crags Upper": {"Power Thistle", "Key of Strength", "Astral Tea Leaves"}, | ||
"Glacial Peak": set(), | ||
"Cloud Ruins": {"Acro"}, | ||
"Underworld": {"Pyro", "Key of Chaos"}, | ||
"Dark Cave": set(), | ||
"Riviere Turquoise": {"Fairy Bottle"}, | ||
"Sunken Shrine": {"Ninja Tabi", "Sun Crest", "Moon Crest", "Key of Love"}, | ||
"Elemental Skylands": {"Key of Symbiosis"}, | ||
"Corrupted Future": {"Key of Courage"}, | ||
"Music Box": {"Rescue Phantom"} | ||
} | ||
"""seal locations have the region in their name and may not need to be created so skip them here""" | ||
|
||
|
||
REGION_CONNECTIONS: Dict[str, Set[str]] = { | ||
"Menu": {"Tower HQ"}, | ||
"Tower HQ": {"Autumn Hills", "Howling Grotto", "Searing Crags", "Glacial Peak", "Tower of Time", "Riviere Turquoise", | ||
"Sunken Shrine", "Corrupted Future", "The Shop", "Music Box"}, | ||
"Tower of Time": set(), | ||
"Ninja Village": set(), | ||
"Autumn Hills": {"Ninja Village", "Forlorn Temple", "Catacombs"}, | ||
"Forlorn Temple": {"Catacombs", "Bamboo Creek"}, | ||
"Catacombs": {"Autumn Hills", "Bamboo Creek", "Dark Cave"}, | ||
"Bamboo Creek": {"Catacombs", "Howling Grotto"}, | ||
"Howling Grotto": {"Bamboo Creek", "Quillshroom Marsh", "Sunken Shrine"}, | ||
"Quillshroom Marsh": {"Howling Grotto", "Searing Crags"}, | ||
"Searing Crags": {"Searing Crags Upper", "Quillshroom Marsh", "Underworld"}, | ||
"Searing Crags Upper": {"Searing Crags", "Glacial Peak"}, | ||
"Glacial Peak": {"Searing Crags Upper", "Tower HQ", "Cloud Ruins", "Elemental Skylands"}, | ||
"Cloud Ruins": {"Underworld"}, | ||
"Underworld": set(), | ||
"Dark Cave": {"Catacombs", "Riviere Turquoise"}, | ||
"Riviere Turquoise": set(), | ||
"Sunken Shrine": {"Howling Grotto"}, | ||
"Elemental Skylands": set(), | ||
} | ||
"""Vanilla layout mapping with all Tower HQ portals open. from -> to""" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 applies to all line-by-line dicts/lists throughout the world:
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.
I know this is PEP8 but it's one of the things I disagree with. probably because it's invalid in other languages.