From 0a01580b727239e0e764c6b71425f3dbfa91e0c5 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期四, 27 十一月 2025 19:17:42 +0800
Subject: [PATCH] 125 战斗 死亡 受击音效 & 天子考验护盾隐藏
---
Main/System/Battle/BattleObject/BattleObject.cs | 7 +++
Main/System/Battle/UIComp/BattleHeroInfoBar.cs | 7 +++
Main/Config/Configs/HeroConfig.cs | 32 +++++++++------
Main/System/Team/TeamHero.cs | 18 +++++----
4 files changed, 42 insertions(+), 22 deletions(-)
diff --git a/Main/Config/Configs/HeroConfig.cs b/Main/Config/Configs/HeroConfig.cs
index f388315..333b3af 100644
--- a/Main/Config/Configs/HeroConfig.cs
+++ b/Main/Config/Configs/HeroConfig.cs
@@ -1,6 +1,6 @@
锘�//--------------------------------------------------------
// [Author]: YYL
-// [ Date ]: Wednesday, September 17, 2025
+// [ Date ]: 2025骞�11鏈�27鏃�
//--------------------------------------------------------
using System.Collections.Generic;
@@ -26,6 +26,8 @@
public int[] SkinIDList;
public int AtkSkillID;
public int AngerSkillID;
+ public int DeathSFX;
+ public int HitSFX;
public int AtkInheritPer;
public int DefInheritPer;
public int HPInheritPer;
@@ -77,21 +79,25 @@
int.TryParse(tables[9],out AngerSkillID);
- int.TryParse(tables[10],out AtkInheritPer);
+ int.TryParse(tables[10],out DeathSFX);
- int.TryParse(tables[11],out DefInheritPer);
+ int.TryParse(tables[11],out HitSFX);
- int.TryParse(tables[12],out HPInheritPer);
+ int.TryParse(tables[12],out AtkInheritPer);
- BatAttrDict = ConfigParse.ParseIntDict(tables[13]);
+ int.TryParse(tables[13],out DefInheritPer);
- if (tables[14].Contains("["))
+ int.TryParse(tables[14],out HPInheritPer);
+
+ BatAttrDict = ConfigParse.ParseIntDict(tables[15]);
+
+ if (tables[16].Contains("["))
{
- FetterIDList = JsonMapper.ToObject<int[]>(tables[14]);
+ FetterIDList = JsonMapper.ToObject<int[]>(tables[16]);
}
else
{
- string[] FetterIDListStringArray = tables[14].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
+ string[] FetterIDListStringArray = tables[16].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
FetterIDList = new int[FetterIDListStringArray.Length];
for (int i=0;i<FetterIDListStringArray.Length;i++)
{
@@ -99,17 +105,17 @@
}
}
- float.TryParse(tables[15],out UIScale);
+ float.TryParse(tables[17],out UIScale);
- Desc = tables[16];
+ Desc = tables[18];
- if (tables[17].Contains("["))
+ if (tables[19].Contains("["))
{
- TalentList = JsonMapper.ToObject<int[]>(tables[17]);
+ TalentList = JsonMapper.ToObject<int[]>(tables[19]);
}
else
{
- string[] TalentListStringArray = tables[17].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
+ string[] TalentListStringArray = tables[19].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
TalentList = new int[TalentListStringArray.Length];
for (int i=0;i<TalentListStringArray.Length;i++)
{
diff --git a/Main/System/Battle/BattleObject/BattleObject.cs b/Main/System/Battle/BattleObject/BattleObject.cs
index 0cceb15..ec00f22 100644
--- a/Main/System/Battle/BattleObject/BattleObject.cs
+++ b/Main/System/Battle/BattleObject/BattleObject.cs
@@ -358,6 +358,7 @@
{
if (!buffMgr.isControled[BattleConst.HardControlGroup])
{
+ battleField.soundManager.PlayEffectSound(teamHero.heroConfig.HitSFX);
motionBase.PlayAnimation(MotionName.hit, false);
}
}
@@ -431,6 +432,7 @@
public virtual void OnDeath(Action _onDeathAnimationComplete)
{
buffMgr.RemoveAllBuff();
+ battleField.soundManager.PlayEffectSound(teamHero.heroConfig.DeathSFX);
motionBase.PlayDeadAnimation(() =>
{
teamHero.isDead = true;
@@ -702,4 +704,9 @@
}
#endif
}
+
+ public bool IsTianziBoss()
+ {
+ return battleField.MapID == 30020 && battleField.FindBoss() == this;
+ }
}
\ No newline at end of file
diff --git a/Main/System/Battle/UIComp/BattleHeroInfoBar.cs b/Main/System/Battle/UIComp/BattleHeroInfoBar.cs
index 1202221..0fa6f19 100644
--- a/Main/System/Battle/UIComp/BattleHeroInfoBar.cs
+++ b/Main/System/Battle/UIComp/BattleHeroInfoBar.cs
@@ -205,6 +205,9 @@
public void UpdateHP(float value)
{
sliderHp.value = value;
+ bool IsTianziBoss = battleObject.IsTianziBoss();
+ sliderShield1.SetActive(!IsTianziBoss);
+ sliderShield2.SetActive(!IsTianziBoss);
//Debug.Log("TianziDamageBar UpdateHP value:" + value);
}
@@ -300,8 +303,10 @@
damageSequence = DOTween.Sequence();
+ bool IsTianziBoss = battleObject.IsTianziBoss();
+
// 鎶ょ浘鍔ㄧ敾
- if (fromShield > 0)
+ if (fromShield > 0 && !IsTianziBoss)
{
float fromShield1Value = Mathf.Min((float)(fromHp + fromShield), (float)maxHp) / (float)maxHp;
float fromShield2Value = Mathf.Max((float)(fromHp + fromShield - maxHp), 0f) / (float)maxHp;
diff --git a/Main/System/Team/TeamHero.cs b/Main/System/Team/TeamHero.cs
index 30065a2..196aa69 100644
--- a/Main/System/Team/TeamHero.cs
+++ b/Main/System/Team/TeamHero.cs
@@ -6,6 +6,8 @@
public HeroCountry Country;
public int SkinID;
+
+ public HeroConfig heroConfig;
public HeroSkinConfig skinConfig;
public string guid;
@@ -42,20 +44,20 @@
// 琛ュ厖 skinid璺焗eroid瑕佷箞鍚屾椂娌℃湁 瑕佷箞鍚屾椂鏈� 濡傛灉杩欎笁涓猧d閮芥病鏈夌殑璇� 閭e氨鏄厤缃弗閲嶉敊璇� 鏃犳硶寮ヨˉ
+ heroConfig = HeroConfig.Get(heroId);
+
+ if (null == heroConfig)
+ {
+ Debug.LogError("hero config is null, heroId : " + heroId);
+ return;
+ }
+
if (fightObj.SkinID > 0 && fightObj.HeroID > 0)
{
- // 璧扮帺瀹堕�昏緫
- var heroConfig = HeroConfig.Get(heroId);
- if (null == heroConfig)
- {
- Debug.LogError("hero config is null, heroId : " + heroId);
- return;
- }
Country = (HeroCountry)heroConfig.Country;
SkinID = (int)fightObj.SkinID;
modelScale = 1f;
name = heroConfig.Name;
-
}
else
{
--
Gitblit v1.8.0