fix: logic team selector

This commit is contained in:
Bragin Stepan
2026-03-13 15:36:04 +05:00
parent 96058b6c58
commit aeadf43425
2 changed files with 7 additions and 3 deletions

View File

@@ -51,7 +51,9 @@ namespace _Project.Develop.Runtime.Logic.Gameplay.Features.Selectors
if (target.TryGetCanApplyDamage(out ICompositeCondition value)) if (target.TryGetCanApplyDamage(out ICompositeCondition value))
result = result && value.Evaluate(); result = result && value.Evaluate();
result = result && (target != _source); result = result
&& (target != _source)
&& (EntitiesHelper.AreOnSameTeam(_source, target) == false);
return result; return result;
}); });

View File

@@ -1,4 +1,4 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using _Project.Develop.Runtime.Entities; using _Project.Develop.Runtime.Entities;
using _Project.Develop.Runtime.Logic.Gameplay.Features.AI.States; using _Project.Develop.Runtime.Logic.Gameplay.Features.AI.States;
@@ -54,7 +54,9 @@ namespace _Project.Develop.Runtime.Logic.Gameplay.Features.Selectors
if (target.TryGetCanApplyDamage(out ICompositeCondition value)) if (target.TryGetCanApplyDamage(out ICompositeCondition value))
result = result && value.Evaluate(); result = result && value.Evaluate();
result = result && (target != _source); result = result
&& (target != _source)
&& (EntitiesHelper.AreOnSameTeam(_source, target) == false);
return result; return result;
}); });