Exemple #1
0
        private IWeapon BalrogSword()
        {
            IWeapon weapon = new Weapon();

            weapon.Id           = itemId++;
            weapon.Level        = 87;
            weapon.ItemPosition = Equipment.AvalableItemPosition.Wield;

            IDamage damage = new Objects.Damage.Damage();

            damage.Dice = GlobalReference.GlobalValues.DefaultValues.DiceForWeaponLevel(weapon.Level);
            damage.Type = DamageType.Fire;
            weapon.DamageList.Add(damage);

            damage      = new Objects.Damage.Damage();
            damage.Dice = GlobalReference.GlobalValues.DefaultValues.DiceForWeaponLevel(weapon.Level);
            damage.Type = DamageType.Poison;
            weapon.DamageList.Add(damage);

            damage      = new Objects.Damage.Damage();
            damage.Dice = GlobalReference.GlobalValues.DefaultValues.DiceForWeaponLevel(weapon.Level);
            damage.Type = DamageType.Slash;
            weapon.DamageList.Add(damage);

            weapon.RequiredHands = 2;
            weapon.KeyWords.Add("Balrog");
            weapon.KeyWords.Add("Sword");
            weapon.ExamineDescription  = "As you get closer to the sword flames flair up engulfing the sword in fire and smoke choking the air and making it hard to determine its true size and shape.";
            weapon.LongDescription     = "When the Balrog wielded the sword it had flames leaping from it, now it just smolders.";
            weapon.SentenceDescription = "sword";
            weapon.ShortDescription    = "A large flaming sword.";

            return(weapon);
        }
Exemple #2
0
        private IEnchantment DragonBreath()
        {
            ISound sound = new Sound();

            sound.Loop = false;
            sound.RandomSounds.Add($"{Zone.Name}\\DragonFireball_Center.mp3");
            sound.RandomSounds.Add($"{Zone.Name}\\DragonFireball_L-R.mp3");
            sound.RandomSounds.Add($"{Zone.Name}\\DragonFireball_R-L.mp3");

            IEnchantment fireDamage = new HeartbeatBigTickEnchantment();

            fireDamage.Effect                    = new Damage(sound);
            fireDamage.ActivationPercent         = 3;
            fireDamage.EnchantmentEndingDateTime = new DateTime(9999, 12, 31);

            IDamage damage = new Objects.Damage.Damage();

            damage.Dice = new Dice(5, 6);
            damage.Type = DamageType.Fire;
            fireDamage.Parameter.Damage        = damage;
            fireDamage.Parameter.TargetMessage = new TranslationMessage("A dragon sweeps down and breaths fire on you.");
            fireDamage.Parameter.Description   = "a dragon";

            return(fireDamage);
        }
Exemple #3
0
        public void Damage_Constructor()
        {
            Mock <IDice> dice = new Mock <IDice>();

            Objects.Damage.Damage damage = new Objects.Damage.Damage(dice.Object);

            Assert.AreSame(dice.Object, damage.Dice);
        }
Exemple #4
0
        private IEnchantment FireDamage()
        {
            IEnchantment fireDamage = new HeartbeatBigTickEnchantment();

            fireDamage.Effect                    = new Damage();
            fireDamage.ActivationPercent         = 5;
            fireDamage.EnchantmentEndingDateTime = new DateTime(9999, 12, 31);
            IDamage damage = new Objects.Damage.Damage();

            damage.Dice = new Dice(1, 6);
            damage.Type = DamageType.Fire;
            fireDamage.Parameter.Damage  = damage;
            fireDamage.Parameter.Message = new TranslationMessage("Fire leaps up and burns you.");

            return(fireDamage);
        }
Exemple #5
0
        private IWeapon Scalpel()
        {
            IWeapon scalpel = CreateWeapon(WeaponType.Dagger, 1);

            scalpel.KeyWords.Add("Scalpel");
            scalpel.ShortDescription    = "A surgical scalpel.";
            scalpel.LookDescription     = "Made of precision surgical steel it as reflective as it is sharp.";
            scalpel.ExamineDescription  = "Useful for making surgical cuts in the hands of a doctor and looking like you escaped from a mental hospital in yours.  Perhaps you should try to find a better, less psycho imagery inducing weapon.";
            scalpel.SentenceDescription = "surgical scalpel";
            scalpel.AttackerStat        = Stat.Dexterity;
            scalpel.DeffenderStat       = Stat.Dexterity;

            IDamage damage = new Objects.Damage.Damage();

            damage.Dice = GlobalReference.GlobalValues.DefaultValues.DiceForWeaponLevel(scalpel.Level);
            damage.Type = DamageType.Slash;
            scalpel.DamageList.Add(damage);
            scalpel.FinishLoad();
            return(scalpel);
        }
Exemple #6
0
        private IEnchantment DragonBreath()
        {
            ISound sound = new Sound();

            sound.Loop      = false;
            sound.SoundName = string.Format("{0}\\{1}", zone.Name, "DragonFireball.mp3");

            IEnchantment fireDamage = new HeartbeatBigTickEnchantment();

            fireDamage.Effect                    = new Damage(sound);
            fireDamage.ActivationPercent         = 3;
            fireDamage.EnchantmentEndingDateTime = new DateTime(9999, 12, 31);

            IDamage damage = new Objects.Damage.Damage();

            damage.Dice = new Dice(5, 6);
            damage.Type = DamageType.Fire;
            fireDamage.Parameter.Damage  = damage;
            fireDamage.Parameter.Message = new TranslationMessage("A dragon sweeps down and breaths fire on you.");

            return(fireDamage);
        }
Exemple #7
0
        public void Craftsman_Build_Weapon()
        {
            DateTime start  = DateTime.Now;
            IResult  result = craftsman.Build(npc.Object, pc.Object, AvalableItemPosition.Wield, 1, "keyword", "sentenceDescription", "shortDescription", "lookDescription", "examineDescription", DamageType.Pierce);

            Assert.IsFalse(result.AllowAnotherCommand);
            Assert.AreEqual("", result.ResultMessage);
            Assert.AreEqual(1, craftsmanObjects.Count);
            ICraftsmanObject craftsmanObject = craftsmanObjects[0];
            IWeapon          item            = craftsmanObject.Item as IWeapon;

            Assert.IsNotNull(item);
            Assert.AreEqual(AvalableItemPosition.Wield, item.ItemPosition);
            Assert.AreEqual(1, item.Level);
            Assert.AreEqual(1, item.KeyWords.Count);
            Assert.AreEqual("keyword", item.KeyWords[0]);
            Assert.AreEqual("sentenceDescription", item.SentenceDescription);
            Assert.AreEqual("shortDescription", item.ShortDescription);
            Assert.AreEqual("lookDescription", item.LookDescription);
            Assert.AreEqual("examineDescription", item.ExamineDescription);
            Assert.AreEqual(1, craftsmanObject.CraftsmanId.Zone);
            Assert.AreEqual(2, craftsmanObject.CraftsmanId.Id);

            DateTime end = DateTime.Now;

            Assert.IsTrue(start.AddMinutes(1) <= craftsmanObject.Completion);
            Assert.IsTrue(end.AddMinutes(1) >= craftsmanObject.Completion);

            IDamage damage = new Objects.Damage.Damage(GlobalReference.GlobalValues.DefaultValues.DiceForWeaponLevel(item.Level));

            Assert.AreEqual(1, item.DamageList.Count);
            IDamage itemDamge = item.DamageList[0];

            Assert.AreEqual(damage.BonusDamageStat, itemDamge.BonusDamageStat);
            Assert.AreEqual(damage.BonusDefenseStat, itemDamge.BonusDefenseStat);
            Assert.AreEqual(damage.Dice.Die, itemDamge.Dice.Die);
            Assert.AreEqual(damage.Dice.Sides, itemDamge.Dice.Sides);
            Assert.AreEqual(DamageType.Pierce, itemDamge.Type);
        }
Exemple #8
0
        public IWeapon GenerateRandomWeapon(int level, int effectiveLevel, WeaponType weaponType)
        {
            IWeapon weapon = new Item.Items.Weapon();

            weapon.Level = level;

            IDamage damage = new Objects.Damage.Damage();

            damage.Dice = GlobalReference.GlobalValues.DefaultValues.DiceForWeaponLevel(effectiveLevel);
            weapon.DamageList.Add(damage);

            weapon.Type = weaponType;
            switch (weaponType)
            {
            case WeaponType.Club:
                weapon.ExamineDescription  = "The club has been worn smooth with several large indentions.  There surly a story for each one but hopefully you were the story teller and not the receiving actor.";
                weapon.LookDescription     = "The club looks to well balanced with a {description} leather grip.";
                weapon.ShortDescription    = "The stout {material} club looks to be well balanced.";
                weapon.SentenceDescription = "club";
                weapon.KeyWords.Add("club");
                weapon.FlavorOptions.Add("{material}", new List <string>()
                {
                    "wooden", "stone"
                });
                weapon.FlavorOptions.Add("{description}", new List <string>()
                {
                    "frayed", "worn", "strong"
                });
                break;

            case WeaponType.Mace:
                weapon.ExamineDescription  = "The head of the mace {shape}.";
                weapon.LookDescription     = "The shaft of the mace is {shaft} and the head of the {head}.";
                weapon.ShortDescription    = "The metal mace has an ornate head used for bashing things.";
                weapon.SentenceDescription = "mace";
                weapon.KeyWords.Add("mace");
                weapon.FlavorOptions.Add("{shaft}", new List <string>()
                {
                    "smooth", "has intricate scroll work", "has images depicting an ancient battle"
                });
                weapon.FlavorOptions.Add("{head}", new List <string>()
                {
                    "polished", "covered in runes",
                });
                weapon.FlavorOptions.Add("{shape}", new List <string>()
                {
                    "is a round ball", "has {number} {design}", "has {number} sides that resemble the crown of a king", "is round with several distinct layers resembling some type of upside down tower"
                });
                weapon.FlavorOptions.Add("{number}", new List <string>()
                {
                    "four", "five"
                });
                weapon.FlavorOptions.Add("{design}", new List <string>()
                {
                    "rows of triangular pyramids", "dragon heads delicately carved into it", "pairs flanges of coming to a rounded point"
                });
                break;

            case WeaponType.WizardStaff:
                weapon.ExamineDescription  = "The wooden staff is constantly in flux as small leaves grow out from the staff, blossom {color2} flowers and then wilt and are reabsorbed into the staff.";
                weapon.LookDescription     = "The wooden staff has {head} for a head{feels}.";
                weapon.ShortDescription    = "The wizards staff hums with a deep sound that resonates deep in your body.";
                weapon.SentenceDescription = "wizard staff";
                weapon.KeyWords.Add("wizard staff");
                weapon.KeyWords.Add("staff");
                weapon.KeyWords.Add("wizard");
                weapon.FlavorOptions.Add("{head}", new List <string>()
                {
                    "gnarled fingers", "gnarled fingers wrapped around a {color} orb", "a {color} orb that floats above the end of the staff", "a {color} stone growing out of the end of the staff"
                });
                weapon.FlavorOptions.Add("{feels}", new List <string>()
                {
                    "", " and feels slightly cold", " and feels warm to the touch", " and vibrates in your hands"
                });
                weapon.FlavorOptions.Add("{color}", new List <string>()
                {
                    "red", "blue", "deep purple", "black as dark as night", "swirling gray blue"
                });
                weapon.FlavorOptions.Add("{color2}", new List <string>()
                {
                    "crimson", "sky blue", "deep purple", "white", "metallic orange", "silver"
                });
                break;

            case WeaponType.Axe:
                weapon.ExamineDescription  = "The blade is {blade description} and made of {material}.";
                weapon.LookDescription     = "The axe could have been used by a great warrior of days or the local peasant down the road.  It is hard tell the history just from its looks.";
                weapon.ShortDescription    = "The axe has a large head and strong wooden handle.";
                weapon.SentenceDescription = "axe";
                weapon.KeyWords.Add("axe");
                weapon.FlavorOptions.Add("{blade description}", new List <string>()
                {
                    "carved runes", "well worn", "full of ornate intersecting lines"
                });
                weapon.FlavorOptions.Add("{material}", new List <string>()
                {
                    "iron", "green glass", "black stone", "granite", "iron with interwoven bands of gold creating a museum worth axe"
                });
                break;

            case WeaponType.Sword:
                weapon.ExamineDescription  = "The blade is made from {blade material}.  The guard is {guard} and the handle is wrapped in {handle}.  There is a {pommel} for a pommel.";
                weapon.LookDescription     = "The blade is {condition} and has {sides} sharpened.";
                weapon.ShortDescription    = "A {type} sword used to cut down ones foes.";
                weapon.SentenceDescription = "sword";
                weapon.KeyWords.Add("sword");
                weapon.FlavorOptions.Add("{type}", new List <string>()
                {
                    "short", "long", "broad"
                });
                weapon.FlavorOptions.Add("{condition}", new List <string>()
                {
                    "pitted", "sharp", "smooth"
                });
                weapon.FlavorOptions.Add("{sides}", new List <string>()
                {
                    "one side", "both sides"
                });
                weapon.FlavorOptions.Add("{blade material}", new List <string>()
                {
                    "steal", "cold steal", "a black metal that seems to suck the light out of the room", "two different metals.  The first being {metal1} forming the base of the sword with an inlay of {metal2} forming {secondMetalObject}."
                });
                weapon.FlavorOptions.Add("{metal1}", new List <string>()
                {
                    "steal"
                });
                weapon.FlavorOptions.Add("{metal2}", new List <string>()
                {
                    "gold", "copper", "silver"
                });
                weapon.FlavorOptions.Add("{secondMetalObject}", new List <string>()
                {
                    "runes", "intricate weaves", "ancient writings"
                });
                weapon.FlavorOptions.Add("{guard}", new List <string>()
                {
                    "shaped like a pair of wings", "shaped like a pair of dragon heads", "slightly curved upwards"
                });
                weapon.FlavorOptions.Add("{handle}", new List <string>()
                {
                    "{silkColor} silk", "leather", "shark skin"
                });
                weapon.FlavorOptions.Add("{silkColor}", new List <string>()
                {
                    "white", "black", "gold", "silver", "brown", "red", "orange", "yellow", "green", "blue", "purple"
                });
                weapon.FlavorOptions.Add("{pommel}", new List <string>()
                {
                    "dragon claw holding a {pommelStone}", "large {pommelStone}", "skull with a pair of red rubies for eyes"
                });
                weapon.FlavorOptions.Add("{pommelStone}", new List <string>()
                {
                    "amber stone", "piece of amethyst", "aquamarine stone", "bloodstone", "diamond", "emerald", "garnet gem", "jade stone", "moonstone", "piece of onyx", "quartz stone", "rubie", "sapphire", "sunstone", "tigers eye", "topaz stone"
                });
                break;

            case WeaponType.Dagger:
                weapon.ExamineDescription  = "The blade is made from {blade material}.  The handle is wrapped in {handle} and there is a small {pommel} for a pommel.";
                weapon.LookDescription     = "The blade is {condition} and has a small fuller running the length of the blade.";
                weapon.ShortDescription    = "The dagger is short sharp and pointy.  Perfect for concealing on your person.";
                weapon.SentenceDescription = "dagger";
                weapon.KeyWords.Add("dagger");
                weapon.FlavorOptions.Add("{condition}", new List <string>()
                {
                    "pitted", "sharp", "smooth"
                });
                weapon.FlavorOptions.Add("{blade material}", new List <string>()
                {
                    "steal", "cold steal", "a black metal that seems to suck the light out of the room", "two different metals.  The first being {metal1} forming the base of the sword with an inlay of {metal2} forming {secondMetalObject}."
                });
                weapon.FlavorOptions.Add("{metal1}", new List <string>()
                {
                    "steal"
                });
                weapon.FlavorOptions.Add("{metal2}", new List <string>()
                {
                    "gold", "copper", "silver"
                });
                weapon.FlavorOptions.Add("{secondMetalObject}", new List <string>()
                {
                    "runes", "intricate weaves", "ancient writings"
                });
                weapon.FlavorOptions.Add("{handle}", new List <string>()
                {
                    "{silkColor} silk", "leather", "shark skin"
                });
                weapon.FlavorOptions.Add("{silkColor}", new List <string>()
                {
                    "white", "black", "gold", "silver", "brown", "red", "orange", "yellow", "green", "blue", "purple"
                });
                weapon.FlavorOptions.Add("{pommel}", new List <string>()
                {
                    "knights helmet", "small {pommelStone}", "skull with a pair of red rubies for eyes"
                });
                weapon.FlavorOptions.Add("{pommelStone}", new List <string>()
                {
                    "amber", "amethyst", "aquamarine", "bloodstone", "diamond", "emerald", "garnet", "jade", "moonstone", "onyx", "quartz", "rubies", "sapphire", "sunstone", "tigers eye", "topaz"
                });
                break;

            case WeaponType.Pick:
                weapon.ExamineDescription  = "The head of the war pick {head description}.";
                weapon.LookDescription     = "This pick has a large grooved hammer head and a sharp pick on the back.";
                weapon.ShortDescription    = "This war pick is a versatile weapon used to fight against armored opponents.";
                weapon.SentenceDescription = "war pick";
                weapon.KeyWords.Add("war pick");
                weapon.KeyWords.Add("pick");
                weapon.KeyWords.Add("war");
                weapon.FlavorOptions.Add("{head description}", new List <string>()
                {
                    "is polished smooth and shines slightly", "is slightly rusted", "has dwarven runes", "is covered in elvish runes", "depicts a kings crest"
                });
                break;

            case WeaponType.Spear:
                weapon.ExamineDescription  = "The spear head is made of {material}.";
                weapon.LookDescription     = "The spear head is pointed and about nine inches long.";
                weapon.ShortDescription    = "A large pointed spear that can be used to poke holes in ones foes or pick up trash.";
                weapon.SentenceDescription = "spear";
                weapon.KeyWords.Add("spear");
                weapon.FlavorOptions.Add("{material}", new List <string>()
                {
                    "flint", "black iron", "iron", "steel", "an unidentified blue metal that is warm to the touch"
                });
                break;
            }

            switch (weapon.Type)
            {
            case WeaponType.Club:
            case WeaponType.Mace:
            case WeaponType.WizardStaff:
                damage.Type = DamageType.Bludgeon;
                break;

            case WeaponType.Axe:
            case WeaponType.Sword:
                damage.Type = DamageType.Slash;
                break;

            case WeaponType.Dagger:
            case WeaponType.Pick:
            case WeaponType.Spear:
                damage.Type = DamageType.Pierce;
                break;
            }

            weapon.FinishLoad();

            return(weapon);
        }