public double Damaged(double dmgRaw, string dmgType, double dmgAP = 0, bool weaponBlock = false) { // PROT reduces damage multiplicatively double reducedDmg = dmgRaw * (1 - PROT(dmgType, weaponBlock)); // A portion of the blocked damage gets through with the armor piercing multiplier double armorPiercingDmg = (dmgRaw - reducedDmg) * dmgAP; // calculate the total amount of damage the character will actually take double totalDmgTaken = -1 * (reducedDmg + armorPiercingDmg); // take the damage HP.AdjustHP(totalDmgTaken); return(totalDmgTaken); }