20 lines
639 B
GDScript
20 lines
639 B
GDScript
class SupernovaCard extends Card:
|
|
func _init():
|
|
super._init()
|
|
card_name = "Supernova"
|
|
rank = Rank.RANK_0
|
|
effect_type = EffectType.PIECE_EFFECT
|
|
description = "Remove all abilities from enemy pieces"
|
|
unit_whitelist = ["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
|