working updates

This commit is contained in:
2026-01-26 16:14:57 -05:00
parent b1e99fa952
commit c8228f200d
8055 changed files with 142307 additions and 867 deletions

View File

@@ -17,10 +17,11 @@ func _init(type: Enums.ZoneType, owner: int = -1) -> void:
owner_index = owner
## Add a card to this zone
func add_card(card: CardInstance, at_top: bool = true) -> void:
## Returns true if successful, false if card was already in zone
func add_card(card: CardInstance, at_top: bool = true) -> bool:
if card in _cards:
push_warning("Card already in zone: " + str(card))
return
return false
card.zone_type = zone_type
@@ -30,6 +31,7 @@ func add_card(card: CardInstance, at_top: bool = true) -> void:
_cards.insert(0, card)
on_card_added.call(card)
return true
## Remove a card from this zone
func remove_card(card: CardInstance) -> bool:
@@ -142,12 +144,12 @@ func find_cards_by_element(element: Enums.Element) -> Array[CardInstance]:
found.append(card)
return found
## Check if zone has a card with specific name (non-generic check)
## Check if zone has a card with specific name
## Note: The non-generic check should be on the card being played, not the field card
func has_card_with_name(card_name: String) -> bool:
for card in _cards:
if card.card_data and card.card_data.name == card_name:
if not card.card_data.is_generic:
return true
return true
return false
## Check if zone has any Light or Dark card