22 lines
621 B
GDScript
22 lines
621 B
GDScript
class DoubleTimeCard extends Card:
|
|
func _init():
|
|
super._init()
|
|
card_name = "Double Time"
|
|
rank = Rank.RANK_2
|
|
effect_type = EffectType.MOVEMENT_MODIFIER
|
|
description = "Piece can move twice in one turn"
|
|
duration = 2 # Lasts for 2 turns
|
|
|
|
func modify_moves() -> Dictionary:
|
|
return {
|
|
"extra_moves": 1,
|
|
"move_multiplier": 1
|
|
}
|
|
|
|
func apply_effect(target_piece = null, board_flow = null, game_state = null):
|
|
if !super.apply_effect(target_piece, board_flow, game_state):
|
|
return false
|
|
|
|
# Logic to allow second move would be implemented in Game.gd
|
|
attached_piece = target_piece
|
|
return true
|