Code duplication in StatsModifierTraits class refactoring.

Functions calculateHitCost()  and calculateKillCost() have almost
identical code. It is good practice code duplication to be resolved.