コード例 #1
0
        public void Initialize(RedSkyGame game)
        {
            _item = new Item[13];

            List <string> ItemNames = new List <string>()
            {
                "Potion", "Pheonix Down", "Ether", "Mega Potion", "Elixer", "Remedy", "Hi-Potion", "Fire Item"
            };

            for (int i = 0; i < 8; i++)
            {
                _item[i]             = new Item(game);
                _item[i].Name        = ItemNames[i];
                _item[i].Usage       = ItemUse.Usable;
                _item[i].Targets     = ItemTargets.Character;
                _item[i].Description = _item[i].Name + " Description here.";
            }

            _item[3].Targets = ItemTargets.Party;

            _item[7].Usage = ItemUse.BattleUsable;


            Equipment Sword = new Equipment(game);

            Sword.Name         = "Sword";
            Sword.Description  = Sword.Name + " Description here.";
            Sword.HeldBy       = BodyPartType.Hand;
            Sword.Weight       = 1;
            Sword.AttackDamage = 5;
            Sword.Strength     = 3;
            _item[8]           = Sword;

            Equipment Axe = new Equipment(game);

            Axe.Name         = "Axe";
            Axe.Description  = Sword.Name + " Description here.";
            Axe.HeldBy       = BodyPartType.Hand;
            Axe.Weight       = 3;
            Axe.AttackDamage = 10;
            Axe.Strength     = 5;
            _item[9]         = Axe;

            Equipment Gloves = new Equipment(game);

            Gloves.Name           = "Gloves";
            Gloves.Description    = Gloves.Name + " Description here.";
            Gloves.WornOn         = BodyPartType.Hand;
            Gloves.Weight         = 100;
            Gloves.MagicalAbility = 5;
            Gloves.Vitality       = 2;
            _item[10]             = Gloves;

            Equipment Helmet = new Equipment(game);

            Helmet.Name        = "Helmet";
            Helmet.Description = Helmet.Name + " Description here.";
            Helmet.WornOn      = BodyPartType.Head;
            Helmet.Weight      = 4;
            _item[11]          = Helmet;

            Equipment Shirt = new Equipment(game);

            Shirt.Name        = "Shirt";
            Shirt.Description = Shirt.Name + " Description here.";
            Shirt.WornOn      = BodyPartType.Body;
            Shirt.Weight      = 2;
            _item[12]         = Shirt;
        }
コード例 #2
0
        internal Dictionary <string, float> GetAlteredSecondaryStatsListHolding(BodyPart bodyPart, Equipment equipment)
        {
            Equipment preserveHolding = bodyPart.Holding;

            ChangeEquipHeld(bodyPart, equipment);

            Dictionary <string, float> statsList = GetSecondaryStatsList();

            ChangeEquipHeld(bodyPart, preserveHolding);

            return(statsList);
        }
コード例 #3
0
 internal void ChangeEquipHeld(BodyPart thisPart, Equipment thisEquipment)
 {
     thisPart.Holding = thisEquipment;
 }
コード例 #4
0
        internal Dictionary <string, float> GetAlteredStatsListWearing(BodyPart bodyPart, Equipment equipment)
        {
            Equipment preserveWearing = bodyPart.Wearing;

            ChangeEquipWorn(bodyPart, equipment);

            Dictionary <string, float> statsList = GetStatsList();

            ChangeEquipWorn(bodyPart, preserveWearing);

            return(statsList);
        }