public int GetHit(BodyPart part, FightPapams par) { int damage; if (part != blockedPart) { damage = CalculateDamage(par.straight); hp -= damage; Wound.Invoke(this, part); } else { if (Dice.Throw() + (par.agility - agility) > 14) // chanse of succesfull block is 70% - agility difference { damage = CalculateDamage(par.straight); hp -= damage; Wound.Invoke(this, part); } else { damage = 0; Block.Invoke(this, blockedPart); } } return(damage); }
public int GetHit(BodyPart part, FightPapams par) { int damage; if (part != blockedPart) { damage = CalculateDamage(par.straight); hp -= damage; Wound.Invoke(this, part); } else { if (Dice.Throw() + (par.agility - agility) > 14) // chanse of succesfull block is 70% - agility difference { damage = CalculateDamage(par.straight); hp -= damage; Wound.Invoke(this, part); } else { damage = 0; Block.Invoke(this, blockedPart); } } return damage; }