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

The Messenger: implement new game #1494

Merged
merged 70 commits into from
Mar 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
befe63a
initial commit of messenger integration
alwaysintreble Dec 29, 2022
58b71aa
setup no_logic and needed slot_data
alwaysintreble Dec 30, 2022
dbffbcf
fix some typos and determinism
alwaysintreble Dec 31, 2022
514fd72
make all of it deterministic
alwaysintreble Jan 1, 2023
638e0e4
add documentation
alwaysintreble Jan 1, 2023
38fc3fb
swapped to non local items so change the fed data
alwaysintreble Jan 1, 2023
48de769
~~deathlink~~
alwaysintreble Jan 2, 2023
00d746d
satisfy the docs test
alwaysintreble Jan 2, 2023
3872a10
update doc test to show expected name
alwaysintreble Jan 2, 2023
baff6c7
split custom classes into a separate file and fix an errant rule
alwaysintreble Jan 3, 2023
77537fa
make access dependency test give more useful errors
alwaysintreble Jan 4, 2023
109de2a
implement tests
alwaysintreble Jan 4, 2023
422ed43
remove some unneccessary back entrances and make names clearer
alwaysintreble Jan 4, 2023
e1b87d8
fix some big dumbs
alwaysintreble Jan 4, 2023
6798aec
successful unit tests are good also some slight reorganizing
alwaysintreble Jan 4, 2023
73998d1
add astral tea quest line, and potentially power seals as items
alwaysintreble Jan 6, 2023
ff4e532
if TYPE_CHECKING... aahhhhhh
alwaysintreble Jan 6, 2023
3ab2b8b
oop forgot to remove legacy code
alwaysintreble Jan 6, 2023
a16b9bb
having the seed and leaves as actual items doesn't seem to do anythin…
alwaysintreble Jan 6, 2023
78020d0
update setup guide with some changes
alwaysintreble Jan 7, 2023
f2b8dad
Tower HQ was creating duplicate locations
alwaysintreble Jan 8, 2023
eaa5ccf
allow self locking items
alwaysintreble Jan 13, 2023
26c5f0d
cleanup
alwaysintreble Jan 13, 2023
6c21f44
move self_locking_items function to core
alwaysintreble Jan 13, 2023
9d7d769
docstring
alwaysintreble Jan 13, 2023
def805b
implement choice of notes needed for music box
alwaysintreble Jan 18, 2023
bad0491
test the default value
alwaysintreble Jan 18, 2023
b10251c
don't create any starting inventory items
alwaysintreble Jan 18, 2023
3694bb6
make item creation faster
alwaysintreble Jan 18, 2023
60a84ae
Merge remote-tracking branch 'Main/main' into messenger
alwaysintreble Jan 18, 2023
daaca7c
change default accessibility and power seals options
alwaysintreble Jan 18, 2023
a0c939e
improve documentation
alwaysintreble Jan 18, 2023
dfe63b2
precollected_items is a dict of Items...
alwaysintreble Jan 18, 2023
c918c12
Merge remote-tracking branch 'Main/main' into messenger
alwaysintreble Feb 1, 2023
9a201c9
implement shop chest goal
alwaysintreble Feb 7, 2023
68fe6dd
tests
alwaysintreble Feb 7, 2023
c03e59d
Merge remote-tracking branch 'Main/main' into messenger_dev
alwaysintreble Feb 12, 2023
8cad82a
always assign total and required seals
alwaysintreble Feb 12, 2023
0e95d01
add new goals and set music box as requiring shop chest on shop chest…
alwaysintreble Feb 21, 2023
2481529
fix dumb test quirk
alwaysintreble Feb 21, 2023
2bc171e
implement music box skip as an option
alwaysintreble Feb 22, 2023
415a37c
Merge remote-tracking branch 'Main/main' into messenger_dev
alwaysintreble Feb 27, 2023
004ec08
world rewrite/cleanup
alwaysintreble Feb 27, 2023
2acdbe0
default to apworld and add game to readme
alwaysintreble Mar 2, 2023
fd39e83
Merge branch 'main' into messenger_dev
alwaysintreble Mar 2, 2023
406656e
revert bleeding commits from other PRs
alwaysintreble Mar 2, 2023
ed68f6d
Merge remote-tracking branch 'TrebleAP/messenger_dev' into messenger_dev
alwaysintreble Mar 2, 2023
50abae6
more bleeds
alwaysintreble Mar 2, 2023
603b941
fix some errors in options docstrings
alwaysintreble Mar 2, 2023
676ac78
???
alwaysintreble Mar 2, 2023
7f35902
make my set rules method not have an awful name
alwaysintreble Mar 2, 2023
b283cc6
test cleanup
alwaysintreble Mar 2, 2023
addb781
add a test for item accessibility
alwaysintreble Mar 3, 2023
c8a5c1d
fix issues with tests
alwaysintreble Mar 6, 2023
5fb17f7
make the self locking item behavior work correctly
alwaysintreble Mar 6, 2023
8123d79
misc cleanup
alwaysintreble Mar 6, 2023
e621411
Merge remote-tracking branch 'Main/main' into messenger_dev
alwaysintreble Mar 6, 2023
11b7734
more general cleanup to be a good example
alwaysintreble Mar 6, 2023
8e714d9
quick rules rewrite
alwaysintreble Mar 6, 2023
a147dea
more general cleanup and typing
alwaysintreble Mar 6, 2023
35a2d0c
more speed, more clean
alwaysintreble Mar 6, 2023
25d10f4
bump data version
alwaysintreble Mar 6, 2023
da0f045
make sure the locked item belongs to current player
alwaysintreble Mar 6, 2023
3a88163
fix bad name and indent. call MessengerItem directly for events
alwaysintreble Mar 6, 2023
b2ec574
add poptracker pack to docs
alwaysintreble Mar 6, 2023
14c8087
doc cleanup and "known issues" section that I probably won't be able …
alwaysintreble Mar 7, 2023
00e9173
missed some spots
alwaysintreble Mar 7, 2023
8dd5f1f
add another bug i forgot about
alwaysintreble Mar 7, 2023
45fef55
Merge remote-tracking branch 'Main/main' into messenger_dev
alwaysintreble Mar 9, 2023
a11acaa
be consistently wrong
alwaysintreble Mar 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Currently, the following games are supported:
* Wargroove
* Stardew Valley
* The Legend of Zelda
* The Messenger

For setup and instructions check out our [tutorials page](https://archipelago.gg/tutorial/).
Downloads can be found at [Releases](https://github.com/ArchipelagoMW/Archipelago/releases), including compiled
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"Stardew Valley",
"Timespinner",
"Minecraft",
"The Messenger",
}


Expand Down
153 changes: 153 additions & 0 deletions worlds/messenger/Constants.py
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"
Copy link
Collaborator

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:

Suggested change
"Key of Symbiosis"
"Key of Symbiosis",

Copy link
Collaborator Author

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.

]

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",
"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"
]

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"
]
66 changes: 66 additions & 0 deletions worlds/messenger/Options.py
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"


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


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


messenger_options = {
"accessibility": MessengerAccessibility,
"enable_logic": Logic,
"shuffle_seals": PowerSeals,
"goal": Goal,
"music_box": MusicBox,
"notes_needed": NotesNeeded,
"total_seals": AmountSeals,
"percent_seals_required": RequiredSeals,
"death_link": DeathLink,
}
52 changes: 52 additions & 0 deletions worlds/messenger/Regions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
from typing import Dict, Set, List

REGIONS: Dict[str, List[str]] = {
"Menu": [],
"Tower HQ": [],
"The Shop": [],
"Tower of Time": [],
"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": [],
"Cloud Ruins": ["Acro"],
"Underworld": ["Pyro", "Key of Chaos"],
"Dark Cave": [],
"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"""
Loading