Altered calculateAbilityModifier to work with class 'character'