willUnitSurviveCard = function (unit, card) {
  let unitSurvives = true;
  const gameSession = card.getGameSession();
  const myGeneral = gameSession.getGeneralForPlayerId(unit.getOwnerId());
  const cardId = card.getBaseCardId();
  const minionOrGeneralTargetType = unit.getIsGeneral() ? CardTargetType.General : CardTargetType.Minion;
  const friendlyOrEnemyTargetType = !myGeneral.getIsSameTeamAs(unit) ? CardTargetType.Enemy : CardTargetType.Friendly;
  const burnIntents = CardIntent.getIntentsByIntentTypeWithPartialTargetType(cardId, CardIntentType.Burn, minionOrGeneralTargetType | friendlyOrEnemyTargetType);
  if (burnIntents.length > 0) {
    const hp = unit.getHP();
    const lethalBurnIntentOnSelf = _.find(burnIntents, (intentObj) => intentObj.amount >= hp);
    unitSurvives = lethalBurnIntentOnSelf !== null;
  }
  return unitSurvives;
}
Returns whether or not a unit will survive any burn intents on a card.
@param {Unit} unit
@param {Card} card
@returns {Boolean}