Closed Zannick closed 6 months ago
There are a few additional challenges here of things that we handled directly based on objective:
unused_items
Unused items can be handled by set-intersection (e.g. an is_item_used
function that checks one rule setting at a time).
Progress measuring is trickier, but both are basically derived from a list of required items; either we can provide it separately from the rule (perhaps even as separate lists of 'progress items' to use for bucketing and 'needed items' for estimates), or we require $victory
be an itemList
that includes $objective
so that we can easily figure out all the needed items automatically.
I'm tempted to require that all rules be itemList
.
Generally, this is what this will look like: required items are the items in the set victory condition, plus the items in the set rules in that victory condition.
For AV2, the victory condition would be written like [Victory, Apocalypse_Bomb, $objective]
, assuming $objective
is a requirement to get Apocalypse_Bomb
which is a requirement for Victory
. If we needed more flexibility or wanted to shortcut some tests, we could make the victory condition be just Victory
but then we have to associate what the required items are separately. The main thing I can think of is that, for any All Items category in AV2, one flask is actually gettable on the escape sequence at the end of the game, which we'd have to write like [Victory, Apocalypse_Bomb, Flask{n}, $objective]
where $objective
has one less flask than the victory condition (or we'd write a separate rule).
The format would be like:
and any can be defined. In the settings file it would look like
This generalizes #48.