You are viewing the MafiaScum.net Wiki. To play the game, visit the forum.

Template:RoleParser/doc

From MafiaWiki
< Template:RoleParser
Revision as of 20:32, 27 May 2018 by Callforjudgement (talk | contribs) (documentation/tests for RoleParser; this is work in progress, it'll likely get more arguments eventually)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Name:
  • RoleParser
Types:
Sub-Template:
  • No
Designer:


The {{RoleParser}} template is the main entry point for producing formatted Role PMs from role strings.

The first argument is the role string to format. The second argument is a slash-separated list of special rules in use in the setup, e.g. "Nightless", "Compulsive" (nightkills), etc.; this can be empty. (The purpose of this argument is to make necessary modifications to the role PM, e.g. removing the factional kill from the Mafia in a Nightless setup.)

There are also a few optional arguments. An argument with a name like TownWincon, MafiaWincon, etc., will override the win condition given in the role PM if the faction in the argument matches the faction of a role. This lets you specify the wincons for the various factions without having to parse the role string to see which faction matches. Finally, the Test argument is optional and rarely used, but will cause this template to dump out some of its internal state, making it possible to test it independently from the sub-templates it calls into.

Examples

Town

Welcome to game! You are a Vanilla Townie.

Template:Rp/Stage1

You win if all threats to the town are eliminated and at least one town-aligned player is alive.

Confirm by replying to this PM with a summary of your role.

Mafia

Welcome to game! You are a Mafia Goon.

Template:Rp/Stage1

You win if at least one mafia member is alive and all other players are dead (or if nothing can prevent the same).

Confirm by replying to this PM with a summary of your role.

Town/Cop

Welcome to game! You are a Town Cop.

Template:Rp/Stage1

You win if all threats to the town are eliminated and at least one town-aligned player is alive.

Confirm by replying to this PM with a summary of your role.

Town/Bulletproof

Welcome to game! You are a Bulletproof Townie.

Template:Rp/Stage1

You win if all threats to the town are eliminated and at least one town-aligned player is alive.

Confirm by replying to this PM with a summary of your role.

Mafia/Loyal/Jailkeeper

Welcome to game! You are a Mafia Loyal Jailkeeper.

Template:Rp/Stage1

You win if at least one mafia member is alive and all other players are dead (or if nothing can prevent the same).

Confirm by replying to this PM with a summary of your role.

Mafia/Bulletproof/Jailkeeper

Welcome to game! You are a Bulletproof Mafia Jailkeeper.

Template:Rp/Stage1

You win if at least one mafia member is alive and all other players are dead (or if nothing can prevent the same).

Confirm by replying to this PM with a summary of your role.

Mafia/Multitasking/Jailkeeper

Welcome to game! You are a Mafia Multitasking Jailkeeper.

Template:Rp/Stage1

You win if at least one mafia member is alive and all other players are dead (or if nothing can prevent the same).

Confirm by replying to this PM with a summary of your role.

Mafia/Ninja

Welcome to game! You are a Mafia Ninja.

Template:Rp/Stage1

You win if at least one mafia member is alive and all other players are dead (or if nothing can prevent the same).

Confirm by replying to this PM with a summary of your role.

Town/Cop/Doctor

Welcome to game! You are a Town Cop Doctor.

Template:Rp/Stage1

You win if all threats to the town are eliminated and at least one town-aligned player is alive.

Confirm by replying to this PM with a summary of your role.

Town/Bulletproof/Enabler

Welcome to game! You are a Town Bulletproof Enabler.

Template:Rp/Stage1

You win if all threats to the town are eliminated and at least one town-aligned player is alive.

Confirm by replying to this PM with a summary of your role.

Town/Odd Night/Doctor/Enabler

Welcome to game! You are a Town Odd Night Doctor Enabler.

Template:Rp/Stage1

You win if all threats to the town are eliminated and at least one town-aligned player is alive.

Confirm by replying to this PM with a summary of your role.

Town/Bulletproof/Activated

Welcome to game! You are a Town Activated Bulletproof.

Template:Rp/Stage1

You win if all threats to the town are eliminated and at least one town-aligned player is alive.

Confirm by replying to this PM with a summary of your role.

Town/Ascetic/Bulletproof

Welcome to game! You are an Ascetic Bulletproof Townie.

Template:Rp/Stage1

You win if all threats to the town are eliminated and at least one town-aligned player is alive.

Confirm by replying to this PM with a summary of your role.

Town/Ascetic/Bulletproof/Enabler

Welcome to game! You are an Ascetic Town Bulletproof Enabler.

Template:Rp/Stage1

You win if all threats to the town are eliminated and at least one town-aligned player is alive.

Confirm by replying to this PM with a summary of your role.

Town/Cop/Odd Night/Doctor

Welcome to game! You are a Town Cop Odd Night Doctor.

Template:Rp/Stage1

You win if all threats to the town are eliminated and at least one town-aligned player is alive.

Confirm by replying to this PM with a summary of your role.

Town/Even Night/Cop/Odd Night/Doctor

Welcome to game! You are a Town Even Night Cop Odd Night Doctor.

Template:Rp/Stage1

You win if all threats to the town are eliminated and at least one town-aligned player is alive.

Confirm by replying to this PM with a summary of your role.

Mafia/Ascetic/Multitasking/Even Night/Cop/Odd Night/Doctor

Welcome to game! You are an Ascetic Mafia Multitasking Even Night Cop Odd Night Doctor.

Template:Rp/Stage1

You win if at least one mafia member is alive and all other players are dead (or if nothing can prevent the same).

Confirm by replying to this PM with a summary of your role.

Town/Loud/Multitasking/Jack of All Trades/Cop/Weak/Doctor/Innocent Child/Activated

Welcome to game! You are a Town Loud Multitasking Jack of All Trades Cop Weak Doctor Activated Innocent Child.

Template:Rp/Stage1

You win if all threats to the town are eliminated and at least one town-aligned player is alive.

Confirm by replying to this PM with a summary of your role.

Serial Killer/Even Night/Ascetic/2-shot/Loud/Ninja/Weak/Rolecop/Odd Night/Doctor

Welcome to game! You are an Even Night Ascetic Serial Killer 2-shot Loud Ninja Weak Rolecop Odd Night Doctor.

Template:Rp/Stage1

You win if you are the last player alive (or if nothing can prevent the same).

Confirm by replying to this PM with a summary of your role.


Test of this template in isolation

Town

Welcome to game! You are a Vanilla Townie.

1=Town; 4=0; 5=1/

You win if all threats to the town are eliminated and at least one town-aligned player is alive.

Confirm by replying to this PM with a summary of your role.

Mafia

Welcome to game! You are a Mafia Goon.

1=Mafia; 4=1; 5=1/

You win if at least one mafia member is alive and all other players are dead (or if nothing can prevent the same).

Confirm by replying to this PM with a summary of your role.

Town/Cop

Welcome to game! You are a Town Cop.

1=Town/Cop; 4=1; 5=1/2/

You win if all threats to the town are eliminated and at least one town-aligned player is alive.

Confirm by replying to this PM with a summary of your role.

Town/Bulletproof

Welcome to game! You are a Bulletproof Townie.

1=Town/Bulletproof; 4=0; 5=1/2/

You win if all threats to the town are eliminated and at least one town-aligned player is alive.

Confirm by replying to this PM with a summary of your role.

Mafia/Loyal/Jailkeeper

Welcome to game! You are a Mafia Loyal Jailkeeper.

1=Mafia/Loyal/Jailkeeper; 4=2; 5=1/3/

You win if at least one mafia member is alive and all other players are dead (or if nothing can prevent the same).

Confirm by replying to this PM with a summary of your role.

Mafia/Bulletproof/Jailkeeper

Welcome to game! You are a Bulletproof Mafia Jailkeeper.

1=Mafia/Bulletproof/Jailkeeper; 4=2; 5=1/2/3/

You win if at least one mafia member is alive and all other players are dead (or if nothing can prevent the same).

Confirm by replying to this PM with a summary of your role.

Mafia/Multitasking/Jailkeeper

Welcome to game! You are a Mafia Multitasking Jailkeeper.

1=Mafia/Multitasking/Jailkeeper; 2=Multitasking; 4=2; 5=1/2/3/

You win if at least one mafia member is alive and all other players are dead (or if nothing can prevent the same).

Confirm by replying to this PM with a summary of your role.

Mafia/Ninja

Welcome to game! You are a Mafia Ninja.

1=Mafia/Ninja; 4=2; 5=1/2/

You win if at least one mafia member is alive and all other players are dead (or if nothing can prevent the same).

Confirm by replying to this PM with a summary of your role.

Town/Cop/Doctor

Welcome to game! You are a Town Cop Doctor.

1=Town/Cop/Doctor; 4=2; 5=1/2/3/

You win if all threats to the town are eliminated and at least one town-aligned player is alive.

Confirm by replying to this PM with a summary of your role.

Town/Bulletproof/Enabler

Welcome to game! You are a Town Bulletproof Enabler.

1=Town/Bulletproof/Enabler; 4=0; 5=1/3/

You win if all threats to the town are eliminated and at least one town-aligned player is alive.

Confirm by replying to this PM with a summary of your role.

Town/Odd Night/Doctor/Enabler

Welcome to game! You are a Town Odd Night Doctor Enabler.

1=Town/Odd Night/Doctor/Enabler; 4=0; 5=1/4/

You win if all threats to the town are eliminated and at least one town-aligned player is alive.

Confirm by replying to this PM with a summary of your role.

Town/Bulletproof/Activated

Welcome to game! You are a Town Activated Bulletproof.

1=Town/Bulletproof/Activated; 4=1; 5=1/3/

You win if all threats to the town are eliminated and at least one town-aligned player is alive.

Confirm by replying to this PM with a summary of your role.

Town/Ascetic/Bulletproof

Welcome to game! You are an Ascetic Bulletproof Townie.

1=Town/Ascetic/Bulletproof; 4=0; 5=1/2/3/

You win if all threats to the town are eliminated and at least one town-aligned player is alive.

Confirm by replying to this PM with a summary of your role.

Town/Ascetic/Bulletproof/Enabler

Welcome to game! You are an Ascetic Town Bulletproof Enabler.

1=Town/Ascetic/Bulletproof/Enabler; 4=0; 5=1/2/4/

You win if all threats to the town are eliminated and at least one town-aligned player is alive.

Confirm by replying to this PM with a summary of your role.

Town/Cop/Odd Night/Doctor

Welcome to game! You are a Town Cop Odd Night Doctor.

1=Town/Cop/Odd Night/Doctor; 4=2; 5=1/2/4/

You win if all threats to the town are eliminated and at least one town-aligned player is alive.

Confirm by replying to this PM with a summary of your role.

Town/Even Night/Cop/Odd Night/Doctor

Welcome to game! You are a Town Even Night Cop Odd Night Doctor.

1=Town/Even Night/Cop/Odd Night/Doctor; 4=2; 5=1/3/5/

You win if all threats to the town are eliminated and at least one town-aligned player is alive.

Confirm by replying to this PM with a summary of your role.

Mafia/Ascetic/Multitasking/Even Night/Cop/Odd Night/Doctor

Welcome to game! You are an Ascetic Mafia Multitasking Even Night Cop Odd Night Doctor.

1=Mafia/Ascetic/Multitasking/Even Night/Cop/Odd Night/Doctor; 2=Multitasking; 4=3; 5=1/2/3/5/7/

You win if at least one mafia member is alive and all other players are dead (or if nothing can prevent the same).

Confirm by replying to this PM with a summary of your role.

Town/Loud/Multitasking/Jack of All Trades/Cop/Weak/Doctor/Innocent Child/Activated

Welcome to game! You are a Town Loud Multitasking Jack of All Trades Cop Weak Doctor Activated Innocent Child.

1=Town/Loud/Multitasking/Jack of All Trades/Cop/Weak/Doctor/Innocent Child/Activated; 2=Multitasking; 3=Jack of All Trades; 4=3; 5=1/3/4/5/7/9/

You win if all threats to the town are eliminated and at least one town-aligned player is alive.

Confirm by replying to this PM with a summary of your role.

Serial Killer/Even Night/Ascetic/2-shot/Loud/Ninja/Weak/Rolecop/Odd Night/Doctor

Welcome to game! You are an Even Night Ascetic Serial Killer 2-shot Loud Ninja Weak Rolecop Odd Night Doctor.

1=Serial Killer/Even Night/Ascetic/2-shot/Loud/Ninja/Weak/Rolecop/Odd Night/Doctor; 4=4; 5=1/3/6/8/10/

You win if you are the last player alive (or if nothing can prevent the same).

Confirm by replying to this PM with a summary of your role.