Example #1
0
 protected virtual void RemoveConflicts(StatusEffectType type)
 {
     for (int i = List.Count - 1; i >= 0; i--)
     {
         if (type.ConflictsWith(List[i].Type))
         {
             Remove(i);
         }
     }
 }
Example #2
0
 public virtual void Remove(StatusEffectType type)
 {
     for (int i = List.Count - 1; i >= 0; i--)
     {
         if (List[i].Type == type)
         {
             Remove(i);
         }
     }
 }
Example #3
0
        public virtual StatusEffectInstance Find(StatusEffectType type)
        {
            for (int i = 0; i < List.Count; i++)
            {
                if (List[i].Type == type)
                {
                    return(List[i]);
                }
            }

            return(null);
        }
Example #4
0
        public virtual bool Contains(StatusEffectType type)
        {
            for (int i = 0; i < List.Count; i++)
            {
                if (List[i].Type == type)
                {
                    return(true);
                }
            }

            return(false);
        }
Example #5
0
 public virtual bool ConflictsWith(StatusEffectType type)
 {
     return(conflicts.Contains(type));
 }