Ejemplo n.º 1
0
 private bool IsScrollOfType(ReadOnlyInventoryItem item, ScrollType scrollType)
 {
     return(item.Item.Name.Contains(scrollType == ScrollType.Experience ? "exp" : scrollType.ToString(), StringComparison.OrdinalIgnoreCase));
 }
Ejemplo n.º 2
0
        public string Details()
        {
            StringBuilder buffer = new StringBuilder(string.Empty);

            if (IsVowel())
            {
                buffer.Append("An ");
                buffer.Append(Name);
            }
            else
            {
                buffer.Append("A ");
                buffer.Append(Name);
            }
            buffer.Append("=");
            buffer.Append("=");
            switch (Type)
            {
            case ItemType.Weapon:
                buffer.Append("A robust weapon, enough to make a sizable dent in your foes.");
                buffer.Append("=");
                buffer.Append("It is of ");
                buffer.Append(quality.ToString());
                buffer.Append(" quality.");
                buffer.Append("=");
                buffer.Append("=");
                buffer.Append("It provides the following bonus to attack:");
                buffer.Append("=");
                buffer.Append("Attack Bonus: ");
                buffer.Append(attackBonus.ToString());
                buffer.Append("=");
                buffer.Append("=");
                if (bodyBonus > 0)
                {
                    buffer.Append("Wearing it also increases your Body by ");
                    buffer.Append(bodyBonus.ToString());
                    buffer.Append("=");
                }
                if (mindBonus > 0)
                {
                    buffer.Append("Wearing it also increases your Mind by ");
                    buffer.Append(mindBonus.ToString());
                    buffer.Append("=");
                }
                if (finesseBonus > 0)
                {
                    buffer.Append("Wearing it also increases your Finesse by ");
                    buffer.Append(finesseBonus.ToString());
                    buffer.Append("=");
                }
                break;

            case ItemType.Armour:
                buffer.Append("A full set of solid armor, enough to protect your entire body.");
                buffer.Append("=");
                buffer.Append("It is of ");
                buffer.Append(quality.ToString());
                buffer.Append(" quality.");
                buffer.Append("=");
                buffer.Append("=");
                buffer.Append("It provides the following protection:");
                buffer.Append("=");
                buffer.Append("Defense Bonus: ");
                buffer.Append(defenseBonus.ToString());
                buffer.Append("=");
                buffer.Append("=");
                if (bodyBonus > 0)
                {
                    buffer.Append("Wearing it also increases your Body by ");
                    buffer.Append(bodyBonus.ToString());
                    buffer.Append("=");
                }
                if (mindBonus > 0)
                {
                    buffer.Append("Wearing it also increases your Mind by ");
                    buffer.Append(mindBonus.ToString());
                    buffer.Append("=");
                }
                if (finesseBonus > 0)
                {
                    buffer.Append("Wearing it also increases your Finesse by ");
                    buffer.Append(finesseBonus.ToString());
                    buffer.Append("=");
                }
                break;

            case ItemType.Potion:
                buffer.Append("A stoppered glass vial containing a glowing liquid.");
                buffer.Append("=");
                buffer.Append("Drinking it will result in a");
                buffer.Append(PotionType.ToString());
                buffer.Append(" spell being cast upon you.");
                buffer.Append("=");
                buffer.Append("=");
                buffer.Append("There is only enough liquid for one dose.");
                break;

            case ItemType.Scroll:
                buffer.Append("A piece of paper containing the");
                buffer.Append(ScrollType.ToString());
                buffer.Append(" spell written on it in glyphs.");
                buffer.Append("=");
                buffer.Append("This item can only be used once, and then the glyphs will magically disappear.");
                break;

            case ItemType.Wand:
                buffer.Append("A wooden wand containing the ");
                buffer.Append(WandType.ToString());
                buffer.Append(" spell.");
                buffer.Append("=");
                buffer.Append("It currently has ");
                buffer.Append(charges.ToString());
                buffer.Append(" stored.");
                break;

            case ItemType.Corpse:
                buffer.Append("A frozen corpse of a long-dead traveller.");
                break;
            }
            return(buffer.ToString());
        }