You have used if nested in forever. In the same way you made the treasure disappear, you can make both your hero and the enemy do something when they touch each other. But look at this game:
Why doesn't the dog say I won when he catches the cat? Or does he? Can you find the error?