Creating a function

function that calculates the damage done for the attack scene in the
story