It will switch between range and melee attacks.
This little Dagannoth is very easy to kill. All you need to do is use protect from melee. It does use range attacks as well, so use rune armour or better while fighting it. A granite shield will also help a lot against the ranged attacks. Also, a cannon or red chins will kill these quickly.
A horror from the ocean depths...
Clue scroll (level-2), Starved ancient effigy
Bones (100%), Water rune (15), Fishing bait, Herb seeds, Fremennik shield, Fremennik shirt, Fremennik blade, Fremennik cloak, Fremennik helm, Gloves, Grimy herbs, Keg of beer, Law rune, Mithril javelin (3), Nature rune, Nature talisman, Oyster pearl, Raw lobster, Seaweed, Steel arrows, Steel hatchet, Tinderbox, Uncut gems, Water talisman, Air talisman, Warrior helm, Archer helm, Berserker helm, Body talisman, Blood rune, Coins, Cosmic talisman, Dagannoth hide, Earth talisman, Edible seaweed, Farseer helm, Fire talisman, Spined boots, Spined gloves