forked from Nekojimi/JackIt
17 lines
666 B
GDScript3
17 lines
666 B
GDScript3
|
extends PickPlayerAction
|
||
|
class_name DesperadoNightAction
|
||
|
|
||
|
@export var prompt_guessed_correct: Prompt
|
||
|
@export var prompt_guessed_wrong: Prompt
|
||
|
|
||
|
func execute_with_target(user: WolfPlayer, target: WolfPlayer) -> bool:
|
||
|
if !super.execute_with_target(user, target):
|
||
|
return false
|
||
|
elif user.team != target.team: # guessed right
|
||
|
user.send_prompt(prompt_guessed_correct.with_context(user.get_context_dict("user_")).with_context(target.get_context_dict("target")))
|
||
|
return target.murder(user)
|
||
|
else:
|
||
|
user.send_prompt(prompt_guessed_wrong.with_context(user.get_context_dict("user_")).with_context(target.get_context_dict("target")))
|
||
|
user.murder(target)
|
||
|
return true
|