We'll also check if they have come across a trap in the game, which would decrease their health.

Add an else if statement.

Make sure to add else if () { on the first line and } after that.