Prophet QOL improvements
- Redo prophet messages so that they don't split into multiple lines - If prophet never reveals, don't bother making them pray twice - Split prophet messages into different messages based on reveal setting instead of putting it together piecemeal -- this allows for easier customization/translation down the road.
This commit is contained in:
parent
00e976d1e0
commit
c4cfbfca83
@ -658,9 +658,9 @@
|
||||
"shaman_turn": "With your mind finally free of distraction, you apply your mastery of the dark arts towards making new potent totems, the likes of which you have never even dreamed of before. Right as you finish, the moonlight filters into the room. You grin at it and know instinctively what to do, transforming into a fearsome werewolf. You let loose a howl, then grab your new totem as you set off into the night.",
|
||||
"no_longer_entranced": "You are no longer entranced.",
|
||||
"doomsayer_notify": "You are a \u0002doomsayer\u0002. You can see how bad luck will befall someone at night by using \"see <nick>\" on them. You may also use \"kill <nick>\" to kill a villager.",
|
||||
"prophet_chance_1": "The first time each night you use your ability, you risk a {0}% chance of having your identity revealed to that person. If your identity is revealed this way, you cannot use your ability again that night. ",
|
||||
"prophet_chance_2": "The second time each night you use your ability, you risk a {0}% chance of having your identity revealed to that person. ",
|
||||
"prophet_notify": "You are a \u0002prophet\u0002. Each night you may pray up to twice to learn who has a particular role. The first time, you are given a list of players. The second time, you are given the exact player name. {0}Use \"pray <role>\" in PM to learn who has that role.",
|
||||
"prophet_notify_both": "You are a \u0002prophet\u0002. Each night you may pray up to twice to learn one player who has a particular role. The first time, you are given a list of players and have a{0} {1}% chance of revealing yourself to someone with that role. If you did not reveal yourself, you may pray again to obtain the exact player name with a{2} {3}% chance of revealing yourself. Use \"pray <role>\" in PM to learn who has that role.",
|
||||
"prophet_notify_second": "You are a \u0002prophet\u0002. Each night you may pray up to twice to learn one player who has a particular role. The first time, you are given a list of players with that role. You may pray again to obtain the exact player name, however this has a{2} {3}% chance of revealing yourself to that player. Use \"pray <role>\" in PM to learn who has that role.",
|
||||
"prophet_notify_none": "You are a \u0002prophet\u0002. Each night you may pray to learn one player who has a particular role. Use \"pray <role>\" in PM to learn who has that role.",
|
||||
"prophet_simple": "You are a \u0002prophet\u0002.",
|
||||
"dullahan_targets_dead": "All your targets are already dead!",
|
||||
"dullahan_notify": "You are a \u0002dullahan\u0002. Every night, you may kill someone by using \"kill <nick>\". You win when all your targets are dead.",
|
||||
|
@ -5674,7 +5674,6 @@ def pray(cli, nick, chan, rest):
|
||||
valid_roles = set(r for r, p in var.ROLES.items() if p) | set(r for p, r in var.AMNESIAC_ROLES.items() if p in pl)
|
||||
|
||||
if role in valid_roles:
|
||||
# looking for a specific role, as opposed to whatever we decide to randomly give them
|
||||
# this sees through amnesiac, so the amnesiac's final role counts as their role
|
||||
# also, if we're the only person with that role, say so and don't allow a second vision
|
||||
people = set(var.ROLES[role]) | set(p for p, r in var.AMNESIAC_ROLES.items() if p in pl and r == role)
|
||||
@ -5703,7 +5702,9 @@ def pray(cli, nick, chan, rest):
|
||||
if target not in half:
|
||||
half[0] = target
|
||||
random.shuffle(half)
|
||||
if len(half) > 1:
|
||||
# if prophet never reveals, there is no point making them pray twice,
|
||||
# so just give them the player the first time around
|
||||
if len(half) > 1 and (var.PROPHET_REVEALED_CHANCE[0] > 0 or var.PROPHET_REVEALED_CHANCE[1] > 0):
|
||||
msg = messages["vision_players"].format(role)
|
||||
if len(half) > 2:
|
||||
msg += "{0}, and {1}.".format(", ".join(half[:-1]), half[-1])
|
||||
@ -5717,6 +5718,7 @@ def pray(cli, nick, chan, rest):
|
||||
var.PRAYED[nick][0] = 2
|
||||
else:
|
||||
# only one, go straight to second chance
|
||||
var.PRAYED[nick][0] = 2
|
||||
pm(cli, nick, messages["vision_role"].format(target, role))
|
||||
debuglog("{0} ({1}) PRAY {2} ({3}) - FULL".format(nick, var.get_role(nick), role, target))
|
||||
if random.random() < var.PROPHET_REVEALED_CHANCE[1]:
|
||||
@ -6871,13 +6873,15 @@ def transition_night(cli):
|
||||
for pht in var.ROLES["prophet"]:
|
||||
chance1 = math.floor(var.PROPHET_REVEALED_CHANCE[0] * 100)
|
||||
chance2 = math.floor(var.PROPHET_REVEALED_CHANCE[1] * 100)
|
||||
warning = ""
|
||||
if chance1 > 0:
|
||||
warning = messages["prophet_chance_1"].format(chance1)
|
||||
if chance2 > 0:
|
||||
warning += messages["prophet_chance_2"].format(chance2).format(chance2)
|
||||
an1 = "n" if chance1 >= 80 and chance1 < 90 else ""
|
||||
an2 = "n" if chance2 >= 80 and chance2 < 90 else ""
|
||||
if pht in var.PLAYERS and not is_user_simple(pht):
|
||||
pm(cli, pht, messages["prophet_notify"].format(warning))
|
||||
if chance1 > 0:
|
||||
pm(cli, pht, messages["prophet_notify_both"].format(an1, chance1, an2, chance2))
|
||||
elif chance2 > 0:
|
||||
pm(cli, pht, messages["prophet_notify_second"].format(an2, chance2))
|
||||
else:
|
||||
pm(cli, pht, messages["prophet_notify_none"])
|
||||
else:
|
||||
pm(cli, pht, messages["prophet_simple"])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user