/// <summary> /// 是否具备某个射程 /// </summary> /// <param name="range">射程</param> /// <returns></returns> public bool HasRange(RangeEnum range) { bool hasNow = ranges.Contains(range); BuffList.ForEach(x => { RangeBuff buff = x as RangeBuff; if (buff != null) { if (buff.IsAdding) { hasNow = true; return; } else { hasNow = false; } } }); return(hasNow); }
/// <summary> /// 是否具备某个属性 /// </summary> /// <param name="type">属性</param> /// <returns></returns> public bool HasType(TypeEnum type) { bool hasNow = types.Contains(type); BuffList.ForEach(x => { TypeBuff buff = x as TypeBuff; if (buff != null) { if (buff.IsAdding) { hasNow = true; return; } else { hasNow = false; } } }); return(hasNow); }
/// <summary> /// 是否具备某个性别 /// </summary> /// <param name="gender">性别</param> /// <returns></returns> public bool HasGender(GenderEnum gender) { bool hasNow = genders.Contains(gender); BuffList.ForEach(x => { GenderBuff buff = x as GenderBuff; if (buff != null) { if (buff.IsAdding) { hasNow = true; return; } else { hasNow = false; } } }); return(hasNow); }
/// <summary> /// 是否具备某个武器 /// </summary> /// <param name="weapon">武器</param> /// <returns></returns> public bool HasWeapon(WeaponEnum weapon) { bool hasNow = weapons.Contains(weapon); BuffList.ForEach(x => { WeaponBuff buff = x as WeaponBuff; if (buff != null) { if (buff.IsAdding) { hasNow = true; return; } else { hasNow = false; } } }); return(hasNow); }
/// <summary> /// 是否具备某个势力 /// </summary> /// <param name="symbol">势力</param> /// <returns></returns> public bool HasSymbol(SymbolEnum symbol) { bool hasNow = symbols.Contains(symbol); BuffList.ForEach(x => { SymbolBuff buff = x as SymbolBuff; if (buff != null) { if (buff.IsAdding) { hasNow = true; return; } else { hasNow = false; } } }); return(hasNow); }