Example #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);
        }
Example #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);
        }
Example #3
0
        public PlayerCharacter()
        {
            inventory.AddBodyItem(RPGWeapon.CreateRandomMeleeWeapon());
            //for (int i = 0; i < 3; i++)
            //{
            inventory.AddPackItem(RPGPotion.CreatePotionHealingSmall());
            //}

            this.AI.RunToAttackMelee = false;

            // for testing only:
            //SpellBook = RPGSpellBook.CreateRandomSpellbook();
            SpellBook = RPGSpellBook.CreateTestSpellbook();
        }
Example #4
0
        public static Actor CreateRandomRobber()
        {
            Actor a = CreateRandomActor(Attribute.Strength, Attribute.Dexterity);

            a.Name = "Robber";

            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);
            }

            return(a);
        }