Pseudocode for random damage and health reduction

Pseudocode for the formula that generates the random damage a player
inflicts as well as for the formula that calculates their health
reductions and the console log of the results.