public int damageCalc(int d, int dmgType){
        float dmg;
        if (dmgType == -1){
            return d;
        }else{
            dmg = d * Data.elementDamage[type-1][dmgType-1];
        }
        float dmgRdu;       //dmg reduction
        float tempArmor = armor - armorRedu;
        if (tempArmor >= 0){
            //dmgRdu = ( (0.06f * armor) / (1 + 0.06f * armor)) * 100f;     //dota armor values
            dmgRdu = dmg / ((100f + tempArmor) / 100f);
            if (dmgRdu > 1){
                return Math.round (dmgRdu);
            }
            else{
                return 1;
            }
        } else{
            dmgRdu = (float) (1.0d - Math.pow (0.94d, -tempArmor)) * 100;
            return Math.round (dmgRdu);
        }
    }