protected bool CheckIfIDamagableIsActive(IDamaging checkDamaging) { var ret = checkDamaging.IsAvailableForConsumption(this) && !IsAChild(checkDamaging); if (ret && checkDamaging.HasImmuneTargets) { //If it is not in the immunetargets collection, it should do damage ret = !checkDamaging.ImmuneTargets.Any(c => c == this); } return ret; }
protected bool CheckIfIDamagableIsActive(IDamaging checkDamaging) { var ret = checkDamaging.IsAvailableForConsumption(this) && !IsAChild(checkDamaging); if (ret && checkDamaging.HasImmuneTargets) { //If it is not in the immunetargets collection, it should do damage ret = !checkDamaging.ImmuneTargets.Any(c => c == this); } return(ret); }