added hp = -1 in if(hp == 0)