getScoreForSummonFromCardWithIntent = function (card, intent, targetPosition) {
  let score = 0;
  if (targetPosition != null) {
    const amount = intent.amount || 1;
    let summonedCards;
    if (intent.cardId != null) {
      summonedCards = [card.getGameSession().getExistingCardFromIndexOrCreateCardFromData({ id: intent.cardId })];
    } else if (intent.targets != null) {
      summonedCards = CardIntent.getCardsTargetedByCardWithIntent(card, intent, targetPosition);
    }

    if (summonedCards != null) {
      for (let i = 0, il = summonedCards.length; i < il; i++) {
        const summonedCard = summonedCards[i];

        // there shouldn't be any summon intents that summon a card for the enemy player
        // so set the owner to the player who plays the card
        summonedCard.setOwnerId(card.getOwnerId());

        // score summoning card
        let summonedCardScore = ScoreForUnitSummon(summonedCard, targetPosition) * amount;
        if (summonedCardScore < THRESHOLD.PLAY_CARD) {
          summonedCardScore += THRESHOLD.PLAY_CARD;
        }

        score += summonedCardScore;
      }
    }
  }

  return score;
}
Returns the score for a unit at target position
@param {Card} card
@param {Object} intent
@param {Vec2} targetPosition
@returns {Number}
@static
@public