72 lines
2.3 KiB
Markdown
72 lines
2.3 KiB
Markdown
# PyWerwolf
|
|
|
|
Trying to rebuild [https://github.com/foin137/werwolfonline.eu](https://github.com/foin137/werwolfonline.eu) in python
|
|
|
|
|
|
## Phases of the game
|
|
|
|
```plantuml
|
|
@startuml(id=overview)
|
|
state WaitingForPlayers <<fork>>
|
|
[*] --> WaitingForPlayers: Created
|
|
WaitingForPlayers --> GameMaster: Creator
|
|
WaitingForPlayers --> Player: Player
|
|
|
|
GameMaster : Show the game id/link
|
|
WaitingForPlayers : Create game in Database
|
|
EditRules -> GameMaster: close Rules
|
|
GameMaster -> EditRules: edit rules
|
|
state WaitingForPlayersEnd <<join>>
|
|
|
|
Player --> WaitingForPlayersEnd: Ready
|
|
|
|
|
|
GameMaster --> GameMaster: start &&\nlen(Players)>=len(special roles) &&\nnum_werewolfes > 1
|
|
GameMaster --> WaitingForPlayersEnd: start &&\n(len(Players)<len(special roles) ||\n num_werewolfes < 1)
|
|
|
|
WaitingForPlayersEnd --> StartGame
|
|
StartGame : Assign Player Roles
|
|
StartGame : Show Introduction
|
|
|
|
StartGame --> MainPhase : all ready
|
|
state MainPhase {
|
|
!include https://gitea.d1v3.de/matthias/pywerewolf/raw/branch/master/README.md!DayAndNight
|
|
}
|
|
@enduml
|
|
```
|
|
|
|
```plantuml
|
|
@startuml(id=DayAndNight)
|
|
state NightPhaseCupin <<fork>>
|
|
[*] --> NightPhaseCupin: Game has Cupin
|
|
[*] --> NightPhaseMain: no Cupin
|
|
NightPhaseMain : Werewolfes awake & select (vote) their victim
|
|
NightPhaseMain : Seer/Spy/Protector/ParanormalInvestigator awaken & access feat
|
|
NightPhaseMain : sleep & confirm
|
|
|
|
|
|
state NightPhaseCupinEnd <<join>>
|
|
NightPhaseCupin --> WaitToContinueCupin: !Cupin
|
|
NightPhaseCupin --> SelectLovedOnes: Cupin
|
|
WaitToContinueCupin --> NightPhaseCupinEnd
|
|
SelectLovedOnes --> NightPhaseCupinEnd: selected and confirmed loved ones
|
|
|
|
state NightPhaseLovedOnes <<fork>>
|
|
state NightPhaseLovedOnesEnd <<fork>>
|
|
NightPhaseCupinEnd --> NightPhaseLovedOnes
|
|
NightPhaseLovedOnes --> LovedOnesAwake: Selected Loved Ones
|
|
NightPhaseLovedOnes --> WaitForLovedOnes: other
|
|
LovedOnesAwake --> NightPhaseLovedOnesEnd: ready
|
|
WaitForLovedOnes --> NightPhaseLovedOnesEnd
|
|
|
|
NightPhaseLovedOnesEnd --> NightPhaseMain : all ready
|
|
NightPhaseMain --> NightPhaseLate : Witch/Leaderwolf && voted && actions done and all ready
|
|
|
|
NightPhaseLate: LeaderWolf selects victim to convert
|
|
NightPhaseLate: witch is allowed to select heal/murder
|
|
|
|
NightPhaseMain --> ShowDead: no Witch/Leaderwolf && voted && actions done and all ready
|
|
NightPhaseLate --> ShowDead: actions taken
|
|
@enduml
|
|
```
|