Example #1
0
        static void CreateAbundantRevelations(BlueprintFeature revelation, BlueprintFeatureSelection abundantRevelations, List <BlueprintFeature> resourceChoices, List <Prerequisite> prereqRevelations, HashSet <BlueprintFeature> seen)
        {
            if (revelation == LifeMystery.lifeLink)
            {
                return;
            }

            bool first = true;

            foreach (var resourceLogic in revelation.GetComponents <AddAbilityResources>())
            {
                if (!seen.Add(revelation))
                {
                    continue;
                }
                var resource = resourceLogic.Resource;
                var feature  = Helpers.CreateFeature($"{abundantRevelations.name}{revelation.name}",
                                                     $"{abundantRevelations.Name} — {revelation.Name}",
                                                     $"{abundantRevelations.Description}\n{revelation.Description}",
                                                     Helpers.MergeIds("d2f3b9be00b04940805bff7b7f60381f", revelation.AssetGuid, resource.AssetGuid),
                                                     revelation.Icon,
                                                     FeatureGroup.None,
                                                     revelation.PrerequisiteFeature(),
                                                     resource.CreateIncreaseResourceAmount(1));
                resourceChoices.Add(feature);
                if (first)
                {
                    prereqRevelations.Add(revelation.PrerequisiteFeature(true));
                    first = false;
                }
            }
            var selection = revelation as BlueprintFeatureSelection;

            if (selection == null)
            {
                return;
            }

            foreach (var r in selection.Features)
            {
                CreateAbundantRevelations(r, abundantRevelations, resourceChoices, prereqRevelations, seen);
            }
        }
Example #2
0
        static BlueprintFeature CreateImprovedHeritage(BlueprintProgression bloodline, BlueprintFeature heritageFeat, int powerLevel)
        {
            var power = GetBloodlinePower(bloodline, powerLevel);

            return(CreateHeritageFeat(bloodline, power, powerLevel,
                                      $"{GetPowerName(power)}ImprovedHeritage",
                                      $"Improved Eldritch Heritage — {power.Name}",
                                      power.Icon,
                                      Helpers.MergeIds(power.AssetGuid, "6a4ec4f556ff4f0d9581722972cb6600"),
                                      new List <BlueprintComponent> {
                heritageFeat.PrerequisiteFeature()
            }));
        }
        private static void CreateGuidedHandFeat()
        {
            BlueprintFeature selectiveChannel = library.Get <BlueprintFeature>("fd30c69417b434d47b6b03b9c1f568ff");

            List <BlueprintFeature> guidedHandFeatures = new List <BlueprintFeature>();

            foreach (BlueprintFeature feature in Resources.FindObjectsOfTypeAll <BlueprintFeature>())
            {
                if (feature.Groups.Contains(FeatureGroup.Deities))
                {
                    AddFeatureOnClassLevel levelUpProficiencyFeature = feature.GetComponent <AddFeatureOnClassLevel>();
                    if (levelUpProficiencyFeature != null)
                    {
                        BlueprintFeature proficiencyFeature = levelUpProficiencyFeature.Feature;
                        WeaponCategory   category;
                        if (proficiencyFeature.AssetGuid == "7812ad3672a4b9a4fb894ea402095167")
                        {
                            category = WeaponCategory.UnarmedStrike;
                        }
                        else
                        {
                            AddProficiencies addedProficiency = proficiencyFeature.GetComponent <AddProficiencies>();
                            category = addedProficiency.WeaponProficiencies[0];
                        }

                        guidedHandFeatures.Add(Helpers.CreateFeature(
                                                   "GuidedHand" + feature.AssetGuid,
                                                   "Guided Hand (" + feature.name + ")",
                                                   "With your deity’s favored weapon, you can use your Wisdom modifier instead of your Strength or Dexterity modifier on attack rolls.",
                                                   Helpers.getGuid("GuidedHand" + feature.AssetGuid),
                                                   feature.Icon,
                                                   FeatureGroup.Feat,
                                                   feature.PrerequisiteFeature(),
                                                   Helpers.Create <PrerequisiteProficiency>(x => x.WeaponProficiencies = new WeaponCategory[] { category }),
                                                   selectiveChannel.PrerequisiteFeature(),
                                                   Helpers.Create <ReplaceAttackStatForWeaponCategoryLogic>(x =>
                        {
                            x.StatType       = StatType.Wisdom;
                            x.WeaponCategory = category;
                        })
                                                   ));
                    }
                }
            }

            library.AddFeats(guidedHandFeatures.ToArray());
        }
Example #4
0
        private static void CreateDivineFightingTechniques()
        {
            BlueprintFeature    desnaFeature = library.Get <BlueprintFeature>("2c0a3b9971327ba4d9d85354d16998c1");         // DesnaFeature
            BlueprintWeaponType _weaponType  = Main.library.Get <BlueprintWeaponType>("5a939137fc039084580725b2b0845c3f"); // Starknife

            BlueprintFeature desnasShootingStar = Helpers.CreateFeature(
                "DesnasShootingStar",
                "Desnas Shooting Star",
                "Among the divine fighting manuals of the Inner Sea, few are as ancient as Clamor of the Spheres, a collection of fighting techniques favored by Desna’s faithful. True to its name, the manual focuses on interpreting the chaos and sounds of combat, but nevertheless provides insightful and downright brilliant methods of defense with Desna’s favored weapon, using techniques that treat a fight with a starknife more as a beautiful dance than a battle. \nYou can add your Charisma bonus to attack rolls and damage rolls when wielding a starknife. If you do so, you don’t modify attack rolls and damage rolls with your starknife with your Strength modifier, your Dexterity modifier (if you have Weapon Finesse), or any other ability score (if you have an ability that allows you to modify attack rolls and damage rolls with that ability score)",
                Helpers.getGuid("DesnasShootingStar"),
                desnaFeature.Icon,
                FeatureGroup.CombatFeat,
                Helpers.Create <DesnasShootingStarLogic>(),
                desnaFeature.PrerequisiteFeature(),
                Helpers.Create <PrerequisiteAlignment>(x => x.Alignment    = AlignmentMaskType.ChaoticGood),
                Helpers.Create <AddStartingEquipment>(x => x.CategoryItems = new [] { _weaponType.Category }));

            Helpers.AddCombatFeats(library, desnasShootingStar);
        }
        public static void CreateAnimalAllyFeatLine()
        {
            Main.ApplyPatch(typeof(GetPortraitFolderPathPatch), "Test");

            BlueprintFeature skillFocusLoreNature = Main.library.Get <BlueprintFeature>("6507d2da389ed55448e0e1e5b871c013");

            BlueprintFeature natureSoul = Helpers.CreateFeature(
                "NatureSoul",
                "Nature Soul",
                "You are innately in tune with nature and venerate the power and mystery of the natural world. \n" +
                "Benefit: You get a + 2 bonus on all Knowledge(nature) checks and Survival checks.If you have 10 or more ranks in one of these skills, the bonus increases to + 4 for that skill.",
                Helpers.getGuid("NatureSoul"),
                skillFocusLoreNature.Icon,
                FeatureGroup.Feat,
                Helpers.Create <NatureSoulLogic>()
                );


            BlueprintFeature        animalDomainProgressionSecondary = Main.library.Get <BlueprintFeature>("f13eb6be93dd5234c8126e5384040009");
            BlueprintFeature        animalDomainProgression          = Main.library.Get <BlueprintFeature>("23d2f87aa54c89f418e68e790dba11e0");
            BlueprintArchetype      sacredHuntsmasterArchetype       = Main.library.Get <BlueprintArchetype>("46eb929c8b6d7164188eb4d9bcd0a012");
            BlueprintCharacterClass inquisitorClass = Main.library.Get <BlueprintCharacterClass>("f1a70d9e1b0b41e49874e1fa9052a1ce");


            BlueprintFeature AnimalCompanionEmptyCompanion     = Main.library.Get <BlueprintFeature>("472091361cf118049a2b4339c4ea836a");
            BlueprintFeature AnimalCompanionFeatureBear        = Main.library.Get <BlueprintFeature>("f6f1cdcc404f10c4493dc1e51208fd6f");
            BlueprintFeature AnimalCompanionFeatureBoar        = Main.library.Get <BlueprintFeature>("afb817d80b843cc4fa7b12289e6ebe3d");
            BlueprintFeature AnimalCompanionFeatureCentipede   = Main.library.Get <BlueprintFeature>("f9ef7717531f5914a9b6ecacfad63f46");
            BlueprintFeature AnimalCompanionFeatureDog         = Main.library.Get <BlueprintFeature>("f894e003d31461f48a02f5caec4e3359");
            BlueprintFeature AnimalCompanionFeatureEkun        = Main.library.Get <BlueprintFeature>("e992949eba096644784592dc7f51a5c7");
            BlueprintFeature AnimalCompanionFeatureElk         = Main.library.Get <BlueprintFeature>("aa92fea676be33d4dafd176d699d7996");
            BlueprintFeature AnimalCompanionFeatureLeopard     = Main.library.Get <BlueprintFeature>("2ee2ba60850dd064e8b98bf5c2c946ba");
            BlueprintFeature AnimalCompanionFeatureMammoth     = Main.library.Get <BlueprintFeature>("6adc3aab7cde56b40aa189a797254271");
            BlueprintFeature AnimalCompanionFeatureMonitor     = Main.library.Get <BlueprintFeature>("ece6bde3dfc76ba4791376428e70621a");
            BlueprintFeature AnimalCompanionFeatureSmilodon    = Main.library.Get <BlueprintFeature>("126712ef923ab204983d6f107629c895");
            BlueprintFeature AnimalCompanionFeatureWolf        = Main.library.Get <BlueprintFeature>("67a9dc42b15d0954ca4689b13e8dedea");
            BlueprintFeature AnimalCompanionFeatureGiantSpider = AddSpiderCompanion();

            BlueprintFeature[] features = new BlueprintFeature[]
            {
                AnimalCompanionEmptyCompanion,
                AnimalCompanionFeatureBear,
                AnimalCompanionFeatureBoar,
                AnimalCompanionFeatureCentipede,
                AnimalCompanionFeatureDog,
                AnimalCompanionFeatureEkun,
                AnimalCompanionFeatureElk,
                AnimalCompanionFeatureLeopard,
                AnimalCompanionFeatureMammoth,
                AnimalCompanionFeatureMonitor,
                AnimalCompanionFeatureSmilodon,
                AnimalCompanionFeatureWolf,
                AnimalCompanionFeatureGiantSpider
            };

            AddAnimalCompanionToAllSelections(AnimalCompanionFeatureGiantSpider);

            BlueprintProgression domainAnimalCompanionProgression = Main.library.Get <BlueprintProgression>("125af359f8bc9a145968b5d8fd8159b8");


            BlueprintProgression animalAllyProgression = Main.library.CopyAndAdd(domainAnimalCompanionProgression, "animalAllyProgression", Helpers.getGuid("animalAllyProgression"));

            animalAllyProgression.Classes = (BlueprintCharacterClass[])Array.Empty <BlueprintCharacterClass>();

            BlueprintFeatureSelection animalAlly = Helpers.CreateFeatureSelection(
                "AnimalAlly",
                "Animal Ally",
                "You gain an animal companion as if you were a druid of your character level –3 from the following list: badger, bird, camel, cat (small), dire rat, dog, horse, pony, snake (viper), or wolf. If you later gain an animal companion through another source (such as the Animal domain, divine bond, hunter’s bond, mount, or nature bond class features), the effective druid level granted by this feat stacks with that granted by other sources.",
                Helpers.getGuid("AnimalAlly"),
                skillFocusLoreNature.Icon,
                FeatureGroup.Feat,
                natureSoul.PrerequisiteFeature(),
                Helpers.PrerequisiteCharacterLevel(4),
                Helpers.Create <PrerequisiteNoArchetype>(x =>
            {
                x.Archetype      = sacredHuntsmasterArchetype;
                x.CharacterClass = inquisitorClass;
            }),
                animalDomainProgression.PrerequisiteNoFeature(),
                animalDomainProgressionSecondary.PrerequisiteNoFeature(),
                Helpers.Create <AddFeatureOnApply>(x => x.Feature = animalAllyProgression),
                Helpers.Create <AnimalAllyAdjustToLevelLogic>()
                );

            animalAlly.SetFeatures(features);

            Main.library.AddFeats(natureSoul, animalAlly);
        }
        private static void CreateAdvancedWeaponTraining()
        {
            var fighter = Helpers.fighterClass;

            BlueprintFeature twoHandedWeaponFeature = library.Get <BlueprintFeature>("88da2a5dfc505054f933bb81014e864f");

            twoHandedWeaponFeature.AddComponent(twoHandedWeaponFeature.PrerequisiteFeature());


            BlueprintFeatureSelection advancedWeaponTraining = Helpers.CreateFeatureSelection("AdvancedWeaponTraining",
                                                                                              "Advanced Weapon Training",
                                                                                              "Beginning at 9th level, instead of selecting an additional fighter weapon group, a fighter can choose an advanced weapon training option for one fighter weapon group that he previously selected with the weapon training class feature.",
                                                                                              "e10b3aca8e8c4075b96ac6b5f27dae27",
                                                                                              WeaponTraining.Icon,
                                                                                              FeatureGroup.CombatFeat,
                                                                                              WeaponTraining.PrerequisiteFeature(true),
                                                                                              twoHandedWeaponFeature.PrerequisiteFeature(true),
                                                                                              fighter.PrerequisiteClassLevel(5)
                                                                                              );

            var features = getAdvancedWeaponTraining(fighter);

            var goBackFeature = Helpers.CreateFeature("0GoBack", "(Go Back)", "Helps to navigate in deep selection trees. Has no other use.", Helpers.getGuid("0GoBack"), null, FeatureGroup.None, Helpers.Create <UndoSelectionLogic>());
            var prerequisite  = Helpers.Create <PrerequisiteMeetsPrerequisiteForAny>();

            prerequisite.Features = features.ToArray();
            goBackFeature.AddComponent(prerequisite);

            advancedWeaponTraining.AddComponent(prerequisite);
            features.Add(goBackFeature);
            advancedWeaponTraining.SetFeatures(features);

            library.AddCombatFeats(advancedWeaponTraining);

            BlueprintFeatureSelection advancedWeaponTrainingForSelection = Helpers.CreateFeatureSelection("AdvancedWeaponTrainingLVL9",
                                                                                                          "Advanced Weapon Training",
                                                                                                          "Beginning at 9th level, instead of selecting an additional fighter weapon group, a fighter can choose an advanced weapon training option for one fighter weapon group that he previously selected with the weapon training class feature.",
                                                                                                          "914b143cd76b40dc91feb87d7c404b23",
                                                                                                          WeaponTraining.Icon,
                                                                                                          FeatureGroup.CombatFeat,
                                                                                                          Helpers.PrerequisiteFeature(WeaponTraining),
                                                                                                          fighter.PrerequisiteClassLevel(9)
                                                                                                          );

            BlueprintFeatureSelection advancedWeaponTrainingForSelectionLVL13 = Helpers.CreateFeatureSelection("AdvancedWeaponTrainingLVL13",
                                                                                                               "Advanced Weapon Training",
                                                                                                               "Beginning at 9th level, instead of selecting an additional fighter weapon group, a fighter can choose an advanced weapon training option for one fighter weapon group that he previously selected with the weapon training class feature.",
                                                                                                               Helpers.getGuid("AdvancedWeaponTrainingLVL13"),
                                                                                                               WeaponTraining.Icon,
                                                                                                               FeatureGroup.CombatFeat,
                                                                                                               WeaponTraining.PrerequisiteFeature(),
                                                                                                               fighter.PrerequisiteClassLevel(13)
                                                                                                               );

            BlueprintFeatureSelection advancedWeaponTrainingForSelectionLVL17 = Helpers.CreateFeatureSelection("AdvancedWeaponTrainingLVL17",
                                                                                                               "Advanced Weapon Training",
                                                                                                               "Beginning at 9th level, instead of selecting an additional fighter weapon group, a fighter can choose an advanced weapon training option for one fighter weapon group that he previously selected with the weapon training class feature.",
                                                                                                               Helpers.getGuid("AdvancedWeaponTrainingLVL17"),
                                                                                                               WeaponTraining.Icon,
                                                                                                               FeatureGroup.CombatFeat,
                                                                                                               Helpers.PrerequisiteFeature(WeaponTraining),
                                                                                                               fighter.PrerequisiteClassLevel(17)
                                                                                                               );

            advancedWeaponTrainingForSelection.SetFeatures(features);
            advancedWeaponTrainingForSelection.AddComponent(prerequisite);
            advancedWeaponTrainingForSelectionLVL13.SetFeatures(features);
            advancedWeaponTrainingForSelectionLVL13.AddComponent(prerequisite);
            advancedWeaponTrainingForSelectionLVL17.SetFeatures(features);
            advancedWeaponTrainingForSelectionLVL17.AddComponent(prerequisite);


            WeaponTraining.SetFeatures(WeaponTraining.AllFeatures.AddToArray(advancedWeaponTrainingForSelection, advancedWeaponTrainingForSelectionLVL13, advancedWeaponTrainingForSelectionLVL17));
        }
        private static List <BlueprintFeature> getAdvancedWeaponTraining(BlueprintCharacterClass fighter)
        {
            var weaponFocus   = library.Get <BlueprintParametrizedFeature>("1e1f627d26ad36f43bbd26cc2bf8ac7e");
            var weaponFinesse = library.Get <BlueprintFeature>("90e54424d682d104ab36436bd527af09");
            var features      = new List <BlueprintFeature>();

            FillWeaponFocusAndWeaponTrainingDictionaries();
            CreateAbilityMoveActions();


            foreach (var weaponTraining in _weaponTrainingBluePrints)
            {
                string weaponTrainingName        = getWeaponTrainingName(weaponTraining, true);
                string weaponTrainingDisplayName = getWeaponTrainingName(weaponTraining);


                string newAssetID = Helpers.getGuid("FocusedWeapon" + weaponTrainingName);

                var focusedWeaponSpecific = Helpers.Create <BlueprintParametrizedFeatureWeaponTraining>(x => x.WeaponTraining = weaponTraining);
                Helpers.SetFeatureInfo(focusedWeaponSpecific, "FocusedWeapon" + weaponTrainingName,
                                       "Focused Weapon (" + weaponTrainingDisplayName + ")", "The fighter selects one weapon for which he has Weapon Focus and that belongs to the associated fighter weapon group. The fighter can deal damage with this weapon based on the damage of the warpriest’s sacred weapon class feature, treating his fighter level as his warpriest level. The fighter must have Weapon Focus with the selected weapon in order to choose this option.",
                                       newAssetID,
                                       WeaponTraining.Icon,
                                       FeatureGroup.Feat,
                                       weaponFocus.PrerequisiteFeature(),
                                       weaponTraining.PrerequisiteFeature(),
                                       Helpers.Create <FocusedWeaponLogic>());
                focusedWeaponSpecific.ParameterType = FeatureParameterType.WeaponCategory;
                focusedWeaponSpecific.Prerequisite  = weaponFocus;
                focusedWeaponSpecific.Ranks         = 1;

                features.Add(focusedWeaponSpecific);


                features.Add(Helpers.CreateFeature(
                                 "ArmedBravery" + weaponTrainingName,
                                 "Armed Bravery (" + weaponTrainingDisplayName + ")",
                                 "The fighter applies his bonus from bravery to Will saving throws. In addition, the DC of Intimidate checks to demoralize him increases by an amount equal to twice his bonus from bravery. The fighter must have the bravery class feature in order to select this option.",
                                 Helpers.getGuid("ArmedBravery" + weaponTrainingName),
                                 WeaponTraining.Icon,
                                 FeatureGroup.CombatFeat,
                                 weaponTraining.PrerequisiteFeature(),
                                 BraveryFeature.PrerequisiteFeature(),
                                 Helpers.Create <ArmedBraveryLogic>(x => x.WeaponTraining = weaponTraining)
                                 ));

                features.Add(Helpers.CreateFeature(
                                 "CombatManeuverDefense" + weaponTrainingName,
                                 "Combat Maneuver Defense (" + weaponTrainingDisplayName + ")",
                                 "When the fighter is wielding weapons from the associated weapon group, his weapon training bonus applies to his CMD against all combat maneuvers attempted against him, instead of just against disarm and sunder combat maneuvers.",
                                 Helpers.getGuid("CombatManeuverDefense" + weaponTrainingName),
                                 WeaponTraining.Icon,
                                 FeatureGroup.CombatFeat,
                                 weaponTraining.PrerequisiteFeature(),
                                 Helpers.Create <CombatManeuverDefenseLogic>(x => x.WeaponTraining = weaponTraining)
                                 ));

                features.Add(Helpers.CreateFeature(
                                 "DazzlingIntimidation" + weaponTrainingName,
                                 "Dazzling Intimidation (" + weaponTrainingDisplayName + ")",
                                 "The fighter applies his weapon training bonus to Intimidate checks and can attempt an Intimidate check to demoralize an opponent as a move action instead of a standard action. If he has the Dazzling Display feat, he can use it as a standard action instead of a full-round action.",
                                 Helpers.getGuid("DazzlingIntimidation" + weaponTrainingName),
                                 WeaponTraining.Icon,
                                 FeatureGroup.CombatFeat,
                                 weaponTraining.PrerequisiteFeature(),
                                 Helpers.Create <DazzlingIntimidationLogic>(x => x.WeaponTraining = weaponTraining)
                                 ));

                features.Add(Helpers.CreateFeature(
                                 "DefensiveWeaponTraining" + weaponTrainingName,
                                 "Defensive Weapon Training (" + weaponTrainingDisplayName + ")",
                                 "The fighter gains a +1 shield bonus to his Armor Class. The fighter adds half his weapon’s enhancement bonus (if any) to this shield bonus. When his weapon training bonus for weapons from the associated fighter weapon group reaches +4, this shield bonus increases to +2. This shield bonus is lost if the fighter is immobilized or helpless.",
                                 Helpers.getGuid("DefensiveWeaponTraining" + weaponTrainingName),
                                 WeaponTraining.Icon,
                                 FeatureGroup.CombatFeat,
                                 weaponTraining.PrerequisiteFeature(),
                                 Helpers.Create <DefensiveWeaponTrainingLogic>(x => x.WeaponTraining = weaponTraining)
                                 ));

                features.Add(Helpers.CreateFeature(
                                 "EffortlessDualWielding" + weaponTrainingName,
                                 "Effortless Dual-Wielding (" + weaponTrainingDisplayName + ")",
                                 "The fighter treats all one-handed weapons that belong to the associated weapon group as though they were light weapons when determining his penalties on attack rolls for fighting with two weapons.",
                                 Helpers.getGuid("EffortlessDualWielding" + weaponTrainingName),
                                 WeaponTraining.Icon,
                                 FeatureGroup.CombatFeat,
                                 weaponTraining.PrerequisiteFeature(),
                                 Helpers.Create <EffortlessDualWieldingLogic>(x => x.WeaponTraining = weaponTraining)
                                 ));

                BlueprintFeatureSelection versatileTraining = Helpers.CreateFeatureSelection(
                    "VersatileTraining" + weaponTrainingName,
                    "Versatile Training (" + weaponTrainingDisplayName + ")",
                    "The fighter can use his base attack bonus in place of his ranks in two skills of his choice that are associated with the fighter weapon group he has chosen with this option (see below). The fighter need not be wielding an associated weapon to use this option. When using versatile training, the fighter substitutes his total base attack bonus (including his base attack bonus gained through levels in other classes) for his ranks in these skills, but adds the skill’s usual ability score modifier and any other bonuses or penalties that would modify those skills. Once the skills have been selected, they cannot be changed and the fighter can immediately retrain all of his skill ranks in the selected skills at no additional cost in money or time. In addition, the fighter adds all skills chosen with this option to his list of class skills. A fighter can choose this option up to two times. The Bluff and Intimidate skills are associated with all fighter weapon groups. The various fighter weapon groups also have the following associated skills: axes (Climb, Survival), bows (Knowledge [engineering], Perception), close (Sense Motive, Stealth), crossbows (Perception, Stealth), double (Acrobatics, Sense Motive), firearms (Perception, Sleight of Hand), flails (Acrobatics, Sleight of Hand), hammers (Diplomacy, Ride), heavy blades (Diplomacy, Ride), light blades (Diplomacy, Sleight of Hand), monk (Acrobatics, Escape Artist), natural (Climb, Fly, Swim), polearms (Diplomacy, Sense Motive), siege engines (Disable Device, Profession [driver]), spears (Handle Animal, Ride), and thrown (Acrobatics, Perception)",
                    Helpers.getGuid("VersatileTraining" + weaponTrainingName),
                    WeaponTraining.Icon,
                    FeatureGroup.CombatFeat,
                    weaponTraining.PrerequisiteFeature());

                List <BlueprintFeature> versatileTrainingFeatures = new List <BlueprintFeature>();
                WeaponGroupAttackBonus  weaponGroupAttackBonus    = weaponTraining.GetComponent <WeaponGroupAttackBonus>();
                if (weaponGroupAttackBonus != null)
                {
                    foreach (var statType in _weaponTrainingToStatType[weaponGroupAttackBonus.WeaponGroup])
                    {
                        versatileTrainingFeatures.Add(Helpers.CreateFeature(
                                                          "VersatileTraining" + weaponTrainingName + statType,
                                                          "Versatile Training (" + statType + ")",
                                                          "The fighter treats all one-handed weapons that belong to the associated weapon group as though they were light weapons when determining his penalties on attack rolls for fighting with two weapons.",
                                                          Helpers.getGuid("VersatileTraining" + weaponTrainingDisplayName + statType),
                                                          WeaponTraining.Icon,
                                                          FeatureGroup.CombatFeat,
                                                          weaponTraining.PrerequisiteFeature(),
                                                          Helpers.Create <SetSkillRankToBabLogic>(x => x.type = statType)));
                    }
                }

                versatileTraining.AddComponent(Helpers.Create <PrerequisiteMeetsPrerequisiteForAny>(x => x.Features = versatileTrainingFeatures.ToArray()));
                versatileTraining.SetFeatures(versatileTrainingFeatures);
                features.Add(versatileTraining);

                var fightersFinesse = Helpers.CreateFeature(
                    "FightersFinesse" + weaponTrainingName,
                    "Fighter’s Finesse (" + weaponTrainingDisplayName + ")",
                    "The fighter gains the benefits of the Weapon Finesse feat with all melee weapons that belong to the associated fighter weapon group (even if they cannot normally be used with Weapon Finesse). The fighter must have the Weapon Finesse feat before choosing this option.",
                    Helpers.getGuid("FightersFinesse" + weaponTrainingName),
                    WeaponTraining.Icon,
                    FeatureGroup.CombatFeat,
                    weaponTraining.PrerequisiteFeature(),
                    weaponFinesse.PrerequisiteFeature(),
                    Helpers.Create <FightersFinesseLogic>(x => x.WeaponTraining = weaponTraining));
                features.Add(fightersFinesse);

                features.Add(Helpers.CreateFeature(
                                 "TrainedGrace" + weaponTrainingName,
                                 "Trained Grace (" + weaponTrainingDisplayName + ")",
                                 "When the fighter uses Weapon Finesse to make a melee attack with a weapon, using his Dexterity modifier on attack rolls and his Strength modifier on damage rolls, he doubles his weapon training bonus on damage rolls. The fighter must have Weapon Finesse in order to choose this option.",
                                 Helpers.getGuid("TrainedGrace" + weaponTrainingName),
                                 WeaponTraining.Icon,
                                 FeatureGroup.CombatFeat,
                                 weaponTraining.PrerequisiteFeature(),
                                 weaponFinesse.PrerequisiteFeature(),
                                 Helpers.Create <TrainedGraceLogic>(x =>
                {
                    x.WeaponFighterGroupFeature = weaponTraining;
                    x.FightersFinesseFeature    = fightersFinesse;
                })));

                features.Add(Helpers.CreateFeature(
                                 "FightersReflexes" + weaponTrainingName,
                                 "Fighter’s Reflexes (" + weaponTrainingDisplayName + ")",
                                 "The fighter applies his weapon training bonus to Reflex saving throws. He loses this bonus when he is flat-footed or denied his Dexterity bonus to AC.",
                                 Helpers.getGuid("FightersReflexes" + weaponTrainingName),
                                 WeaponTraining.Icon,
                                 FeatureGroup.CombatFeat,
                                 weaponTraining.PrerequisiteFeature(),
                                 Helpers.Create <FightersReflexesLogic>(x => x.WeaponTraining = weaponTraining)));

                features.Add(Helpers.CreateFeature(
                                 "FightersTactics" + weaponTrainingName,
                                 "Fighter’s Tactics (" + weaponTrainingDisplayName + ")",
                                 "All of the fighter’s allies are treated as if they had the same teamwork feats as the fighter for the purpose of determining whether the fighter receives a bonus from his teamwork feats. His allies do not receive any bonuses from these feats unless they actually have the feats themselves. The allies’ positioning and actions must still meet the prerequisites listed in the teamwork feat for the fighter to receive the listed bonus.",
                                 Helpers.getGuid("FightersTactics" + weaponTrainingName),
                                 WeaponTraining.Icon,
                                 FeatureGroup.CombatFeat,
                                 weaponTraining.PrerequisiteFeature(),
                                 Helpers.Create <FightersTacticsLogic>(x => x.WeaponTraining = weaponTraining)));
            }

            features.AddRange(AddWarriorSpirit());

            return(features);
        }