for coding
I think I would resolve this as:
Doctor (No. 4) heals themself.
Roleblocker (No. 1) gets jailed.
Roleblocker (No. 1) gets told their action failed. Everyone else gets told that their action succeeded.
with most abilities you should generally be able to find a better resolution tho
oh damn have you been like, thinking about coding that kind of thing?
whyd u become an aussie at the end there
alr guys im gonna write the wandering souls OP wish me luck
general cw (i am treating a serious topic kinda lightly)
a second muer has hit the afterlife
Iâve personally referred to it as Chain Resolution.
The way Iâve tried approaching it is like a linked list, where you keep working backwards through a chain of âthat person was targeted by this person, who was targeted by this personâ until you find the earliest person not targeted by what Iâd dub an âaction-affecting effectâ (RB, bus drive, etc). From there, you resolve things.
Yes. On and off for years lol. Like sometimes I donât think about it for months, but I do think about it and Iâve made some progress. So much of mafia game rules is just kinda fiat and not formalized that it makes writing the code for how I want it to work really difficult because it forces me to consider all of these questions. And I want it to be generalizable so I really have to decide how things work and interact with each other.
yea fair
Same.
Itâs kind of an across-the-board mess to do this because various people have different assumptions on how action resolution should be handled.
thereâs a LOT of mafia rules that are unspoken because theyâre so universal, even in game OPs that are supposed to describe it
iâve also (kinda) tried coding a framework that you could put abilities into as mentioned before, and really what i was doing was making a thing that you put abilities into and then it spits out results & feedback n shit. as a proof of concept
really what i came up with there extended basically to âhow do you fit all of these unique abilities into one tos-like resolutionâ and i ended up with extremely abstracted abilities (e.g. jailkeeper â an instance of roleblock and an instance of doctor, targeted on the same person)
this in particular does result in some counter-intuitive resolutions (in this case, the roleblock immunity attribute is assigned to the roleblock but not the doctor, so they become a roleblocker for the night if they get rbâd) but i think manipulative abilities are guranteed to result in that in general
in terms of Macro you can usually go with the ~general order of âmanipulative > killer/protective (however u wanna make those work) â investigativeâ
but it doesnât work for everything so
I would construct a directed graph and then use a function to construct a directed acyclic graph (DAG) from that for actual resolution order. A graph is going to be more natural than a linked list both literally in terms of programming and in your brain when you think about how these things relate to each other. Like 5 players may target the same player, and none of them interact so their order relative to each other is irrelevant. You can represent that with 5 nodes having edges to that single node, and then your traversal function can choose any of those 5 to resolve first arbitrarily. Thatâs the idea anyway. You want to start with just a directed graph because want to have a record of actions as submitted, and the DAG is what things look like after you break cycles and get things into the final order.
i would probably create a few extra general tiers within there too
(e.g. a tier below maniplautive for things that canât be manipulated and that impact manipulative abilities as if they didnât have rb immunity could be good
along with a tier in between manip and kills for misc effects that need to go before kills, and between kills and investigations for misc effects that need to go after kills. the distinction here is less relevant given the fact that death doesnât stop actions, but still useful probably
i would also have two or three after investigations; one for trackers, one for misc end-of-night effects, and the final one for role/alignment changes)
this isnât very useful for coding but you can use it to have different âphasesâ of the resolution ig, and then you divide the actual resolution in between those phases
yea i have no idea what any of this means
Willow this just isnt something you take lightly or make jokes about.
thatâs why i put it under a spoiler
Yeah youâre working your way towards a similar abstraction of abilities being compositions of effects lol