- 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.
21 lines
385 B
GDScript
21 lines
385 B
GDScript
class_name BattlePhase
|
|
extends RefCounted
|
|
|
|
const PLAYER_DRAW: int = 0
|
|
const PLAYER_PLAY: int = 1
|
|
const PLAYER_END: int = 2
|
|
const ENEMY: int = 3
|
|
|
|
static func to_text(phase: int) -> String:
|
|
match phase:
|
|
PLAYER_DRAW:
|
|
return "抽牌阶段"
|
|
PLAYER_PLAY:
|
|
return "出牌阶段"
|
|
PLAYER_END:
|
|
return "结束阶段"
|
|
ENEMY:
|
|
return "敌方阶段"
|
|
_:
|
|
return "未知阶段"
|