getAttributeScoreForModifierForCard = function (card, modifier, buffKey, buffBounty, fixedAttributeBuffScores) {
  let score = 0;

  if (modifier.getBuffsAttribute(buffKey)) {
    // don't consider modifiers that buff this attribute after encountering a fixed modifier
    const isFixed = modifier.getIsAttributeFixed(buffKey);
    const blockedByFixed = fixedAttributeBuffScores[buffKey] !== CONFIG.INFINITY;
    if (isFixed || blockedByFixed) {
      // find diff between buffed value and base value
      // we do this instead of a direct read on the attribute buffs
      // because some modifiers change attributes dynamically
      const baseValue = card[buffKey] || 0;
      const buffedValue = modifier.getBuffedAttribute(baseValue, buffKey) || 0;
      const buffAmount = buffedValue - baseValue;
      if (modifier.getRebasesAttribute(buffKey) || modifier.getBuffsAttributeAbsolutely(buffKey)) {
        // when rebasing attribute or setting absolutely, score by current buffed value
        score += buffedValue * buffBounty;
      } else {
        // score by buff amount
        score += buffAmount * buffBounty;
      }

      if (isFixed) {
        // store fixed score
        fixedAttributeBuffScores[buffKey] = score;

        // remove the score of the previous fixed modifier
        if (blockedByFixed) {
          score -= fixedAttributeBuffScores[buffKey];
        }
      }
    }
  }

  return score;
}
Returns score for a modifier attribute buff as applied to a card.
@param {Card} card
@param {Modifier} modifier
@param {String} buffKey
@param {Number} buffBounty
@param {Object} fixedAttributeBuffScores map of buff keys that are fixed with scores
@returns {Number}
@private