Beispiel #1
0
 public SocketableFile(string name, string displayName, string iconName, AffixesSec affixesSec,
                       int rarity, int value, int level, int minLevel, int maxLevel, string baseFile, string basePath) :
     this(name, displayName, iconName, affixesSec, rarity, value, level, minLevel, maxLevel)
 {
     this.baseFile = baseFile;
     this.basePath = basePath;
 }
Beispiel #2
0
 public SocketableFile(string name, string displayName, string iconName, AffixesSec affixesSec,
                       int rarity, int value, int level, int minLevel, int maxLevel)
     : this(name, displayName, iconName)
 {
     this.affixesSec = affixesSec;
     this.rarity     = rarity;
     this.value      = value;
     this.level      = level;
     this.minLevel   = minLevel;
     this.maxLevel   = maxLevel;
 }
Beispiel #3
0
        static void CreateGem(ref int gc, string gemtype)
        {
            int[] levels = new int[] { 3, 8, 16, 24, 32, 40,
                                       50, 60, 70, 80, 90, 100,
                                       120, 140, 160, 180, 200, 220,
                                       240, 300, 360, 420, 480, 540,
                                       600, 680, 760, 840, 920, 1000,
                                       10000000, 10000000, 10000000, 10000000,
                                       10000000, 10000000, 10000000, 10000000 };

            string[] prefixes = new string[] { "Cracked", "Flawed", "Dull", "Refined", "Sparkling", "Dazzling" };
            string[] suffixes = new string[] { "Ore", "Gem", "Stone", "Block", "Star" };
            int      quantity = prefixes.Length * suffixes.Length;

            string[] names = new string[quantity];
            int      i     = 0;

            foreach (string suffix in suffixes)
            {
                foreach (string prefix in prefixes)
                {
                    names[i++] = prefix + ' ' + gemtype + ' ' + suffix;
                }
            }

            int rarity = (int)Math.Pow(2, quantity - 1);

            for (i = 0; i < quantity; ++i)
            {
                AffixesSec affixSec = new AffixesSec(new string[] { gemtype + "Weapon", gemtype + "Armor",
                                                                    gemtype + "Trinket" + (i + 1).ToString("00") });
                SocketableFile file = new SocketableFile(gemtype + (i + 1).ToString("00"), names[i], gemtype + (i + 1).ToString(),
                                                         affixSec, rarity, 500, levels[i], levels[i], levels[i + 8] - 1);
                file.unitGuid = (++gc).ToString();
                file.Create();
                rarity /= 2;
            }
        }
Beispiel #4
0
 public void AddAffixes(AffixesSec affixesSec)
 {
     Add(affixesSec);
 }
Beispiel #5
0
        static void CreateSkillLevels(SkillFile skill, string affixName, string layoutFile, bool isAttack)
        {
            LevelSec levelSec;
            // mana cost progression by skill level
            double manaCost = 2;
            double manaInc1 = 1;
            double manaInc2 = 0;
            double manaInc3 = 0.1;
            double manaInc4 = 0.005;
            // level requirement progression by skill level
            int levelReq    = 1;
            int levelReqInc = 1;
            // affix level progression by skill level
            double affixLevel     = 1;
            double affixLevelInc  = 2;
            double affixLevelInc2 = 0.106;

            if (!isAttack)
            {
                affixLevelInc  = 1;
                affixLevelInc2 = 0;
            }
            // add all the skill levels
            for (int skillLvl = 1; skillLvl <= 120; ++skillLvl)
            {
                // prepare all the needed sections
                if (isAttack)
                {
                    levelSec = new LevelSec(skillLvl, (int)(manaCost + 0.5), levelReq);
                }
                else
                {
                    levelSec = new LevelSec(skillLvl, 0, levelReq);
                }
                if (skillLvl > 100)
                {
                    levelSec.levelRequired = 0;
                }
                EventSec   eventSec   = new EventSec(EventSec.EVENT_TRIGGER, layoutFile);
                AffixesSec affixesSec = new AffixesSec(affixName);
                affixesSec.affixLevel = (int)(affixLevel + 0.5);
                // add the sections in the proper order
                eventSec.AddAffixes(affixesSec);
                levelSec.AddEvent(eventSec);
                skill.AddLevel(levelSec);

                // increase mana cost
                manaInc3 += manaInc4;
                manaInc2 += manaInc3;
                manaInc1 += manaInc2;
                manaCost += manaInc1;
                // increase level requirements
                if (skillLvl % 10 == 0)
                {
                    ++levelReqInc;
                }
                levelReq += levelReqInc;
                // increase affix level
                affixLevelInc += affixLevelInc2;
                affixLevel    += affixLevelInc;
            }
        }