From dc7922d80c1d133b6261b8af1d521567d2c0a35d Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期四, 30 十月 2025 16:51:39 +0800
Subject: [PATCH] Merge branch 'master' of http://mobile.secondworld.net.cn:10010/r/Project_SG_scripts

---
 Main/System/Battle/Skill/SkillBase.cs |  125 ++++++++++++++++++++++++++++++++++++-----
 1 files changed, 109 insertions(+), 16 deletions(-)

diff --git a/Main/System/Battle/Skill/SkillBase.cs b/Main/System/Battle/Skill/SkillBase.cs
index 57bd849..b8c46b5 100644
--- a/Main/System/Battle/Skill/SkillBase.cs
+++ b/Main/System/Battle/Skill/SkillBase.cs
@@ -9,6 +9,13 @@
 {
     const float moveTime = 0.5f;
 
+    private static readonly Color colorGreen = new Color(33f / 255f,
+                                                        133f / 255f,
+                                                        6f / 255f);
+    private static readonly Color colorBlue = new Color(40f / 255f,
+                                                        87f / 255f,
+                                                        189f / 255f);
+
     protected SkillEffect skillEffect;
     protected HB427_tagSCUseSkill tagUseSkillAttack;
     public SkillConfig skillConfig;
@@ -23,6 +30,8 @@
     protected bool moveFinished = false;
     public int fromSkillId;
     public bool isPlay = false;
+
+    private float MoveSpeed = 750f;
 
     private Dictionary<int, BattleDrops> tempDropList = new Dictionary<int, BattleDrops>();
     private Dictionary<int, HB422_tagMCTurnFightObjDead> tempDeadPackList = new Dictionary<int, HB422_tagMCTurnFightObjDead>();
@@ -76,6 +85,44 @@
         }
     }
 
+    protected void ShadowIllutionCreate(bool create)
+    {
+        if (create)
+        {
+            Color color = Color.white;
+            //1-杩炲嚮锛�2-鍙嶅嚮锛�3-杩藉嚮
+            //  鍙嶅嚮钃濊壊
+            //  杩藉嚮杩炲嚮缁胯壊
+            bool change = false;
+            if (tagUseSkillAttack.BattleType == 1)
+            {
+                color = colorGreen;
+                change = true;
+            }
+            else if (tagUseSkillAttack.BattleType == 2)
+            {
+                color = colorBlue;
+                change = true;
+            }
+            else if (tagUseSkillAttack.BattleType == 3)
+            {
+                color = colorGreen;
+                change = true;
+            }
+            
+            if (change)
+            {
+                MoveSpeed = 1125f;
+                caster.motionBase.ShowIllusionShadow(true, color);
+            }
+        }
+        else
+        {
+            MoveSpeed = 750f;
+            caster.motionBase.ShowIllusionShadow(false);
+        }
+    }
+
     // 鎶�鑳介噴鏀句富閫昏緫锛氬箍鎾簨浠躲�侀珮浜洰鏍囥�佹墽琛岄噴鏀�
     public virtual void Cast()
     {
@@ -83,6 +130,30 @@
         string guid = battleField.guid;
         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, false, 1.25f);
+                // Debug.Break();
+            }
+        }
 
         // 楂樹寒鎵�鏈夋湰娆℃妧鑳界浉鍏崇殑鐩爣
         HighLightAllTargets();
@@ -125,7 +196,12 @@
         RectTransform target = battleField.GetTeamNode(caster.GetEnemyCamp(), skillConfig);
         ExecuteMoveAndCastSequence(target, () =>
         {
-            MoveToTarget(battleField.GetTeamNode(caster.Camp, caster.teamHero.positionNum), Vector2.zero, OnAttackFinish, 750F);
+            // ShadowIllutionCreate(true);
+            MoveToTarget(battleField.GetTeamNode(caster.Camp, caster.teamHero.positionNum), Vector2.zero, () =>
+            {
+                // ShadowIllutionCreate(false);
+                OnAttackFinish();
+            }, MoveSpeed);
         });
     }
 
@@ -146,7 +222,12 @@
         ExecuteMoveAndCastSequence(targetTrans, () =>
         {
             RectTransform rectTransform = battleField.GetTeamNode(caster.Camp, caster.teamHero.positionNum);
-            MoveToTarget(rectTransform, Vector2.zero, OnAttackFinish, 750F);
+            // ShadowIllutionCreate(true);
+            MoveToTarget(rectTransform, Vector2.zero, () =>
+            {
+                // ShadowIllutionCreate(false);
+                OnAttackFinish();
+            }, MoveSpeed);
         });
     }
 
@@ -156,17 +237,24 @@
         RectTransform target = battleField.GetTeamNode(caster.Camp, skillConfig);
         ExecuteMoveAndCastSequence(target, () =>
         {
-            MoveToTarget(battleField.GetTeamNode(caster.Camp, caster.teamHero.positionNum), Vector2.zero, OnAttackFinish, 750F);
+            // ShadowIllutionCreate(true);
+            MoveToTarget(battleField.GetTeamNode(caster.Camp, caster.teamHero.positionNum), Vector2.zero, () =>
+            {
+                // ShadowIllutionCreate(false);
+                OnAttackFinish();
+            }, MoveSpeed);
         });
     }
 
     // 鎵ц绉诲姩-鏂芥硶-杩斿洖搴忓垪锛氶�氱敤鐨勭Щ鍔ㄦ敾鍑绘祦绋�
     private void ExecuteMoveAndCastSequence(RectTransform target, Action onReturnComplete)
     {
+        ShadowIllutionCreate(true);
         MoveToTarget(target, new Vector2(skillConfig.CastDistance, 0), () =>
         {
             TurnBack(() =>
             {
+                ShadowIllutionCreate(false);
                 CastImpl(() =>
                 {
                     TurnBack(() => 
@@ -187,7 +275,7 @@
     }
 
     // 绉诲姩鍒扮洰鏍囦綅缃細澶勭悊瑙掕壊鐨勭Щ鍔ㄥ姩鐢诲拰閫昏緫
-    protected void MoveToTarget(RectTransform target, Vector2 offset, Action _onComplete = null, float speed = 500f)
+    protected void MoveToTarget(RectTransform target, Vector2 offset, Action _onComplete = null, float speed = 750f)
     {
         if (skillConfig.CastDistance >= 9999)
         {
@@ -321,7 +409,7 @@
         }
 
         battleField.battleRootNode.skillMaskNode.SetActive(true);
-        battleField.battleRootNode.SetSortingOrder();
+        // battleField.battleRootNode.SetSortingOrder();
     }
 
     // 鍛戒腑鐩爣鍥炶皟锛氬鐞嗘墍鏈夎鍛戒腑鐨勭洰鏍�
@@ -622,8 +710,8 @@
     public void OnSkillFinished()
     {
         // 淇锛氫娇鐢ㄥ惊鐜唬鏇块�掑綊锛岄伩鍏嶆爤婧㈠嚭椋庨櫓
-        try
-        {
+        // try
+        // {
             while (true)
             {
                 // 楠岃瘉鎶�鑳芥晥鏋滄槸鍚﹀畬鎴�
@@ -675,17 +763,22 @@
                 }
 
                 if (pack is CustomB421ActionPack actionPack)
+                {
                     actionPack.Distribute();
-                PackageRegedit.Distribute(pack);
+                }
+                else
+                {
+                    PackageRegedit.Distribute(pack);
+                }
             }
-        }
-        catch (Exception ex)
-        {
-            Debug.LogError($"OnSkillFinished寮傚父: {ex.Message}锛屾妧鑳絀D={skillConfig.SkillID}");
-            // 纭繚鐘舵�佷竴鑷存�э紝鍗充娇鍑虹幇寮傚父涔熻鏍囪瀹屾垚
-            isFinished = true;
-            throw; // 閲嶆柊鎶涘嚭寮傚父渚涗笂灞傚鐞�
-        }
+        // }
+        // catch (Exception ex)
+        // {
+        //     Debug.LogError($"OnSkillFinished寮傚父: {ex.Message}锛屾妧鑳絀D={skillConfig.SkillID}");
+        //     // 纭繚鐘舵�佷竴鑷存�э紝鍗充娇鍑虹幇寮傚父涔熻鏍囪瀹屾垚
+        //     isFinished = true;
+        //     throw; // 閲嶆柊鎶涘嚭寮傚父渚涗笂灞傚鐞�
+        // }
 
         isFinished = true;
     }

--
Gitblit v1.8.0