Example #1
0
        static BlueprintFeatureSelection CreateOppositionResearch()
        {
            var noFeature          = Helpers.PrerequisiteNoFeature(null);
            var wizardClass        = Helpers.GetClass("ba34257984f4c41408ce1dc2004e342e");
            var spellFocusGreater  = (library.Get <BlueprintFeature>("5b04b45b228461c43bad768eb0f7c7bf"));
            var oppositionResearch = Helpers.CreateFeatureSelection("OppositionResearchSelection",
                                                                    "Opposition Research",
                                                                    "Select one Wizard opposition school; preparing spells of this school now only requires one spell slot of the appropriate level instead of two, and you no longer have the –4 Spellcraft penalty for crafting items from that school.",
                                                                    "48eb4a47b01e4d088f763ff20824189e",
                                                                    spellFocusGreater.Icon,
                                                                    FeatureGroup.WizardFeat,
                                                                    Helpers.PrerequisiteClassLevel(wizardClass, 9),
                                                                    noFeature);

            noFeature.Feature = oppositionResearch;
            var schoolFeats       = new List <BlueprintFeature>();
            var oppositionSchools = library.Get <BlueprintFeatureSelection>("6c29030e9fea36949877c43a6f94ff31");

            foreach (var school in EnumUtils.GetValues <SpellSchool>())
            {
                if (school == SpellSchool.None || school == SpellSchool.Universalist)
                {
                    continue;
                }

                var oppositionFeat = oppositionSchools.AllFeatures.First(
                    f => f.GetComponent <AddOppositionSchool>()?.School == school);
                var specialistFeat = oppositionFeat.GetComponent <PrerequisiteNoFeature>().Feature;

                var schoolName = LocalizedTexts.Instance.SpellSchoolNames.GetText(school);
                schoolFeats.Add(Helpers.CreateFeature(oppositionResearch.name + school,
                                                      oppositionResearch.Name + $" — {schoolName}",
                                                      oppositionResearch.Description,
                                                      Helpers.MergeIds(oppositionResearch.AssetGuid, oppositionFeat.AssetGuid),
                                                      specialistFeat.Icon,
                                                      FeatureGroup.Feat,
                                                      oppositionFeat.PrerequisiteFeature(),
                                                      RemoveOppositionSchool.Create(wizardClass, school)));
            }
            oppositionResearch.Groups = new FeatureGroup[] { FeatureGroup.Feat, FeatureGroup.WizardFeat };
            oppositionResearch.SetFeatures(schoolFeats);
            return(oppositionResearch);
        }
        static BlueprintFeatureSelection CreateOppositionResearch()
        {
            var noFeature          = Helpers.PrerequisiteNoFeature(null);
            var wizardClass        = Helpers.GetClass("ba34257984f4c41408ce1dc2004e342e");
            var spellFocusGreater  = (library.Get <BlueprintFeature>("5b04b45b228461c43bad768eb0f7c7bf"));
            var oppositionResearch = Helpers.CreateFeatureSelection("OppositionResearchSelection",
                                                                    "禁制学派研究",
                                                                    "选择一个你的禁制学派,现在准备此学派的法术只需要一个合适等级的法术位而不是两个。并且你不再在制造此学派物品时承受-4惩e",
                                                                    "48eb4a47b01e4d088f763ff20824189e",
                                                                    spellFocusGreater.Icon,
                                                                    FeatureGroup.WizardFeat,
                                                                    Helpers.PrerequisiteClassLevel(wizardClass, 9),
                                                                    noFeature);

            noFeature.Feature = oppositionResearch;
            var schoolFeats       = new List <BlueprintFeature>();
            var oppositionSchools = library.Get <BlueprintFeatureSelection>("6c29030e9fea36949877c43a6f94ff31");

            foreach (var school in EnumUtils.GetValues <SpellSchool>())
            {
                if (school == SpellSchool.None || school == SpellSchool.Universalist)
                {
                    continue;
                }

                var oppositionFeat = oppositionSchools.AllFeatures.First(
                    f => f.GetComponent <AddOppositionSchool>()?.School == school);
                var specialistFeat = oppositionFeat.GetComponent <PrerequisiteNoFeature>().Feature;

                var schoolName = LocalizedTexts.Instance.SpellSchoolNames.GetText(school);
                schoolFeats.Add(Helpers.CreateFeature(oppositionResearch.name + school,
                                                      oppositionResearch.Name + $" — {schoolName}",
                                                      oppositionResearch.Description,
                                                      Helpers.MergeIds(oppositionResearch.AssetGuid, oppositionFeat.AssetGuid),
                                                      specialistFeat.Icon,
                                                      FeatureGroup.Feat,
                                                      oppositionFeat.PrerequisiteFeature(),
                                                      RemoveOppositionSchool.Create(wizardClass, school)));
            }
            oppositionResearch.Groups = new FeatureGroup[] { FeatureGroup.Feat, FeatureGroup.WizardFeat };
            oppositionResearch.SetFeatures(schoolFeats);
            return(oppositionResearch);
        }