Exemplo n.º 1
0
        public string getDisplayName()
        {
            string firstNon = "";
            int    c        = GetPlusValue(ref firstNon);

            if (relicData != null)
            {
                RelicInfo ri = relicData.OrderByDescending(o => o.notoriety).First();
                return((c > 0 ? "+" + c + " " : "") + ri.relicName + " " + Main.ToTitleCase(item.name));
            }
            else if (enchants.Count > 0)
            {
                return((c > 0 ? "+" + c + " " : "") + firstNon + Main.ToTitleCase(item.name));
            }
            return(Main.ToTitleCase(item.name));
        }
Exemplo n.º 2
0
        public static BigRational GetRelicValue(ItemStack examinedStack)
        {
            BigRational val = examinedStack.item.getBaseValue() * 2000 * BigRational.Pow(1.1f, examinedStack.enchants.Count + examinedStack.antiquity);

            if (examinedStack.relicData != null)
            {
                RelicInfo ri = examinedStack.relicData.OrderByDescending(o => o.notoriety).First();
                if (ri != null)
                {
                    UpgradeValueWrapper wrap;
                    Main.instance.player.upgrades.TryGetValue(UpgradeType.QUEST_SCALAR, out wrap);
                    BigRational b = examinedStack.item.getBaseValue() * BigRational.Pow(1.5f, ri.notoriety) * 1000;
                    b   *= ((UpgradeFloatValue)wrap).value;
                    val += b;
                }
                if (examinedStack.relicData.Any(x => x.relicName == "Lost"))
                {
                    val /= 10000;
                }
                val *= Main.instance.GetRelicSellMultiplier();
            }
            val = BigRational.Truncate(val, 6, false);
            return(val);
        }