Exemple #1
0
        public static Actor CreateRandomThug()
        {
            // create fighter-type
            Actor a = CreateRandomActor(Attribute.Strength, Attribute.Constitution);

            a.Name = "Thug";

            a.SetAlignment(Alignment.Neutral_Evil);

            a.AI.RunToAttackMelee = true;

            // add random melee weapon
            RPGWeapon wpn = RPGWeapon.CreateRandomMeleeWeapon();

            if (a.inventory.AddBodyItem(wpn) == false)
            {
                a.inventory.AddPackItem(wpn);
            }

            // add one piece of armor
            RPGArmor apiece = RPGArmor.CreateRandomArmorPiece();

            a.inventory.AddBodyItem(apiece);

            return(a);
        }
Exemple #2
0
        public static Actor CreateRandomFighter()
        {
            Actor a = CreateRandomActor(Attribute.Strength, Attribute.Constitution);

            a.Name = "Random Fighter";

            // equip with fighter gear
            a.inventory.AddBodyItem(RPGArmor.CreateRandomTorsoArmor());
            a.inventory.AddBodyItem(RPGArmor.CreateRandomShield());

            // 50/50 for a belt
            if (new RPGCalc().Roll(100) > 50)
            {
                a.inventory.AddBodyItem(new RPGArmor(RPGArmor.ArmorClass.Belt));
            }

            // boots
            // 20% heavy, 40% light, 40% none
            int bootsRoll = new RPGCalc().Roll(100);

            if (bootsRoll > 80)
            {
                a.inventory.AddBodyItem(new RPGArmor(RPGArmor.ArmorClass.HeavyBoots));
            }
            else if (bootsRoll > 40)
            {
                a.inventory.AddBodyItem(new RPGArmor(RPGArmor.ArmorClass.LightBoots));
            }

            // helm
            // 20% full, 40% small, 40% none
            int helmRoll = new RPGCalc().Roll(100);

            if (helmRoll > 80)
            {
                a.inventory.AddBodyItem(new RPGArmor(RPGArmor.ArmorClass.FullHelm));
            }
            else if (helmRoll > 40)
            {
                a.inventory.AddBodyItem(new RPGArmor(RPGArmor.ArmorClass.SmallHelm));
            }

            // add random melee weapon
            RPGWeapon wpn = RPGWeapon.CreateRandomMeleeWeapon();

            if (a.inventory.AddBodyItem(wpn) == false)
            {
                a.inventory.AddPackItem(wpn);
            }

            a.AI.RunToAttackMelee = true;

            return(a);
        }
Exemple #3
0
        public static Actor CreateRandomArcher()
        {
            Actor a = CreateRandomActor(Attribute.Dexterity, Attribute.Intelligence);

            a.Name = "Random Archer";

            // equip with archer gear
            a.inventory.AddBodyItem(RPGArmor.CreateRandomTorsoArmor());

            a.AI.RunToAttackMelee = false;

            // 25% for a belt
            if (new RPGCalc().Roll(100) > 75)
            {
                a.inventory.AddBodyItem(new RPGArmor(RPGArmor.ArmorClass.Belt));
            }

            // boots
            // 35% light, 65% none
            int bootsRoll = new RPGCalc().Roll(100);

            if (bootsRoll > 65)
            {
                a.inventory.AddBodyItem(new RPGArmor(RPGArmor.ArmorClass.LightBoots));
            }

            // helm
            // 25% small
            int helmRoll = new RPGCalc().Roll(100);

            if (helmRoll > 75)
            {
                a.inventory.AddBodyItem(new RPGArmor(RPGArmor.ArmorClass.SmallHelm));
            }

            // bow or crossbow or sling
            RPGWeapon wpn = (RPGWeapon)RPGWeapon.CreateRandomLauncherWeapon();

            a.inventory.AddBodyItem(wpn);
            a.inventory.AddBodyItem(new Projectile(a, wpn.GetProjectileType(), null));

            return(a);
        }