示例#1
0
        public HealingInfo GetHealingInfo(IUnit unit)
        {
            var retval = new HealingInfo();

            foreach (var promotion in UnitPromotionLogic.GetPromotionsForUnit(unit))
            {
                HealingParser.ParsePromotionForHealingInfo(promotion, unit, retval);
            }

            return(retval);
        }
示例#2
0
        public void ParsePromotionForHealingInfo(IPromotion promotion, IUnit unit, HealingInfo info)
        {
            if (!promotion.RequiresForeignTerritory || IsUnitInForeignTerritory(unit))
            {
                info.BonusHealingToSelf     += promotion.BonusHealingToSelf;
                info.BonusHealingToAdjacent += promotion.BonusHealingToAdjacent;

                info.HealsEveryTurn |= promotion.HealsEveryTurn;

                info.AlternateNavalBaseHealing = Math.Max(
                    info.AlternateNavalBaseHealing, promotion.AlternativeNavalBaseHealing
                    );
            }
        }
示例#3
0
        public HealingModifier(ModifierInfo info,
                               Entity casterEntity, Entity targetEntity, Environment environment,
                               CollectionOfInteractions modifierInteractionCollection) : base(info, casterEntity, targetEntity, environment, modifierInteractionCollection)
        {
            this.info = (HealingInfo)info;

            duration = this.info.Hmc.ShowDurationInSeconds();
            targetHealthComponent = targetEntity.GetComponent <HealthComponent>();
            if (this.info.Hmc.isTotal)
            {
                int tickCount = (int)(duration / this.info.Hmc.interval) + 1;
                healPercentPerTickWithoutPowerScale = this.info.Hmc.percent / tickCount;
            }
            else
            {
                healPercentPerTickWithoutPowerScale = this.info.Hmc.percent;
            }
        }
示例#4
0
        public static string GetOwnersHealingTakenTooltip(this HealingInfo healingTakenInfo,
                                                          string title, int displayIndex, double?percentOfTotal, double?percentOfMax)
        {
            bool isOwnerTheSource = healingTakenInfo.Source.IsOwner;

            return
                ($@"{displayIndex}. {title}

{(isOwnerTheSource ? "≥ " : "")}{healingTakenInfo.PotentialHealingPlusPets.Format()} potential healing
{percentOfTotal.FormatPercent()} of {healingTakenInfo.Target.UncoloredName}'s total healing
{percentOfMax.FormatPercent()} of {healingTakenInfo.Target.UncoloredName}'s max healing

{healingTakenInfo.RealizedHealingPlusPets.Format()} realized healing
{(isOwnerTheSource ? "≥ " : "")}{healingTakenInfo.OverhealingPlusPets.Format()} overhealing
{(isOwnerTheSource ? "≥ " : "")}{healingTakenInfo.NanoHealingPlusPets.Format()} nano healing

{(isOwnerTheSource ? "≥ " : "")}{healingTakenInfo.PercentOfOverhealingPlusPets.FormatPercent()} overhealing");
        }
示例#5
0
 public OwnersHealingTakenMainRow(FightViewModel fightViewModel, HealingInfo healingTakenInfo)
     : base(fightViewModel, healingTakenInfo.Source)
     => HealingTakenInfo = healingTakenInfo;
 public OwnersHealingDoneViewingModeDetailRow(FightViewModel fightViewModel, HealingInfo healingDoneInfo)
     : base(fightViewModel, healingDoneInfo.Target, showIcon: true)
     => HealingDoneInfo = healingDoneInfo;
示例#7
0
 public OwnersHealingTakenViewingModeDetailRow(FightViewModel fightViewModel, HealingInfo healingTakenInfo)
     : base(fightViewModel, healingTakenInfo.Source, showIcon: true)
     => HealingTakenInfo = healingTakenInfo;
示例#8
0
 public OwnersHealingDoneMainRow(FightViewModel fightViewModel, HealingInfo healingDoneInfo)
     : base(fightViewModel, healingDoneInfo.Target)
     => HealingDoneInfo = healingDoneInfo;