Example #1
0
        public void Load(string value)
        {
            var lines = File.ReadAllLines(value);

            foreach (var line in lines)
            {
                if (line.ToLower().Contains("example") || line.ToLower().Contains("[spells]"))
                {
                    //Ignore
                }
                else
                {
                    var temp = line.Split('_');
                    SpellNames.Add(temp[0]);
                    Health.Add(Convert.ToInt32(temp[1]));
                    SpellKeys.Add(temp[2]);
                    CastTime.Add(Convert.ToInt32(temp[3]));
                    Mana.Add(Convert.ToInt32(temp[4]));
                    Range.Add(Convert.ToInt32(temp[5]));
                    Type.Add(temp[6]);
                    Combo.Add(Convert.ToInt32(temp[7]));
                    MinDistance.Add(Convert.ToInt32(temp[8]));
                    EnemyHealth.Add(Convert.ToInt32(temp[9]));
                }
            }
        }
Example #2
0
        public virtual string GenTooltip(float acts, float ttldps)
        {
            float misses = GetXActs(AttackTableSelector.Missed, acts), missesPerc = (acts == 0f ? 0f : misses / acts);
            float crits = GetXActs(AttackTableSelector.Crit, acts), critsPerc = (acts == 0f ? 0f : crits / acts);
            float hits = GetXActs(AttackTableSelector.Hit, acts), hitsPerc = (acts == 0f ? 0f : hits / acts);

            bool  showmisss = misses > 0f;
            bool  showcrits = CanCrit && crits > 0f;
            float localDPS  = GetDPS(acts);

            string tooltip = string.Format("{0:0.0}*{1}\n", localDPS, Name)
                             + string.Format("Cast Time: {0}, CD: {1}, FocusCost: {2}\n",
                                             (CastTime != -1 ? CastTime.ToString() : "Instant"),
                                             (Cd != -1 ? Cd.ToString() : "None"),
                                             (FocusCost != -1 ? FocusCost.ToString() : "None")) +
                             Environment.NewLine + acts.ToString("000.00") + " Activates over Attack Table:" +
                             (showmisss ? Environment.NewLine + "- " + misses.ToString("000.00") + " : " + missesPerc.ToString("00.00%") + " : Missed " : "") +
                             (showcrits ? Environment.NewLine + "- " + crits.ToString("000.00") + " : " + critsPerc.ToString("00.00%") + " : Crit " : "") +
                             Environment.NewLine + "- " + hits.ToString("000.00") + " : " + hitsPerc.ToString("00.00%") + " : Hit " +
                             Environment.NewLine +
                             Environment.NewLine + "Targets Hit: " + (Targets != -1 ? AvgTargets.ToString("0.00") : "None") +
                             Environment.NewLine + "DPS: " + (localDPS > 0 ? localDPS.ToString("0.00") : "None") +
                             Environment.NewLine + string.Format("Percentage of Total DPS: {0}", (ttldps > 0 ? (localDPS / ttldps).ToString("00.00%") : "None"));

            return(tooltip);
        }
Example #3
0
        public virtual string GenTooltip(float acts, float ttldpsperc)
        {
            float misses = GetXActs(AttackTableSelector.Missed, acts), missesPerc = (acts == 0f ? 0f : misses / acts);
            float dodges = GetXActs(AttackTableSelector.Dodged, acts), dodgesPerc = (acts == 0f ? 0f : dodges / acts);
            float parrys = GetXActs(AttackTableSelector.Parried, acts), parrysPerc = (acts == 0f ? 0f : parrys / acts);
            float blocks = GetXActs(AttackTableSelector.Blocked, acts), blocksPerc = (acts == 0f ? 0f : blocks / acts);
            float crits = GetXActs(AttackTableSelector.Crit, acts), critsPerc = (acts == 0f ? 0f : crits / acts);
            float hits = GetXActs(AttackTableSelector.Hit, acts), hitsPerc = (acts == 0f ? 0f : hits / acts);

            bool showmisss = misses > 0f;
            bool showdodge = CanBeDodged && dodges > 0f;
            bool showparry = CanBeParried && parrys > 0f;
            bool showblock = CanBeBlocked && blocks > 0f;
            bool showcrits = CanCrit && crits > 0f;

            string tooltip = "*" + Name +
                             Environment.NewLine + "Cast Time: " + (CastTime != -1 ? CastTime.ToString() : "Instant")
                             + ", CD: " + (Cd != -1 ? Cd.ToString() : "None")
                             + ", RageCost: " + (RageCost != -1 ? RageCost.ToString() : "None") +
                             Environment.NewLine + Environment.NewLine + acts.ToString("000.00") + " Activates over Attack Table:" +
                             (showmisss ? Environment.NewLine + "- " + misses.ToString("000.00") + " : " + missesPerc.ToString("00.00%") + " : Missed " : "") +
                             (showdodge ? Environment.NewLine + "- " + dodges.ToString("000.00") + " : " + dodgesPerc.ToString("00.00%") + " : Dodged " : "") +
                             (showparry ? Environment.NewLine + "- " + parrys.ToString("000.00") + " : " + parrysPerc.ToString("00.00%") + " : Parried " : "") +
                             (showblock ? Environment.NewLine + "- " + blocks.ToString("000.00") + " : " + blocksPerc.ToString("00.00%") + " : Blocked " : "") +
                             (showcrits ? Environment.NewLine + "- " + crits.ToString("000.00") + " : " + critsPerc.ToString("00.00%") + " : Crit " : "") +
                             Environment.NewLine + "- " + hits.ToString("000.00") + " : " + hitsPerc.ToString("00.00%") + " : Hit " +
                             Environment.NewLine +
                             //Environment.NewLine + "Damage per Blocked|Hit|Crit: x|x|x" +
                             Environment.NewLine + "Targets Hit: " + (Targets != -1 ? AvgTargets.ToString("0.00") : "None") +
                             Environment.NewLine + "DPS: " + (GetDPS(acts) > 0 ? GetDPS(acts).ToString("0.00") : "None") +
                             Environment.NewLine + "Percentage of Total DPS: " + (ttldpsperc > 0 ? ttldpsperc.ToString("00.00%") : "None");

            return(tooltip);
        }
Example #4
0
 protected override string ToStringDirectHeal()
 {
     return(String.Format("{0}\nPenance ticks a total of {1} times, once every {2} seconds, for a duration of {3} seconds",
                          base.ToStringDirectHeal(),
                          3,
                          (CastTime / 2).ToString("0.00"), // First tick is instant.
                          CastTime.ToString("0.00")
                          ));
 }
Example #5
0
 public override string ToString()
 {
     return(String.Format("{0} *DpS: {1}\r\nDpM: {2}\r\nTick: {3}\r\nCast: {4}\r\nCost: {5}",
                          AvgDamage.ToString("0"),
                          DpS.ToString("0.00"),
                          DpM.ToString("0.00"),
                          (AvgDamage / CastTime * 3).ToString("0"),
                          CastTime.ToString("0.00"),
                          ManaCost.ToString("0")));
 }
Example #6
0
 public override string ToString()
 {
     return(String.Format("{0} *DpS: {1}\r\nDpM: {2}\r\nMin: {3}\r\nMax: {4}\r\nAvg Crit: {5}\r\nMax Crit: {6}\r\nCast: {7}\r\nCost: {8}",
                          AvgDamage.ToString("0"),
                          DpS.ToString("0.00"),
                          DpM.ToString("0.00"),
                          MinDamage.ToString("0"),
                          MaxDamage.ToString("0"),
                          AvgCrit.ToString("0"),
                          MaxCrit.ToString("0"),
                          CastTime.ToString("0.00"),
                          ManaCost.ToString("0")));
 }
Example #7
0
 public override string ToString()
 {
     return(String.Format("{0} *HpS: {1}\r\nHpM: {2}\r\nMin Heal: {3}\r\nMax Heal: {4}\r\nAvg Crit: {5}\r\nMax Crit: {6}\r\nCast: {7}\r\nCost: {8}",
                          AvgHeal.ToString("0"),
                          HpS.ToString("0.00"),
                          HpM.ToString("0.00"),
                          MinHeal.ToString("0"),
                          MaxHeal.ToString("0"),
                          AvgCrit.ToString("0"),
                          MaxCrit.ToString("0"),
                          CastTime.ToString("0.00"),
                          ManaCost.ToString("0")));
 }
Example #8
0
 public override string ToString()
 {
     return(String.Format("{0} *HpS(3): {1}\r\nHpS(4): {10}\r\nHpS(5): {12}\r\nHpM(3): {2}\r\nHpM(4): {11}\r\nHpM(5): {13}\r\nMin Heal: {3}\r\nMax Heal: {4}\r\nAvg Crit: {5}\r\nMax Crit: {6}\r\nCast: {7}\r\nCost: {8}\r\nRange: {9}",
                          AvgHeal.ToString("0"),
                          (AvgHeal * 3 / CastTime).ToString("0.00"),
                          (AvgHeal * 3 / ManaCost).ToString("0.00"),
                          MinHeal.ToString("0"),
                          MaxHeal.ToString("0"),
                          AvgCrit.ToString("0"),
                          MaxCrit.ToString("0"),
                          CastTime.ToString("0.00"),
                          ManaCost.ToString("0"),
                          Range,
                          (AvgHeal * 4 / CastTime).ToString("0.00"),
                          (AvgHeal * 4 / ManaCost).ToString("0.00"),
                          (AvgHeal * 5 / CastTime).ToString("0.00"),
                          (AvgHeal * 5 / ManaCost).ToString("0.00")));
 }
Example #9
0
 protected override void Init()
 {
     CastTime.Set(0.8f);
     Cooldown.Set(0);
 }
Example #10
0
        public override string ToString()
        {
            string retval = String.Format("Cast Time: {0} seconds", (IsInstant) ? String.Format("Instant {0}", GlobalCooldown.ToString("0.00")) : CastTime.ToString("0.00"));

            if (ManaCost > 0)
            {
                retval += String.Format("\nMana Cost: {0}", ManaCost.ToString("0"));
            }
            if (CritChance > 0)
            {
                retval += String.Format("\nCrit Chance: {0}%", (CritChance * 100f).ToString("0.00"));
            }
            if (Cooldown > 0)
            {
                retval += String.Format("\nCooldown: {0} seconds", Cooldown.ToString("0"));
            }
            if (Targets > 0)
            {
                retval += String.Format("\nTargets hit: {0}", Targets);
            }
            if (HasDirectDamage)
            {
                retval += ToStringDirectDamage();
            }
            if (HasOverTimeDamage)
            {
                retval += ToStringOverTimeDamage();
            }
            if (HasDirectHeal)
            {
                retval += ToStringDirectHeal();
            }
            if (HasOverTimeHeal)
            {
                retval += ToStringOverTimeHeal();
            }
            if (HasAbsorb)
            {
                retval += ToStringAbsorb();
            }
            return(retval);
        }
Example #11
0
        public override int GetHashCode()
        {
            var hashCode = -1002157333;

            hashCode = hashCode * -1521134295 + Index.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(FullName);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(GroupName);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(SetName);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Name);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Display);

            hashCode = hashCode * -1521134295 + Available.GetHashCode();
            hashCode = hashCode * -1521134295 + ModesRequired.GetHashCode();
            hashCode = hashCode * -1521134295 + ModesDisallowed.GetHashCode();
            hashCode = hashCode * -1521134295 + PowerType.GetHashCode();
            hashCode = hashCode * -1521134295 + Accuracy.GetHashCode();
            hashCode = hashCode * -1521134295 + AttackTypes.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string[]> .Default.GetHashCode(GroupMemberships);

            hashCode = hashCode * -1521134295 + EntitiesAffected.GetHashCode();
            hashCode = hashCode * -1521134295 + EntitiesAutoHit.GetHashCode();
            hashCode = hashCode * -1521134295 + Target.GetHashCode();
            hashCode = hashCode * -1521134295 + TargetLineOfSight.GetHashCode();
            hashCode = hashCode * -1521134295 + Range.GetHashCode();
            hashCode = hashCode * -1521134295 + TargetSecondary.GetHashCode();
            hashCode = hashCode * -1521134295 + RangeSecondary.GetHashCode();
            hashCode = hashCode * -1521134295 + EnduranceCost.GetHashCode();
            hashCode = hashCode * -1521134295 + InterruptTime.GetHashCode();
            hashCode = hashCode * -1521134295 + CastTime.GetHashCode();
            hashCode = hashCode * -1521134295 + RechargeTime.GetHashCode();
            hashCode = hashCode * -1521134295 + BaseRechargeTime.GetHashCode();
            hashCode = hashCode * -1521134295 + ActivatePeriod.GetHashCode();
            hashCode = hashCode * -1521134295 + EffectArea.GetHashCode();
            hashCode = hashCode * -1521134295 + Radius.GetHashCode();
            hashCode = hashCode * -1521134295 + Arc.GetHashCode();
            hashCode = hashCode * -1521134295 + MaxTargets.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(MaxBoosts);

            hashCode = hashCode * -1521134295 + CastFlags.GetHashCode();
            hashCode = hashCode * -1521134295 + ArtificalIntelligenceReport.GetHashCode();
            hashCode = hashCode * -1521134295 + NumberOfCharges.GetHashCode();
            hashCode = hashCode * -1521134295 + UsageTime.GetHashCode();
            hashCode = hashCode * -1521134295 + LifeTime.GetHashCode();
            hashCode = hashCode * -1521134295 + LifeTimeInGame.GetHashCode();
            hashCode = hashCode * -1521134295 + NumberAllowed.GetHashCode();
            hashCode = hashCode * -1521134295 + DoNotSave.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string[]> .Default.GetHashCode(BoostsAllowed);

            hashCode = hashCode * -1521134295 + CastThroughHold.GetHashCode();
            hashCode = hashCode * -1521134295 + IgnoreStrength.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(DescriptionShort);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(DescriptionLong);

            hashCode = hashCode * -1521134295 + EqualityComparer <int[]> .Default.GetHashCode(SetTypes);

            hashCode = hashCode * -1521134295 + ClickBuff.GetHashCode();
            hashCode = hashCode * -1521134295 + AlwaysToggle.GetHashCode();
            hashCode = hashCode * -1521134295 + Level.GetHashCode();
            hashCode = hashCode * -1521134295 + AllowFrontLoading.GetHashCode();
            hashCode = hashCode * -1521134295 + VariableEnabled.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(VariableName);

            hashCode = hashCode * -1521134295 + VariableMin.GetHashCode();
            hashCode = hashCode * -1521134295 + VariableMax.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string[]> .Default.GetHashCode(SubPowers);

            hashCode = hashCode * -1521134295 + EqualityComparer <int[]> .Default.GetHashCode(IgnoreEnhancements);

            hashCode = hashCode * -1521134295 + EqualityComparer <int[]> .Default.GetHashCode(IgnoreBuffs);

            hashCode = hashCode * -1521134295 + SkipMax.GetHashCode();
            hashCode = hashCode * -1521134295 + DisplayLocation.GetHashCode();
            hashCode = hashCode * -1521134295 + MutuallyExclusiveAuto.GetHashCode();
            hashCode = hashCode * -1521134295 + MutuallyExclusiveIgnore.GetHashCode();
            hashCode = hashCode * -1521134295 + AbsorbSummonEffects.GetHashCode();
            hashCode = hashCode * -1521134295 + AbsorbSummonAttributes.GetHashCode();
            hashCode = hashCode * -1521134295 + ShowSummonAnyway.GetHashCode();
            hashCode = hashCode * -1521134295 + NeverAutoUpdate.GetHashCode();
            hashCode = hashCode * -1521134295 + NeverAutoUpdateRequirements.GetHashCode();
            hashCode = hashCode * -1521134295 + IncludeFlag.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(ForcedClass);

            hashCode = hashCode * -1521134295 + SortOverride.GetHashCode();
            hashCode = hashCode * -1521134295 + BoostBoostable.GetHashCode();
            hashCode = hashCode * -1521134295 + BoostUsePlayerLevel.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <Effect[]> .Default.GetHashCode(Effects);

            hashCode = hashCode * -1521134295 + HiddenPower.GetHashCode();
            return(hashCode);
        }