- Knight Challenging Shout AoE Taunt ability - Mage Firewall AoE Burn ability - Added support for movement speed modifier effects to slow enemies instead of only buffing allies. - Added different movement speed minimum cap to enemies and bosses
52 lines
1.2 KiB
C#
52 lines
1.2 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using UnityEngine;
|
|
|
|
public class Taggable : MonoBehaviour
|
|
{
|
|
public List<TargetTag> targetTag = new List<TargetTag>();
|
|
|
|
public bool IsValidTarget(List<TargetTag> tags)
|
|
{
|
|
for (int i = 0; i < targetTag.Count; i++)
|
|
{
|
|
if (tags.Contains(targetTag[i])) return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
public bool AlliedTagsContains(List<TargetTag> tags)
|
|
{
|
|
for (int i = 0; i < targetTag.Count; i++)
|
|
{
|
|
for (int j = 0; j < tags.Count; j++)
|
|
{
|
|
if (targetTag[i].AlliedTags.Contains(tags[j])) return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
public bool HasSameTag(List<TargetTag> tags)
|
|
{
|
|
for (int i = 0; i < targetTag.Count; i++)
|
|
{
|
|
if (tags.Contains(targetTag[i])) return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
public bool IsBoss()
|
|
{
|
|
return this.name.ToLower().Contains("boss");
|
|
}
|
|
//private IEnumerable<TargettingTag> commonItems;
|
|
//public bool IsValidTarget(List<TargettingTag> tags)
|
|
//{
|
|
// commonItems = this.tags.Intersect(tags);
|
|
//
|
|
// return commonItems.Any();
|
|
//}
|
|
}
|