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

@@ -96,36 +96,53 @@ func is_attack_phase() -> bool:
## Get cards drawn this turn (2 normally, 1 on first turn for first player)
func get_draw_count() -> int:
if is_first_turn and current_player_index == 0:
if is_first_turn:
return 1
return 2
## Attack phase state management
## Start attack declaration
func start_attack_declaration() -> void:
## Start attack declaration (only valid from PREPARATION)
func start_attack_declaration() -> bool:
if attack_step != Enums.AttackStep.PREPARATION:
return false
attack_step = Enums.AttackStep.DECLARATION
return true
## Set the attacking forward
func set_attacker(attacker: CardInstance) -> void:
## Set the attacking forward (only valid from DECLARATION)
func set_attacker(attacker: CardInstance) -> bool:
if attack_step != Enums.AttackStep.DECLARATION:
return false
if attacker == null:
return false
current_attacker = attacker
attack_step = Enums.AttackStep.BLOCK_DECLARATION
return true
## Set the blocking forward (or null for no block)
func set_blocker(blocker: CardInstance) -> void:
current_blocker = blocker
## Set the blocking forward (or null for no block) - only valid from BLOCK_DECLARATION
func set_blocker(blocker: CardInstance) -> bool:
if attack_step != Enums.AttackStep.BLOCK_DECLARATION:
return false
current_blocker = blocker # null is valid (no block)
attack_step = Enums.AttackStep.DAMAGE_RESOLUTION
return true
## Complete the current attack
func complete_attack() -> void:
## Complete the current attack (only valid from DAMAGE_RESOLUTION)
func complete_attack() -> bool:
if attack_step != Enums.AttackStep.DAMAGE_RESOLUTION:
return false
current_attacker = null
current_blocker = null
attack_step = Enums.AttackStep.DECLARATION
return true
## End the attack phase (no more attacks)
func end_attack_phase() -> void:
## End the attack phase (no more attacks) - only valid from DECLARATION
func end_attack_phase() -> bool:
if attack_step != Enums.AttackStep.DECLARATION and attack_step != Enums.AttackStep.PREPARATION:
return false
_reset_attack_state()
advance_phase()
return true
## Get current phase as string
func get_phase_string() -> String: