Exemplo n.º 1
0
        static void createVersatilePerformanceAndExpandedVersality()
        {
            var bard_class = library.Get <BlueprintCharacterClass>("772c83a25e2268e448e841dcd548235f");

            var skill_foci = library.Get <BlueprintFeatureSelection>("c9629ef9eebb88b479b2fbc5e836656a").AllFeatures;
            var skills     = new StatType[] { StatType.SkillMobility, StatType.SkillStealth, StatType.SkillPersuasion, StatType.SkillPerception, StatType.SkillUseMagicDevice };

            for (int i = 0; i < skill_foci.Length; i++)
            {
                StatType stat = skill_foci[i].GetComponent <AddContextStatBonus>().Stat;
                if (!skills.Contains(stat))
                {
                    continue;
                }

                string name = LocalizedTexts.Instance.Stats.GetText(stat);

                var feature = Helpers.CreateFeature(stat.ToString() + "VersatilePerformanceFeature",
                                                    "Versatile Performance: " + name,
                                                    "At 2nd level a bard or skald selects one of the following skills: Mobility, Stealth, Perception, Persuation or Use Magic Device. She receives a number of ranks in this skill equal to half her bard or skald level. In addition she uses charisma modifier in place of the ability modifier the skill would normally use. The bard or skald can immediately retrain all of her ranks in excess in the selected skill at no additional cost in money or time.",
                                                    "",
                                                    skill_foci[i].Icon,
                                                    FeatureGroup.None,
                                                    Helpers.Create <SkillMechanics.SetSkillRankToValue>(ss => { ss.skill = stat; ss.value = Helpers.CreateContextValue(AbilityRankType.Default); }),
                                                    Helpers.Create <StatReplacementMechanics.ReplaceBaseStatForStatTypeLogic>(r => { r.only_if_greater = false; r.NewBaseStatType = StatType.Charisma; r.StatTypeToReplaceBastStatFor = stat; }),
                                                    Helpers.CreateContextRankConfig(ContextRankBaseValueType.ClassLevel, progression: ContextRankProgression.OnePlusDiv2,
                                                                                    classes: new BlueprintCharacterClass[] { bard_class, Skald.skald_class }
                                                                                    )
                                                    );

                var feature2 = Helpers.CreateFeature(stat.ToString() + "ExpandedVersalityFeature",
                                                     "Expanded Versality: " + name,
                                                     "A bard or skald can select a skill for which she already selected versatile performance and instead gain a number of ranks in this skill equal to her bard or skald level. The bard or skald can immediately retrain all of her ranks in excess in the selected skill at no additional cost in money or time.",
                                                     "",
                                                     skill_foci[i].Icon,
                                                     FeatureGroup.None,
                                                     Helpers.Create <SkillMechanics.SetSkillRankToValue>(ss => { ss.skill = stat; ss.value = Helpers.CreateContextValue(AbilityRankType.Default); ss.increase_by1_on_apply = true; }),
                                                     Helpers.CreateContextRankConfig(ContextRankBaseValueType.ClassLevel, progression: ContextRankProgression.Div2,
                                                                                     classes: new BlueprintCharacterClass[] { bard_class, Skald.skald_class }
                                                                                     ),
                                                     Helpers.PrerequisiteFeature(feature)
                                                     );
                versatile_performances.Add(feature);
                versatile_performances.Add(feature2);
                if (stat == StatType.SkillPersuasion)
                {
                    Skald.great_orator.AllFeatures = new BlueprintFeature[] { feature };
                }
            }
        }