More ghost fixes with assistance from jacob1
- A ghost driven away by retribution totem can now get team wins if their team wins, but will not get individual wins. They used to unconditionally lose. - Make it so ghosts driven away by retribution totem are no longer messaged and are no longer able to kill.
This commit is contained in:
parent
3f990a22ec
commit
b490d91f7a
@ -1621,9 +1621,16 @@ def stop_game(cli, winner = ""):
|
|||||||
elif splr in var.VENGEFUL_GHOSTS and var.VENGEFUL_GHOSTS[splr] == "villagers" and winner == "wolves":
|
elif splr in var.VENGEFUL_GHOSTS and var.VENGEFUL_GHOSTS[splr] == "villagers" and winner == "wolves":
|
||||||
won = True
|
won = True
|
||||||
iwon = True
|
iwon = True
|
||||||
|
elif splr in var.VENGEFUL_GHOSTS and var.VENGEFUL_GHOSTS[splr] == "!villagers" and winner == "wolves":
|
||||||
|
# Starts with ! if they were driven off by retribution totem
|
||||||
|
won = True
|
||||||
|
iwon = False
|
||||||
elif splr in var.VENGEFUL_GHOSTS and var.VENGEFUL_GHOSTS[splr] == "wolves" and winner == "villagers":
|
elif splr in var.VENGEFUL_GHOSTS and var.VENGEFUL_GHOSTS[splr] == "wolves" and winner == "villagers":
|
||||||
won = True
|
won = True
|
||||||
iwon = True
|
iwon = True
|
||||||
|
elif splr in var.VENGEFUL_GHOSTS and var.VENGEFUL_GHOSTS[splr] == "!wolves" and winner == "villagers":
|
||||||
|
won = True
|
||||||
|
iwon = False
|
||||||
else:
|
else:
|
||||||
won = False
|
won = False
|
||||||
iwon = False
|
iwon = False
|
||||||
@ -2770,6 +2777,8 @@ def transition_day(cli, gameid=0):
|
|||||||
for wolf in wolves:
|
for wolf in wolves:
|
||||||
villagers.remove(wolf)
|
villagers.remove(wolf)
|
||||||
for ghost, target in var.VENGEFUL_GHOSTS.items():
|
for ghost, target in var.VENGEFUL_GHOSTS.items():
|
||||||
|
if target[0] == "!":
|
||||||
|
continue
|
||||||
if ghost not in var.OTHER_KILLS:
|
if ghost not in var.OTHER_KILLS:
|
||||||
if target == "wolves":
|
if target == "wolves":
|
||||||
var.OTHER_KILLS[ghost] = random.choice(wolves)
|
var.OTHER_KILLS[ghost] = random.choice(wolves)
|
||||||
@ -3825,6 +3834,9 @@ def kill(cli, nick, chan, rest):
|
|||||||
return # they do this a lot.
|
return # they do this a lot.
|
||||||
if role not in wolfroles + ["hunter"] and nick not in var.VENGEFUL_GHOSTS.keys():
|
if role not in wolfroles + ["hunter"] and nick not in var.VENGEFUL_GHOSTS.keys():
|
||||||
return
|
return
|
||||||
|
if nick in var.VENGEFUL_GHOSTS.keys() and var.VENGEFUL_GHOSTS[nick][0] == "!":
|
||||||
|
# ghost was driven away by retribution
|
||||||
|
return
|
||||||
if var.PHASE != "night":
|
if var.PHASE != "night":
|
||||||
pm(cli, nick, "You may only kill people at night.")
|
pm(cli, nick, "You may only kill people at night.")
|
||||||
return
|
return
|
||||||
@ -5102,6 +5114,8 @@ def transition_night(cli):
|
|||||||
pm(cli, lycan, "You are a \u0002lycan\u0002.")
|
pm(cli, lycan, "You are a \u0002lycan\u0002.")
|
||||||
|
|
||||||
for v_ghost, who in var.VENGEFUL_GHOSTS.items():
|
for v_ghost, who in var.VENGEFUL_GHOSTS.items():
|
||||||
|
if who[0] == "!":
|
||||||
|
continue
|
||||||
wolves = var.list_players(var.WOLFTEAM_ROLES)
|
wolves = var.list_players(var.WOLFTEAM_ROLES)
|
||||||
if who == "wolves":
|
if who == "wolves":
|
||||||
pl = wolves
|
pl = wolves
|
||||||
|
Loading…
x
Reference in New Issue
Block a user