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

184 lines
5.5 KiB
Plaintext

[gd_scene load_steps=3 format=3]
[ext_resource type="Script" path="res://Game/Presentation/Battle/Scripts/BattleController.gd" id="1_0xwme"]
[ext_resource type="Script" path="res://Game/Presentation/Battle/Scripts/EnemyIntentView.gd" id="2_o50r6"]
[node name="BattleScene" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_0xwme")
[node name="Background" type="ColorRect" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0.09, 0.1, 0.14, 1)
[node name="RootLayout" type="VBoxContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 16.0
offset_top = 10.0
offset_right = -16.0
offset_bottom = -10.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/separation = 10
[node name="TopHUD" type="HBoxContainer" parent="RootLayout"]
layout_mode = 2
theme_override_constants/separation = 14
[node name="TurnLabel" type="Label" parent="RootLayout/TopHUD"]
layout_mode = 2
text = "回合 1"
[node name="EnergyLabel" type="Label" parent="RootLayout/TopHUD"]
layout_mode = 2
text = "能量 3/3"
[node name="PhaseLabel" type="Label" parent="RootLayout/TopHUD"]
layout_mode = 2
text = "阶段 抽牌阶段"
[node name="StatusLabel" type="Label" parent="RootLayout/TopHUD"]
layout_mode = 2
size_flags_horizontal = 3
text = "正在准备战斗..."
[node name="EndTurnButton" type="Button" parent="RootLayout/TopHUD"]
layout_mode = 2
text = "结束回合"
[node name="BattleRow" type="HBoxContainer" parent="RootLayout"]
layout_mode = 2
size_flags_vertical = 3
theme_override_constants/separation = 16
[node name="PlayerPanel" type="PanelContainer" parent="RootLayout/BattleRow"]
custom_minimum_size = Vector2(240, 0)
layout_mode = 2
size_flags_vertical = 3
[node name="PlayerBody" type="VBoxContainer" parent="RootLayout/BattleRow/PlayerPanel"]
layout_mode = 2
theme_override_constants/separation = 4
[node name="PlayerTitle" type="Label" parent="RootLayout/BattleRow/PlayerPanel/PlayerBody"]
layout_mode = 2
text = "玩家"
[node name="PlayerPortrait" type="ColorRect" parent="RootLayout/BattleRow/PlayerPanel/PlayerBody"]
custom_minimum_size = Vector2(0, 130)
layout_mode = 2
color = Color(0.2, 0.3, 0.45, 1)
[node name="PlayerHp" type="Label" parent="RootLayout/BattleRow/PlayerPanel/PlayerBody"]
layout_mode = 2
text = "生命 50/50"
[node name="PlayerBlock" type="Label" parent="RootLayout/BattleRow/PlayerPanel/PlayerBody"]
layout_mode = 2
text = "格挡 0"
[node name="PlayerStrength" type="Label" parent="RootLayout/BattleRow/PlayerPanel/PlayerBody"]
layout_mode = 2
text = "力量 0"
[node name="PlayerWeak" type="Label" parent="RootLayout/BattleRow/PlayerPanel/PlayerBody"]
layout_mode = 2
text = "虚弱 0"
[node name="PlayerBuffs" type="Label" parent="RootLayout/BattleRow/PlayerPanel/PlayerBody"]
layout_mode = 2
text = "Buff -"
autowrap_mode = 2
[node name="CenterGap" type="Control" parent="RootLayout/BattleRow"]
layout_mode = 2
size_flags_horizontal = 3
[node name="EnemyPanel" type="PanelContainer" parent="RootLayout/BattleRow"]
custom_minimum_size = Vector2(260, 0)
layout_mode = 2
size_flags_vertical = 3
[node name="EnemyBody" type="VBoxContainer" parent="RootLayout/BattleRow/EnemyPanel"]
layout_mode = 2
theme_override_constants/separation = 4
[node name="EnemyTitle" type="Label" parent="RootLayout/BattleRow/EnemyPanel/EnemyBody"]
layout_mode = 2
text = "敌人"
[node name="EnemyPortrait" type="ColorRect" parent="RootLayout/BattleRow/EnemyPanel/EnemyBody"]
custom_minimum_size = Vector2(0, 130)
layout_mode = 2
color = Color(0.47, 0.2, 0.22, 1)
[node name="EnemyIntent" type="HBoxContainer" parent="RootLayout/BattleRow/EnemyPanel/EnemyBody"]
layout_mode = 2
script = ExtResource("2_o50r6")
[node name="IntentIcon" type="ColorRect" parent="RootLayout/BattleRow/EnemyPanel/EnemyBody/EnemyIntent"]
custom_minimum_size = Vector2(18, 18)
layout_mode = 2
color = Color(0.8, 0.2, 0.2, 1)
[node name="IntentCode" type="Label" parent="RootLayout/BattleRow/EnemyPanel/EnemyBody/EnemyIntent"]
layout_mode = 2
text = "攻"
[node name="IntentValue" type="Label" parent="RootLayout/BattleRow/EnemyPanel/EnemyBody/EnemyIntent"]
layout_mode = 2
text = "6"
[node name="EnemyHp" type="Label" parent="RootLayout/BattleRow/EnemyPanel/EnemyBody"]
layout_mode = 2
text = "生命 45/45"
[node name="EnemyBlock" type="Label" parent="RootLayout/BattleRow/EnemyPanel/EnemyBody"]
layout_mode = 2
text = "格挡 0"
[node name="EnemyStrength" type="Label" parent="RootLayout/BattleRow/EnemyPanel/EnemyBody"]
layout_mode = 2
text = "力量 0"
[node name="EnemyWeak" type="Label" parent="RootLayout/BattleRow/EnemyPanel/EnemyBody"]
layout_mode = 2
text = "虚弱 0"
[node name="EnemyBuffs" type="Label" parent="RootLayout/BattleRow/EnemyPanel/EnemyBody"]
layout_mode = 2
text = "Buff -"
autowrap_mode = 2
[node name="EnemyTargetButton" type="Button" parent="RootLayout/BattleRow/EnemyPanel/EnemyBody"]
layout_mode = 2
text = "选择敌人"
[node name="HandPanel" type="PanelContainer" parent="RootLayout"]
custom_minimum_size = Vector2(0, 260)
layout_mode = 2
[node name="HandBody" type="VBoxContainer" parent="RootLayout/HandPanel"]
layout_mode = 2
[node name="HandTitle" type="Label" parent="RootLayout/HandPanel/HandBody"]
layout_mode = 2
text = "手牌"
[node name="HandCards" type="HBoxContainer" parent="RootLayout/HandPanel/HandBody"]
layout_mode = 2
theme_override_constants/separation = 10