除了充盈都做完了

This commit is contained in:
SoulliesOfficial
2025-10-31 10:02:30 -04:00
parent 5d09ef7b53
commit ee1d3d9c0a
179 changed files with 3239 additions and 200 deletions

View File

@@ -1,5 +1,6 @@
using Continentis.MainGame;
using Continentis.MainGame.Character;
using SLSFramework.General;
using UnityEngine;
namespace Continentis.Mods.Basic.Buffs
@@ -34,6 +35,14 @@ namespace Continentis.Mods.Basic.Buffs
public override bool OnBuffApply(out CharacterCombatBuffBase existingBuff)
{
MainGameManager.Instance.basePrefabs.GenerateInfoText(contentSubmodule.displayName, attachedCharacter.characterView);
if (attachedCharacter.combatBuffSubmodule.TryGetBuff(out Protected conflictProtected))
{
//如果目标已经有Protected Buff则应当将其移除以防止冲突.
//使用移除所有保护者的方式来移除。
Debug.Log($"Conflicted Protected buff found, with {conflictProtected.protectingSources.Count} protecting sources. Removing all.");
conflictProtected.protectingSources.For(ps => ps.Remove());
}
if (FindExistingSameBuff(out existingBuff))
{
@@ -46,13 +55,12 @@ namespace Continentis.Mods.Basic.Buffs
existProtecting.roundCountSubmodule.AddCount(this.roundCountSubmodule.remainingCount);
return false;
}
this.protectedBuff ??= target.combatBuffSubmodule.GetBuff<Protected>();
this.protectedBuff.protectingSources.Add(this);
return true; //独立处理直接返回true
}
Debug.Log("No existing same buff found.");
this.protectedBuff ??= target.combatBuffSubmodule.GetBuff<Protected>();
this.protectedBuff.protectingSources.Add(this);
Debug.Log(protectedBuff.protectingSources.Count);
return true;
}