Additional fixes
Fix issue introduced in last commit where regular gunners didn't get bullets. Fix wolves ending night when angry with only one target selected. Closes #28
This commit is contained in:
parent
32312ed2d6
commit
736d5f572e
@ -2165,9 +2165,9 @@ def chk_nightdone(cli):
|
||||
else:
|
||||
kills.add(ls)
|
||||
# check if wolves are actually agreeing
|
||||
if not var.ANGRY_WOLVES and len(kills) > 1:
|
||||
if not var.ANGRY_WOLVES and len(kills) != 1:
|
||||
return
|
||||
elif var.ANGRY_WOLVES and len(kills) > 2:
|
||||
elif var.ANGRY_WOLVES and len(kills) != 2:
|
||||
return
|
||||
|
||||
for x, t in var.TIMERS.items():
|
||||
@ -3448,12 +3448,12 @@ def transition_night(cli):
|
||||
random.shuffle(pl)
|
||||
pl.remove(wolf) # remove self from list
|
||||
for i, player in enumerate(pl):
|
||||
role = var.get_role(player)
|
||||
if role in var.WOLFCHAT_ROLES:
|
||||
prole = var.get_role(player)
|
||||
if prole in var.WOLFCHAT_ROLES:
|
||||
cursed = ""
|
||||
if player in var.ROLES["cursed villager"]:
|
||||
cursed = "cursed "
|
||||
pl[i] = "\u0002{0}\u0002 ({1}{2})".format(player, cursed, role)
|
||||
pl[i] = "\u0002{0}\u0002 ({1}{2})".format(player, cursed, prole)
|
||||
elif player in var.ROLES["cursed villager"]:
|
||||
pl[i] = player + " (cursed)"
|
||||
|
||||
@ -3947,10 +3947,9 @@ def start(cli, nick, chann_, rest):
|
||||
gunner_list = copy.copy(var.ROLES["gunner"])
|
||||
num_sharpshooters = 0
|
||||
for gunner in gunner_list:
|
||||
if num_sharpshooters < addroles["sharpshooter"]:
|
||||
if gunner in var.ROLES["village drunk"]:
|
||||
var.GUNNERS[gunner] = (var.DRUNK_SHOTS_MULTIPLIER * math.ceil(var.SHOTS_MULTIPLIER * len(pl)))
|
||||
elif gunner not in cannot_be_sharpshooter and random.random() <= var.SHARPSHOOTER_CHANCE:
|
||||
elif num_sharpshooters < addroles["sharpshooter"] and gunner not in cannot_be_sharpshooter and random.random() <= var.SHARPSHOOTER_CHANCE:
|
||||
var.GUNNERS[gunner] = math.ceil(var.SHARPSHOOTER_MULTIPLIER * len(pl))
|
||||
var.ROLES["gunner"].remove(gunner)
|
||||
var.ROLES["sharpshooter"].append(gunner)
|
||||
|
Loading…
Reference in New Issue
Block a user