예제 #1
0
 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;
 }
예제 #2
0
    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);
    }