diff --git a/Assets/Addressables_Temp.meta b/Assets/Addressables_Temp.meta
new file mode 100644
index 00000000..8c61470a
--- /dev/null
+++ b/Assets/Addressables_Temp.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: e164e1d4c54c82642aff8894a1571338
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Addressables_Temp/link.xml b/Assets/Addressables_Temp/link.xml
new file mode 100644
index 00000000..208ccf28
--- /dev/null
+++ b/Assets/Addressables_Temp/link.xml
@@ -0,0 +1,92 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Assets/Addressables_Temp/link.xml.meta b/Assets/Addressables_Temp/link.xml.meta
new file mode 100644
index 00000000..cc11b6d0
--- /dev/null
+++ b/Assets/Addressables_Temp/link.xml.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 5a95af5ae3555cb4eaa7b93bb1f76a8a
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mods/Basic/Cards/Data/PlayerHeros/Assassin/CardData_Basic_KnifeTrick.asset b/Assets/Mods/Basic/Cards/Data/PlayerHeros/Assassin/CardData_Basic_KnifeTrick.asset
index 7911c632..514bc7f9 100644
--- a/Assets/Mods/Basic/Cards/Data/PlayerHeros/Assassin/CardData_Basic_KnifeTrick.asset
+++ b/Assets/Mods/Basic/Cards/Data/PlayerHeros/Assassin/CardData_Basic_KnifeTrick.asset
@@ -27,7 +27,7 @@ MonoBehaviour:
intentionIconKeys: []
intentionValueNames: []
intentionTextOverride:
- baseWeight: 1
+ baseWeight: 0
variableAttributes:
dictionaryList:
- Key: TargetCount
@@ -42,7 +42,7 @@ MonoBehaviour:
Value: 0
index: 2
isKeyDuplicated: 0
- - Key: BuffStack
+ - Key: BuffStack_KnifeTrick
Value: 4
index: 3
isKeyDuplicated: 0
diff --git a/Assets/Mods/Basic/Cards/Scripts/Assassin/KnifeTrick.cs b/Assets/Mods/Basic/Cards/Scripts/Assassin/KnifeTrick.cs
index 82e9e472..0b0f7219 100644
--- a/Assets/Mods/Basic/Cards/Scripts/Assassin/KnifeTrick.cs
+++ b/Assets/Mods/Basic/Cards/Scripts/Assassin/KnifeTrick.cs
@@ -11,10 +11,10 @@ namespace Continentis.Mods.Basic.Cards.Assassin
public override List PlayEffect(List targetList)
{
CommandGroup mainGroup = new CommandGroup(ExecutionMode.Sequential,
- new Cmd_PlayAnimation(user.characterView, "Skill"),
+ new Cmd_PlayAnimation(user.characterView, "Action"),
new Cmd_Function(() =>
{
- CreateCharacterBuff(GetAttribute("BuffStack")).Apply(user, user, this);
+ CreateCharacterBuff(GetAttribute("BuffStack_KnifeTrick")).Apply(user, user, this);
}));
return new List { mainGroup };
diff --git a/Assets/Mods/Basic/Characters/CombatBuffs/Assassin/KnifeTrick.cs b/Assets/Mods/Basic/Characters/CombatBuffs/Assassin/KnifeTrick.cs
index cdf254a2..f961b9c4 100644
--- a/Assets/Mods/Basic/Characters/CombatBuffs/Assassin/KnifeTrick.cs
+++ b/Assets/Mods/Basic/Characters/CombatBuffs/Assassin/KnifeTrick.cs
@@ -10,7 +10,7 @@ namespace Continentis.Mods.Basic.Buffs
public KnifeTrick(int stack)
{
Initialize(BuffType.Positive, BuffDispelLevel.Strong);
- this.contentSubmodule = new ContentSubmodule(this, false)
+ this.contentSubmodule = new ContentSubmodule(this)
.AddParameterGetter("Stack", () => unitedStackSubmodule.stackAmount.ToString());
this.iconSubmodule = new IconSubmodule(this);
this.unitedStackSubmodule = new UnitedStackSubmodule(this, stack);
@@ -20,8 +20,6 @@ namespace Continentis.Mods.Basic.Buffs
{
if (buff is Sharpness)
{
- Debug.Log("Knife Trick observed Sharpness buff removal, adding new Sharpness buff.");
- Debug.Log("Stack amount: " + unitedStackSubmodule.stackAmount);
CreateCharacterBuff(unitedStackSubmodule.stackAmount).Apply(attachedCharacter, attachedCharacter);
}
}));
@@ -33,8 +31,6 @@ namespace Continentis.Mods.Basic.Buffs
if (FindExistingSameBuff(out existingBuff))
{
existingBuff.unitedStackSubmodule.ModifyStack(this.unitedStackSubmodule.stackAmount);
- int newStack = existingBuff.unitedStackSubmodule.stackAmount;
- existingBuff.coreAttributeSubmodule.numericChange["DodgeChanceOffset"] = newStack;
return false;
}
return true;
diff --git a/Assets/Mods/Basic/Characters/Data/CharacterData_Basic_MarshalOfUnderworld.asset b/Assets/Mods/Basic/Characters/Data/CharacterData_Basic_MarshalOfUnderworld.asset
index 9126f302..582e6902 100644
--- a/Assets/Mods/Basic/Characters/Data/CharacterData_Basic_MarshalOfUnderworld.asset
+++ b/Assets/Mods/Basic/Characters/Data/CharacterData_Basic_MarshalOfUnderworld.asset
@@ -152,7 +152,7 @@ MonoBehaviour:
index: 22
isKeyDuplicated: 0
- Key: Speed
- Value: 99
+ Value: 0
index: 23
isKeyDuplicated: 0
- Key: LifeStealMultiplier
diff --git a/Assets/Scripts/MainGame/Buff/BuffSubmodules.cs b/Assets/Scripts/MainGame/Buff/BuffSubmodules.cs
index db437851..b83091be 100644
--- a/Assets/Scripts/MainGame/Buff/BuffSubmodules.cs
+++ b/Assets/Scripts/MainGame/Buff/BuffSubmodules.cs
@@ -122,7 +122,7 @@ namespace Continentis.MainGame
public void Remove()
{
- buffIcon?.RemoveIcon();
+ //buffIcon?.RemoveIcon();
}
}
diff --git a/Assets/Scripts/MainGame/Character/CharacterBuff/CharacterCombatBuffBase.cs b/Assets/Scripts/MainGame/Character/CharacterBuff/CharacterCombatBuffBase.cs
index 765b022f..2998a16c 100644
--- a/Assets/Scripts/MainGame/Character/CharacterBuff/CharacterCombatBuffBase.cs
+++ b/Assets/Scripts/MainGame/Character/CharacterBuff/CharacterCombatBuffBase.cs
@@ -105,6 +105,13 @@ namespace Continentis.MainGame.Character
public override void Remove()
{
OnBuffRemove();
+
+ if (iconSubmodule != null)
+ {
+ (attachedCharacter.characterView.hudContainer.enablingHUDs["CharacterBuffCollection"] as HUD_CharacterBuffCollection)
+ ?.RemoveBuffIcon(this);
+ }
+
this.attachedCharacter.combatBuffSubmodule.buffList.Remove(this);
attachedCharacter.deckSubmodule.GetAllCards().ForEach(card => card.RefreshCardAttributes());
attachedCharacter.combatBuffSubmodule.buffList.Exclude(this).For(buff => buff.eventSubmodule?.onOtherBuffRemoved.Invoke(this));
diff --git a/Assets/Scripts/MainGame/UI/CombatMainPage/TeamSwitchButton.cs b/Assets/Scripts/MainGame/UI/CombatMainPage/TeamSwitchButton.cs
index 2fb7cc53..98e03ff4 100644
--- a/Assets/Scripts/MainGame/UI/CombatMainPage/TeamSwitchButton.cs
+++ b/Assets/Scripts/MainGame/UI/CombatMainPage/TeamSwitchButton.cs
@@ -50,7 +50,7 @@ namespace Continentis.MainGame.UI
card.user = CombatMainManager.Instance.currentCharacter;
card.RefreshCardAttributes();
buttonText.text = "Team";
- teamPileText.gameObject.SetActive(true);
+ UpdateTeamPileText(card.user.team);
});
}));
@@ -72,7 +72,7 @@ namespace Continentis.MainGame.UI
CombatUIManager.Instance.combatMainPage.ClearAllCardViews();
playerHero.deckSubmodule.SetUpHandCardViews();
buttonText.text = "Hero";
- teamPileText.gameObject.SetActive(false);
+ UpdateTeamPileText(playerHero.team);
}));
seq.AppendInterval(0.1f);
seq.Append(CombatUIManager.Instance.combatMainPage.handPile.rectTransform.DOAnchorPosY(80f, 0.2f));
@@ -87,13 +87,17 @@ namespace Continentis.MainGame.UI
public void UpdateTeamPileText(CombatTeam team)
{
int currentCardCount = team.deckSubmodule.HandPile.Count;
-
- Debug.Log($"Current team hand pile count: {currentCardCount}");
- gameObject.SetActive(currentCardCount != 0);
-
+ if (isTeam)
+ {
+ gameObject.SetActive(true);
+ }
+ else
+ {
+ gameObject.SetActive(currentCardCount != 0);
+ }
+
teamPileText.text = $"{currentCardCount}/10";
- Debug.Log($"Updated team pile text: {teamPileText.text}");
}
}
}
\ No newline at end of file
diff --git a/Assets/Scripts/MainGame/UI/HUDPage/HUDElements/HUD_CharacterBuffCollection.cs b/Assets/Scripts/MainGame/UI/HUDPage/HUDElements/HUD_CharacterBuffCollection.cs
index 1f84af9f..9483299d 100644
--- a/Assets/Scripts/MainGame/UI/HUDPage/HUDElements/HUD_CharacterBuffCollection.cs
+++ b/Assets/Scripts/MainGame/UI/HUDPage/HUDElements/HUD_CharacterBuffCollection.cs
@@ -34,8 +34,18 @@ namespace Continentis.MainGame.UI
HUD_CharacterBuffIcon buffIcon = buffIcons.Find(x => x.buff == buff);
if (buffIcon != null)
{
- LeanPool.Despawn(buffIcon.gameObject);
buffIcons.Remove(buffIcon);
+ buff.iconSubmodule.buffIcon = null;
+ LeanPool.Despawn(buffIcon.gameObject);
+ }
+ else
+ {
+ // 如果逻辑上要移除 Buff,但在 UI 列表里找不到对应的 Icon,说明出事了。
+ // 这可能是导致你看到“Buff图标没有正常显示”的另一个原因(状态不同步)。
+ Debug.LogWarning($"[HUD] 尝试移除 Buff {buff.contentSubmodule.displayName} 的图标,但在 buffIcons 列表中未找到匹配项!可能存在状态脱节。");
+
+ // 可选:强制清理一遍列表中的空引用(自我修复)
+ // CleanUpInvalidIcons();
}
UpdateHud();
}
diff --git a/Assets/Scripts/MainGame/UI/HUDPage/HUDElements/Icon/HUD_BaseIcon.cs b/Assets/Scripts/MainGame/UI/HUDPage/HUDElements/Icon/HUD_BaseIcon.cs
index 4a21e49b..af3c638c 100644
--- a/Assets/Scripts/MainGame/UI/HUDPage/HUDElements/Icon/HUD_BaseIcon.cs
+++ b/Assets/Scripts/MainGame/UI/HUDPage/HUDElements/Icon/HUD_BaseIcon.cs
@@ -40,6 +40,14 @@ namespace Continentis.MainGame.UI
}
TMP_Text text = textList[textIndex];
+
+ if (text == null)
+ {
+ Debug.LogWarning($"Text component at index {textIndex} is null.");
+ // 如果这里触发了,说明上层逻辑在尝试操作一个已经死亡的 UI 对象
+ return;
+ }
+
if (getText != null)
{
text.gameObject.SetActive(true);