gnlow / todo

Issue tracker for my idea
3 stars 0 forks source link

Mafia42 Custom role simulator #66

Open gnlow opened 3 years ago

gnlow commented 3 years ago

Sketch

ability Justice {
  when getUsers( { team: Mafia } ).votes == 0
  when getUsers( { role: CultLeader } ).votes == 0
  when getUsers( { team: CitizenTeam } ).votes >= getUser( { team: Cult } ).votes
  then win
}
role Citizen {
  have Justice
}
{
  abilities: {
    Justice: {
      if: [
        { "==": [ { votes: { team: "mafia" } }, 0 ] },
        { "==": [ { votes: { role: "cultReader" } }, 0 ] },
        { ">=": [ { votes: { team: "citizenTeam" } }, { votes: { team: "cultTeam" } } ] }
      ],
      then: "win"
    }
  },
  role: {
    Citizen: {
      abilities: ["Justice"]
    }
  }
}
abilities:
  Justice:
    if:
      - ==:
          - votes:
              team: mafia
          - 0
      - ==:
          - votes:
              role: cultReader
          - 0
      - '>=':
          - votes:
              team: citizenTeam
          - votes:
              team: cultTeam
    then: win
role:
  Citizen:
    abilities:
      - Justice