RiftMayhem/Assets/Scripts/Taggable.cs
Pedro Gomes 25d028c5e3 Barbarian/Naturalist & Mage Updates
- Barb/Naturalist Rain ability
- Barb/Naturalist Eye of the Storm ability
- Mage lost Charged up class signature ability
- Mage mana barrier is now temp signature ability
- Mage Glacial Bomb back to slot 4
2024-12-23 23:20:58 +00:00

61 lines
1.4 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");
}
//private IEnumerable<TargettingTag> commonItems;
//public bool IsValidTarget(List<TargettingTag> tags)
//{
// commonItems = this.tags.Intersect(tags);
//
// return commonItems.Any();
//}
}