Creepy Caverns

Description
The megawump and his foul minions dwell in the creepy caverns, emerging only at night to steal from the local inhabitants and bring back their stolen loot. You have decided to rid the world of these loathsome beasts and have entered the caverns to find three magical items (an amulet, some arrows and a sword) with which to defeat the megawump.
You start the game in one of the caverns, with possible exits in each of the four sides of the screen. All of the caverns in the game are arranged within a 6x6 square grid. Most of them are populated with two enemies belonging to three possible types: pythons, trolls or hydra. Snakes will tend to leave you alone unless you are close enough, but hydra will follow you constantly. Contact with any enemy will result in the loss of one of your five lives. There are treasures of various sorts scattered around the place. Gold and jewelry provide you with points that add to your score. Other items include smart and dumb arrows, an amulet which gives you immunity to the megawump's lightning attack, a key which can be used to open a magic box, and a sword that can be found inside the magic box.
One of the caverns contains the megawump. On entering its lair, it will shut off all exits from the room, preventing your escape. To defeat the megawump, you must hit it with three arrows, changing its colour. Then, once it is in this vulnerable state, you can finish it off with the magic sword to win the game. To assist you in avoiding the megawump before you are ready, you can use the fact that hydras occupy the closest caves to its lair (with trolls further out, and then pythons) to guess its location.