I don't know if this is supposed to be that way but if you have the Confusing Staff, it is activated again every time a card a drawn with "trickster".
I found a simple fix but I don't know if it's the cleanest solution...
In player_handler.gd, I changed the following like this :
Basically, draw_cards won't call player_hand_drawn signal now but draw_cards_start_of_turn will!
func draw_cards(amount: int) -> void:
var tween := create_tween()
for i in range(amount):
tween.tween_callback(draw_card)
tween.tween_interval(HAND_DRAW_INTERVAL)
func draw_cards_start_of_turn(amount: int) -> void:
var tween := create_tween()
for i in range(amount):
tween.tween_callback(draw_card)
tween.tween_interval(HAND_DRAW_INTERVAL)
tween.finished.connect(
func(): Events.player_hand_drawn.emit()
)
and changed draw_cards to draw_cards_start_of_turn in _on_statuses_applied.
Hope that helps!
PS: another way to fix is to add a bool is_start_of_turn in the draw_cards function and to only emit the signal if the bool is true...
Pass in a boolean variable to the draw_cards() method which is false by default. Then, we only emit the hand_drawn signal when that boolean is true. Finally, we call draw_cards() with a true boolean parameter after the start of turn status were applied.
Hi again,
I don't know if this is supposed to be that way but if you have the Confusing Staff, it is activated again every time a card a drawn with "trickster".
I found a simple fix but I don't know if it's the cleanest solution...
In player_handler.gd, I changed the following like this : Basically, draw_cards won't call player_hand_drawn signal now but draw_cards_start_of_turn will!
and changed draw_cards to draw_cards_start_of_turn in _on_statuses_applied.
Hope that helps!
PS: another way to fix is to add a bool is_start_of_turn in the draw_cards function and to only emit the signal if the bool is true...