Project:Night phases

Breaking night into multiple phases so that roles act in sequence instead of simultaneously. Some of the roles mentioned below don't exist yet; they're placeholders to show where they'll belong once implemented. Implementing these missing roles is not in scope of this project.

Timing
Each night phase lasts around 30 seconds. If all players who have roles assigned to the phase act, it may end before those 30 seconds are finished, similar to how night currently ends early. This will move it onto the next phase.

Roles that are only allowed to act once per game will be required to use the "pass" command in subsequent nights after they act, in order to avoid revealing that they have already used their once per game ability. Otherwise if knowledge of who is meant to act in a phase is meant to be kept hidden (such as doppelganger) and nobody alive is acting in a particular phase, the bot will randomly end the phase after 5-20 seconds (uniform distribution).

Automated warnings for failing to act are not in scope for this project.

Buckets
Each role which can act at night is set to a particular bucket, which defines when it can act. Multiple roles can act during the same bucket. Some roles may be split among different buckets.

Bucket 1
Time limit: 30 seconds (15 seconds when time lord activates)


 * doomsayer: observe
 * sorcerer: observe
 * werecrow: observe
 * turncoat: side
 * succubus: visit
 * harlot: visit
 * matchmaker: match
 * wild child: idol
 * clone: clone
 * assassin: target
 * doppelganger: clone
 * shaman: totem
 * crazed shaman: totem
 * wolf shaman: totem
 * warlock: curse
 * hag: hex

Bucket 2
Time limit: 40 seconds (20 seconds when time lord activates)

Notes: If totems are in play, all players who act at night in bucket 2 and beyond are aware of which players have totems.


 * wolf, werecrow, werekitten, alpha wolf, fallen angel, wolf mystic, wolf shaman, doomsayer: kill (shared target), chat enabled (if wolfchat is restricted)
 * hunter: kill
 * vigilante: kill
 * vengeful ghost: kill
 * dullahan: kill
 * alpha wolf: bite

Bucket 3
Time limit: 30 seconds (15 seconds when time lord activates). When scryer is alive, will last a minimum of 20 seconds (10 seconds when time lord activatesion).


 * seer, oracle, augur, scryer: chat enabled (only if scryer is alive)
 * witch: guard, kill
 * bodyguard: guard
 * guardian angel: guard

Bucket 4
Time limit: 30 seconds (15 seconds when time lord activates)


 * seer: see
 * oracle: see
 * augur: see
 * piper: charm
 * prophet: pray

Special

 * Nightmares in sleepy last 60 seconds and begin with bucket 3 (but may extend beyond bucket 3 into buckets 4 or 5; possibly delaying bucket 5 until the 60 seconds fully expires).

Role information
All roles which gain additional information at night (such as mystic, wolf mystic, minion, amnesiac, as well as shaman and wolf shaman learning what totems they have) learn that information at the beginning of night, even if they are unable to act on it right away.