28 lines
810 B
GDScript
28 lines
810 B
GDScript
class_name KingsSquireCard extends Card
|
|
|
|
func _init():
|
|
super._init()
|
|
# id = Utils.generate_guid()
|
|
cardName = "Kings' Squire"
|
|
rank = Rank.RANK_2
|
|
effectType = EffectType.MOVEMENT_MODIFIER
|
|
description = "Attached Pawn can move and capture in any direction"
|
|
duration = 1 # Lasts for 2 turns
|
|
unitWhitelist = ["Pawn"]
|
|
is_default = false
|
|
# current_movement_string = "mWmFcfF"
|
|
|
|
|
|
func apply_effect(target_piece = null, board_flow = null, game_state = null):
|
|
if !super.apply_effect(target_piece, board_flow, game_state):
|
|
return false
|
|
|
|
attached_piece = target_piece
|
|
attached_piece.current_movement_string = "WF"
|
|
return true
|
|
|
|
|
|
func reset():
|
|
super.reset()
|
|
remaining_turns = duration
|
|
attached_piece.reset_current_movement_string()
|