- 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.
20 lines
416 B
GDScript
20 lines
416 B
GDScript
class_name BattleEventTask
|
|
extends RefCounted
|
|
|
|
var event_type: String = ""
|
|
var payload: Dictionary = {}
|
|
var chain_id: int = 0
|
|
var queue_index: int = -1
|
|
var producer: String = ""
|
|
|
|
func _init(
|
|
p_event_type: String = "",
|
|
p_payload: Dictionary = {},
|
|
p_chain_id: int = 0,
|
|
p_producer: String = ""
|
|
) -> void:
|
|
event_type = p_event_type
|
|
payload = p_payload.duplicate(true)
|
|
chain_id = p_chain_id
|
|
producer = p_producer
|