21 lines
750 B
GDScript
21 lines
750 B
GDScript
class_name SupernovaCard extends Card
|
|
func _init():
|
|
super._init()
|
|
# id = Utils.generate_guid()
|
|
cardName = "Supernova"
|
|
rank = Rank.RANK_0
|
|
effectType = EffectType.PIECE_EFFECT
|
|
description = "Remove all abilities from enemy pieces"
|
|
unitWhitelist = ["King"] # Can only be used by Kings
|
|
|
|
func apply_effect(target_piece = null, board_flow = null, game_state = null):
|
|
if !super.apply_effect(target_piece, board_flow, game_state):
|
|
return false
|
|
|
|
if board_flow:
|
|
for cell in board_flow.get_children():
|
|
if cell.get_child_count() > 0:
|
|
var piece = cell.get_child(0)
|
|
if piece.Item_Color != target_piece.Item_Color:
|
|
pass
|
|
return true
|