fix fool wins with lover setting, adjust lots of numbers
This commit is contained in:
parent
9e83ac941c
commit
47f3b0e4d3
@ -1186,7 +1186,6 @@ def stop_game(cli, winner = ""):
|
|||||||
iwon = False
|
iwon = False
|
||||||
elif rol == "fool" and "@" + splr == winner:
|
elif rol == "fool" and "@" + splr == winner:
|
||||||
iwon = True
|
iwon = True
|
||||||
winner = "fool"
|
|
||||||
elif rol == "monster" and splr in survived and winner == "monsters":
|
elif rol == "monster" and splr in survived and winner == "monsters":
|
||||||
iwon = True
|
iwon = True
|
||||||
elif splr in var.LOVERS and splr in survived:
|
elif splr in var.LOVERS and splr in survived:
|
||||||
@ -1318,7 +1317,7 @@ def chk_win(cli, end_game = True):
|
|||||||
|
|
||||||
if lpl < 1:
|
if lpl < 1:
|
||||||
message = "Game over! There are no players remaining. Nobody wins."
|
message = "Game over! There are no players remaining. Nobody wins."
|
||||||
winner = ""
|
winner = "none"
|
||||||
elif lwolves == lpl / 2:
|
elif lwolves == lpl / 2:
|
||||||
if len(var.ROLES["monster"]) > 0:
|
if len(var.ROLES["monster"]) > 0:
|
||||||
plural = "s" if len(var.ROLES["monster"]) > 1 else ""
|
plural = "s" if len(var.ROLES["monster"]) > 1 else ""
|
||||||
@ -4868,14 +4867,14 @@ def start(cli, nick, chann_, rest):
|
|||||||
for gamemode in var.GAMEMODE_VOTES.values():
|
for gamemode in var.GAMEMODE_VOTES.values():
|
||||||
if len(villagers) >= var.GAME_MODES[gamemode][1] and len(villagers) <= var.GAME_MODES[gamemode][2]:
|
if len(villagers) >= var.GAME_MODES[gamemode][1] and len(villagers) <= var.GAME_MODES[gamemode][2]:
|
||||||
votes[gamemode] = votes.get(gamemode, 0) + 1
|
votes[gamemode] = votes.get(gamemode, 0) + 1
|
||||||
voted = [gamemode for gamemode in votes if votes[gamemode] == max(votes.values()) and votes[gamemode] > 2*len(villagers)/5]
|
voted = [gamemode for gamemode in votes if votes[gamemode] == max(votes.values()) and votes[gamemode] >= len(villagers)/2]
|
||||||
if len(voted):
|
if len(voted):
|
||||||
cgamemode(cli, random.choice(voted))
|
cgamemode(cli, random.choice(voted))
|
||||||
else:
|
else:
|
||||||
possiblegamemodes = []
|
possiblegamemodes = []
|
||||||
for gamemode in var.GAME_MODES.keys():
|
for gamemode in var.GAME_MODES.keys():
|
||||||
if len(villagers) >= var.GAME_MODES[gamemode][1] and len(villagers) <= var.GAME_MODES[gamemode][2] and var.GAME_MODES[gamemode][3] > 0:
|
if len(villagers) >= var.GAME_MODES[gamemode][1] and len(villagers) <= var.GAME_MODES[gamemode][2] and var.GAME_MODES[gamemode][3] > 0:
|
||||||
possiblegamemodes += [gamemode]*(var.GAME_MODES[gamemode][3]+votes.get(gamemode, 0)*7)
|
possiblegamemodes += [gamemode]*(var.GAME_MODES[gamemode][3]+votes.get(gamemode, 0)*15)
|
||||||
cgamemode(cli, random.choice(possiblegamemodes))
|
cgamemode(cli, random.choice(possiblegamemodes))
|
||||||
|
|
||||||
for index in range(len(var.ROLE_INDEX) - 1, -1, -1):
|
for index in range(len(var.ROLE_INDEX) - 1, -1, -1):
|
||||||
@ -6128,8 +6127,9 @@ if botconfig.DEBUG_MODE or botconfig.ALLOWED_NORMAL_MODE_COMMANDS:
|
|||||||
return
|
return
|
||||||
|
|
||||||
if rest:
|
if rest:
|
||||||
rest = mode = rest.lower().split()[0]
|
rest = mode = rest.strip().lower()
|
||||||
if rest not in var.GAME_MODES.keys():
|
if rest not in var.GAME_MODES.keys() and not rest.startswith("roles"):
|
||||||
|
rest = rest.split()[0]
|
||||||
#players can vote by only using partial name
|
#players can vote by only using partial name
|
||||||
matches = 0
|
matches = 0
|
||||||
for gamemode in var.GAME_MODES.keys():
|
for gamemode in var.GAME_MODES.keys():
|
||||||
|
@ -339,7 +339,7 @@ class ChangedRolesMode(object):
|
|||||||
except ValueError:
|
except ValueError:
|
||||||
raise InvalidModeException("A bad value was used in mode roles.")
|
raise InvalidModeException("A bad value was used in mode roles.")
|
||||||
|
|
||||||
@game_mode("default", minp = 4, maxp = 24, likelihood = 10)
|
@game_mode("default", minp = 4, maxp = 24, likelihood = 15)
|
||||||
class DefaultMode(object):
|
class DefaultMode(object):
|
||||||
"""Default game mode."""
|
"""Default game mode."""
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@ -510,7 +510,7 @@ class DrunkFireMode(object):
|
|||||||
"sharpshooter" : ( 2 , 2 , 3 , 3 , 4 ),
|
"sharpshooter" : ( 2 , 2 , 3 , 3 , 4 ),
|
||||||
})
|
})
|
||||||
|
|
||||||
@game_mode("noreveal", minp = 4, maxp = 21, likelihood = 2)
|
@game_mode("noreveal", minp = 4, maxp = 21, likelihood = 0)
|
||||||
class NoRevealMode(object):
|
class NoRevealMode(object):
|
||||||
"""Roles are not revealed when players die."""
|
"""Roles are not revealed when players die."""
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@ -538,7 +538,7 @@ class NoRevealMode(object):
|
|||||||
"cursed villager" : ( 0 , 1 , 1 , 1 , 1 , 1 , 2 , 2 ),
|
"cursed villager" : ( 0 , 1 , 1 , 1 , 1 , 1 , 2 , 2 ),
|
||||||
})
|
})
|
||||||
|
|
||||||
@game_mode("lycan", minp = 7, maxp = 21, likelihood = 2)
|
@game_mode("lycan", minp = 7, maxp = 21, likelihood = 1)
|
||||||
class LycanMode(object):
|
class LycanMode(object):
|
||||||
"""Many lycans will turn into wolves. Hunt them down before the wolves overpower the village."""
|
"""Many lycans will turn into wolves. Hunt them down before the wolves overpower the village."""
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@ -579,11 +579,12 @@ class AmnesiaMode(object):
|
|||||||
|
|
||||||
# Credits to Metacity for designing and current name
|
# Credits to Metacity for designing and current name
|
||||||
# Blame arkiwitect for the original name of KrabbyPatty
|
# Blame arkiwitect for the original name of KrabbyPatty
|
||||||
@game_mode("aleatoire", minp = 4, maxp = 24, likelihood = 2)
|
@game_mode("aleatoire", minp = 4, maxp = 24, likelihood = 3)
|
||||||
class AleatoireMode(object):
|
class AleatoireMode(object):
|
||||||
"""Game mode created by Metacity and balanced by woffle."""
|
"""Game mode created by Metacity and balanced by woffle."""
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.SHARPSHOOTER_CHANCE = 1 # SHAMAN , CRAZED SHAMAN
|
self.SHARPSHOOTER_CHANCE = 1
|
||||||
|
# SHAMAN , CRAZED SHAMAN
|
||||||
self.TOTEM_CHANCES = { "death": ( 4/20 , 1/15 ),
|
self.TOTEM_CHANCES = { "death": ( 4/20 , 1/15 ),
|
||||||
"protection": ( 8/20 , 1/15 ),
|
"protection": ( 8/20 , 1/15 ),
|
||||||
"silence": ( 2/20 , 1/15 ),
|
"silence": ( 2/20 , 1/15 ),
|
||||||
@ -795,7 +796,7 @@ def update_game_stats(gamemode, size, winner):
|
|||||||
vwins += 1
|
vwins += 1
|
||||||
elif winner == "monsters":
|
elif winner == "monsters":
|
||||||
mwins += 1
|
mwins += 1
|
||||||
elif winner == "fool":
|
elif winner.startswith("@"):
|
||||||
fwins += 1
|
fwins += 1
|
||||||
total += 1
|
total += 1
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user