多轮审查评估
This commit is contained in:
@@ -82,6 +82,15 @@ namespace BaseGames.Combat.StatusEffects
|
||||
/// <summary>直接施加一个具体效果(供技能/Boss 使用)。</summary>
|
||||
public void ApplyEffect(StatusEffect effect)
|
||||
{
|
||||
// 检查是否被现有效果阻断
|
||||
foreach (var blockerType in effect.BlockedBy)
|
||||
if (_activeIndex.ContainsKey(blockerType)) return;
|
||||
|
||||
// 净化与新效果互斥的现有效果
|
||||
foreach (var excludedType in effect.MutualExclusions)
|
||||
if (_activeIndex.ContainsKey(excludedType))
|
||||
CleanseEffect(excludedType);
|
||||
|
||||
if (_activeIndex.TryGetValue(effect.EffectType, out StatusEffect existing))
|
||||
{
|
||||
existing.OnStack();
|
||||
|
||||
Reference in New Issue
Block a user