Exemple #1
0
        public void ManaCost_Zero()
        {
            ManaCost mc = ManaCost.Parse("{0}");

            Assert.AreEqual(0, mc.ConvertedManaCost);
            Assert.AreEqual("0", mc.ToString());
        }
Exemple #2
0
        public void ManaCost_1W()
        {
            ManaCost mc = ManaCost.Parse("{1}{W}");

            Assert.AreEqual(mc.ConvertedManaCost, 2);
            Assert.AreEqual("1W", mc.ToString());
        }
Exemple #3
0
        public void ManaCost_NoCost()
        {
            ManaCost mc = ManaCost.Parse("");

            Assert.IsTrue(mc.HasNoCost);
            Assert.AreEqual("(no cost)", mc.ToString());
        }
Exemple #4
0
        public void ManaCost_Colorless_Generic()         // Kozilek, the Great Distortion
        {
            ManaCost mc = ManaCost.Parse("8CC");

            Assert.AreEqual(mc.ConvertedManaCost, 10);
            Assert.AreEqual("{8}{C}{C}", mc.ToString(true));
        }
Exemple #5
0
        public void ManaCost_XUU_NoBrackets()
        {
            ManaCost mc = ManaCost.Parse("{X}{U}{U}");

            Assert.AreEqual(mc.ConvertedManaCost, 2);
            Assert.AreEqual("XUU", mc.ToString());
        }
Exemple #6
0
        public void ManaCost_GenericTwelve()
        {
            ManaCost mc = ManaCost.Parse("{12}");

            Assert.AreEqual(mc.ConvertedManaCost, 12);
            Assert.AreEqual("12", mc.ToString());
        }
Exemple #7
0
        public void ManaCost_TwoGenericOrColored()
        {
            ManaCost mc = ManaCost.Parse("{2/W}{2/U}{2/B}{2/R}{2/G}");

            Assert.AreEqual(mc.ConvertedManaCost, 10);
            Assert.AreEqual("{2/W}{2/U}{2/B}{2/R}{2/G}", mc.ToString());
        }
Exemple #8
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")
                             + ", ManaCost: " + (ManaCost != -1 ? ManaCost.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);
        }
Exemple #9
0
        public void ManaCost_HybridGW()         // Dawnglow Infusion
        {
            ManaCost mc = ManaCost.Parse("{X}{G/W}");

            Assert.AreEqual(mc.ConvertedManaCost, 1);
            Assert.AreEqual("{X}{G/W}", mc.ToString(true));
        }
Exemple #10
0
        public void ManaCost_FiveColors_InconsistentBraces()         // Progenitus
        {
            ManaCost mc = ManaCost.Parse("WWUU{B}BR{R}{G}G");

            Assert.AreEqual(mc.ConvertedManaCost, 10);
            Assert.AreEqual("WWUUBBRRGG", mc.ToString());
        }
Exemple #11
0
        public void ManaCost_PhyrexianGreenWithX()         // Corrosive Gale
        {
            ManaCost mc = ManaCost.Parse("X{GP}");

            Assert.AreEqual(mc.ConvertedManaCost, 1);
            Assert.AreEqual("X{P/G}", mc.ToString());
        }
Exemple #12
0
 public override string ToString()
 {
     return(String.Format("{0} *HpM: {1}\r\nCost: {2}",
                          MinHeal.ToString("0"),
                          HpM.ToString("0.00"),
                          ManaCost.ToString("0")));
 }
Exemple #13
0
        public override string ToString()
        {
            StringBuilder res = new StringBuilder(name);

            if (!ManaCost.HasNoCost)
            {
                res.Append(" | ").Append(ManaCost.ToString());
            }
            res.Append(" | ").Append(TypeLine);
            if (Power != null && Toughness != null)
            {
                res.Append(" | ").Append(Power.ToString()).Append("/").Append(Toughness.ToString());
            }
            if (Loyalty != null)
            {
                res.Append(" | L=").Append(Loyalty.ToString());
            }
            int len0 = oracleText.Length > 0 ? oracleText[0].Length : 0;

            switch (oracleText.Length)
            {
            case 0: break;

            case 1: res.Append(" | ").Append(len0 > 30 ? oracleText[0].Substring(0, 30) + "…" : oracleText[0]); break;

            default: res.Append(" | ").Append(len0 > 30 ? oracleText[0].Substring(0, 30) + "…" : oracleText[0]).Append(" +").Append(oracleText.Length - 1).Append(" more"); break;
            }
            return(res.ToString());
        }
Exemple #14
0
        public void ManaCost_GenericTen()
        {
            ManaCost mc = ManaCost.Parse("10");

            Assert.IsFalse(mc.HasNoCost);
            Assert.AreEqual(mc.ConvertedManaCost, 10);
            Assert.AreEqual("{10}", mc.ToString(true));
        }
Exemple #15
0
 public override string ToString()
 {
     return(String.Format("{0} *DpS: {1}\r\nDpM: {2}\r\nTick: {3}\r\nCost: {4}",
                          AvgDamage.ToString("0"),
                          DpS.ToString("0.00"),
                          DpM.ToString("0.00"),
                          (AvgDamage / DebuffDuration * 3).ToString("0"),
                          ManaCost.ToString("0")));
 }
Exemple #16
0
 public override string ToString()
 {
     return(String.Format("{0} *HpS: {1}\r\nHpM: {2}\r\nTick: {3}\r\nCost: {4}",
                          MinHeal.ToString("0"),
                          HpS.ToString("0.00"),
                          HpM.ToString("0.00"),
                          (MinHeal / HotDuration * 3).ToString("0"),
                          ManaCost.ToString("0")));
 }
Exemple #17
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")));
 }
Exemple #18
0
 public override string ToString()
 {
     return(String.Format("{0} *HpS(2): {1}\r\nHpM (2): {2}\r\nMin Heal: {3}\r\nMax Heal: {4}\r\nAvg Crit: {5}\r\nMax Crit: {6}\r\nCost: {7}",
                          AvgHeal.ToString("0"),
                          HpS.ToString("0.00"),
                          HpM.ToString("0.00"),
                          MinHeal.ToString("0"),
                          MaxHeal.ToString("0"),
                          AvgCrit.ToString("0"),
                          MaxCrit.ToString("0"),
                          ManaCost.ToString("0")));
 }
Exemple #19
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")));
 }
Exemple #20
0
 public override string ToString()
 {
     return(String.Format("{0} *HpM(1): {1}\r\nHpM(2): {2}\r\nHpM 3): {3}\r\nHpM(4): {4}\r\nHpM(5): {5}\r\nCrit: {6}\r\nCost: {7}\r\nRange: {8}",
                          AvgHeal.ToString("0"),
                          (AvgHeal / ManaCost).ToString("0.00"),
                          (AvgHeal * 2 / ManaCost).ToString("0.00"),
                          (AvgHeal * 3 / ManaCost).ToString("0.00"),
                          (AvgHeal * 4 / ManaCost).ToString("0.00"),
                          (AvgHeal * 5 / ManaCost).ToString("0.00"),
                          AvgCrit.ToString("0"),
                          ManaCost.ToString("0"),
                          Range));
 }
Exemple #21
0
        public void ChangeCardCostOn(int value, bool changeRealCost = false)
        {
            if (changeRealCost)
            {
                WorkingCard.RealCost += value;
                ManaCost              = WorkingCard.RealCost;
                CostText.text         = ManaCost.ToString();
            }
            else
            {
                ManaCost      = WorkingCard.RealCost + value;
                CostText.text = ManaCost.ToString();
            }

            UpdateColorOfCost();
        }
Exemple #22
0
 public override string ToString()
 {
     return(String.Format("{0} *HpS(3): {1}\r\nHpS(4): {9}\r\nHpS(5): {11}\r\nHpM(3): {2}\r\nHpM(4): {10}\r\nHpM(5): {12}\r\nMin Heal: {3}\r\nMax Heal: {4}\r\nAvg Crit: {5}\r\nMax Crit: {6}\r\nCost: {7}\r\nRange: {8}",
                          AvgHeal.ToString("0"),
                          (AvgHeal * 3 / GlobalCooldown).ToString("0.00"),
                          (AvgHeal * 3 / ManaCost).ToString("0.00"),
                          MinHeal.ToString("0"),
                          MaxHeal.ToString("0"),
                          AvgCrit.ToString("0"),
                          MaxCrit.ToString("0"),
                          ManaCost.ToString("0"),
                          Range,
                          (AvgHeal * 4 / GlobalCooldown).ToString("0.00"),
                          (AvgHeal * 4 / ManaCost).ToString("0.00"),
                          (AvgHeal * 5 / GlobalCooldown).ToString("0.00"),
                          (AvgHeal * 5 / ManaCost).ToString("0.00")));
 }
Exemple #23
0
        public void SetCardCost(int value, bool changeRealCost = false)
        {
            if (changeRealCost)
            {
                WorkingCard.LibraryCard.Cost = value;
                WorkingCard.RealCost         = value;
                ManaCost      = WorkingCard.RealCost;
                CostText.text = ManaCost.ToString();
            }
            else
            {
                ManaCost      = value;
                CostText.text = ManaCost.ToString();
            }

            UpdateColorOfCost();
        }
Exemple #24
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);
        }
Exemple #25
0
 public override string ToString()
 {
     return(String.Format("{0} *Cost: {1}",
                          (HealthConvertionCoef * 100).ToString("0") + "%",
                          ManaCost.ToString("0")));
 }
Exemple #26
0
 public override string ToString()
 {
     return(String.Format("{0} *Cost: {1}",
                          MinDamage.ToString("0"),
                          ManaCost.ToString("0")));
 }