Files
54shitaimzf e465f1cbb0 feat: 基础卡牌场景与卡牌逻辑可扩展框架,以及todo文档
- Added BattleState class to manage battle flow, including turn management and event handling.
- Introduced BuffInstance class to represent buffs applied to combatants.
- Created CardInstance class to handle card definitions and cost calculations.
- Developed CombatantState class to manage combatant attributes and actions.
- Implemented EffectRegistry to apply effects based on event specifications.
- Added various handlers (BlockHandler, DamageHandler, DrawHandler, etc.) to process specific events.
- Created IntentPlanner and IntentState classes to manage enemy actions and intents.
- Established a queue system for handling battle events with BattleEventQueue and BattleEventTask.
- Introduced triggers for applying effects based on game events (e.g., OnCardDrawnGainBlockTrigger).
- Added necessary UID files for new scripts to ensure proper resource management.
2026-04-22 21:58:15 +08:00

28 lines
710 B
GDScript

class_name DebugLogger
extends RefCounted
static var enabled: bool = true
static func info(tag: String, msg: String) -> void:
if not enabled:
return
print("[DBG][%s] %s" % [tag, msg])
static func warn(tag: String, msg: String) -> void:
if not enabled:
return
push_warning("[DBG][%s] %s" % [tag, msg])
static func error(tag: String, msg: String) -> void:
if not enabled:
return
push_error("[DBG][%s] %s" % [tag, msg])
static func event(tag: String, event_type: String, payload: Dictionary) -> void:
if not enabled:
return
var payload_text := "{}"
if not payload.is_empty():
payload_text = JSON.stringify(payload)
print("[DBG][%s] event=%s payload=%s" % [tag, event_type, payload_text])