locked preloading to rank 2 and 3

This commit is contained in:
2ManyProjects 2025-03-16 02:24:19 -05:00
parent 9c5b0e011b
commit 6035e8bb6c

View file

@ -132,6 +132,14 @@ func populateBank():
card_item.connect("card_selected", Callable(self, "_on_bank_card_selected"))
_connect_hover_signals(card_item)
static var TokenCosts = {
Card.Rank.RANK_0: 15, # Most expensive (one-time use)
Card.Rank.RANK_1: 10, # Expensive (once per match)
Card.Rank.RANK_2: 5, # Medium (multiple uses)
Card.Rank.RANK_3: 3 # Cheapest (basic cards)
}
func _on_hand_card_selected(card_slot, card):
if card:
# Remove card from deck
@ -154,6 +162,7 @@ func _on_bank_card_selected(card_item, card):
print("_on_bank_card_selected ", card.id)
# Find first empty slot in deck
var empty_slot_index = -1
if card and (card.rank == Card.Rank.RANK_2 || card.rank == Card.Rank.RANK_3):
for i in range(deckGrid.get_child_count()):
var slot = deckGrid.get_child(i)
if !slot.has_card():