public override string ToString() { //TODO LOCALIZATION string scratch = didScratch ? " (Scratch)" : ""; string report = ""; for (int i = 0; i < indentLevel; i++) { report += "\t"; } if (attackInfos != null && attackInfos.source != null) { report += string.Format("{0} inflicts {1} - {2} = {3} {4} damage(s) to {5}. {6}", attackInfos.source.Name, unreduced.ToString(), reducedByArmor.ToString(), final.ToString(), type.ToString(), target.Name, scratch); } else { report += string.Format("{0} takes {1} - {2} = {3} {4} damage(s). {5}", target.Name, unreduced.ToString(), reducedByArmor.ToString(), final.ToString(), type.ToString(), scratch); } return(report); }
//********************************************** // End Equipment // Start Health public override void OnTakeDamage(GameObject attacker, float dmgAmount, EDamageType dmgType = EDamageType.Generic) { base.OnTakeDamage(attacker, dmgAmount, dmgType); Debug.Log("Player took " + dmgAmount + " of " + dmgType.ToString() + " damage from " + attacker.name); }