Example #1
0
        public ItemAbilityData(ItemAbilityData data)
        {
            UnlockValue = data.UnlockValue;
            Unlocked    = data.Unlocked;

            Components = new List <AbilityComponent>();
            for (int i = 0; i < data.Components.Count; i++)
            {
                Components.Add(data.Components[i]);
            }

            Effects = new List <AbilityComponent>();
            for (int i = 0; i < data.Effects.Count; i++)
            {
                Effects.Add(data.Effects[i]);
            }
        }
Example #2
0
        static ItemSetData GenerateSetData()
        {
            ItemSetData data = new ItemSetData();

            data.SetName   = "Random Item Set Data";
            data.NumPieces = Random.Range(2, 9);

            data.LevelData = new List <ItemAbilityData>();
            for (int i = 0; i < data.NumPieces - 1; i++)
            {
                ItemAbilityData levelData = new ItemAbilityData();
                levelData.UnlockValue = i + 2;
                levelData.Effects.Add(GetRandomEffect());
                data.LevelData.Add(levelData);
            }

            return(data);
        }
Example #3
0
        static ArtifactData GenerateArtifactData()
        {
            ArtifactData data = new ArtifactData();

            data.Level      = 1;
            data.Experience = 0;
            data.NextLevel  = 1000;

            int numAbilitiesToGen = Random.Range(2, 6);

            data.LevelData = new List <ItemAbilityData>();
            for (int i = 0; i < numAbilitiesToGen; i++)
            {
                ItemAbilityData levelData = new ItemAbilityData();
                levelData.UnlockValue = i + 2;
                levelData.Effects.Add(GetRandomEffect());
                data.LevelData.Add(levelData);
            }

            return(data);
        }