-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* create help text * add Harlot text template * add testcases for Harlot * create + add action Harlot roles class * generate Harlot role
- Loading branch information
1 parent
64f58c0
commit b358aea
Showing
24 changed files
with
1,056 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import text_templates | ||
from game.roles.villager import Villager | ||
|
||
|
||
class Harlot(Villager): | ||
def __init__(self, interface, player_id, player_name): | ||
super().__init__(interface, player_id, player_name) | ||
self.yesterday_target = None | ||
|
||
async def on_day(self): | ||
self.yesterday_target = self.target | ||
self.target = None | ||
|
||
async def on_night_start(self, alive_embed_data, _): | ||
if self.is_alive(): | ||
await self.interface.send_action_text_to_channel("harlot_before_voting_text", self.channel_name) | ||
await self.interface.send_embed_to_channel(alive_embed_data, self.channel_name) | ||
|
||
def is_yesterday_target(self, target_id): | ||
return self.yesterday_target == target_id | ||
|
||
def generate_invalid_target_text(self, target_id): | ||
if self.is_yesterday_target(target_id): | ||
return text_templates.generate_text("invalid_harlot_yesterday_target_text") | ||
|
||
return "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ | |
"Betrayer": -2, | ||
"Cupid": -3, | ||
"Cursed": -3, | ||
"Harlot": -3, | ||
"Rat": -4, | ||
"Werewolf": -5, | ||
"Superwolf": -6 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.