var HD as number HD = minimum(hero.tagcount[Hero.HitDice]) / 4 herofield[tFeats] = herofield[tFeats] + HD