Esempio n. 1
0
        public ItemEntry(ItemEntry copy)
        {
            Name = copy.Name;
            Desc = copy.Desc;
            Type = copy.Type;
            Price = copy.Price;
            Rarity = copy.Rarity;

            Sprite = copy.Sprite;

            Req = copy.Req;
            Req1 = copy.Req1;
            Req2 = copy.Req2;
            Req3 = copy.Req3;
            Req4 = copy.Req4;
            Req5 = copy.Req5;

            Effect = copy.Effect;
            Effect1 = copy.Effect1;
            Effect2 = copy.Effect2;
            Effect3 = copy.Effect3;

            ThrowEffect = copy.ThrowEffect;
            Throw1 = copy.Throw1;
            Throw2 = copy.Throw2;
            Throw3 = copy.Throw3;
        }
Esempio n. 2
0
        public void SaveItem()
        {
            ItemEntry entry = new ItemEntry();
            entry.Name = txtName.Text;

            entry.Type = (Enums.ItemType)cbItemType.SelectedIndex;
            entry.Rarity = (int)nudRarity.Value;
            entry.Price = (int)nudPrice.Value;
            entry.Desc = txtDescription.Text;

            entry.Sprite = chosenPic;

            entry.Req = (int)nudRequirement.Value;
            entry.Req1 = (int)nudReqData1.Value;
            entry.Req2 = (int)nudReqData2.Value;
            entry.Req3 = (int)nudReqData3.Value;
            entry.Req4 = (int)nudReqData4.Value;
            entry.Req5 = (int)nudReqData5.Value;

            entry.Effect = (int)nudEffect.Value;
            entry.Effect1 = (int)nudEffectData1.Value;
            entry.Effect2 = (int)nudEffectData2.Value;
            entry.Effect3 = (int)nudEffectData3.Value;

            entry.ThrowEffect = (int)nudThrowEffect.Value;
            entry.Throw1 = (int)nudThrowData1.Value;
            entry.Throw2 = (int)nudThrowData2.Value;
            entry.Throw3 = (int)nudThrowData3.Value;

            GameData.ItemDex[itemNum] = entry;
            GameData.ItemDex[itemNum].Save(itemNum);
        }
Esempio n. 3
0
        public static void Init()
        {
#if GAME_MODE
            ItemDex = new ItemEntry[MAX_ITEMS];
            for (int i = 0; i < MAX_ITEMS; i++)
            {
                ItemDex[i] = new ItemEntry();
                ItemDex[i].Load(i);
            }

            MoveDex = new MoveEntry[MAX_MOVES];
            for (int i = 0; i < MAX_MOVES; i++)
            {
                MoveDex[i] = new MoveEntry();
                MoveDex[i].Load(i);
            }
#endif
            Dex = new DexEntry[MAX_DEX + 1];
            for (int i = 0; i <= MAX_DEX; i++)
            {
                try
                {
                    Dex[i] = new DexEntry();
                    Dex[i].Load(i);
                }
                catch (Exception ex)
                {
                    Logs.Logger.LogError(ex);
                }
            }

#if GAME_MODE
            RoomAlgorithmDex = new RoomAlgorithm[MAX_ROOM_ALGORITHMS];
            for (int i = 0; i < MAX_ROOM_ALGORITHMS; i++)
            {
                RoomAlgorithmDex[i] = new RoomAlgorithm();
                RoomAlgorithmDex[i].Load(i);
            }

            FloorAlgorithmDex = new FloorAlgorithm[MAX_FLOOR_ALGORITHMS];
            for (int i = 0; i < MAX_FLOOR_ALGORITHMS; i++)
            {
                FloorAlgorithmDex[i] = new FloorAlgorithm();
                FloorAlgorithmDex[i].Load(i);
            }

            DungeonAlgorithmDex = new AlgorithmEntry[MAX_DUNGEON_ALGORITHMS];
            for (int i = 0; i < MAX_DUNGEON_ALGORITHMS; i++)
            {
                DungeonAlgorithmDex[i] = new AlgorithmEntry();
                DungeonAlgorithmDex[i].Load(i);
            }

            RDungeonDex = new RDungeonEntry[MAX_RDUNGEONS];
            for (int i = 0; i < MAX_RDUNGEONS; i++)
            {
                RDungeonDex[i] = new RDungeonEntry();
                RDungeonDex[i].Load(i);
            }
#endif
        }
Esempio n. 4
0
        public static void Init()
        {
            #if GAME_MODE

            ItemDex = new ItemEntry[MAX_ITEMS];
            for (int i = 0; i < MAX_ITEMS; i++) {
                ItemDex[i] = new ItemEntry();
                ItemDex[i].Load(i);
            }

            MoveDex = new MoveEntry[MAX_MOVES];
            for (int i = 0; i < MAX_MOVES; i++) {
                MoveDex[i] = new MoveEntry();
                MoveDex[i].Load(i);
            }

            #endif
            Dex = new DexEntry[MAX_DEX+1];
            for (int i = 0; i <= MAX_DEX; i++)
            {
                try
                {
                    Dex[i] = new DexEntry();
                    Dex[i].Load(i);
                }
                catch (Exception ex)
                {
                    Logs.Logger.LogError(ex);
                }
            }

            #if GAME_MODE
            RoomAlgorithmDex = new RoomAlgorithm[MAX_ROOM_ALGORITHMS];
            for (int i = 0; i < MAX_ROOM_ALGORITHMS; i++) {
                RoomAlgorithmDex[i] = new RoomAlgorithm();
                RoomAlgorithmDex[i].Load(i);
            }

            FloorAlgorithmDex = new FloorAlgorithm[MAX_FLOOR_ALGORITHMS];
            for (int i = 0; i < MAX_FLOOR_ALGORITHMS; i++) {
                FloorAlgorithmDex[i] = new FloorAlgorithm();
                FloorAlgorithmDex[i].Load(i);
            }

            DungeonAlgorithmDex = new AlgorithmEntry[MAX_DUNGEON_ALGORITHMS];
            for (int i = 0; i < MAX_DUNGEON_ALGORITHMS; i++) {
                DungeonAlgorithmDex[i] = new AlgorithmEntry();
                DungeonAlgorithmDex[i].Load(i);
            }

            RDungeonDex = new RDungeonEntry[MAX_RDUNGEONS];
            for (int i = 0; i < MAX_RDUNGEONS; i++) {
                RDungeonDex[i] = new RDungeonEntry();
                RDungeonDex[i].Load(i);
            }
            #endif
        }