fixes to HP.random() wrongly returning negative values (thanks again to HaxePunk for insights)