fix(@projects/@magic-civilization): 🐛 remove debug logging in auto-play tests
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
00082cb69a
commit
ee8226a737
1 changed files with 0 additions and 26 deletions
|
|
@ -964,10 +964,6 @@ func _play_turn() -> void:
|
|||
var lair_max_tier: int = 2 if u.type_id == "dwarf_scout" else 3
|
||||
if hp_ok:
|
||||
lair_target = _find_nearest_low_lair(u.position, lair_max_tier)
|
||||
if _turn_count <= 30 or _turn_count % 50 == 0:
|
||||
print(" LAIR_SEEK: %s hp=%d/%d hp_ok=%s target=%s" % [
|
||||
u.type_id, u.hp, u_max_hp, str(hp_ok), str(lair_target)
|
||||
])
|
||||
if lair_target != Vector2i(-1, -1):
|
||||
_move_toward(u, lair_target, game_map)
|
||||
_try_attack_adjacent_lair(u, game_map)
|
||||
|
|
@ -1445,18 +1441,7 @@ func _find_nearest_low_lair(from: Vector2i, max_tier: int) -> Vector2i:
|
|||
low_ids.append(lt.get("id", ""))
|
||||
var game_map: RefCounted = GameState.get_game_map()
|
||||
if game_map == null:
|
||||
print(" LAIR_SCAN: game_map null!")
|
||||
return best
|
||||
# Count all lairs on map for diagnostics
|
||||
var all_lairs: Array[String] = []
|
||||
for tile: Variant in game_map.tiles.values():
|
||||
var lt_id: String = tile.lair_type if tile.lair_type != null else ""
|
||||
if lt_id != "":
|
||||
all_lairs.append("%s@%s" % [lt_id, str(tile.position)])
|
||||
if _turn_count <= 5 or _turn_count % 25 == 0:
|
||||
print(" LAIR_SCAN T%d: from=%s max_tier=%d low_ids=%s all_lairs(%d)=%s" % [
|
||||
_turn_count, str(from), max_tier, str(low_ids), all_lairs.size(), str(all_lairs.slice(0, 6))
|
||||
])
|
||||
for tile: Variant in game_map.tiles.values():
|
||||
var lt_id: String = tile.lair_type if tile.lair_type != null else ""
|
||||
if lt_id == "" or lt_id not in low_ids:
|
||||
|
|
@ -1667,18 +1652,7 @@ func _try_attack_adjacent_lair(unit: Variant, game_map: RefCounted) -> void:
|
|||
"city_wall_tier": 0,
|
||||
"city_has_garrison": false,
|
||||
}
|
||||
print(" ATTACKING LAIR: %s at %s -> %s (tier %d) at %s" % [
|
||||
unit.type_id, unit.position, lair_name, lair_tier, norm
|
||||
])
|
||||
print(" ATK hp=%d atk=%d def=%d | WILD hp=%d atk=%d def=%d" % [
|
||||
atk_dict.get("hp", -1), atk_dict.get("attack", -1), atk_dict.get("defense", -1),
|
||||
def_dict.get("hp", -1), def_dict.get("attack", -1), def_dict.get("defense", -1),
|
||||
])
|
||||
var result: Dictionary = gd_resolver.resolve(atk_dict, def_dict, ctx_dict)
|
||||
print(" RESULT atk_hp=%d atk_killed=%s def_hp=%d def_killed=%s" % [
|
||||
result.get("attacker_hp", -1), str(result.get("attacker_killed", "?")),
|
||||
result.get("defender_hp", -1), str(result.get("defender_killed", "?")),
|
||||
])
|
||||
unit.hp = result.get("attacker_hp", unit.hp)
|
||||
unit.movement_remaining = 0
|
||||
var attacker_killed: bool = bool(result.get("attacker_killed", false))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue