From aaba89998346bdde161928abee16296d16947a76 Mon Sep 17 00:00:00 2001 From: skizzerz Date: Fri, 26 Dec 2014 01:07:27 -0600 Subject: [PATCH] Add "alpha" gamemode This mode features the alpha wolf and doctor roles, and should provide for very "swingy" games where wolves are very disadvantaged at first but should be able to make a decent comeback later on. This also brought some rebalancing to gamemode weights, mostly all of the existing ones stayed the same though, a summary of changes is below. Numbers below are rounded to the nearest percent, so they won't necessarily add up to 100. default: 41% -> 40% (-1%) foolish: 19% -> 16% (-3%) mad: 19% -> 16% (-3%) classic: 11% -> 8% (-3%) lycan: 3% -> 2% (-1%) aleatoire: 8% -> 8% (0%) alpha: n/a -> 10% --- settings/wolfgame.py | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/settings/wolfgame.py b/settings/wolfgame.py index efe8190..ed653d4 100644 --- a/settings/wolfgame.py +++ b/settings/wolfgame.py @@ -401,14 +401,14 @@ class ChangedRolesMode(object): except ValueError: raise InvalidModeException("A bad value was used in mode roles.") -@game_mode("default", minp = 4, maxp = 24, likelihood = 15) +@game_mode("default", minp = 4, maxp = 24, likelihood = 20) class DefaultMode(object): """Default game mode.""" def __init__(self): # No extra settings, just an explicit way to revert to default settings pass -@game_mode("foolish", minp = 8,maxp = 24, likelihood = 7) +@game_mode("foolish", minp = 8,maxp = 24, likelihood = 8) class FoolishMode(object): """Contains the fool, be careful not to lynch them!""" def __init__(self): @@ -436,7 +436,7 @@ class FoolishMode(object): "mayor" : ( 0 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , 1 , 1 ), }) -@game_mode("mad", minp = 7, maxp = 22, likelihood = 7) +@game_mode("mad", minp = 7, maxp = 22, likelihood = 8) class MadMode(object): """This game mode has mad scientist and many things that may kill you.""" def __init__(self): @@ -641,7 +641,7 @@ class AmnesiaMode(object): # Credits to Metacity for designing and current name # Blame arkiwitect for the original name of KrabbyPatty -@game_mode("aleatoire", minp = 4, maxp = 24, likelihood = 3) +@game_mode("aleatoire", minp = 4, maxp = 24, likelihood = 4) class AleatoireMode(object): """Game mode created by Metacity and balanced by woffle.""" def __init__(self): @@ -692,6 +692,34 @@ class AleatoireMode(object): "mayor" : ( 0 , 0 , 0 , 0 , 0 , 1 , 1 , 1 ), }) +@game_mode("alpha", minp = 4, maxp = 24, likelihood = 5) +class AlphaMode(object): + """Features the alpha wolf who can turn other people into wolves, be careful whom you trust!""" + def __init__(self): + self.ROLE_INDEX = ( 4 , 6 , 7 , 8 , 10 , 11 , 12 , 14 , 15 , 17 , 18 , 20 , 21 , 24 ) + self.ROLE_GUIDE = reset_roles(self.ROLE_INDEX) + self.ROLE_GUIDE.update({ + #village roles + "oracle" : ( 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ), + "matchmaker" : ( 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ), + "village drunk" : ( 0 , 0 , 0 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ), + "guardian angel" : ( 0 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ), + "doctor" : ( 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ), + "harlot" : ( 0 , 0 , 0 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ), + "augur" : ( 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , 1 ), + # wolf roles + "wolf" : ( 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 2 , 2 , 3 , 3 , 4 , 5 ), + "alpha wolf" : ( 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ), + "traitor" : ( 0 , 0 , 0 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ), + "werecrow" : ( 0 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ), + # neutral roles + "lycan" : ( 0 , 0 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 2 , 2 , 2 , 2 , 2 ), + "clone" : ( 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 1 ), + # templates + "cursed villager" : ( 0 , 1 , 1 , 1 , 1 , 1 , 2 , 2 , 2 , 2 , 3 , 3 , 3 , 4 ), + "gunner" : ( 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ), + }) + # Persistence