From 7c1079d84f0552002699f29cc90b0da7bacba899 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期五, 24 十月 2025 10:17:51 +0800
Subject: [PATCH] 125 战斗 连击 追击 反击的飘字

---
 Main/System/Battle/BattleConst.cs              |   13 +++++-
 Main/System/Battle/BattleUtility.cs            |    2 
 Main/System/Battle/Skill/SkillBase.cs          |   23 +++++++++++
 Main/System/Battle/UIComp/BattleHeroInfoBar.cs |   14 +++---
 Main/System/Battle/UIComp/BattleTips.cs        |   18 ++++++++-
 5 files changed, 57 insertions(+), 13 deletions(-)

diff --git a/Main/System/Battle/BattleConst.cs b/Main/System/Battle/BattleConst.cs
index 0aabf7d..cf46127 100644
--- a/Main/System/Battle/BattleConst.cs
+++ b/Main/System/Battle/BattleConst.cs
@@ -30,6 +30,13 @@
 
     public const int BattleTotalRecoverType = 100002; // 鎬绘不鐤楃被鍨婭D
 
+    public const int BattleComboAttack = 100003; // 杩炲嚮
+
+    public const int BattleCounterAttack = 100004; // 鍙嶅嚮
+
+    public const int BattleChaseAttack = 100005; // 杩藉嚮
+
+    public const int BattleStun = 100006; // 鍑绘檿
 
     //  1000~10000涔嬮棿鐨勬垬鏂楀眰绾�
     //  闇�瑕佽�冭檻鏍规嵁UI 鐗规晥 鎴樻枟瑙掕壊涓夋柟鐨勫眰绾у叧绯�
@@ -56,7 +63,7 @@
     {
         get
         {
-            return  UnactiveHeroBackSortingOrder - 1;
+            return UnactiveHeroBackSortingOrder - 1;
         }
     }
 
@@ -157,7 +164,7 @@
     {
         get
         {
-            return ActiveHeroSortingOrder + 2;
+            return ActiveHeroSortingOrder + 10;
         }
     }
 
@@ -167,7 +174,7 @@
     {
         get
         {
-            return ActiveHeroFrontSortingOrder - 1;
+            return ActiveHeroFrontSortingOrder - 5;
         }
     }
 
diff --git a/Main/System/Battle/BattleUtility.cs b/Main/System/Battle/BattleUtility.cs
index 3a5e7ee..2f9276c 100644
--- a/Main/System/Battle/BattleUtility.cs
+++ b/Main/System/Battle/BattleUtility.cs
@@ -127,7 +127,7 @@
         return result;
     }
 
-    static string ConvertToArtFont(DamageNumConfig config, float _num)
+    public static string ConvertToArtFont(DamageNumConfig config, float _num)
     {
         var stringBuild = new System.Text.StringBuilder();
 
diff --git a/Main/System/Battle/Skill/SkillBase.cs b/Main/System/Battle/Skill/SkillBase.cs
index 57bd849..a42d02f 100644
--- a/Main/System/Battle/Skill/SkillBase.cs
+++ b/Main/System/Battle/Skill/SkillBase.cs
@@ -84,6 +84,29 @@
         TeamHero teamHero = caster.teamHero;
         EventBroadcast.Instance.Broadcast<string, SkillConfig, TeamHero>(EventName.BATTLE_CAST_SKILL, guid, skillConfig, teamHero);
 
+        if (caster != null)
+        {
+            // 鎴樻枟绫诲瀷 0-甯歌锛�1-杩炲嚮锛�2-鍙嶅嚮锛�3-杩藉嚮锛�4-瀛愭妧鑳斤紱5-琚姩瑙﹀彂鐨�
+            DamageNumConfig hintConfig = null;
+            if (tagUseSkillAttack.BattleType == 1)
+            {
+                hintConfig = DamageNumConfig.Get(BattleConst.BattleComboAttack);
+            }
+            else if (tagUseSkillAttack.BattleType == 2)
+            {
+                hintConfig = DamageNumConfig.Get(BattleConst.BattleCounterAttack);
+            }
+            else if (tagUseSkillAttack.BattleType == 3)
+            {
+                hintConfig = DamageNumConfig.Get(BattleConst.BattleChaseAttack);
+            }
+            
+            if (hintConfig != null)
+            {
+                caster.heroInfoBar.ShowTips(((char)hintConfig.prefix).ToString(), true);
+            }
+        }
+
         // 楂樹寒鎵�鏈夋湰娆℃妧鑳界浉鍏崇殑鐩爣
         HighLightAllTargets();
 
diff --git a/Main/System/Battle/UIComp/BattleHeroInfoBar.cs b/Main/System/Battle/UIComp/BattleHeroInfoBar.cs
index 87e73fe..e870384 100644
--- a/Main/System/Battle/UIComp/BattleHeroInfoBar.cs
+++ b/Main/System/Battle/UIComp/BattleHeroInfoBar.cs
@@ -20,7 +20,7 @@
 
     [SerializeField] public List<BattleBuffCell> buffCells = new List<BattleBuffCell>();
 
-    protected List<string> messages = new List<string>();
+    protected List<KeyValuePair<string, bool>> messages = new List<KeyValuePair<string, bool>>();
 
     public BasicHeroInfoContainer heroInfoContainer;
  
@@ -80,9 +80,9 @@
         }
         tipsList.Clear();
     }
-    public void ShowTips(string message)
+    public void ShowTips(string message, bool useArtText = false)
     {
-        messages.Add(message);
+        messages.Add(new KeyValuePair<string, bool>(message, useArtText));
     }
 
     public void SetActive(bool active)
@@ -90,7 +90,7 @@
         gameObject.SetActive(active);
     }
 
-    public void PopUpTipsDirectly(string message)
+    public void PopUpTipsDirectly(string message, bool useArtText = false)
     {
         GameObject prefab = textTips.gameObject;
 
@@ -98,7 +98,7 @@
 
         BattleTips tips = go.GetComponent<BattleTips>();
 
-        tips.SetText(message);
+        tips.SetText(message, useArtText);
 
         tips.OnFinish = () =>
         {
@@ -168,10 +168,10 @@
         if (messages.Count > 0 && timer >= PopUpInterval)
         {
             // 鎾斁椋樺瓧
-            string message = messages[0];
+            KeyValuePair<string, bool> message = messages[0];
             messages.RemoveAt(0);
 
-            PopUpTipsDirectly(message);
+            PopUpTipsDirectly(message.Key, message.Value);
 
             timer = 0f;
         }
diff --git a/Main/System/Battle/UIComp/BattleTips.cs b/Main/System/Battle/UIComp/BattleTips.cs
index 6457858..1243441 100644
--- a/Main/System/Battle/UIComp/BattleTips.cs
+++ b/Main/System/Battle/UIComp/BattleTips.cs
@@ -14,14 +14,28 @@
 
     public Text tipText;
 
+    public Text artText;
+
     public Action OnFinish;
 
-    public void SetText(string text)
+    public void SetText(string text, bool useArtText = false)
     {
-        tipText.text = text;
         rectTransform.anchoredPosition = Vector2.zero;
         timer = 0f;
         gameObject.SetActive(true);
+
+        if (useArtText)
+        {
+            artText.text = text;
+            tipText.gameObject.SetActive(false);
+            artText.gameObject.SetActive(true);
+        }
+        else
+        {
+            tipText.text = text;
+            artText.gameObject.SetActive(false);
+            tipText.gameObject.SetActive(true);
+        }
     }
 
 

--
Gitblit v1.8.0