示例#1
0
 bool IsImmunity(ImmuneData targetDataType, ImmuneData dataType)
 {
     if (targetDataType.IsIgron)
     {
         return(false);
     }
     return((targetDataType.GainType == dataType.GainType || dataType.GainType == ImmuneGainType.All) &&
            (targetDataType.ImmuneType == dataType.ImmuneType || dataType.ImmuneType == ImmuneType.All));
 }
示例#2
0
        public bool IsImmunity(ImmuneData effectDataType)
        {
            bool isImmunity = false;

            for (int i = 0; i < _datas.Count; i++)
            {
                if (IsImmunity(effectDataType, _datas[i]))
                {
                    isImmunity = true;
                }
            }
            return(isImmunity);
        }
示例#3
0
 public void RemoveImmunity(ImmuneData effectDataType)
 {
     _datas.Remove(effectDataType);
 }
示例#4
0
 public void AddImmunity(ImmuneData effectDataType)
 {
     _datas.Add(effectDataType);
 }