RiftMayhem/Assets/Scripts/Taggable.cs
Pedro Gomes 9903af1fb7 Updates And new abilities
- Updated mirror image visuals
- New Vamp/Cultist/Satanist ability: Bat Swarm
- Updated Channeled abilities to have a cost per tick, and lowered initial costs significantly to take this into consideration.
2024-12-28 12:48:09 +00:00

66 lines
1.5 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 IsAllied(TargetTag target)
{
for (int i = 0; i < targetTag.Count; i++)
{
if (targetTag[i].AlliedTags.Contains(target)) 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");
}
public bool IsMinion()
{
return this.name.ToLower().Contains("minion");
}
//private IEnumerable<TargettingTag> commonItems;
//public bool IsValidTarget(List<TargettingTag> tags)
//{
// commonItems = this.tags.Intersect(tags);
//
// return commonItems.Any();
//}
}