RiftMayhem/Assets/Scripts/Taggable.cs
Pedro Gomes 59c74b1d31 New abilities, bugfix necro autosummon, updated effects
- 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
2024-12-21 20:40:31 +00:00

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();
//}
}