From 3d8ba4c1dd3c3a9c8edde42b5a9ade68089b4562 Mon Sep 17 00:00:00 2001 From: skizzerz Date: Fri, 13 Feb 2015 19:28:00 -0600 Subject: [PATCH] Add valentine mode --- settings/wolfgame.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/settings/wolfgame.py b/settings/wolfgame.py index 25991e7..b8bd3e1 100644 --- a/settings/wolfgame.py +++ b/settings/wolfgame.py @@ -1,4 +1,5 @@ from collections import defaultdict +import math PING_WAIT = 300 # Seconds PING_MIN_WAIT = 30 # How long !start has to wait after a !ping @@ -664,6 +665,18 @@ class AmnesiaMode(object): "amnesiac" : [i - 2 for i in self.ROLE_INDEX] }) +@game_mode("valentines", minp = 8, maxp = 24, likelihood = 0) +class MatchmakerMode(object): + """Love is in the air!""" + def __init__(self): + self.ROLE_INDEX = range(8, 25) + self.ROLE_GUIDE = reset_roles(self.ROLE_INDEX) + self.ROLE_GUIDE.update({ + "wolf" : [math.ceil((i ** 1.4) * 0.06) for i in self.ROLE_INDEX], + "matchmaker" : [i - math.ceil((i ** 1.4) * 0.06) - (1 if i >= 12 else 0) - (1 if i >= 18 else 0) for i in self.ROLE_INDEX], + "monster" : [(1 if i >= 12 else 0) for i in self.ROLE_INDEX], + "mad scientist" : [(1 if i >= 18 else 0) for i in self.ROLE_INDEX] + }) # Credits to Metacity for designing and current name # Blame arkiwitect for the original name of KrabbyPatty @@ -745,6 +758,7 @@ class AlphaMode(object): "cursed villager" : ( 0 , 1 , 1 , 1 , 1 , 1 , 2 , 2 , 2 , 2 , 3 , 3 , 3 , 4 ), }) + # Persistence