-
Notifications
You must be signed in to change notification settings - Fork 558
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
Inscryption: Implement new game #3621
base: main
Are you sure you want to change the base?
Conversation
…). Add a rule for victory. Change the regions list to remove menu in the destination.
…cations and items.
…ms as "progression", renamed tomb checks, added more location rules, re-added completion rule
…for some checks, adjusted setup doc a bit
# Conflicts: # README.md
…into Inscryption
…on to fit the new setup
…n impossible fight early on
… API mod. Fixed some french translations.
… tower requirement for Mycologist Key check. Fixed missing comma in act 2 locations oopsies.
…ons + made pieces progressive + adjusted docs
…longer contain progression items.
# Conflicts: # README.md
# Conflicts: # README.md
…ndomize abilities to randomize sigils. Fixed generation issue with epitaph pieces randomization. Goobert's painting no longer forces filler. Removed traps option for now. Reworded some option descriptions.
# Conflicts: # README.md
Some of the latest changes do still need some testing but I'm starting the PR anyway in case anything needs changing |
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.
Out of time to keep reviewing for now, may review more later
worlds/inscryption/Rules.py
Outdated
def has_pelts(self, state: CollectionState, count: int) -> bool: | ||
return state.has("Holo Pelt", self.player, count) | ||
|
||
def has_one_pelt(self, state: CollectionState) -> bool: | ||
return self.has_pelts(state, 1) and self.has_gems_and_battery(state) | ||
|
||
def has_two_pelt(self, state: CollectionState) -> bool: | ||
return self.has_pelts(state, 2) and self.has_gems_and_battery(state) | ||
|
||
def has_three_pelt(self, state: CollectionState) -> bool: | ||
return self.has_pelts(state, 3) and self.has_gems_and_battery(state) | ||
|
||
def has_four_pelt(self, state: CollectionState) -> bool: | ||
return self.has_pelts(state, 4) and self.has_gems_and_battery(state) | ||
|
||
def has_five_pelt(self, state: CollectionState) -> bool: | ||
return self.has_pelts(state, 5) and self.has_gems_and_battery(state) |
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.
def has_pelts(self, state: CollectionState, count: int) -> bool: | |
return state.has("Holo Pelt", self.player, count) | |
def has_one_pelt(self, state: CollectionState) -> bool: | |
return self.has_pelts(state, 1) and self.has_gems_and_battery(state) | |
def has_two_pelt(self, state: CollectionState) -> bool: | |
return self.has_pelts(state, 2) and self.has_gems_and_battery(state) | |
def has_three_pelt(self, state: CollectionState) -> bool: | |
return self.has_pelts(state, 3) and self.has_gems_and_battery(state) | |
def has_four_pelt(self, state: CollectionState) -> bool: | |
return self.has_pelts(state, 4) and self.has_gems_and_battery(state) | |
def has_five_pelt(self, state: CollectionState) -> bool: | |
return self.has_pelts(state, 5) and self.has_gems_and_battery(state) | |
def has_pelts(self, state: CollectionState, count: int) -> bool: | |
return state.has("Holo Pelt", self.player, count) and self.has_gems_and_battery(state) |
Having 5 separate has_num_pelt helpers feels excessive -- would recommend condensing them into one function.
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 agree that it's excessive. If I remember correctly, I think it was because my rules list is of the type dict[str, (CollectionState) -> bool] which doesn't allow me to add parameters like the number of pelts. If you know of a way, that would be great.
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.
Ah, well, I have no idea then -- this is probably fine then to keep using that kind of structure. I'm definitely no stranger to having to do some hacky thing to keep everything else smooth
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.
Have has_pelts
only take the count, then return a lambda that captures the count and takes a CollectionState
to return a bool
Then, instead, of "Act 3 - Trader 1": self.has_one_pelt
you would call the function to get that lambda of type Callable[[CollectionState], bool]
to put in your rules dict
"Act 3 - Trader 1": self.has_pelts(1)
Basically my thoughts are something along the lines of
def has_pelts(self, count: int) -> Callable[[CollectionState], bool]:
return lambda state: state.has("Holo Pelt", self.player, count)
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.
Pushed in the latest commit. Works wonderfully!
from .Locations import act1_locations, act2_locations, act3_locations, regions_to_locations | ||
from .Regions import inscryption_regions_all, inscryption_regions_act_1 | ||
from typing import Dict, Any | ||
from . import Rules |
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.
from . import Rules | |
import .Rules |
Not 100% sure this is correct since I'm not in front of an IDE atm
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.
Simply removing "from . " seems to work. No dot needed before Rules.
Edit: Nevermind, that doesn't work either.
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'm assuming this should be okay as it is? Gonna mark this as resolved if that's the case.
…ion, cleaned up imports, renamed Death Link related options to include "death_link" instead of "deathlink", replaced numeral values for option checking into class attributes for readability, slight optimization to tower rule, fixed typo in codes option description.
@@ -0,0 +1,19 @@ | |||
# Inscryption |
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.
In general, I recommend having a section detailing how many locations are in your world, since it is a common question among users. Since it varies by options, I'd recommend either saying how many locations each option has, or give a range and a default if it's more complicated.
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.
Added a section for it. Let me know if it looks good.
…ion, added items/locations count in game docs and adjusted some sections
What is this fixing or adding?
Adds new world for the game Inscryption.
https://store.steampowered.com/app/1092790/Inscryption/
Learn more about the implementation here: https://github.com/Glowbuzz/Archipelago/blob/Inscryption/worlds/inscryption/docs/en_Inscryption.md
How was this tested?
Has been available publicly and regularly tested by the community and the world developers since september of 2023 through our future-game-design thread. It has been included in multiple community asyncs as a stable unsupported game. Unit tests have also been added for logic.