refactor draw_hp_bar, fix some bugs