Exemplo n.º 1
0
        private static void addFavoredClassBonus(BlueprintCharacterClass favoredClass)
        {
            BlueprintProgression      progression         = library.TryGet <BlueprintProgression>(Helpers.MergeIds(Helpers.fighterClass.AssetGuid, "081651146ada4d0a88f6e9190ac6b01a"));
            BlueprintFeatureSelection FavoredClassFeature = library.TryGet <BlueprintFeatureSelection>("bc4c271ef0954eceb808d84978c500f7");

            if (progression != null && FavoredClassFeature != null)
            {
                BlueprintProgression newProgression = library.CopyAndAdd(progression, $"FavoredClass{favoredClass.name}Progression", Helpers.getGuid($"FavoredClass{favoredClass.name}Progression"));
                newProgression.SetName($"Favored Class — {favoredClass.Name}");
                newProgression.SetIcon(favoredClass.Icon);
                newProgression.Classes = new BlueprintCharacterClass[] { favoredClass };
                newProgression.ExclusiveProgression = favoredClass;

                FavoredClassFeature.SetFeatures(FavoredClassFeature.AllFeatures.AddToArray(newProgression));
            }
        }
Exemplo n.º 2
0
        static public void CreateFeats()
        {
            if (!prepared)
            {
                LoadSpecialSpells();
            }
            if (addSpecialSpellFeat != null)
            {
                return;
            }
            BlueprintSpellList specialList = Helpers.Create <BlueprintSpellList>();

            specialList.name          = "RisiaBossSpecialSpells";
            specialList.SpellsByLevel = new SpellLevelList[10];
            for (int i = 0; i < 10; i++)
            {
                specialList.SpellsByLevel[i] = new SpellLevelList(i);
            }
            int len = specialSpellLevels.Count;

            for (int i = 0; i < len; i++)
            {
                specialList.SpellsByLevel[specialSpellLevels[i]].Spells.Add(specialSpells[i]);
            }
            library.AddAsset(specialList, OtherUtils.GetMd5("Risia.Boss.AddSpecialSpellList.List"));
            addSpecialSpellListFeat = Helpers.CreateFeature("RisiaAddSpecialSpellListFeat", "", "",
                                                            OtherUtils.GetMd5("Risia.Boss.AddSpecialSpellList.Feat"),
                                                            IconSet.elvenmagic,
                                                            FeatureGroup.None,
                                                            Helpers.Create <AddSpecialSpellList>(a => {
                a.CharacterClass = ArcanistClass.arcanist;
                a.SpellList      = specialList;
            }));

            /*addSpecialSpellFeat = Helpers.CreateFeature("RisiaAddSpecialSpellFeat", "", "",
             *  OtherUtils.GetMd5("Risia.AddSpecialSpell.Feat"),
             *  IconSet.elvenmagic,
             *  FeatureGroup.None);*/
            addSpecialSpellFeat = Helpers.CreateProgression("RisiaAddSpecialSpellProgression", "", "",
                                                            OtherUtils.GetMd5("Risia.AddSpecialSpell.Progression.Feat"),
                                                            null,
                                                            FeatureGroup.None);
            addSpecialSpellFeat.IsClassFeature = false;
            addSpecialSpellFeat.Classes        = new BlueprintCharacterClass[] { ArcanistClass.arcanist };
            addSpecialSpellFeat.LevelEntries   = new LevelEntry[20];
            for (int i = 0; i < 20; i++)
            {
                addSpecialSpellFeat.LevelEntries[i] = new LevelEntry {
                    Level = i + 1
                };
            }
            BlueprintFeature[] subFeats = new BlueprintFeature[10];
            for (int i = 0; i < 10; i++)
            {
                subFeats[i] = Helpers.CreateFeature($"Risia.AddSpecialSpellFeat.Level{i}", "", "",
                                                    OtherUtils.GetMd5($"Risia.AddSpecialSpellFeat.Level{i}"),
                                                    null,
                                                    FeatureGroup.None);
            }
            for (int i = 0; i < len; i++)
            {
                subFeats[specialSpellLevels[i]].AddComponent(specialSpells[i].CreateAddKnownSpell(ArcanistClass.arcanist, specialSpellLevels[i]));
            }
            for (int i = 1; i <= 9; i++)
            {
                int firstArcanistLevel = (i == 1 ? 1 : i * 2) + 1;
                addSpecialSpellFeat.LevelEntries[firstArcanistLevel - 1] = Helpers.LevelEntry(firstArcanistLevel, subFeats[i]);
            }
            addSpecialSpellFeat.SetName(Helpers.CreateString("Risia.AddSpecialSpell.Feat.Name"));
            addSpecialSpellFeat.SetDescription(Helpers.CreateString("Risia.AddSpecialSpell.Feat.Desc"));
        }