-
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.
Add Hunter (Thợ săn) character (#143)
* Add hunter document * Handle Hunter code * Add hunter test cases --------- Co-authored-by: HUYPC\Huy Bui <[email protected]>
- Loading branch information
Showing
18 changed files
with
577 additions
and
17 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,19 @@ | ||
from game.roles.villager import Villager | ||
|
||
|
||
class Hunter(Villager): | ||
''' Hunter is basic Villager with ability to kill anyone on his death (die with him) ''' | ||
|
||
def __init__(self, interface, player_id, player_name): | ||
super().__init__(interface, player_id, player_name) | ||
self.hunted_target = None | ||
|
||
async def on_action(self, embed_data): | ||
await self.interface.send_action_text_to_channel("hunter_before_voting_text", self.channel_name) | ||
await self.interface.send_embed_to_channel(embed_data, self.channel_name) | ||
|
||
def get_hunted_target(self): | ||
return self.hunted_target | ||
|
||
def set_hunted_target(self, hunted): | ||
self.hunted_target = hunted |
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
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,74 @@ | ||
{ | ||
"name": "Hunter die together by kill", | ||
"player_list": { | ||
"w1": "Werewolf", | ||
"s1": "Seer", | ||
"h1": "Hunter", | ||
"c1": "Cupid", | ||
"sw1": "Superwolf", | ||
"wi1": "Witch" | ||
}, | ||
"timeline": [ | ||
{ | ||
"time": "day1", | ||
"alive": [ | ||
"w1", | ||
"h1", | ||
"c1", | ||
"sw1", | ||
"wi1", | ||
"s1" | ||
], | ||
"action": [ | ||
"w1 vote h1", | ||
"h1 vote w1", | ||
"c1 ship h1 s1", | ||
"sw1 vote c1", | ||
"wi1 vote sw1" | ||
] | ||
}, | ||
{ | ||
"time": "night1", | ||
"alive": [ | ||
"w1", | ||
"s1", | ||
"h1", | ||
"c1", | ||
"wi1", | ||
"sw1" | ||
], | ||
"action": [ | ||
"w1 kill wi1", | ||
"s1 seer h1", | ||
"h1 hunt c1" | ||
] | ||
}, | ||
{ | ||
"time": "day2", | ||
"alive": [ | ||
"w1", | ||
"s1", | ||
"h1", | ||
"c1", | ||
"sw1" | ||
], | ||
"action": [ | ||
"w1 vote sw1", | ||
"c1 vote sw1" | ||
] | ||
}, | ||
{ | ||
"time": "night2", | ||
"alive": [ | ||
"w1", | ||
"s1", | ||
"h1", | ||
"c1" | ||
], | ||
"action": [ | ||
"w1 kill s1" | ||
] | ||
} | ||
], | ||
"win": "Werewolf" | ||
} |
Oops, something went wrong.