static void LoadDetectSecretDoors()
        {
            var spell = Helpers.CreateAbility("DetectSecretDoors", "Detect Secret Doors",
                                              "You can detect secret doors, compartments, caches, and so forth. Only passages, doors, or openings that have been specifically constructed to escape detection are detected by this spell.\n" +
                                              "Each round, you can turn to detect secret doors in a new area. This spell requires concentration, and will end prematurely if you cast another spell, take a standard action, or fail a concentration check.",
                                              "5462b5e9578349ffa59bb469b94ffbb0",
                                              Image2Sprite.Create("Mods/EldritchArcana/sprites/detect_secret_doors_spell.png"),//Helpers.GetIcon("4709274b2080b6444a3c11c6ebbe2404"), // find traps
                                              AbilityType.Spell, CommandType.Standard, AbilityRange.Personal, "concentration, up to 1 min/level", "");

            var foresightBuff = library.Get <BlueprintBuff>("8c385a7610aa409468f3a6c0f904ac92");

            var buff = Helpers.CreateBuff($"{spell.name}Buff", spell.Name, spell.Description,
                                          "0f93757378dc41c492b86b807b3a6625", spell.Icon, foresightBuff.FxOnStart, // common divination
                                          SpellConcentrationLogic.Create(),
                                          Helpers.Create <DetectSecretDoorsLogic>());

            spell.SetComponents(
                SpellSchool.Divination.CreateSpellComponent(),
                Helpers.CreateContextRankConfig(),
                Helpers.CreateRunActions(buff.CreateApplyBuff(
                                             Helpers.CreateContextDuration(rate: DurationRate.Minutes), fromSpell: true)));
            spell.AvailableMetamagic = Metamagic.Quicken | Metamagic.Heighten | Metamagic.Extend;

            spell.AddToSpellList(Helpers.alchemistSpellList, 1);
            spell.AddToSpellList(Helpers.bardSpellList, 1);
            spell.AddToSpellList(Helpers.wizardSpellList, 1);
            Helpers.AddSpellAndScroll(spell, "5e9bd8e141c622a4a8f4e4654d022f40"); // find traps scroll

            Main.ApplyPatch(typeof(MapObjectView_UpdateHighlight_Patch), "Detect Secret Doors: reveal hidden passages");
        }
Beispiel #2
0
        static BlueprintFeature CreateFrail()
        {
            var frailsprite = Image2Sprite.Create("Mods/EldritchArcana/sprites/frail.png");
            var fraily      = new BlueprintComponent[64];

            fraily[0] = Helpers.CreateAddStatBonus(StatType.HitPoints, -3, ModifierDescriptor.Crippled);
            for (int i = 2; i < 65; i++)
            {
                fraily[i - 1] = Helpers.CreateAddStatBonusOnLevel(StatType.HitPoints, i * -1, ModifierDescriptor.Penalty, i, i);
            }
            ;

            var feat = Helpers.CreateFeature("Frail", "Frail",
                                             "You have A frail body and you break bones easily also your health is not great so you have -1 vs disease saves.\n" +
                                             "if you pick a Drawback at level one you can choose an extra feat on top\n" +
                                             "Drawback: -3 hp at level 1 and You lose 1 additional hit points.For every Hit Die you possess.",
                                             "0639446638b04ecc85e069e050751bfb",
                                             frailsprite,//Helpers.NiceIcons(9),
                                             FeatureGroup.Feat,
                                             Helpers.Create <SavingThrowBonusAgainstDescriptor>(s => { s.SpellDescriptor = SpellDescriptor.Disease; s.Bonus = -1; s.ModifierDescriptor = ModifierDescriptor.Crippled; })
                                             //,
                                             //Helpers.Create<FeyFoundlingLogic>(s => { s.dieModefier = 2;}),
                                             //Helpers.CreateAddStatBonusOnLevel(StatType.HitPoints,-3,ModifierDescriptor.Penalty,1),
                                             //PrerequisiteCharacterLevelExact.Create(1)
                                             );

            feat.AddComponents(fraily);
            return(feat);
        }
        static void LoadDetectSecretDoors()
        {
            var spell = Helpers.CreateAbility("DetectSecretDoors", RES.DetectSecretDoorsSpells_info,
                                              RES.DetectSecretDoorsAbilityDescription_info,
                                              "5462b5e9578349ffa59bb469b94ffbb0",
                                              Image2Sprite.Create("Mods/EldritchArcana/sprites/detect_secret_doors_spell.png"),//Helpers.GetIcon("4709274b2080b6444a3c11c6ebbe2404"), // find traps
                                              AbilityType.Spell, CommandType.Standard, AbilityRange.Personal, RES.DetectSecretDoorsAbilityDuration_info, "");

            var foresightBuff = library.Get <BlueprintBuff>("8c385a7610aa409468f3a6c0f904ac92");

            var buff = Helpers.CreateBuff($"{spell.name}Buff", spell.Name, spell.Description,
                                          "0f93757378dc41c492b86b807b3a6625", spell.Icon, foresightBuff.FxOnStart, // common divination
                                          SpellConcentrationLogic.Create(),
                                          Helpers.Create <DetectSecretDoorsLogic>());

            spell.SetComponents(
                SpellSchool.Divination.CreateSpellComponent(),
                Helpers.CreateContextRankConfig(),
                Helpers.CreateRunActions(buff.CreateApplyBuff(
                                             Helpers.CreateContextDuration(rate: DurationRate.Minutes), fromSpell: true)));
            spell.AvailableMetamagic = Metamagic.Quicken | Metamagic.Heighten | Metamagic.Extend;

            spell.AddToSpellList(Helpers.alchemistSpellList, 1);
            spell.AddToSpellList(Helpers.bardSpellList, 1);
            spell.AddToSpellList(Helpers.wizardSpellList, 1);
            Helpers.AddSpellAndScroll(spell, "5e9bd8e141c622a4a8f4e4654d022f40"); // find traps scroll

            Main.ApplyPatch(typeof(MapObjectView_UpdateHighlight_Patch), "Detect Secret Doors: reveal hidden passages");
        }
        static void LoadFavoredPrestigeClass()
        {
            alertnessFeat = library.Get <BlueprintFeature>("1c04fe9a13a22bc499ffac03e6f79153");

            var noFeature = Helpers.Create <PrerequisiteNoFeature>();

            favoredPrestigeClass = Helpers.CreateFeatureSelection(
                "FavoredPresitgeClassSelection",
                RES.FavoredPresitgeClassFeatureName_info,
                RES.FavoredPresitgeClassFeatureDescription_info,
                "4fab2e6256e644daaa637093bc2421aa",
                Image2Sprite.Create("Mods/EldritchArcana/sprites/favored_prestige_class.png"),
                FeatureGroup.Feat,
                noFeature,
                Helpers.Create <LevelUpRecommendation>(l =>
            {
                // Mark this feat recommended if a prestige class is taken.
                l.ClassPriorities = new ClassesPriority[] {
                    new ClassesPriority()
                    {
                        Classes  = Helpers.prestigeClasses.ToArray(),
                        Priority = RecommendationPriority.Good
                    }
                };
            }));
            // Note: feat order should match Helpers.prestigeClasses so Prestigious Spellcaster can index into this.
            favoredPrestigeClass.SetFeatures(Helpers.prestigeClasses.Select(CreateFavoredPrestigeClass));
            noFeature.Feature = favoredPrestigeClass;

            library.AddFeats(favoredPrestigeClass);
        }
        static void LoadFavoredPrestigeClass()
        {
            alertnessFeat = library.Get <BlueprintFeature>("1c04fe9a13a22bc499ffac03e6f79153");

            var noFeature = Helpers.Create <PrerequisiteNoFeature>();

            favoredPrestigeClass = Helpers.CreateFeatureSelection(
                "FavoredPresitgeClassSelection",
                "Favored Prestige Class",
                "You have come to favor a certain prestige class, either because you are particularly devoted to the class’s cause, have trained more than most others have for that specific role, or have simply been destined to excel in the prestige class all along. Regardless of the reason, levels gained in your favored prestige class grant additional benefits in a way similar to those you gain for taking levels in your base favored class.\n" +
                "You can select this feat before you gain levels in your chosen favored prestige class, but the benefits of the feat do not apply until you actually gain at least 1 level in that prestige class.",
                "4fab2e6256e644daaa637093bc2421aa",
                Image2Sprite.Create("Mods/EldritchArcana/sprites/favored_prestige_class.png"),
                FeatureGroup.Feat,
                noFeature,
                Helpers.Create <LevelUpRecommendation>(l =>
            {
                // Mark this feat recommended if a prestige class is taken.
                l.ClassPriorities = new ClassesPriority[] {
                    new ClassesPriority()
                    {
                        Classes  = Helpers.prestigeClasses.ToArray(),
                        Priority = RecommendationPriority.Good
                    }
                };
            }));
            // Note: feat order should match Helpers.prestigeClasses so Prestigious Spellcaster can index into this.
            favoredPrestigeClass.SetFeatures(Helpers.prestigeClasses.Select(CreateFavoredPrestigeClass));
            noFeature.Feature = favoredPrestigeClass;

            library.AddFeats(favoredPrestigeClass);
        }
Beispiel #6
0
        static void LoadSummonWildhunt()
        {
            var GoblinSummonSix = library.Get <BlueprintAbility>("1909400d0731ae049ac62edade91c1f7");//TestSummonAbility.
            //var summonMonsterIXd4plus1 = library.Get<BlueprintAbility>("4988b2e622c6f2d4b897894e3be13f09");
            //var SummonMonsterIXBase = library.Get<BlueprintAbility>("52b5df2a97df18242aec67610616ded0");
            //var SummonSpecial = library.Get<BlueprintAbility>("563876dbfa98696409e60fc635ea9d77");//summon murder pony
            //var SummonSpecial = library.Get<BlueprintAbility>("c2e5b967c47a81c4aa355ef213ec5634");//RaySpellLanternKingStar.
            var SummonSpecial = library.Get <BlueprintAbility>("06a171f8ce3ad71418ffc516ded07a6b");//squirrelhorde
            //var SummonSpecial = library.Get<BlueprintAbility>("26c8d5dc21025564baaeaee51ede05c1");//Switchdoublecompainions
            //var kalike = library.Get<BlueprintAbility>("5cb0f13fc0eef464993b2e082f186032");//SwitchTo_Kalikke_Ability.
            //var kanerah = library.Get<BlueprintAbility>("fb96d35da88acb1498dc51a934f6c4d5");//SwitchTo_Kanerah_Ability.
            var camo    = library.Get <BlueprintAbility>("b26a123a009d4a141ac9c19355913285");//camoflage
            var GobIcon = Image2Sprite.Create("Mods/EldritchArcana/sprites/summon_goblins.png");
            //TestSummonAbility.1909400d0731ae049ac62edade91c1f7//summon 6 goblins

            //scaleXP = new ModEntryCheck("ScaleXP");
            //craftMagicItems = new ModEntryCheck("CraftMagicItems");


            //var spell = library.CopyAndAdd(summonMonsterIXd4plus1, "Wildhunt", SummonWildhuntId);
            var GoblinSpell = library.CopyAndAdd(GoblinSummonSix, "GoblinSummonSix", SummonGoblinSixId);//

            GoblinSpell.AddComponent(Helpers.CreateSpellComponent(SpellSchool.Conjuration));
            Lazy <BlueprintItem> shortSword = new Lazy <BlueprintItem>(() => library.Get <BlueprintItem>("f717b39c351b8b44388c471d4d272f4e"));

            GoblinSpell.MaterialComponent.Item  = shortSword.Value;
            GoblinSpell.MaterialComponent.Count = 1;
            var SquirrelSpell = library.CopyAndAdd(SummonSpecial, "Squirrelhorde", SummonSquirrelId);

            SquirrelSpell.SetNameDescription("Summon Swarm Squirrels",
                                             "You summon a swarm of Squirrels, which attacks all other creatures within its area. (You may summon the swarm so that it shares the area of other creatures.) If no living creatures are within its area, the swarm attacks or pursues the nearest creature as best it can. The caster has no control over its target or direction of travel.");
            GoblinSpell.SetNameDescription("Summon Six Goblins",
                                           "This spell summons to your side a sextuple band of goblin creatures. The summoned band appears where you designate and acts immediately, on your turn. It attacks your opponents to the best of its ability. If you can communicate with the creature, you can direct it not to attack, to attack particular enemies, or to perform other actions as you command.");
            GoblinSpell.SetIcon(GobIcon);
            //var spell2 = library.CopyAndAdd(kalike, "kalikesw", "5cc0f13fc0eef464993b2e082f186033");
            //var spell3 = library.CopyAndAdd(kanerah, "kanerahsw", "5db0f13fc0eef464993b2e082f186034");
            //Helpers.
            //spell
            //spell.ReplaceComponent<ISummonPoolHandler>(summonWildhunt.GetComponent<ISummonPoolHandler>());
            SquirrelSpell.AddToSpellList(Helpers.druidSpellList, 3);
            SquirrelSpell.AddToSpellList(Helpers.inquisitorSpellList, 3);
            SquirrelSpell.AddToSpellList(Helpers.wizardSpellList, 3);
            SquirrelSpell.AddToSpellList(Helpers.bardSpellList, 3);

            GoblinSpell.AddToSpellList(Helpers.magusSpellList, 2);
            GoblinSpell.AddToSpellList(Helpers.wizardSpellList, 2);
            GoblinSpell.AddToSpellList(Helpers.bardSpellList, 2);
            GoblinSpell.AddToSpellList(Helpers.druidSpellList, 2);

            /*
             * var CallOfTheWild = new ModEntryCheck("CallOfTheWild");
             * if (CallOfTheWild.IsInstalled())
             * {
             *  Log.Write("Call of the wild detected by eldricharcana adding spells to witch");
             *  var witchSpellBook = library.Get<BlueprintSpellbook>("be5817bb59c14526a99877f8a7f15d31");
             *  GoblinSpell.AddToSpellList(witchSpellBook.SpellList,2);
             *  SquirrelSpell.AddToSpellList(witchSpellBook.SpellList, 3);
             * }
             */
        }
        static void LoadLimitedWish()
        {
            var spell = Helpers.CreateAbility("LimitedWish", RES.LimitedWishSpells_info,
                                              RES.LimitedWishAbilityDescription_info,
                                              "9e70b011f2554c3ba0fe9060dc93fc6c",
                                              Image2Sprite.Create("Mods/EldritchArcana/sprites/limited_wish.png"), // geniekind
                                              AbilityType.Spell,
                                              CommandType.Standard,
                                              AbilityRange.Personal,
                                              "", "",
                                              Helpers.CreateSpellComponent(SpellSchool.Universalist),
                                              Helpers.CreateSpellDescriptor());

            spell.CanTargetSelf      = true;
            spell.AvailableMetamagic = Metamagic.Quicken | Metamagic.Heighten | Metamagic.Empower | Metamagic.Extend | Metamagic.Maximize | Metamagic.Reach;

            var variants = new List <BlueprintAbility>();

            for (int level = 1; level <= 6; level++)
            {
                variants.Add(CreateWishForSpellLevel(spell, level, 7));
            }
            spell.AddComponent(spell.CreateAbilityVariants(variants));
            spell.MaterialComponent = variants[0].MaterialComponent;

            spell.AddToSpellList(Helpers.wizardSpellList, 7);
            // Scroll uses Limited Wish (5th level) so you can choose divine spells.
            Helpers.AddSpellAndScroll(spell, "f948342d6a9f2ce49b6aa5f362569d72", 4); // scroll geniekind djinni
        }
        static BlueprintFeature CreateSpellVulnerability()
        {
            //Log.Write(DrawFeatGuids[1]);
            var spellvulsprite        = Image2Sprite.Create("Mods/EldritchArcana/sprites/spell_vulnerability.png");
            int SpellVunrabilityBonus = -4;
            var components            = new List <BlueprintComponent> {
            };

            var schoolTypes = new Dictionary <SpellSchool, DamageEnergyType>()
            {
                { SpellSchool.Abjuration, DamageEnergyType.Cold },
                { SpellSchool.Conjuration, DamageEnergyType.Acid },
                { SpellSchool.Enchantment, DamageEnergyType.Sonic },
                { SpellSchool.Evocation, DamageEnergyType.Fire },
                { SpellSchool.Illusion, DamageEnergyType.Electricity },
                { SpellSchool.Necromancy, DamageEnergyType.Unholy },
                { SpellSchool.Transmutation, DamageEnergyType.Divine }
            };

            var spellSchoolChoiceFeature = schoolTypes.Select(schoolType =>
            {
                var result = Helpers.CreateFeature($"SpellVulnerability{schoolType.Key}",
                                                   string.Format(RES.SpellVulnerabilityFeatureName_info, LocalizedTexts.Instance.SpellSchoolNames.GetText(schoolType.Key)),
                                                   string.Format(RES.SpellVulnerabilityFeatureDescription_info, SpellVunrabilityBonus,
                                                                 LocalizedTexts.Instance.SpellSchoolNames.GetText(schoolType.Key),
                                                                 LocalizedTexts.Instance.DamageEnergy.GetText(schoolType.Value)),
                                                   Helpers.MergeIds(DrawFeatGuids[1], Helpers.spellSchoolGuid(schoolType.Key)),
                                                   Helpers.GetIcon(Helpers.spellSchoolGuid(schoolType.Key)), FeatureGroup.None,
                                                   Helpers.Create <SavingThrowBonusAgainstSchool>(a =>
                {
                    a.School             = schoolType.Key;
                    a.Value              = SpellVunrabilityBonus;
                    a.ModifierDescriptor = ModifierDescriptor.Penalty;
                }));
                result.AddComponent(Helpers.Create <AddEnergyVulnerability>(a => a.Type = schoolType.Value));
                return(result);
            }).ToArray();

            //var noFeature = Helpers.PrerequisiteNoFeature(null);

            var feat = Helpers.CreateFeatureSelection("SpellVulnerability", RES.DrawbackSpellVulnerabilityFeatureName_info,
                                                      string.Format(RES.DrawbackSpellVulnerabilityFeatureDescription_info, SpellVunrabilityBonus),
                                                      DrawFeatGuids[1],
                                                      spellvulsprite,//Helpers.NiceIcons(15),
                                                      FeatureGroup.Feat);

            //,PrerequisiteCharacterLevelExact.Create(1)
            //feat.AddComponents(ElementalWeaknesChoiceFeature);
            //noFeature.Feature = feat;
            feat.SetFeatures(spellSchoolChoiceFeature);
            //feat.AddComponents(ikweethetniet);
            //components.AddRange(ikweethetniet);

            return(feat);
        }
Beispiel #9
0
        internal static void Load()
        {
            // This is a simplified version of Time Stop:
            // - Freezes all other units for 1d4+1 round
            // - Stops area effects from ticking
            //
            // I tried a slow motion version (adjust game time rate), but it takes a lot of patches to
            // keep the player's animations/cooldowns moving at normal speed. Walk/run animations in particular
            // are complicated, and I didn't find a clean way to patch that.
            //
            // I also had a version that gave the player 1d4+1 instant cast spells/abilities and a large
            // speeed boost. It works pretty nicely with "pause". But it's neat to see everyone else frozen
            // and "apparent time" ticking for the caster.
            //
            // TODO: this doesn't stop particle effects (or spells-in-flight, etc). Also it
            // doesn't change the end time for area spells ()
            var expeditiousRetreat     = library.Get <BlueprintAbility>("4f8181e7a7f1d904fbaea64220e83379");
            var expeditiousRetreatBuff = library.Get <BlueprintBuff>("9ea4ec3dc30cd7940a372a4d699032e7");
            var dispelMagicGreater     = library.Get <BlueprintAbility>("f0f761b808dc4b149b08eaf44b99f633");

            var freezeBuff = Helpers.CreateBuff("TimeStopFreezeBuff", "Frozen in Time",
                                                "Time stop is active for another unit, freezing apparent time for them.",
                                                "fb33065de053485394dd9bfe99a86337",
                                                dispelMagicGreater.Icon, null,
                                                UnitCondition.CantAct.CreateAddCondition(),
                                                UnitCondition.CantMove.CreateAddCondition(),
                                                UnitCondition.Paralyzed.CreateAddCondition(),
                                                Helpers.Create <Untargetable>(),
                                                Helpers.Create <EraseFromTimeEffect>());

            var buff = Helpers.CreateBuff("TimeStopBuff", "Time Stop",
                                          "This spell seems to make time cease to flow for everyone but you. In fact, you speed up so greatly that all other creatures seem frozen, though they are actually still moving at their normal speeds. You are free to act for 1d4+1 rounds of apparent time. Normal and magical fire, cold, gas, and the like can still harm you. While the time stop is in effect, other creatures are invulnerable to your attacks and spells; you cannot target such creatures with any attack or spell. A spell that affects an area and has a duration longer than the remaining duration of the time stop have their normal effects on other creatures once the time stop ends. Most spellcasters use the additional time to improve their defenses, summon allies, or flee from combat.\n" +
                                          "You cannot move or harm items held, carried, or worn by a creature stuck in normal time, but you can affect any item that is not in another creature’s possession.\n" +
                                          "You are undetectable while time stop lasts. You cannot enter an area protected by an antimagic field while under the effect of time stop.",
                                          "a5adb4794e364485bca802e7ecfb694a",
                                          Image2Sprite.Create("Mods/EldritchArcana/sprites/time_stop.png"), expeditiousRetreatBuff.FxOnStart,
                                          UnitCondition.ImmuneToAttackOfOpportunity.CreateAddCondition(),
                                          UnitCondition.CanNotAttack.CreateAddCondition(),
                                          Helpers.Create <TimeStopEffect>(t => t.FreezeTime = freezeBuff));

            var spell = TimeStop.spell = Helpers.CreateAbility("TimeStop", buff.Name, buff.Description,
                                                               "661c8d61f47d4c5c93e34f7d8692e81b", buff.Icon, AbilityType.Spell,
                                                               CommandType.Standard, AbilityRange.Personal, "1d4+1 rounds (apparent time)", "",
                                                               expeditiousRetreat.GetComponent <AbilitySpawnFx>(),
                                                               Helpers.CreateSpellComponent(SpellSchool.Transmutation),
                                                               Helpers.CreateRunActions(Helpers.CreateApplyBuff(buff,
                                                                                                                Helpers.CreateContextDuration(1, diceType: DiceType.D4, diceCount: 1),
                                                                                                                fromSpell: true, toCaster: true, dispellable: false)));

            spell.AvailableMetamagic = Metamagic.Extend | Metamagic.Quicken;
            spell.CanTargetSelf      = true;

            spell.AddToSpellList(Helpers.wizardSpellList, 9);
            Helpers.AddSpellAndScroll(spell, "b3365694d86108842b58609d90b6d05c"); // scroll greater dispel
        }
        internal static void Load()
        {
            // This is a simplified version of Time Stop:
            // - Freezes all other units for 1d4+1 round
            // - Stops area effects from ticking
            //
            // I tried a slow motion version (adjust game time rate), but it takes a lot of patches to
            // keep the player's animations/cooldowns moving at normal speed. Walk/run animations in particular
            // are complicated, and I didn't find a clean way to patch that.
            //
            // I also had a version that gave the player 1d4+1 instant cast spells/abilities and a large
            // speeed boost. It works pretty nicely with "pause". But it's neat to see everyone else frozen
            // and "apparent time" ticking for the caster.
            //
            // TODO: this doesn't stop particle effects (or spells-in-flight, etc). Also it
            // doesn't change the end time for area spells ()
            var expeditiousRetreat     = library.Get <BlueprintAbility>("4f8181e7a7f1d904fbaea64220e83379");
            var expeditiousRetreatBuff = library.Get <BlueprintBuff>("9ea4ec3dc30cd7940a372a4d699032e7");
            var dispelMagicGreater     = library.Get <BlueprintAbility>("f0f761b808dc4b149b08eaf44b99f633");

            var freezeBuff = Helpers.CreateBuff("TimeStopFreezeBuff", RES.TimeStopFreezeBuffName_info,
                                                RES.TimeStopFreezeBuffDescription_info,
                                                "fb33065de053485394dd9bfe99a86337",
                                                dispelMagicGreater.Icon, null,
                                                UnitCondition.CantAct.CreateAddCondition(),
                                                UnitCondition.CantMove.CreateAddCondition(),
                                                UnitCondition.Paralyzed.CreateAddCondition(),
                                                Helpers.Create <Untargetable>(),
                                                Helpers.Create <EraseFromTimeEffect>());

            var buff = Helpers.CreateBuff("TimeStopBuff", RES.TimeStopSpells_info,
                                          RES.TimeStopBuffDescription_info,
                                          "a5adb4794e364485bca802e7ecfb694a",
                                          Image2Sprite.Create("Mods/EldritchArcana/sprites/time_stop.png"), expeditiousRetreatBuff.FxOnStart,
                                          UnitCondition.ImmuneToAttackOfOpportunity.CreateAddCondition(),
                                          UnitCondition.CanNotAttack.CreateAddCondition(),
                                          Helpers.Create <TimeStopEffect>(t => t.FreezeTime = freezeBuff));

            var spell = TimeStop.spell = Helpers.CreateAbility("TimeStop", buff.Name, buff.Description,
                                                               "661c8d61f47d4c5c93e34f7d8692e81b", buff.Icon, AbilityType.Spell,
                                                               CommandType.Standard, AbilityRange.Personal, RES.TimeStopAbilityDuration_info, "",
                                                               expeditiousRetreat.GetComponent <AbilitySpawnFx>(),
                                                               Helpers.CreateSpellComponent(SpellSchool.Transmutation),
                                                               Helpers.CreateRunActions(Helpers.CreateApplyBuff(buff,
                                                                                                                Helpers.CreateContextDuration(1, diceType: DiceType.D4, diceCount: 1),
                                                                                                                fromSpell: true, toCaster: true, dispellable: false)));

            spell.AvailableMetamagic = Metamagic.Extend | Metamagic.Quicken;
            spell.CanTargetSelf      = true;

            spell.AddToSpellList(Helpers.wizardSpellList, 9);
            Helpers.AddSpellAndScroll(spell, "b3365694d86108842b58609d90b6d05c"); // scroll greater dispel
        }
Beispiel #11
0
        static void LoadWish()
        {
            var spell = Helpers.CreateAbility("Wish", "Wish",
                                              "Wish is the mightiest spell a wizard or sorcerer can cast. By simply speaking aloud, you can alter reality to better suit you. Even wish, however, has its limits. A wish can produce any one of the following effects.\n" +
                                              "• Duplicate any sorcerer/wizard spell of 8th level or lower, provided the spell does not belong to one of your opposition schools.\n" +
                                              "• Duplicate any non-sorcerer/wizard spell of 7th level or lower, provided the spell does not belong to one of your opposition schools.\n" +
                                              "• Duplicate any sorcerer/wizard spell of 7th level or lower, even if it belongs to one of your opposition schools.\n" +
                                              "• Duplicate any non-sorcerer/wizard spell of 6th level or lower, even if it belongs to one of your opposition schools.\n" +
                                              "• Undo the harmful effects of many other spells, such as geas/quest or insanity.\n" +
                                              "• Grant a creature a +1 inherent bonus to an ability score. Two to five wish spells cast in immediate succession can grant a creature a +2 to +5 inherent bonus to an ability score (two wishes for a +2 inherent bonus, three wishes for a +3 inherent bonus, and so on). Inherent bonuses are instantaneous, so they cannot be dispelled. Note: An inherent bonus may not exceed +5 for a single ability score, and inherent bonuses to a particular ability score do not stack, so only the best one applies.\n" +
                                              "• Remove injuries and afflictions. A single wish can aid one creature per caster level, and all subjects are cured of the same kind of affliction. For example, you could heal all the damage you and your companions have taken, or remove all poison effects from everyone in the party, but not do both with the same wish.\n" +
                                              "• Revive the dead. A wish can bring a dead creature back to life by duplicating a resurrection spell. A wish can revive a dead creature whose body has been destroyed, but the task takes two wishes: one to recreate the body and another to infuse the body with life again. A wish cannot prevent a character who was brought back to life from gaining a permanent negative level.\n" +
                                              //"• Transport travelers. A wish can lift one creature per caster level from anywhere on any plane and place those creatures anywhere else on any plane regardless of local conditions. An unwilling target gets a Will save to negate the effect, and spell resistance (if any) applies.\n" +
                                              //"• Undo misfortune. A wish can undo a single recent event. The wish forces a reroll of any roll made within the last round (including your last turn). Reality reshapes itself to accommodate the new result. For example, a wish could undo an opponent’s successful save, a foe’s successful critical hit (either the attack roll or the critical roll), a friend’s failed save, and so on. The re-roll, however, may be as bad as or worse than the original roll. An unwilling target gets a Will save to negate the effect, and Spell Resistance (if any) applies.\n" +
                                              "Duplicated spells allow saves and Spell Resistance as normal (but save DCs are for 9th-level spells).\n" +
                                              "When a wish duplicates a spell with a material component that costs more than 10,000 gp, you must provide that component (in addition to the 25,000 gp diamond component for this spell).",
                                              "508802d7c0cb452ab7473c2e83c3f535",
                                              Image2Sprite.Create("Mods/EldritchArcana/sprites/wish_spell.png"),
                                              AbilityType.Spell,
                                              CommandType.Standard,
                                              AbilityRange.Personal,
                                              "", "", Helpers.CreateSpellComponent(SpellSchool.Universalist),
                                              Helpers.CreateSpellDescriptor());

            spell.CanTargetSelf      = true;
            spell.AvailableMetamagic = Metamagic.Quicken | Metamagic.Heighten | Metamagic.Empower | Metamagic.Extend | Metamagic.Maximize | Metamagic.Reach;

            var variants = new List <BlueprintAbility>();

            // TODO: add an option to remove injuries and afflictions.
            for (int level = 1; level <= 8; level++)
            {
                variants.Add(CreateWishForSpellLevel(spell, level, 9));
            }
            //variants.AddRange(CreateWishForStatBonus(spell));

            variants.AddRange(CreateWishForStatBonus(spell, spell.AssetGuid));
            spell.AddComponent(spell.CreateAbilityVariants(variants));
            spell.MaterialComponent = variants[0].MaterialComponent;

            spell.AddToSpellList(Helpers.wizardSpellList, 9);
            // Wish Scroll uses 7th level spells to offer the most choice (divine + arcane).
            Wishy = spell;
            Helpers.AddSpellAndScroll(spell, "f948342d6a9f2ce49b6aa5f362569d72", 6);                          // scroll geniekind djinni icon
            // Fix Draconic and Arcane bloodlines to have Wish as their 9th level spell.
            FixBloodlineSpell(spell, "4d491cf9631f7e9429444f4aed629791", "74ab07974fa1c424bbd6fc0e56114db6"); // arcane
            FixBloodlineSpell(spell, "7bd143ead2d6c3a409aad6ee22effe34", "32d443e6a4103d84b9243822c3abec97"); // draconic
        }
        static void LoadSummonWildhunt()
        {
            var GoblinSummonSix = Library.Get <BlueprintAbility>("1909400d0731ae049ac62edade91c1f7");//TestSummonAbility.
            //var summonMonsterIXd4plus1 = library.Get<BlueprintAbility>("4988b2e622c6f2d4b897894e3be13f09");
            //var SummonMonsterIXBase = library.Get<BlueprintAbility>("52b5df2a97df18242aec67610616ded0");
            //var SummonSpecial = library.Get<BlueprintAbility>("563876dbfa98696409e60fc635ea9d77");//summon murder pony
            //var SummonSpecial = library.Get<BlueprintAbility>("c2e5b967c47a81c4aa355ef213ec5634");//RaySpellLanternKingStar.
            var SummonSpecial = Library.Get <BlueprintAbility>("06a171f8ce3ad71418ffc516ded07a6b");//squirrelhorde
            //var SummonSpecial = library.Get<BlueprintAbility>("26c8d5dc21025564baaeaee51ede05c1");//Switchdoublecompainions
            //var kalike = library.Get<BlueprintAbility>("5cb0f13fc0eef464993b2e082f186032");//SwitchTo_Kalikke_Ability.
            //var kanerah = library.Get<BlueprintAbility>("fb96d35da88acb1498dc51a934f6c4d5");//SwitchTo_Kanerah_Ability.
            var camo    = Library.Get <BlueprintAbility>("b26a123a009d4a141ac9c19355913285");//camoflage
            var GobIcon = Image2Sprite.Create("Mods/EldritchArcana/sprites/summon_goblins.png");
            //TestSummonAbility.1909400d0731ae049ac62edade91c1f7//summon 6 goblins

            //var spell = library.CopyAndAdd(summonMonsterIXd4plus1, "Wildhunt", SummonWildhuntId);
            var GoblinSpell = Library.CopyAndAdd(GoblinSummonSix, "GoblinSummonSix", SummonGoblinSixId);

            GoblinSpell.AddComponent(Helpers.CreateSpellComponent(SpellSchool.Conjuration));
            Lazy <BlueprintItem> shortSword = new Lazy <BlueprintItem>(() => Library.Get <BlueprintItem>("f717b39c351b8b44388c471d4d272f4e"));

            GoblinSpell.MaterialComponent.Item  = shortSword.Value;
            GoblinSpell.MaterialComponent.Count = 1;
            var SquirrelSpell = Library.CopyAndAdd(SummonSpecial, "Squirrelhorde", SummonSquirrelId);

            SquirrelSpell.Type = AbilityType.Spell;
            SquirrelSpell.SetNameDescription(RES.SquirrelSpellName_info,
                                             RES.SquirrelSpellDescription_info);
            GoblinSpell.SetNameDescription(RES.GoblinSpellName_info,
                                           RES.GoblinSpellDescription_info);
            GoblinSpell.SetIcon(GobIcon);
            //var spell2 = library.CopyAndAdd(kalike, "kalikesw", "5cc0f13fc0eef464993b2e082f186033");
            //var spell3 = library.CopyAndAdd(kanerah, "kanerahsw", "5db0f13fc0eef464993b2e082f186034");
            //Helpers.
            //spell
            //spell.ReplaceComponent<ISummonPoolHandler>(summonWildhunt.GetComponent<ISummonPoolHandler>());
            SquirrelSpell.AddToSpellList(Helpers.druidSpellList, 3);
            SquirrelSpell.AddToSpellList(Helpers.inquisitorSpellList, 3);
            SquirrelSpell.AddToSpellList(Helpers.wizardSpellList, 3);
            SquirrelSpell.AddToSpellList(Helpers.bardSpellList, 3);
            Helpers.AddSpellAndScroll(SquirrelSpell, "e72436c53e19a8048ba35cf49f70c64a"); //卷轴 召唤怪物III 王蜥

            GoblinSpell.AddToSpellList(Helpers.magusSpellList, 2);
            GoblinSpell.AddToSpellList(Helpers.wizardSpellList, 2);
            GoblinSpell.AddToSpellList(Helpers.bardSpellList, 2);
            GoblinSpell.AddToSpellList(Helpers.druidSpellList, 2);
            Helpers.AddSpellAndScroll(GoblinSpell, "20e78f54795c37b469bbcc0af791fbd5"); //卷轴 召唤怪物II 1d3只狗
        }
        static BlueprintFeature CreateOneLegged()
        {
            var frailsprite = Image2Sprite.Create("Mods/EldritchArcana/sprites/peg_leg.png");

            Log.Write(DrawFeatGuids[0]);
            var feat = Helpers.CreateFeature("OneLegged", RES.DrawbackOneLeggedFeatureName_info,
                                             RES.DrawbackOneLeggedFeatureDescription_info,
                                             DrawFeatGuids[0],
                                             frailsprite,//Helpers.NiceIcons(38),
                                             FeatureGroup.Feat,
                                             Helpers.CreateAddStatBonus(StatType.Speed, -10, ModifierDescriptor.Crippled),
                                             Helpers.CreateAddStatBonus(StatType.Initiative, -2, ModifierDescriptor.Crippled)
                                             //,PrerequisiteCharacterLevelExact.Create(1)
                                             );

            return(feat);
        }
Beispiel #14
0
        static BlueprintFeature CreateOneLegged()
        {
            var frailsprite = Image2Sprite.Create("Mods/EldritchArcana/sprites/peg_leg.png");

            Log.Write(DrawFeatGuids[0]);
            var feat = Helpers.CreateFeature("OneLegged", "Peg leg",
                                             "if you pick a Drawback at level one you can choose an extra feat on top\n" +
                                             "Drawback: Even with a peg leg, you lose 10 feet from your race’s normal speed.\n" +
                                             "Drawback: You lose 2 initiative",
                                             DrawFeatGuids[0],
                                             frailsprite,//Helpers.NiceIcons(38),
                                             FeatureGroup.Feat,
                                             Helpers.CreateAddStatBonus(StatType.Speed, -10, ModifierDescriptor.Crippled),
                                             Helpers.CreateAddStatBonus(StatType.Initiative, -2, ModifierDescriptor.Crippled)
                                             //,PrerequisiteCharacterLevelExact.Create(1)
                                             );

            return(feat);
        }
Beispiel #15
0
        static void LoadDeitySelection()
        {
            // For RP flavor, this adds an optional deity/atheism selection to the character creation page.
            var baseDeitySelection = library.Get <BlueprintFeatureSelection>("59e7a76987fe3b547b9cce045f4db3e4");
            var atheismFeature     = library.Get <BlueprintFeature>("92c0d2da0a836ce418a267093c09ca54");

            // Classes tagged with "no atheism" can't select it on the Deity selection.
            // (in practice, most of them wouldn't get the option, since they have their own deity selection feature.
            // This is mainly for Oracles, but it also serves as nice documentation.)
            atheismFeature.AddComponents(
                Helpers.classes.Where(c => c.GetComponents <PrerequisiteNoFeature>().Any(p => p.Feature == atheismFeature))
                .Select(c => Helpers.Create <PrerequisiteNoClassLevel>(p => p.CharacterClass = c)));
            atheismFeature.SetIcon(Image2Sprite.Create("Mods/EldritchArcana/sprites/atheism.png"));

            var deitySelection = library.CopyAndAdd(baseDeitySelection, "DeitySelectionAny", "d5c3c9d4080043f98e6c09f4e843440e");

            deitySelection.Group = FeatureGroup.None; // to prevent "determinators" page clutter.
            var noDeityChoice = Helpers.CreateFeature("SkipDeity", RES.SkipDeityFeatureName_info,
                                                      RES.SkipDeityFeatureDescription_info,
                                                      "e1f5711210404b34a805b00749eeba20",
                                                      null, FeatureGroup.None);

            noDeityChoice.HideInUI = true;

            var choices = new List <BlueprintFeature> {
                noDeityChoice
            };

            choices.AddRange(baseDeitySelection.AllFeatures);
            choices.Add(atheismFeature);
            deitySelection.SetFeatures(choices);

            var paladinDeitySelection = library.Get <BlueprintFeatureSelection>("a7c8b73528d34c2479b4bd638503da1d");

            ApplyClassMechanics_Apply_Patch.onChargenApply.Add((state, unit) =>
            {
                if (!state.Selections.Any(s => s.Selection.GetGroup() == FeatureGroup.Deities ||
                                          (object)s.Selection == paladinDeitySelection))
                {
                    deitySelection.AddSelection(state, unit, 1);
                }
            });
        }
Beispiel #16
0
        static void LoadLimitedWish()
        {
            var spell = Helpers.CreateAbility("LimitedWish", "Limited Wish",
                                              "A limited wish lets you create nearly any type of effect. For example, a limited wish can do any of the following things.\n" +
                                              "• Duplicate any sorcerer/wizard spell of 6th level or lower, provided the spell does not belong to one of your opposition schools.\n" +
                                              "• Duplicate any non-sorcerer/wizard spell of 5th level or lower, provided the spell does not belong to one of your opposition schools.\n" +
                                              "• Duplicate any sorcerer/wizard spell of 5th level or lower, even if it belongs to one of your opposition schools.\n" +
                                              "• Duplicate any non-sorcerer/wizard spell of 4th level or lower, even if it belongs to one of your opposition schools.\n" +
                                              "• Undo the harmful effects of many spells, such as insanity.\n" +
                                              "• Produce any other effect whose power level is in line with the above effects, such as a single creature automatically hitting on its next attack or taking a -7 penalty on its next saving throw.\n" +
                                              "A duplicated spell allows saving throws and spell resistance as normal, but the save DC is for a 7th-level spell. When a limited wish spell duplicates a spell with a material component that costs more than 1,000 gp, you must provide that component (in addition to the 1,500 gp diamond component for this spell).",
                                              "9e70b011f2554c3ba0fe9060dc93fc6c",
                                              Image2Sprite.Create("Mods/EldritchArcana/sprites/limited_wish.png"), // geniekind
                                              AbilityType.Spell,
                                              CommandType.Standard,
                                              AbilityRange.Personal,
                                              "", "",
                                              Helpers.CreateSpellComponent(SpellSchool.Universalist),
                                              Helpers.CreateSpellDescriptor());

            spell.CanTargetSelf      = true;
            spell.AvailableMetamagic = Metamagic.Quicken | Metamagic.Heighten | Metamagic.Empower | Metamagic.Extend | Metamagic.Maximize | Metamagic.Reach;

            var variants = new List <BlueprintAbility>();

            for (int level = 1; level <= 6; level++)
            {
                variants.Add(CreateWishForSpellLevel(spell, level, 7));
            }
            spell.AddComponent(spell.CreateAbilityVariants(variants));
            spell.MaterialComponent = variants[0].MaterialComponent;

            spell.AddToSpellList(Helpers.wizardSpellList, 7);
            // Scroll uses Limited Wish (5th level) so you can choose divine spells.
            Helpers.AddSpellAndScroll(spell, "f948342d6a9f2ce49b6aa5f362569d72", 4); // scroll geniekind djinni
        }
Beispiel #17
0
        static void LoadWish()
        {
            var spell = Helpers.CreateAbility("Wish", RES.WishSpells_info,
                                              RES.WishAbilityDescription_info,
                                              "508802d7c0cb452ab7473c2e83c3f535",
                                              Image2Sprite.Create("Mods/EldritchArcana/sprites/wish_spell.png"),
                                              AbilityType.Spell,
                                              CommandType.Standard,
                                              AbilityRange.Personal,
                                              "", "", Helpers.CreateSpellComponent(SpellSchool.Universalist),
                                              Helpers.CreateSpellDescriptor());

            spell.CanTargetSelf      = true;
            spell.AvailableMetamagic = Metamagic.Quicken | Metamagic.Heighten | Metamagic.Empower | Metamagic.Extend | Metamagic.Maximize | Metamagic.Reach;

            var variants = new List <BlueprintAbility>();

            // TODO: add an option to remove injuries and afflictions.
            for (int level = 1; level <= 8; level++)
            {
                variants.Add(CreateWishForSpellLevel(spell, level, 9));
            }
            //variants.AddRange(CreateWishForStatBonus(spell));

            variants.AddRange(CreateWishForStatBonus(spell, spell.AssetGuid));
            spell.AddComponent(spell.CreateAbilityVariants(variants));
            spell.MaterialComponent = variants[0].MaterialComponent;

            spell.AddToSpellList(Helpers.wizardSpellList, 9);
            // Wish Scroll uses 7th level spells to offer the most choice (divine + arcane).
            Wishy = spell;
            Helpers.AddSpellAndScroll(spell, "f948342d6a9f2ce49b6aa5f362569d72", 6);                          // scroll geniekind djinni icon
            // Fix Draconic and Arcane bloodlines to have Wish as their 9th level spell.
            FixBloodlineSpell(spell, "4d491cf9631f7e9429444f4aed629791", "74ab07974fa1c424bbd6fc0e56114db6"); // arcane
            FixBloodlineSpell(spell, "7bd143ead2d6c3a409aad6ee22effe34", "32d443e6a4103d84b9243822c3abec97"); // draconic
        }
Beispiel #18
0
        public static BlueprintFeatureSelection CreateSocialTraits(out BlueprintFeatureSelection adopted)
        {
            var noFeature    = Helpers.PrerequisiteNoFeature(null);
            var socialTraits = Helpers.CreateFeatureSelection("SocialTrait", "Social Trait",
                                                              "Social traits focus on your character’s social class or upbringing.",
                                                              "9e41e60c929e45bc84ded046148c07ec", null, FeatureGroup.None, noFeature);

            noFeature.Feature = socialTraits;
            var choices = new List <BlueprintFeature>();

            // This trait is finished by CreateRaceTraits.
            adopted = Helpers.CreateFeatureSelection("AdoptedTrait", "Adopted",
                                                     "You were adopted and raised by someone not of your race, and raised in a society not your own.\nBenefit: As a result, you picked up a race trait from your adoptive parents and society, and may immediately select a race trait from your adoptive parents’ race.",
                                                     "b4b37968273b4782b29d31c0ca215f41",
                                                     Helpers.GetIcon("26a668c5a8c22354bac67bcd42e09a3f"), // Adaptability
                                                     FeatureGroup.None);

            adopted.IgnorePrerequisites = true;
            adopted.Obligatory          = true;
            choices.Add(adopted);

            choices.Add(Traits.CreateAddStatBonus("ChildOfTheStreetsTrait", "Child of the Streets",
                                                  "You grew up on the streets of a large city, and as a result you have developed a knack for picking pockets and hiding small objects on your person.",
                                                  "a181fd2561134715a04e1b05776ab7a3",
                                                  StatType.SkillThievery));

            choices.Add(Traits.CreateAddStatBonus("FastTalkerTrait", "Fast-Talker",
                                                  "You had a knack for getting yourself into trouble as a child, and as a result developed a silver tongue at an early age.",
                                                  "509458a5ded54ecd9a2a4ef5388de2b7",
                                                  StatType.SkillPersuasion));

            //var ArchaeologistCleverExplorer = Traits.library.Get<BlueprintFeature>("1322e50d2b36aba45ab5405db43c53a3");

            var performanceResource = Traits.library.Get <BlueprintAbilityResource>("e190ba276831b5c4fa28737e5e49e6a6");

            choices.Add(Helpers.CreateFeature("MaestroOfTheSocietyTrait", "Maestro of the Society",
                                              "The skills of the greatest musicians are at your fingertips, thanks to the vast treasure trove of musical knowledge in the vaults you have access to.\nBenefit: You may use bardic performance 3 additional rounds per day.",
                                              "847cdf262e4147cda2c670db81852c58",
                                              Helpers.GetIcon("0d3651b2cb0d89448b112e23214e744e"),
                                              FeatureGroup.None,
                                              Helpers.Create <IncreaseResourceAmount>(i => { i.Resource = performanceResource; i.Value = 3; })));

            var gnomeReq = Helpers.PrerequisiteFeature(Helpers.gnome);
            //var performanceResource = Traits.library.Get<BlueprintAbilityResource>("e190ba276831b5c4fa28737e5e49e6a6");
            var MutagenResource = Traits.library.Get <BlueprintAbilityResource>("3b163587f010382408142fc8a97852b6");

            choices.Add(Helpers.CreateFeature("GnomishAlchemistTrait", "Gnomish Alchemist",
                                              "a Gnomish alchemist discovers how to create a special elixir that he can imbibe in order to heighten his ability This is so potent it can be used an extra time. When consumed, the elixir causes the Alchemist’s skin to change color to match the background and causes his hands and feet to secrete a sticky residue.\n" +
                                              "Benfefit:you can use your mutagen an additinal 2 times per day.",
                                              "125cdf262e4147cda2c670db81852c69",
                                              Helpers.GetIcon("0d3651b2cb0d89448b112e23214e744e"),
                                              FeatureGroup.None,
                                              Helpers.Create <IncreaseResourceAmount>(i => { i.Resource = MutagenResource; i.Value = 2; }),
                                              gnomeReq));



            var Clever = Helpers.CreateFeatureSelection("CleverWordplayTrait", "Clever Wordplay",
                                                        "Your cunning and logic are more than a match for another’s confidence and poise.\n" +
                                                        "Benefit: Choose a skill normally decided by Charisma and use Intelligence instead.",
                                                        "2d4dcccc21e158cdaf2cd4c643249cbf",
                                                        Helpers.NiceIcons(46),
                                                        FeatureGroup.None);

            var CleverOptions = new BlueprintFeature[6];
            var icons         = new int[] { 24, 48 };

            var Stats = new StatType[] {
                StatType.SkillUseMagicDevice,
                StatType.SkillPersuasion,
            };

            for (int i = 0; i < 2; i++)
            {
                CleverOptions[i] = Helpers.CreateFeature($"CleverWordplayTrait{Stats[i]}", $"Use Intelligence for calculating {Stats[i]}",
                                                         "Your cunning and logic are more than a match for another’s confidence and poise.\n" +
                                                         $"Benefit: You modify your {Stats[i]} using your Intelligence modifier.",
                                                         $"a98{i}f{i}e69db44c{i}d889{i}3885e37a6c{i}b",
                                                         Helpers.NiceIcons(i),
                                                         FeatureGroup.None,
                                                         Helpers.Create <ReplaceBaseStatForStatTypeLogic>(x =>
                {
                    x.StatTypeToReplaceBastStatFor = Stats[i];
                    x.NewBaseStatType = StatType.Intelligence;
                })
                                                         );
            }
            Clever.SetFeatures(CleverOptions);
            choices.Add(Clever);



            var AvidReader = Helpers.CreateFeatureSelection("AvidReaderTrait", "Avid Reader",
                                                            "As a youth, you voraciously consumed books and scrolls provided by a member of an adventurer’s guild or a learned organization like the Pathfinder Society, and you have internalized these stories of bold adventurers." +
                                                            "\nBenefit: Choose one Knowledge skill. You always choose to take 10 on checks with the chosen Knowledge skill, even when distracted or threatened.",
                                                            "2e4dcdce32e159cbaf0fb3c641249cbf",
                                                            Image2Sprite.Create("Mods/EldritchArcana/sprites/opposition_research.png"), FeatureGroup.None);



            var AvidReaderOptions = new List <BlueprintFeature>()
            {
                Helpers.CreateFeature("AvidReaderArcana", "Knowledge Arcana",
                                      "Because you are a magic bookworm\n" +
                                      "Benefit: You can always choose to take 10 on checks with knowledge arcana, even when distracted or threatened.",
                                      $"a932f3e69db44cdd33965985e37a6d2b",
                                      Image2Sprite.Create("Mods/EldritchArcana/sprites/spell_perfection.png"),
                                      FeatureGroup.None,
                                      Helpers.Create <Take10ForSuccessLogic>(t => t.Skill = StatType.SkillKnowledgeArcana)
                                      ), Helpers.CreateFeature("AvidReaderWorld", "Knowledge World",
                                                               "Becouse you are a bookworm.\n" +
                                                               "Benefit: You can always choose to take 10 on checks with knowledge world, even when distracted or threatened.",
                                                               $"b254f3e69db44cdd33964985e37a6d1b",
                                                               Image2Sprite.Create("Mods/EldritchArcana/sprites/opposition_research.png"),
                                                               FeatureGroup.None,
                                                               Helpers.Create <Take10ForSuccessLogic>(t => t.Skill = StatType.SkillKnowledgeWorld)
                                                               ),
            };


            AvidReader.SetFeatures(AvidReaderOptions);
            choices.Add(AvidReader);

            choices.Add(Traits.CreateAddStatBonus("SuspiciousTrait", "Suspicious",
                                                  "You discovered at an early age that someone you trusted, perhaps an older sibling or a parent, had lied to you, and lied often, about something you had taken for granted, leaving you quick to question the claims of others.",
                                                  "2f4e86a9d42547bc85b4c829a47d054c",
                                                  StatType.SkillPerception));

            choices.Add(UndoSelection.Feature.Value);
            socialTraits.SetFeatures(choices);
            return(socialTraits);
        }
        public static BlueprintFeatureSelection CreateRegionalTraits()
        {
            var noFeature      = Helpers.PrerequisiteNoFeature(null);
            var regionalTraits = Helpers.CreateFeatureSelection("RegionalTrait", "Regional Trait",
                                                                "Regional traits are keyed to specific regions, be they large (such as a nation or geographic region) or small (such as a city or a specific mountain). In order to select a regional trait, your PC must have spent at least a year living in that region. At 1st level, you can only select one regional trait (typically the one tied to your character’s place of birth or homeland), despite the number of regions you might wish to write into your character’s background.",
                                                                "6158dd4ad2544c27bc3a9b48c2e8a2ca", null, FeatureGroup.None, noFeature);

            noFeature.Feature = regionalTraits;

            // TODO: more regional traits.

            // Note: use the generic feat names/text to let players RP this as they choose.
            var choices = new List <BlueprintFeature>();


            var signatureSpell = Helpers.CreateFeatureSelection("SignatureSpellTrait", "Signature Spell",
                                                                "You have learned a mystical secret that empowers your spellcasting.\nBenefit: Pick one spell when you choose this trait—from this point on, whenever you cast that spell, you do so at +1 caster level.",
                                                                "7a3dfe274f45432b85361bdbb0a3009b",
                                                                Helpers.GetIcon("fe9220cdc16e5f444a84d85d5fa8e3d5"), // Spell Specialization Progression
                                                                FeatureGroup.None,
                                                                Helpers.Create <IncreaseCasterLevelForSpell>());

            Traits.FillSpellSelection(signatureSpell, 1, 9, Helpers.Create <IncreaseCasterLevelForSpell>());
            choices.Add(signatureSpell);

            var metamagicApprentice = Helpers.CreateFeatureSelection("MetamagicApprenticeTrait", "Metamagic Master",
                                                                     "Your ability to alter your spell of choice is greater than expected.\nBenefit: Select one spell of 3rd level or below; when you use the chosen spell with a metamagic feat, it uses one spell slot one level lower than it normally would.\nstarting level is still minimun",
                                                                     "00844f940e434033ab826e5ff5930012",
                                                                     Helpers.GetIcon("ee7dc126939e4d9438357fbd5980d459"), // Spell Penetration
                                                                     FeatureGroup.None);

            Traits.FillSpellSelection(metamagicApprentice, 1, 3, Helpers.Create <ReduceMetamagicCostForSpell>(r => { r.Reduction = 1; r.MaxSpellLevel = 3; }));
            choices.Add(metamagicApprentice);


            choices.Add(Helpers.CreateFeature("BlightedTrait", "Blighted Physiology",
                                              "Exposure to corruption has altered your body causing you to sprout horrific growths beneath your skin." +
                                              "\nBenefit: You gain a +1 natural armor bonus to AC, but your body does not work as a normal creature’s would. Anytime you receive magical healing you heal 1 hp less per die.",
                                              "c50bdfaad65b4028884dd4a74f14e792",
                                              Image2Sprite.Create("Mods/EldritchArcana/sprites/anatomist.png"),
                                              FeatureGroup.None,
                                              Helpers.CreateAddStatBonus(StatType.AC, 1, ModifierDescriptor.NaturalArmor),
                                              Helpers.Create <FeyFoundlingLogic>(s => { s.dieModefier = -1; s.flatModefier = 0; })));

            choices.Add(Helpers.CreateFeature("WanderlustTrait", "Wanderlust",
                                              "Your childhood was brightened by the new places you constantly saw as you traveled with your parents, who were merchants. Still excited by travel, you gain great energy when traveling overland." +
                                              "\nBenefit: Treat your base land speed as 10 feet higher when determining your overland speed.",
                                              "d40bdfaad65b4028884dd4a74f14e793",
                                              Helpers.NiceIcons(0),
                                              FeatureGroup.None,
                                              Helpers.CreateAddStatBonus(StatType.Speed, 10, ModifierDescriptor.Insight)));



            var dagger = Traits.library.Get <BlueprintWeaponType>("07cc1a7fceaee5b42b3e43da960fe76d");

            var riverrat = Traits.CreateAddStatBonus("DaggerboyTrait", "River Rat (Marsh or River)",
                                                     "You learned to swim right after you learned to walk. When you were a youth, a gang of river pirates put you to work swimming in night-time rivers. And canals with a dagger between your teeth so you could sever the anchor ropes of merchant vessels. \n Benefit: You gain a +1 trait bonus on damage rolls with a dagger and a +1 trait bonus on Swim(atletics is class skill) checks. and you start with a dagger.",
                                                     "e16eb56b2f964321a29976226dccb39f",
                                                     StatType.SkillAthletics // strongman

                                                     );

            //riverrat.Icon = Helpers.NiceIcons(38);

            /*
             * var riverratextra = Helpers.CreateFeature("AtleticsTrait", "Swimmer",
             *  "Your swimming made you athletic",
             *  "EB6BC4BF90B1433C80878C9D0C81AAED", Helpers.GetSkillFocus(StatType.SkillAthletics).Icon,
             *  FeatureGroup.None,
             *  Helpers.Create<AddStartingEquipment>(a =>
             *  {
             *      a.CategoryItems = new WeaponCategory[] { WeaponCategory.Dagger, WeaponCategory.Dagger };
             *      a.RestrictedByClass = Array.Empty<BlueprintCharacterClass>();
             *      a.BasicItems = Array.Empty<BlueprintItem>();
             *  }),
             *  //Helpers.CreateAddStatBonus(StatType.SkillAthletics,1,ModifierDescriptor.Trait),
             *  //,
             *  Helpers.Create<WeaponTypeDamageBonus>(a => { a.WeaponType = dagger; a.DamageBonus = 1; })
             *  //Helpers.Create<WeaponCategoryAttackBonus>(a => { a.Category = WeaponCategory.Dagger; a.AttackBonus = 1; })
             *  );
             */

            riverrat.AddComponent(Helpers.Create <WeaponTypeDamageBonus>(a => { a.WeaponType = dagger; a.DamageBonus = 1; }));
            riverrat.AddComponent(Helpers.Create <AddStartingEquipment>(a =>
            {
                a.CategoryItems     = new WeaponCategory[] { WeaponCategory.Dagger, WeaponCategory.Dagger };
                a.RestrictedByClass = Array.Empty <BlueprintCharacterClass>();
                a.BasicItems        = Array.Empty <BlueprintItem>();
            }));
            choices.Add(riverrat);
            //WeaponCategoryAttackBonus

            choices.Add(Helpers.CreateFeature("EmpathicDiplomatTrait", "Empathic Diplomat",
                                              "You have long followed the path of common sense and empathic insight when using diplomacy. \n" +
                                              "Benefit:You modify your Diplomacy checks using your Wisdom modifier, not your Charisma modifier.",
                                              "a987f5e69db44cdd88983985e37a6d2b",
                                              Helpers.NiceIcons(999), // Weapon Specialization
                                              FeatureGroup.None,
                                                                      //dwarfReq,
                                              Helpers.Create <ReplaceBaseStatForStatTypeLogic>(x =>
            {
                x.StatTypeToReplaceBastStatFor = StatType.SkillPersuasion;
                x.NewBaseStatType = StatType.Wisdom;
            })));

            var BruisingInt = Traits.CreateAddStatBonus("BruisingIntellectTrait", "Bruising Intellect",
                                                        "Your sharp intellect and rapier-like wit bruise egos. \n" +
                                                        "Benefits: Intimidate is always a class skill for you, and you may use your Intelligence modifier when making Intimidate checks instead of your Charisma modifier.",
                                                        "b222b5e69db44cdd88983985e37a6d2f",
                                                        StatType.SkillPersuasion
                                                        );

            BruisingInt.AddComponent(Helpers.Create <ReplaceBaseStatForStatTypeLogic>(x =>
            {
                x.StatTypeToReplaceBastStatFor = StatType.SkillPersuasion;
                x.NewBaseStatType = StatType.Intelligence;
            }));

            choices.Add(BruisingInt);


            var Education = Helpers.CreateFeatureSelection("BalancedEducationTrait", "Balanced Education",
                                                           "Your upbringing focused on strengthening mind and body in equal measure.\n" +
                                                           "Benefit: You can exchange ability modifiers between the following pairings: Strength with Intelligence, Dexterity with Wisdom, and Constitution with Charisma.",
                                                           "2d6dc2bca4e158cdaf2cd4c643249bc4",
                                                           Image2Sprite.Create("Mods/EldritchArcana/sprites/spell_perfection.png"),
                                                           FeatureGroup.None);

            var EducationOptions = new BlueprintFeature[11];
            var icons            = new int[] { 24, 48 };
            var Difforhumans     = new string[]
            {
                "Use Magic Device",
                "Persuasion",
                "Lore Nature",
                "Lore Religion",
                "Perception",
                "Knowledge Arcana",
                "Knowledge World",
                "Stealth",
                "Trickery",
                "Mobility",
                "Athletics",
            };



            var Stats = new StatType[] {
                StatType.SkillUseMagicDevice,
                StatType.SkillPersuasion,
                StatType.SkillLoreNature,
                StatType.SkillLoreReligion,
                StatType.SkillPerception,     //5
                StatType.SkillKnowledgeArcana,
                StatType.SkillKnowledgeWorld, //7
                StatType.SkillStealth,
                StatType.SkillThievery,
                StatType.SkillMobility, //10
                StatType.SkillAthletics //11
            };
            var Moddefiers = new StatType[]
            {
                StatType.Constitution,
                StatType.Constitution,
                StatType.Dexterity,
                StatType.Dexterity,
                StatType.Dexterity, //5
                StatType.Strength,
                StatType.Strength,  //7
                StatType.Wisdom,
                StatType.Wisdom,
                StatType.Wisdom,
                StatType.Intelligence//11
            };

            for (int i = 0; i < Stats.Length; i++)
            {
                EducationOptions[i] = Helpers.CreateFeature($"BalancedEducationTrait{Stats[i]}", $"Use {Moddefiers[i]} for calculating {Difforhumans[i]}",
                                                            "you can draw on this training to apply a physical ability modifier to a skill check instead of its usual mental ability modifier, or apply a mental ability modifier to a skill check instead of its usual physical ability modifier.\n" +
                                                            $"Benefit: You modify your {Difforhumans[i]} using your {Moddefiers[i]} modifier.",
                                                            $"a985f6e69db24c7d889b39{i+15}e37a6c1b",
                                                            Helpers.GetSkillFocus(Stats[i]).Icon,
                                                            FeatureGroup.None,
                                                            Helpers.Create <ReplaceBaseStatForStatTypeLogic>(x =>
                {
                    x.StatTypeToReplaceBastStatFor = Stats[i];
                    x.NewBaseStatType = Moddefiers[i];
                })
                                                            );
            }
            Education.SetFeatures(EducationOptions);
            choices.Add(Education);


            choices.Add(UndoSelection.Feature.Value);
            regionalTraits.SetFeatures(choices);
            return(regionalTraits);
        }
Beispiel #20
0
        public static BlueprintFeatureSelection CreateRegionalTraits()
        {
            var noFeature      = Helpers.PrerequisiteNoFeature(null);
            var regionalTraits = Helpers.CreateFeatureSelection("RegionalTrait", RES.RegionalTraitName_info,
                                                                RES.RegionalTraitDescription_info,
                                                                "6158dd4ad2544c27bc3a9b48c2e8a2ca", null, FeatureGroup.None, noFeature);

            noFeature.Feature = regionalTraits;

            // TODO: more regional traits.

            // Note: use the generic feat names/text to let players RP this as they choose.
            var choices = new List <BlueprintFeature>();


            var signatureSpell = Helpers.CreateFeatureSelection("SignatureSpellTrait", RES.SignatureSpellTraitName_info,
                                                                RES.SignatureSpellTraitDescription_info,
                                                                "7a3dfe274f45432b85361bdbb0a3009b",
                                                                Helpers.GetIcon("fe9220cdc16e5f444a84d85d5fa8e3d5"), // Spell Specialization Progression
                                                                FeatureGroup.None,
                                                                Helpers.Create <IncreaseCasterLevelForSpell>());

            Traits.FillSpellSelection(signatureSpell, 1, 9, Helpers.Create <IncreaseCasterLevelForSpell>());
            choices.Add(signatureSpell);

            var metamagicApprentice = Helpers.CreateFeatureSelection("MetamagicApprenticeTrait", RES.MetamagicApprenticeTraitName_info,
                                                                     RES.MetamagicApprenticeTraitDescription_info,
                                                                     "00844f940e434033ab826e5ff5930012",
                                                                     Helpers.GetIcon("ee7dc126939e4d9438357fbd5980d459"), // Spell Penetration
                                                                     FeatureGroup.None);

            Traits.FillSpellSelection(metamagicApprentice, 1, 3, Helpers.Create <ReduceMetamagicCostForSpell>(r => { r.Reduction = 1; r.MaxSpellLevel = 3; }));
            choices.Add(metamagicApprentice);

            choices.Add(Helpers.CreateFeature("BlightedTrait", RES.BlightedTraitName_info,
                                              RES.BlightedTraitDescription_info,
                                              "c50bdfaad65b4028884dd4a74f14e792",
                                              Image2Sprite.Create("Mods/EldritchArcana/sprites/anatomist.png"),
                                              FeatureGroup.None,
                                              Helpers.CreateAddStatBonus(StatType.AC, 1, ModifierDescriptor.NaturalArmor),
                                              Helpers.Create <FeyFoundlingLogic>(s => { s.dieModefier = -1; s.flatModefier = 0; })));

            choices.Add(Helpers.CreateFeature("WanderlustTrait", RES.WanderlustTraitName_info,
                                              RES.WanderlustTraitDescription_info,
                                              "d40bdfaad65b4028884dd4a74f14e793",
                                              Helpers.NiceIcons(0),
                                              FeatureGroup.None,
                                              Helpers.CreateAddStatBonus(StatType.Speed, 10, ModifierDescriptor.Trait)));


            var dagger = Traits.library.Get <BlueprintWeaponType>("07cc1a7fceaee5b42b3e43da960fe76d");

            var riverrat = Traits.CreateAddStatBonus("DaggerboyTrait", RES.DaggerboyTraitName_info,
                                                     RES.DaggerboyTraitDescription_info,
                                                     "e16eb56b2f964321a29976226dccb39f",
                                                     StatType.SkillAthletics // strongman

                                                     );

            //riverrat.Icon = Helpers.NiceIcons(38);

            /*
             * var riverratextra = Helpers.CreateFeature("AtleticsTrait", "Swimmer",
             *  "Your swimming made you athletic",
             *  "EB6BC4BF90B1433C80878C9D0C81AAED", Helpers.GetSkillFocus(StatType.SkillAthletics).Icon,
             *  FeatureGroup.None,
             *  Helpers.Create<AddStartingEquipment>(a =>
             *  {
             *      a.CategoryItems = new WeaponCategory[] { WeaponCategory.Dagger, WeaponCategory.Dagger };
             *      a.RestrictedByClass = Array.Empty<BlueprintCharacterClass>();
             *      a.BasicItems = Array.Empty<BlueprintItem>();
             *  }),
             *  //Helpers.CreateAddStatBonus(StatType.SkillAthletics,1,ModifierDescriptor.Trait),
             *  //,
             *  Helpers.Create<WeaponTypeDamageBonus>(a => { a.WeaponType = dagger; a.DamageBonus = 1; })
             *  //Helpers.Create<WeaponCategoryAttackBonus>(a => { a.Category = WeaponCategory.Dagger; a.AttackBonus = 1; })
             *  );
             */

            riverrat.AddComponent(Helpers.Create <WeaponTypeDamageBonus>(a => { a.WeaponType = dagger; a.DamageBonus = 1; }));
            riverrat.AddComponent(Helpers.Create <AddStartingEquipment>(a =>
            {
                a.CategoryItems     = new WeaponCategory[] { WeaponCategory.Dagger, WeaponCategory.Dagger };
                a.RestrictedByClass = Array.Empty <BlueprintCharacterClass>();
                a.BasicItems        = Array.Empty <BlueprintItem>();
            }));
            choices.Add(riverrat);
            //WeaponCategoryAttackBonus

            choices.Add(Helpers.CreateFeature("EmpathicDiplomatTrait", RES.EmpathicDiplomatTraitName_info,
                                              RES.EmpathicDiplomatTraitDescription_info,
                                              "a987f5e69db44cdd88983985e37a6d2b",
                                              Helpers.NiceIcons(999), // Weapon Specialization
                                              FeatureGroup.None,
                                                                      //dwarfReq,
                                              Helpers.Create <ReplaceBaseStatForStatTypeLogic>(x =>
            {
                x.StatTypeToReplaceBastStatFor = StatType.SkillPersuasion;
                x.NewBaseStatType = StatType.Wisdom;
            })));

            var BruisingInt = Traits.CreateAddStatBonus("BruisingIntellectTrait", RES.BruisingIntellectTraitName_info,
                                                        RES.BruisingIntellectTraitDescription_info,
                                                        "b222b5e69db44cdd88983985e37a6d2f",
                                                        StatType.SkillPersuasion
                                                        );

            BruisingInt.AddComponent(Helpers.Create <ReplaceBaseStatForStatTypeLogic>(x =>
            {
                x.StatTypeToReplaceBastStatFor = StatType.SkillPersuasion;
                x.NewBaseStatType = StatType.Intelligence;
            }));

            choices.Add(BruisingInt);

            choices.Add(UndoSelection.Feature.Value);
            regionalTraits.SetFeatures(choices);
            return(regionalTraits);
        }
        public static BlueprintFeatureSelection CreateMagicTraits()
        {
            var noFeature   = Helpers.PrerequisiteNoFeature(null);
            var magicTraits = Helpers.CreateFeatureSelection("MagicTrait", "Magic Trait",
                                                             "Magic traits focus on any magical events or training your character may have had in their past.",
                                                             "d89181c607e4431084f9d97532c5c554", null, FeatureGroup.None, noFeature);

            noFeature.Feature = magicTraits;

            var choices = new List <BlueprintFeature>();

            choices.Add(Traits.CreateAddStatBonus("ClassicallySchooledTrait", "Classically Schooled",
                                                  "Your greatest interests as a child did not lie with current events or the mundane—you have always felt out of place, as if you were born in the wrong era. You take to philosophical discussions of the Great Beyond and of historical events with ease.",
                                                  "788098518aa9436782397fa318c64c69",
                                                  StatType.SkillKnowledgeArcana));

            choices.Add(Traits.CreateAddStatBonus("DangerouslyCuriousTrait", "Dangerously Curious",
                                                  "You have always been intrigued by magic, possibly because you were the child of a magician or priest. You often snuck into your parent’s laboratory or shrine to tinker with spell components and magic devices, and frequently caused quite a bit of damage and headaches for your parent as a result.",
                                                  "0c72c573cc404b42916dc7265ea6f59a",
                                                  StatType.SkillUseMagicDevice));


            var WildShapeResource = Traits.library.Get <BlueprintAbilityResource>("ae6af4d58b70a754d868324d1a05eda4");


            choices.Add(Helpers.CreateFeature("BeastOfSocietyTrait", "Beast Of Society",
                                              "A master druid revealed to you greater secrets of concentration when changing your form into that of an animal." +
                                              "\nBenefit: You can shapeshift more often.",
                                              "e34889a2dd7e4e9ebfdfa76bfb8f4445",
                                              Image2Sprite.Create("Mods/EldritchArcana/sprites/beast_of_society.png"),
                                              FeatureGroup.None,
                                              WildShapeResource.CreateIncreaseResourceAmount(4)));

            choices.Add(Helpers.CreateFeature("FocusedMindTrait", "Focused Mind",
                                              "Your childhood was dominated either by lessons of some sort (whether musical, academic, or other) or by a horrible home life that encouraged your ability to block out distractions and focus on the immediate task at hand.\nBenefit: You gain a +2 trait bonus on concentration checks.",
                                              "e34889a2dd7e4e9ebfdfa76bfb8f5556",
                                              Helpers.GetIcon("06964d468fde1dc4aa71a92ea04d930d"), // Combat Casting
                                              FeatureGroup.None,
                                              Helpers.Create <ConcentrationBonus>(a => a.Value = 2)));

            var giftedAdept = Helpers.CreateFeatureSelection("GiftedAdeptTrait", "Gifted Adept",
                                                             "Your interest in magic was inspired by witnessing a spell being cast in a particularly dramatic method, perhaps even one that affected you physically or spiritually. This early exposure to magic has made it easier for you to work similar magic on your own.\nBenefit: Pick one spell when you choose this trait—from this point on, whenever you cast that spell, its effects manifest at +1 caster level.",
                                                             "5eb0b8050ed5466986846cffca0b35b6",
                                                             Helpers.GetIcon("fe9220cdc16e5f444a84d85d5fa8e3d5"), // Spell Specialization Progression
                                                             FeatureGroup.None);

            Traits.FillSpellSelection(giftedAdept, 1, 9, Helpers.Create <IncreaseCasterLevelForSpell>());
            choices.Add(giftedAdept);

            choices.Add(Helpers.CreateFeature("MagicalKnackTrait", "Magical Knack",
                                              "You were raised, either wholly or in part, by a magical creature, either after it found you abandoned in the woods or because your parents often left you in the care of a magical minion. This constant exposure to magic has made its mysteries easy for you to understand, even when you turn your mind to other devotions and tasks.\nBenefit: Pick a class when you gain this trait—your caster level in that class gains a +2 trait bonus as long as this bonus doesn’t raise your caster level above your current Hit Dice.",
                                              "8fd15d5aa003497aa7f976530d21e430",
                                              Helpers.GetIcon("16fa59cc9a72a6043b566b49184f53fe"), // Spell Focus
                                              FeatureGroup.None,
                                                                                                   //Helpers.Create<IncreaseCasterLevel>(),
                                              Helpers.Create <IncreaseCasterLevelUpToCharacterLevel>()));

            var magicalLineage = Helpers.CreateFeatureSelection("MagicalLineageTrait", "Magical Lineage",
                                                                "One of your parents was a gifted spellcaster who not only used metamagic often, but also developed many magical items and perhaps even a new spell or two—and you have inherited a fragment of this greatness.\nBenefit: Pick one spell when you choose this trait. When you apply metamagic feats to this spell that add at least 1 level to the spell, treat its actual level as 1 lower for determining the spell’s final adjusted level.",
                                                                "1785787fb62a4c529104ba53d0de99af",
                                                                Helpers.GetIcon("ee7dc126939e4d9438357fbd5980d459"), // Spell Penetration
                                                                FeatureGroup.None);

            Traits.FillSpellSelection(magicalLineage, 1, 9, Helpers.Create <ReduceMetamagicCostForSpell>(r => r.Reduction = 1));
            choices.Add(magicalLineage);

            choices.Add(Helpers.CreateFeature("PragmaticActivatorTrait", "Pragmatic Activator",
                                              "While some figure out how to use magical devices with stubborn resolve, your approach is more pragmatic.\n" +
                                              "Benefit: You may use your Intelligence modifier when making Use Magic Device checks instead of your Charisma modifier.",
                                              "d982f3e69db44cdd34263985e37a6d4c",
                                              Image2Sprite.Create("Mods/EldritchArcana/sprites/spell_perfection.png"),
                                              FeatureGroup.None,
                                              Helpers.Create <ReplaceBaseStatForStatTypeLogic>(x =>
            {
                x.StatTypeToReplaceBastStatFor = StatType.SkillKnowledgeArcana;
                x.NewBaseStatType = StatType.Charisma;
            })
                                              ));


            choices.Add(UndoSelection.Feature.Value);
            magicTraits.SetFeatures(choices);
            return(magicTraits);
        }
Beispiel #22
0
        // Add the Prestigious Spellcaster feat.
        internal static void Load()
        {
            if (prestigiousSpellcasterClasses != null)
            {
                return;
            }

            dragonDiscipleClass = Helpers.GetClass(dragonDiscipleId);
            eldritchKnightClass = Helpers.GetClass(eldritchKnightId);
            // NOTE: this order must match the order used in the feats.
            ///126
            prestigiousSpellcasterDefault = new BlueprintCharacterClass[] { eldritchKnightClass, dragonDiscipleClass };
            ///127
            prestigiousSpellcasterExtra = Helpers.prestigeClassesSkipLevels.ToArray();

            //prestigiousSpellcasterClasses = prestigiousSpellcasterDefault.Concat(prestigiousSpellcasterExtra).ToArray();
            prestigiousSpellcasterClasses = Helpers.prestigeClassesSkipLevels.ToArray();

            FixEldritchKnightPrereq();

            // TODO: it would be nice to find the list of spellcasting prestige classes with skipped levels automatically.
            var spellSpecialization = library.Get <BlueprintFeatureSelection>("fe67bc3b04f1cd542b4df6e28b6e0ff5");
            var prestigiousSpell    = Helpers.CreateFeatureSelection("PrestigiousSpellcasterSelection", RES.PrestigiousSpellcasterFeatureName_info,
                                                                     RES.PrestigiousSpellcasterFeatureDescription_info,
                                                                     "30e9a3fcdb0446aa87f45d0f50b3b3fc",
                                                                     Image2Sprite.Create("Mods/EldritchArcana/sprites/prestigious_spellcaster.png"),
                                                                     FeatureGroup.Feat);


            //126

            /*
             * prestigiousSpell.SetFeatures(
             *  CreatePrestigiousSpellcaster(eldritchKnightClass, "dc3ab8d0484467a4787979d93114ebc3"  ),//*EldritchKnightSpellbookSelection
             *  CreatePrestigiousSpellcaster(dragonDiscipleClass, "8c1ba14c0b6dcdb439c56341385ee474"  )
             *  );//*DragonDiscipleSpellbookSelection
             * //start*/
            foreach (BlueprintCharacterClass c in prestigiousSpellcasterClasses)
            {
                Log.Write("patching:" + c.ToString());
                var spellbookguid = "";
                for (int i = 1; i < 11; i++)
                {
                    var entry = c.Progression.GetLevelEntry(i);
                    foreach (BlueprintFeatureBase f in entry.Features)
                    {
                        if (f.name.ToUpper().Contains("SPELLBOOK"))
                        {
                            spellbookguid = f.AssetGuid;
                            break;
                        }
                    }
                    if (spellbookguid != "" && spellbookguid != null)
                    {
                        break;
                    }
                }
                if (spellbookguid != "" && spellbookguid != null)
                {
                    try
                    {
                        var feat = CreatePrestigiousSpellcaster(c, spellbookguid);
                        prestigiousSpell.Features.AddToArray(feat);
                    }
                    catch (System.Exception)
                    {
                        Log.Write("There was an issue with " + c.name + " unable to add to prestigious spellcaster");
                    }
                }
            }
            //end

            var components = new List <BlueprintComponent>(prestigiousSpellcasterClasses.Select(
                                                               c => Helpers.PrerequisiteClassLevel(c, 1, any: true)));

            components.Add(Helpers.PrerequisiteFeature(FavoredClassBonus.favoredPrestigeClass));
            components.Add(Helpers.Create <PrestigiousSpellcasterRecommendation>());
            prestigiousSpell.SetComponents(components);
            prestigiousSpell.AllFeatures = prestigiousSpell.Features;
            // Log.Write(prestigiousSpell, "", true);

            library.AddFeats(prestigiousSpell);

            ApplySpellbook_Apply_Patch.onApplySpellbook.Add((state, unit, previousCasterLevel) =>
            {
                if (ShouldGainCasterLevelOnLevelUp(state, unit))
                {
                    IncreaseCasterLevel(state, unit);
                }
            });

            // Set this last, so it won't be set if we failed to initialize.
            prestigiousSpellcaster = prestigiousSpell;
        }
        static void LoadMeteorSwarm()
        {
            var fireball = library.Get <BlueprintAbility>("2d81362af43aeac4387a3d4fced489c3");

            var spell = library.CopyAndAdd(fireball, "MeteorSwarm", "2d18f8a4de6742e2ba954da0f19a4957");

            spell.SetNameDescriptionIcon("Meteor Swarm",
                                         "Meteor swarm is a very powerful and spectacular spell that is similar to fireball in many aspects. When you cast it, four 2-foot-diameter spheres spring from your outstretched hand and streak in straight lines to the spots you select. The meteor spheres leave a fiery trail of sparks.\n" +
                                         "If you aim a sphere at a specific creature, you may make a ranged touch attack to strike the target with the meteor.Any creature struck by a sphere takes 2d6 points of bludgeoning damage(no save) and has to make a saving throw against +4 DC for the sphere’s fire damage(see below).If a targeted sphere misses its target, it simply explodes at the nearest corner of the target’s space. You may aim more than one sphere at the same target.\n" +
                                         "Once a sphere reaches its destination, it explodes in a 40-foot-radius spread, dealing 6d6 points of fire damage to each creature in the area.If a creature is within the area of more than one sphere, it must save separately against each.Despite stemming from separate spheres, all of the fire damage is added together after the saves have been made, and fire resistance is applied only once.",
                                         Image2Sprite.Create("Mods/EldritchArcana/sprites/meteor_swarm.png"));
            spell.LocalizedSavingThrow = Helpers.CreateString($"{spell.name}.SavingThrow", "None or Reflex half, see text");

            var deliverProjectile  = UnityEngine.Object.Instantiate(fireball.GetComponent <AbilityDeliverProjectile>());
            var fireballProjectile = deliverProjectile.Projectiles[0];

            deliverProjectile.Projectiles.AddToArray(fireballProjectile, fireballProjectile);

            var fire24d6 = Helpers.CreateActionDealDamage(DamageEnergyType.Fire,
                                                          DiceType.D6.CreateContextDiceValue(24), isAoE: true, halfIfSaved: true);
            var fireDmgSave = Helpers.CreateActionSavingThrow(SavingThrowType.Reflex, fire24d6);

            var conditionalDCIncrease = Harmony12.AccessTools.Inner(typeof(ContextActionSavingThrow), "ConditionalDCIncrease");
            var dcAdjustArray         = Array.CreateInstance(conditionalDCIncrease, 1);
            var dcAdjust = Activator.CreateInstance(conditionalDCIncrease);

            // If the main target was hit by the ranged touch attack, increase the DC by 4.
            Helpers.SetField(dcAdjust, "Condition", Helpers.CreateConditionsCheckerAnd(ContextConditionNearMainTarget.Create()));
            Helpers.SetField(dcAdjust, "Value", AbilitySharedValue.StatBonus.CreateContextValue());
            dcAdjustArray.SetValue(dcAdjust, 0);
            Helpers.SetField(fireDmgSave, "m_ConditionalDCIncrease", dcAdjustArray);

            var increaseDCBy4 = Helpers.Create <ContextActionChangeSharedValue>(c =>
            {
                c.SharedValue = AbilitySharedValue.StatBonus;
                c.SetValue    = 4;
                c.Type        = SharedValueChangeType.Set;
            });

            var physical2d6 = Helpers.CreateActionDealDamage(PhysicalDamageForm.Bludgeoning,
                                                             DiceType.D6.CreateContextDiceValue(2));

            spell.SetComponents(
                SpellSchool.Evocation.CreateSpellComponent(),
                SpellDescriptor.Fire.CreateSpellDescriptor(),
                deliverProjectile,
                Helpers.CreateAbilityTargetsAround(40.Feet(), TargetType.Any),
                Helpers.CreateRunActions(
                    Helpers.CreateConditional(
                        // Check if this unit is the primary target
                        ContextConditionNearMainTarget.Create(),
                        // Perform a ranged touch attack on the primary target
                        ContextActionRangedTouchAttack.Create(
                            // If ranged touch succeeded:
                            // - 4 meteors hit for 2d6 bludgeoning damage each.
                            // - target takes 24d6 fire damage, -4 penalty to reflex save for half
                            new GameAction[] {
                physical2d6, physical2d6, physical2d6, physical2d6,
                increaseDCBy4
            })),
                    // Apply fire damage to all targets in range.
                    fireDmgSave));
            spell.AddToSpellList(Helpers.wizardSpellList, 9);
            spell.AddToSpellList(Helpers.magusSpellList, 9);
            spell.AddToSpellList(Helpers.fireDomainSpellList, 9);
            //spell.AddToSpellList(Helpers.druidSpellList, 9);
            //spell.AddToSpellList(Helpers., 9);
            Helpers.AddSpellAndScroll(spell, "5b172c2c3e356eb43ba5a8f8008a8a5a"); // scroll of fireball
            meteorSwarm = spell;
        }
        public static BlueprintFeatureSelection CreateFaithTraits()
        {
            var noFeature   = Helpers.PrerequisiteNoFeature(null);
            var faithTraits = Helpers.CreateFeatureSelection("FaithTrait", "Faith Trait",
                                                             "Faith traits focus on the character's religious and philosophical leanings.",
                                                             "21d0fe2d88e44e5cbfb28becadf86110", null, FeatureGroup.None, noFeature);

            noFeature.Feature = faithTraits;

            var choices = new List <BlueprintFeature>();

            choices.Add(Helpers.CreateFeature("BirthmarkTrait", "Birthmark",
                                              "You were born with a strange birthmark that looks very similar to the holy symbol of the god you chose to worship later in life.\nBenefits: This birthmark increases your devotion to your god. You gain a +2 trait bonus on all saving throws against charm and compulsion effects.",
                                              "ebf720b1589d43a2b6cfad26aeda34f9",
                                              Helpers.GetIcon("2483a523984f44944a7cf157b21bf79c"), // Elven Immunities
                                              FeatureGroup.None,
                                              Helpers.Create <SavingThrowBonusAgainstSchool>(a =>
            {
                a.School             = SpellSchool.Enchantment;
                a.Value              = 2;
                a.ModifierDescriptor = ModifierDescriptor.Trait;
            })));


            choices.Add(Helpers.CreateFeature("DefyMadnessTrait", "Defy Madness (Old Cults)",
                                              "Your direct involvement with supernatural and alien forces has left you less vulnerable to the insanity they cause." +
                                              "\nBenefit: You gain a +1 trait bonus on any saving throws against confusion, insanity, madness, and Wisdom damage and drain.",
                                              "fdc612c0789d43a2b6cfad26aeda34f9",
                                              Helpers.GetIcon("2483a523984f44944a7cf157b21bf79c"), // Elven Immunities
                                              FeatureGroup.None,
                                              Helpers.Create <SavingThrowBonusAgainstDescriptor>(a =>
            {
                a.SpellDescriptor    = SpellDescriptor.MindAffecting;
                a.Value              = 1;
                a.ModifierDescriptor = ModifierDescriptor.Trait;
            })));



            choices.Add(Traits.CreateAddStatBonus("ChildOfTheTempleTrait", "Child of the Temple",
                                                  "You have long served at a temple in a city, where you picked up on many of the nobility’s customs in addition to spending much time in the temple libraries studying your faith.",
                                                  "cb79816f17d84a51b173ef74aa325561",
                                                  StatType.SkillLoreReligion));


            choices.Add(Traits.CreateAddStatBonus("DevoteeOfTheGreenTrait", "Devotee of the Green",
                                                  "Your faith in the natural world or one of the gods of nature makes it easy for you to pick up on related concepts.",
                                                  "6b8e68de9fc04139af0f1127d2a33984",
                                                  StatType.SkillLoreNature));

            choices.Add(Traits.CreateAddStatBonus("EaseOfFaithTrait", "Ease of Faith",
                                                  "Your mentor, the person who invested your faith in you from an early age, took steps to ensure you understood that what powers your divine magic is no different from that which powers the magic of other religions. This philosophy makes it easier for you to interact with others who may not share your views.",
                                                  "300d727a858d4992a3e01c8165a4c25f",
                                                  StatType.SkillPersuasion));

            var channelEnergyResource           = Traits.library.Get <BlueprintAbilityResource>("5e2bba3e07c37be42909a12945c27de7");
            var channelEnergy                   = Traits.library.Get <BlueprintAbility>("f5fc9a1a2a3c1a946a31b320d1dd31b2");
            var channelEnergyEmpyrealResource   = Traits.library.Get <BlueprintAbilityResource>("f9af9354fb8a79649a6e512569387dc5");
            var channelEnergyHospitalerResource = Traits.library.Get <BlueprintAbilityResource>("b0e0c7716ab27c64fb4b131c9845c596");
            var LayOnHandsResource              = Traits.library.Get <BlueprintAbilityResource>("9dedf41d995ff4446a181f143c3db98c");

            choices.Add(Helpers.CreateFeature("ExaltedOfTheSocietyTrait", "Exalted of the Society",
                                              "The vaults of the great city contain many secrets of the divine powers of the gods, and you have studied your god extensively.\nBenefit: You may channel energy 1 additional time per day.",
                                              "3bb1b077ad0845b59663c0e1b343011a",
                                              Helpers.GetIcon("cd9f19775bd9d3343a31a065e93f0c47"), // Extra Channel
                                              FeatureGroup.None,
                                              channelEnergyResource.CreateIncreaseResourceAmount(1),
                                              channelEnergyEmpyrealResource.CreateIncreaseResourceAmount(1),
                                              channelEnergyHospitalerResource.CreateIncreaseResourceAmount(1),
                                              LayOnHandsResource.CreateIncreaseResourceAmount(2),
                                              LifeMystery.channelResource.CreateIncreaseResourceAmount(1)));

            choices.Add(Helpers.CreateFeature("SacredConduitTrait", "Sacred Conduit",
                                              "Your birth was particularly painful and difficult for your mother, who needed potent divine magic to ensure that you survived (your mother may or may not have survived). In any event, that magic infused you from an early age, and you now use divine energy with greater ease than most." +
                                              "\nBenefit: Whenever you use healing energy, you gain a +1 trait bonus to its save DC vs undead.",
                                              "bd9c29875bd9d3343a31a065e93f0c28",
                                              Helpers.GetIcon("cd9f19775bd9d3343a31a065e93f0c47"), // Extra Channel
                                              FeatureGroup.None,

                                              Helpers.Create <ReplaceAbilityDC>(r => { r.Ability = channelEnergy; r.Stat = StatType.Wisdom; }),
                                              //Helpers.Create<ability>(r => { r.Ability = channelEnergy; r.Stat = StatType.Wisdom; }),
                                              Helpers.Create <IncreaseSpellDescriptorDC>(r => { r.Descriptor = SpellDescriptor.Cure; r.BonusDC = 1; })
                                              //Helpers.Create<IncreaseSpellDescriptorDC>(r => { r.Descriptor = SpellDescriptor.; r.BonusDC = 1; })
                                              ));

            choices.Add(Helpers.CreateFeature("FatesFavoredTrait", "Fate's Favored",
                                              "Whenever you are under the effect of a luck bonus of any kind, that bonus increases by 1.",
                                              "0c5dcccc21e148cdaf0fb3c643249bfb",
                                              Image2Sprite.Create("Mods/EldritchArcana/sprites/fey_foundling.png"), // blessing luck & resolve
                                              FeatureGroup.None,
                                              Helpers.Create <ExtraLuckBonus>()));

            var planar = Helpers.CreateFeatureSelection("PlanarSavantTrait", "Planar Savant",
                                                        "You have always had an innate sense of the workings of the planes and their denizens." +
                                                        "\nBenefit: You may use your Charisma modifier when making Knowledge checks instead of your Intelligence modifier. choose a knowledge to replace.",
                                                        "2e4dcecc32e148cbaf0fb3c643249cbf",
                                                        Helpers.NiceIcons(19),
                                                        FeatureGroup.None);



            var planarOptions = new List <BlueprintFeature>()
            {
                Helpers.CreateFeature("PlanarArcana", "Knowledge Arcana",
                                      "Use Charisma for calculating Knowledge (Arcana)\n" +
                                      "Benefit: You modify your Knowledge (Arcana) using your Charisma modifier. insted of your Inteligence",
                                      $"a982f3e69db44cdd33963985e37a6d2b",
                                      Helpers.NiceIcons(32),
                                      FeatureGroup.None,
                                      Helpers.Create <ReplaceBaseStatForStatTypeLogic>(x =>
                {
                    x.StatTypeToReplaceBastStatFor = StatType.SkillKnowledgeArcana;
                    x.NewBaseStatType = StatType.Charisma;
                })
                                      ), Helpers.CreateFeature("PlanarWorld", "Knowledge World",
                                                               "Use Charisma for calculating Knowledge (World)\n" +
                                                               "Benefit: You modify your Knowledge (World) using your Charisma modifier. insted of your Inteligence",
                                                               $"b234f3e69db44cdd33963985e37a6d1b",
                                                               Helpers.NiceIcons(32),
                                                               FeatureGroup.None,
                                                               Helpers.Create <ReplaceBaseStatForStatTypeLogic>(x =>
                {
                    x.StatTypeToReplaceBastStatFor = StatType.SkillKnowledgeWorld;
                    x.NewBaseStatType = StatType.Charisma;
                })
                                                               ),
            };


            planar.SetFeatures(planarOptions);
            choices.Add(planar);

            var WisFlesh = Helpers.CreateFeatureSelection("WisdomintheFleshTrait", "Wisdom in the Flesh",
                                                          "Your hours of meditation on inner perfection and the nature of strength and speed allow you to focus your thoughts to achieve things your body might not normally be able to do on its own.\n" +
                                                          "Benefit: Choose a skill normally decided by Strength, Charisma, or Dexterity, and use Wisdom instead.",
                                                          "1d4dcccc21e148cdaf0fb3c643249cbf",
                                                          Helpers.NiceIcons(43), // wisman
                                                          FeatureGroup.None);

            var WisFleshOptions = new BlueprintFeature[6];
            var icons           = new int[] { 0, 1, 24, 2, 25, 6, 22 };
            var OldStats        = new StatType[] {
                StatType.Dexterity,
                StatType.Dexterity,
                StatType.Charisma,
                StatType.Charisma,
                StatType.Strength,
                //StatType.Intelligence,
                StatType.Dexterity,
                StatType.Charisma,
            };
            var Stats = new StatType[] {
                StatType.SkillMobility,
                StatType.SkillThievery,
                StatType.SkillUseMagicDevice,
                StatType.SkillPersuasion,
                StatType.SkillAthletics,
                //StatType.SkillKnowledgeWorld,
                StatType.SkillStealth,
                StatType.SkillPersuasion,
            };

            for (int i = 0; i < 6; i++)
            {
                WisFleshOptions[i] = Helpers.CreateFeature($"EmpathicDiplomatTrait{Stats[i]}", $"Use Wisdom for calculating {Stats[i]}",
                                                           "Your hours of meditation on inner perfection and the nature of strength and speed allow you to focus your thoughts to achieve things your body might not normally be able to do on its own. \n" +
                                                           $"Benefit: You modify your {Stats[i]} using your Wisdom modifier. insted of your {OldStats[i]}",
                                                           $"a98{i}f{i}e69db44cdd889{i}3985e37a6d2b",
                                                           Helpers.NiceIcons(i),
                                                           FeatureGroup.None,
                                                           Helpers.Create <ReplaceBaseStatForStatTypeLogic>(x =>
                {
                    x.StatTypeToReplaceBastStatFor = Stats[i];
                    x.NewBaseStatType = StatType.Wisdom;
                })
                                                           );
            }
            WisFlesh.SetFeatures(WisFleshOptions);
            choices.Add(WisFlesh);


            choices.Add(Helpers.CreateFeature("IndomitableFaithTrait", "Indomitable Faith",
                                              "You were born in a region where your faith was not popular, but you still have never abandoned it. Your constant struggle to maintain your own faith has bolstered your drive.\nBenefit: You gain a +1 trait bonus on Will saves.",
                                              "e50acadad65b4028884dd4a74f14e727",
                                              Helpers.GetIcon("175d1577bb6c9a04baf88eec99c66334"), // Iron Will
                                              FeatureGroup.None,
                                              Helpers.CreateAddStatBonus(StatType.SaveWill, 1, ModifierDescriptor.Trait)));

            var LessonResource = Helpers.CreateAbilityResource("ChaldiraResource", "Chaldira charge",
                                                               "One charge Chaldira",
                                                               "2dc32000b6e056d42a8ecc9921dd43c2",
                                                               Helpers.NiceIcons(3),
                                                               null
                                                               );

            LessonResource.SetFixedResource(0);
            int rnd = DateTime.Now.Millisecond % 17 + 3;

            var Chaldira = Helpers.CreateFeatureSelection("ChaldiraTrait", "Lessons of Faith",
                                                          "Your studies have given you a knack for avoiding trouble." +
                                                          "\nBenefit: Your first few saves have are better" +
                                                          "\nChoose how to apply " +
                                                          "the original version from tabletop is there but in tabletop you can choose if you want to reroll and if you roll a 18 you might not want to reroll becouse the chance you roll better is small." +
                                                          "And if you have a save you know has a verry low dc you might not want to reroll even a 2 becouse you are going to succeed anyway." +
                                                          "This is why there is an option to gain a flat bonus to the first few saves. this is not in the normal tabletop version.",
                                                          "f51acadad65b4028884dd4a74f14e817",
                                                          Helpers.GetIcon("175d1577bb6c9a04baf88eec99c66334"), // Iron Will
                                                          FeatureGroup.None,
                                                          Helpers.CreateAddAbilityResource(LessonResource));

            //
            int len             = 5;
            var ChaldiraOptions = new List <BlueprintFeature>(len);

            ChaldiraOptions.Add(Helpers.CreateFeature($"ChaldiraEffectnumber", $"Chaldira(original)",
                                                      "Your studies have given you a knack for avoiding trouble." +
                                                      "\nBenefit: The first time you have to roll a save you roll the d20 2 times and pick the best this can be used once per day",
                                                      $"f53acadad65b4048884dd4a74f14e617",
                                                      Helpers.GetIcon("175d1577bb6c9a04baf88eec99c66334"), // Iron Will
                                                      FeatureGroup.None,
                                                      Helpers.Create <NewMechanics.SavingThrowReroll>(a => { a.Descriptor = ModifierDescriptor.Sacred; a.Value = rnd; a.resource = LessonResource; a.original = true; }),
                                                      LessonResource.CreateIncreaseResourceAmount(1)));

            for (int i = 1; i < len; i++)
            {
                ChaldiraOptions.Add(Helpers.CreateFeature($"ChaldiraEffectnumber{i}", $"Chaldira {i}[HB]",
                                                          "Your studies have given you a knack for avoiding trouble." +
                                                          $"\nBenefit: Each day add a {(int)(12/i)} Sacred bonus to the first {i} save(s).",
                                                          $"f5{i}acadad65b40{i}8884dd4a74f14e{i}17",
                                                          Helpers.GetIcon("175d1577bb6c9a04baf88eec99c66334"), // Iron Will
                                                          FeatureGroup.None,
                                                          Helpers.Create <NewMechanics.SavingThrowReroll>(a => { a.Descriptor = ModifierDescriptor.Sacred; a.Value = (int)(12 / i); a.resource = LessonResource; }),
                                                          LessonResource.CreateIncreaseResourceAmount(i)));
            }

            Chaldira.SetFeatures(ChaldiraOptions);
            choices.Add(Chaldira);

            choices.Add(Traits.CreateAddStatBonus("ScholarOfTheGreatBeyondTrait", "Scholar of the Great Beyond",
                                                  "Your greatest interests as a child did not lie with current events or the mundane—you have always felt out of place, as if you were born in the wrong era. You take to philosophical discussions of the Great Beyond and of historical events with ease.",
                                                  "0896fea4f7ca4635aa4e5338a673610d",
                                                  StatType.SkillKnowledgeWorld));

            // TODO: Stalwart of the Society

            faithTraits.SetFeatures(choices);
            return(faithTraits);
        }
 private static void CreateSpellbookSelection()
 {
     BlueprintComponent[] array = new List <BlueprintComponent>().ToArray();
     ArcaneSavantClass.spellbookSelection = Helpers.CreateFeatureSelection("ArcaneArcherSpellbookSelection", "Arcane Spellcasting", "At 2nd level, and at every level thereafter, with an exception for 5th and 9th levels, an Arcane Archer  gains new spells per day as if he had also gained a level in an arcane spellcasting class he belonged to before adding the prestige class. He does not, however, gain any other benefit a character of that class would have gained, except for additional spells per day, spells known, and an increased effective level of spellcasting. If a character had more than one arcane spellcasting class before becoming an Arcane Archer, he must decide to which class he adds the new level for purposes of determining spells per day.", "ea4c7c56d90d413886876152b03f9f5f", Image2Sprite.Create("FeatIcons/Icon_Casting_Combat.png"), FeatureGroup.ArcaneTricksterSpellbook, array);
     addSpellbooksToSpellSelection("Arcane Archer", 1, ArcaneSavantClass.spellbookSelection, false, true, false);
 }
Beispiel #26
0
        internal static void Load()
        {
            // Create the trait selection (https://www.d20pfsrd.com/traits/).
            // TODO: ideally we'd use FeatureGroup.Trait, but it's not recognized by the game code.
            var featureGroup   = FeatureGroup.Feat;
            var traitSelection = Helpers.CreateFeatureSelection("TraitSelection1", "Traits",
                                                                "Character traits are abilities that are not tied to your character’s race or class. They can enhance your character’s skills, racial abilities, class abilities, or other statistics, enabling you to further customize them. At its core, a character trait is approximately equal in power to half a feat, so two character traits are roughly equivalent to a bonus feat. Yet a character trait isn’t just another kind of power you can add on to your character—it’s a way to quantify (and encourage) building a character background that fits into your campaign world. Think of character traits as “story seeds” for your background; after you pick your two traits, you’ll have a point of inspiration from which to build your character’s personality and history. Alternatively, if you’ve already got a background in your head or written down for your character, you can view picking their traits as a way to quantify that background, just as picking race and class and ability scores quantifies their other strengths and weaknesses.",
                                                                "f243a1b828714591b5fa0635b0cefb5b", null, featureGroup);
            var traitSelection2 = Helpers.CreateFeatureSelection("TraitSelection2", "Traits",
                                                                 traitSelection.Description, "d3a6541d2d384b1390d8ea26bb02b8cd", null, featureGroup);
            var traitSelection3 = Helpers.CreateFeatureSelection("TraitSelection3", "Traits",
                                                                 traitSelection.Description, "d4b7541d2d384b1390d8ea26bb02b8rt", null, featureGroup);

            var DrawbackSelection1 = Helpers.CreateFeatureSelection("DrawbackSelection3", "Drawbacks",
                                                                    "Drawbacks are traits in reverse. Instead of granting you a boon, they grant you a negative effect, typically in particular circumstances. " +
                                                                    "If you choose to take a drawback, you can take a third trait that you have access to. " +
                                                                    "You are not required to take a drawback.(disable in eldrich arcana menu and restart game)", "4db7541d2d384b1390d8ea26bb02b9tr", null, featureGroup);

            var choices         = new List <BlueprintFeatureSelection>();
            var Drawbackchoices = new List <BlueprintFeatureSelection>();

            var Skip = Helpers.CreateFeatureSelection("NoChoice", "(Skip)",
                                                      "skip this selection.",
                                                      "afb4225be98a4b3e9717883f22068c28", null, FeatureGroup.None);

            choices.Add(Skip);
            Drawbackchoices.Add(Skip);
            var DrawbackEmotion  = EmotionDrawbacks.CreateEmotionDrawbacks();
            var DrawbackPhysique = PhysiqueDrawbacks.CreatePhysiqueDrawbacks();

            Drawbackchoices.Add(DrawbackEmotion);
            Drawbackchoices.Add(DrawbackPhysique);
            choices.Add(CombatTraits.CreateCombatTraits());//,choices,"combattraits");
            choices.Add(FaithTraits.CreateFaithTraits());
            choices.Add(MagicTraits.CreateMagicTraits());
            BlueprintFeatureSelection adopted;

            choices.Add(SocialTraits.CreateSocialTraits(out adopted));
            choices.Add(EquipmentTraits.CreateEquipmentTraits());
            choices.Add(RaceTraits.CreateRaceTraits(adopted));
            choices.Add(CampaignTraits.CreateCampaignTraits());
            choices.Add(RegionalTraits.CreateRegionalTraits());
            // if main settings cheatcustomtrait = false it won't be added just be initialized
            var x = CreateCustomTraits(Main.settings.CheatCustomTraits);

            if (Main.settings.CheatCustomTraits)
            {
                choices.Add(x);
            }


            traitSelection.SetFeatures(choices);


            DrawbackSelection1.SetFeatures(Drawbackchoices);
            traitSelection2.SetFeatures(traitSelection.Features);
            traitSelection3.SetFeatures(traitSelection.Features);
            ApplyClassMechanics_Apply_Patch.onChargenApply.Add((state, unit) =>
            {
                traitSelection.AddSelection(state, unit, 1);
                traitSelection2.AddSelection(state, unit, 1);
                DrawbackSelection1.AddSelection(state, unit, 1);
            });
            //this only lets the player select a second feat if drawbackemotion is chosen
            SelectFeature_Apply_Patch.onApplyFeature.Add(DrawbackEmotion, (state, unit) =>
            {
                traitSelection3.AddSelection(state, unit, 1);
            });


            // Create the "Additional Traits" feat.
            var additionalTraits = Helpers.CreateFeature("AdditionalTraitsProgression",
                                                         "Additional Traits",
                                                         "You have more traits than normal.\nBenefit: You gain two character traits of your choice. These traits must be chosen from different lists, and cannot be chosen from lists from which you have already selected a character trait. You must meet any additional qualifications for the character traits you choose — this feat cannot enable you to select a dwarf character trait if you are an elf, for example.",
                                                         "02dbb324cc334412a55e6d8f9fe87009",
                                                         Image2Sprite.Create("Mods/EldritchArcana/sprites/additional_traits.png"),//Helpers.GetIcon("0d3651b2cb0d89448b112e23214e744e"), // Extra Performance
                                                         FeatureGroup.Feat);

            var additionalTrait1 = Helpers.CreateFeatureSelection("AdditionalTraitSelection1", "Traits",
                                                                  traitSelection.Description,
                                                                  "a85fbbe3c9184137a31a12f4b0b7904a", null, FeatureGroup.Feat);
            var additionalTrait2 = Helpers.CreateFeatureSelection("AdditionalTraitSelection2", "Traits",
                                                                  traitSelection.Description,
                                                                  "0fdd6f51c19c44938b9d64b147cf32f8", null, FeatureGroup.Feat);
            var additionalTrait3 = Helpers.CreateFeatureSelection("AdditionalTraitSelection3", "Traits",
                                                                  traitSelection.Description,
                                                                  "1cdd6f51c19c44938b9d64b147cf32d2", null, FeatureGroup.Feat);
            var additionalDrawback1 = Helpers.CreateFeatureSelection("AdditionalDrawbackSelection1", "Drawbacks",
                                                                     DrawbackSelection1.Description,
                                                                     "1ddd6f51c19c44938b9d64b147cc22c9", null, FeatureGroup.Feat);

            additionalTrait1.SetFeatures(traitSelection.Features);
            additionalTrait2.SetFeatures(traitSelection.Features);
            additionalTrait3.SetFeatures(traitSelection.Features);
            additionalDrawback1.SetFeatures(DrawbackSelection1.Features);

            SelectFeature_Apply_Patch.onApplyFeature.Add(additionalTraits, (state, unit) =>
            {
                additionalTrait1.AddSelection(state, unit, 1);
                additionalTrait2.AddSelection(state, unit, 1);
                additionalDrawback1.AddSelection(state, unit, 1);
                //HereHere
            });

            SelectFeature_Apply_Patch.onApplyFeature.Add(DrawbackPhysique, (state, unit) =>
            {
                additionalTrait3.AddSelection(state, unit, 1);
            });

            library.AddFeats(additionalTraits);
        }
        internal static void Load()
        {
            // Create the trait selection (https://www.d20pfsrd.com/traits/).
            // TODO: ideally we'd use FeatureGroup.Trait, but it's not recognized by the game code.
            var featureGroup   = FeatureGroup.Feat;
            var traitSelection = Helpers.CreateFeatureSelection("TraitSelection1", RES.loadTraits_error,
                                                                RES.TraitsSelectionDescription_info,
                                                                "f243a1b828714591b5fa0635b0cefb5b", null, featureGroup);
            var traitSelection2 = Helpers.CreateFeatureSelection("TraitSelection2", RES.loadTraits_error,
                                                                 traitSelection.Description, "d3a6541d2d384b1390d8ea26bb02b8cd", null, featureGroup);
            var traitSelection3 = Helpers.CreateFeatureSelection("TraitSelection3", RES.loadTraits_error,
                                                                 traitSelection.Description, "d4b7541d2d384b1390d8ea26bb02b8rt", null, featureGroup);

            var DrawbackSelection1 = Helpers.CreateFeatureSelection("DrawbackSelection3", RES.Drawbacks_info,
                                                                    RES.DrawbacksDescription_info, "4db7541d2d384b1390d8ea26bb02b9tr", null, featureGroup);

            var choices         = new List <BlueprintFeatureSelection>();
            var Drawbackchoices = new List <BlueprintFeatureSelection>();

            var Skip = Helpers.CreateFeatureSelection("NoChoice", RES.SkipSelection_info,
                                                      RES.SkipSelectionDescription_info,
                                                      "afb4225be98a4b3e9717883f22068c28", null, FeatureGroup.None);

            choices.Add(Skip);
            Drawbackchoices.Add(Skip);
            var DrawbackEmotion  = EmotionDrawbacks.CreateEmotionDrawbacks();
            var DrawbackPhysique = PhysiqueDrawbacks.CreatePhysiqueDrawbacks();

            Drawbackchoices.Add(DrawbackEmotion);
            Drawbackchoices.Add(DrawbackPhysique);
            choices.Add(CombatTraits.CreateCombatTraits());//,choices,"combattraits");
            choices.Add(FaithTraits.CreateFaithTraits());
            choices.Add(MagicTraits.CreateMagicTraits());
            BlueprintFeatureSelection adopted;

            choices.Add(SocialTraits.CreateSocialTraits(out adopted));
            choices.Add(EquipmentTraits.CreateEquipmentTraits());
            choices.Add(RaceTraits.CreateRaceTraits(adopted));
            choices.Add(CampaignTraits.CreateCampaignTraits());
            choices.Add(RegionalTraits.CreateRegionalTraits());
            // if main settings cheatcustomtrait = false it won't be added just be initialized
            var x = CreateCustomTraits(Main.settings.CheatCustomTraits);

            if (Main.settings.CheatCustomTraits)
            {
                choices.Add(x);
            }

            traitSelection.SetFeatures(choices);

            DrawbackSelection1.SetFeatures(Drawbackchoices);
            traitSelection2.SetFeatures(traitSelection.Features);
            traitSelection3.SetFeatures(traitSelection.Features);
            ApplyClassMechanics_Apply_Patch.onChargenApply.Add((state, unit) =>
            {
                traitSelection.AddSelection(state, unit, 1);
                traitSelection2.AddSelection(state, unit, 1);
                DrawbackSelection1.AddSelection(state, unit, 1);
            });
            //this only lets the player select a second feat if drawbackemotion is chosen
            SelectFeature_Apply_Patch.onApplyFeature.Add(DrawbackEmotion, (state, unit) =>
            {
                traitSelection3.AddSelection(state, unit, 1);
            });


            // Create the "Additional Traits" feat.
            var additionalTraits = Helpers.CreateFeature("AdditionalTraitsProgression",
                                                         RES.AdditionalTraitsFeatName_info,
                                                         RES.AdditionalTraitsFeatDescription_info,
                                                         "02dbb324cc334412a55e6d8f9fe87009",
                                                         Image2Sprite.Create("Mods/EldritchArcana/sprites/additional_traits.png"),//Helpers.GetIcon("0d3651b2cb0d89448b112e23214e744e"), // Extra Performance
                                                         FeatureGroup.Feat);

            var additionalTrait1 = Helpers.CreateFeatureSelection("AdditionalTraitSelection1", RES.loadTraits_error,
                                                                  traitSelection.Description,
                                                                  "a85fbbe3c9184137a31a12f4b0b7904a", null, FeatureGroup.Feat);
            var additionalTrait2 = Helpers.CreateFeatureSelection("AdditionalTraitSelection2", RES.loadTraits_error,
                                                                  traitSelection.Description,
                                                                  "0fdd6f51c19c44938b9d64b147cf32f8", null, FeatureGroup.Feat);
            var additionalTrait3 = Helpers.CreateFeatureSelection("AdditionalTraitSelection3", RES.loadTraits_error,
                                                                  traitSelection.Description,
                                                                  "1cdd6f51c19c44938b9d64b147cf32d2", null, FeatureGroup.Feat);
            var additionalDrawback1 = Helpers.CreateFeatureSelection("AdditionalDrawbackSelection1", RES.Drawbacks_info,
                                                                     DrawbackSelection1.Description,
                                                                     "1ddd6f51c19c44938b9d64b147cc22c9", null, FeatureGroup.Feat);

            additionalTrait1.SetFeatures(traitSelection.Features);
            additionalTrait2.SetFeatures(traitSelection.Features);
            additionalTrait3.SetFeatures(traitSelection.Features);
            additionalDrawback1.SetFeatures(DrawbackSelection1.Features);

            SelectFeature_Apply_Patch.onApplyFeature.Add(additionalTraits, (state, unit) =>
            {
                additionalTrait1.AddSelection(state, unit, 1);
                additionalTrait2.AddSelection(state, unit, 1);
                additionalDrawback1.AddSelection(state, unit, 1);
                //HereHere
            });

            SelectFeature_Apply_Patch.onApplyFeature.Add(DrawbackPhysique, (state, unit) =>
            {
                additionalTrait3.AddSelection(state, unit, 1);
            });

            library.AddFeats(additionalTraits);
        }
        static void LoadMeteorSwarm()
        {
            var fireball = library.Get <BlueprintAbility>("2d81362af43aeac4387a3d4fced489c3");

            var spell = library.CopyAndAdd(fireball, "MeteorSwarm", "2d18f8a4de6742e2ba954da0f19a4957");

            spell.SetNameDescriptionIcon(RES.MeteorSwarmAbilityName_info,
                                         RES.MeteorSwarmAbilityDescription_info,
                                         Image2Sprite.Create("Mods/EldritchArcana/sprites/meteor_swarm.png"));
            spell.LocalizedSavingThrow = Helpers.CreateString($"{spell.name}.SavingThrow", RES.MeteorSwarmSavingThrowDescription_info);

            var deliverProjectile  = UnityEngine.Object.Instantiate(fireball.GetComponent <AbilityDeliverProjectile>());
            var fireballProjectile = deliverProjectile.Projectiles[0];

            deliverProjectile.Projectiles.AddToArray(fireballProjectile, fireballProjectile);

            var fire24d6 = Helpers.CreateActionDealDamage(DamageEnergyType.Fire,
                                                          DiceType.D6.CreateContextDiceValue(24), isAoE: true, halfIfSaved: true);
            var fireDmgSave = Helpers.CreateActionSavingThrow(SavingThrowType.Reflex, fire24d6);

            var conditionalDCIncrease = Harmony12.AccessTools.Inner(typeof(ContextActionSavingThrow), "ConditionalDCIncrease");
            var dcAdjustArray         = Array.CreateInstance(conditionalDCIncrease, 1);
            var dcAdjust = Activator.CreateInstance(conditionalDCIncrease);

            // If the main target was hit by the ranged touch attack, increase the DC by 4.
            Helpers.SetField(dcAdjust, "Condition", Helpers.CreateConditionsCheckerAnd(ContextConditionNearMainTarget.Create()));
            Helpers.SetField(dcAdjust, "Value", AbilitySharedValue.StatBonus.CreateContextValue());
            dcAdjustArray.SetValue(dcAdjust, 0);
            Helpers.SetField(fireDmgSave, "m_ConditionalDCIncrease", dcAdjustArray);

            var increaseDCBy4 = Helpers.Create <ContextActionChangeSharedValue>(c =>
            {
                c.SharedValue = AbilitySharedValue.StatBonus;
                c.SetValue    = 4;
                c.Type        = SharedValueChangeType.Set;
            });

            var physical2d6 = Helpers.CreateActionDealDamage(PhysicalDamageForm.Bludgeoning,
                                                             DiceType.D6.CreateContextDiceValue(2));

            spell.SetComponents(
                SpellSchool.Evocation.CreateSpellComponent(),
                SpellDescriptor.Fire.CreateSpellDescriptor(),
                deliverProjectile,
                Helpers.CreateAbilityTargetsAround(40.Feet(), TargetType.Any),
                Helpers.CreateRunActions(
                    Helpers.CreateConditional(
                        // Check if this unit is the primary target
                        ContextConditionNearMainTarget.Create(),
                        // Perform a ranged touch attack on the primary target
                        ContextActionRangedTouchAttack.Create(
                            // If ranged touch succeeded:
                            // - 4 meteors hit for 2d6 bludgeoning damage each.
                            // - target takes 24d6 fire damage, -4 penalty to reflex save for half
                            new GameAction[] {
                physical2d6, physical2d6, physical2d6, physical2d6,
                increaseDCBy4
            })),
                    // Apply fire damage to all targets in range.
                    fireDmgSave));
            spell.AddToSpellList(Helpers.wizardSpellList, 9);
            //spell.AddToSpellList(Helpers.magusSpellList, 9);
            //spell.AddToSpellList(Helpers.fireDomainSpellList, 9);
            //spell.AddToSpellList(Helpers.druidSpellList, 9);
            //spell.AddToSpellList(Helpers., 9);
            Helpers.AddSpellAndScroll(spell, "5b172c2c3e356eb43ba5a8f8008a8a5a"); // scroll of fireball
            meteorSwarm = spell;
        }
Beispiel #29
0
        public static BlueprintFeatureSelection CreateSocialTraits(out BlueprintFeatureSelection adopted)
        {
            var noFeature    = Helpers.PrerequisiteNoFeature(null);
            var socialTraits = Helpers.CreateFeatureSelection("SocialTrait", RES.SocialTraitName_info,
                                                              RES.SocialTraitDescription_info,
                                                              "9e41e60c929e45bc84ded046148c07ec", null, FeatureGroup.None, noFeature);

            noFeature.Feature = socialTraits;
            var choices = new List <BlueprintFeature>();

            // This trait is finished by CreateRaceTraits.
            adopted = Helpers.CreateFeatureSelection("AdoptedTrait", RES.AdoptedTraitName_info,
                                                     RES.AdoptedTraitDescription_info,
                                                     "b4b37968273b4782b29d31c0ca215f41",
                                                     Helpers.GetIcon("26a668c5a8c22354bac67bcd42e09a3f"), // Adaptability
                                                     FeatureGroup.None);

            adopted.IgnorePrerequisites = true;
            adopted.Obligatory          = true;
            choices.Add(adopted);

            choices.Add(Traits.CreateAddStatBonus("ChildOfTheStreetsTrait", RES.ChildOfTheStreetsTraitName_info,
                                                  RES.ChildOfTheStreetsTraitDescription_info,
                                                  "a181fd2561134715a04e1b05776ab7a3",
                                                  StatType.SkillThievery));

            choices.Add(Traits.CreateAddStatBonus("FastTalkerTrait", RES.FastTalkerTraitName_info,
                                                  RES.FastTalkerTraitDescription_info,
                                                  "509458a5ded54ecd9a2a4ef5388de2b7",
                                                  StatType.SkillPersuasion));

            //var ArchaeologistCleverExplorer = Traits.library.Get<BlueprintFeature>("1322e50d2b36aba45ab5405db43c53a3");

            var performanceResource = Traits.library.Get <BlueprintAbilityResource>("e190ba276831b5c4fa28737e5e49e6a6");

            choices.Add(Helpers.CreateFeature("MaestroOfTheSocietyTrait", RES.MaestroOfTheSocietyTraitName_info,
                                              RES.MaestroOfTheSocietyTraitDescription_info,
                                              "847cdf262e4147cda2c670db81852c58",
                                              Helpers.GetIcon("0d3651b2cb0d89448b112e23214e744e"),
                                              FeatureGroup.None,
                                              Helpers.Create <IncreaseResourceAmount>(i => { i.Resource = performanceResource; i.Value = 3; })));

            var gnomeReq = Helpers.PrerequisiteFeature(Helpers.gnome);
            //var performanceResource = Traits.library.Get<BlueprintAbilityResource>("e190ba276831b5c4fa28737e5e49e6a6");
            var MutagenResource = Traits.library.Get <BlueprintAbilityResource>("3b163587f010382408142fc8a97852b6");

            choices.Add(Helpers.CreateFeature("GnomishAlchemistTrait", RES.GnomishAlchemistTraitName_info,
                                              RES.GnomishAlchemistTraitDescription_info,
                                              "125cdf262e4147cda2c670db81852c69",
                                              Helpers.GetIcon("0d3651b2cb0d89448b112e23214e744e"),
                                              FeatureGroup.None,
                                              Helpers.Create <IncreaseResourceAmount>(i => { i.Resource = MutagenResource; i.Value = 2; }),
                                              gnomeReq));


            choices.Add(Traits.CreateAddStatBonus("SuspiciousTrait", RES.SuspiciousTraitName_info,
                                                  RES.SuspiciousTraitDescription_info,
                                                  "2f4e86a9d42547bc85b4c829a47d054c",
                                                  StatType.SkillPerception));

            var AvidReader = Helpers.CreateFeatureSelection("AvidReaderTrait", RES.AvidReaderTraitName_info,
                                                            RES.AvidReaderTraitDescription_info,
                                                            "2e4dcdce32e159cbaf0fb3c641249cbf",
                                                            Image2Sprite.Create("Mods/EldritchArcana/sprites/opposition_research.png"), FeatureGroup.None);

            var AvidReaderOptions = new List <BlueprintFeature>()
            {
                Helpers.CreateFeature("AvidReaderArcana", UIUtility.GetStatText(StatType.SkillKnowledgeArcana),
                                      RES.AvidReaderArcanaDescription_info,
                                      $"a932f3e69db44cdd33965985e37a6d2b",
                                      Image2Sprite.Create("Mods/EldritchArcana/sprites/spell_perfection.png"),
                                      FeatureGroup.None,
                                      Helpers.Create <Take10ForSuccessLogic>(t => t.Skill = StatType.SkillKnowledgeArcana)
                                      ), Helpers.CreateFeature("AvidReaderWorld", UIUtility.GetStatText(StatType.SkillKnowledgeWorld),
                                                               RES.AvidReaderWorldDescription_info,
                                                               $"b254f3e69db44cdd33964985e37a6d1b",
                                                               Image2Sprite.Create("Mods/EldritchArcana/sprites/opposition_research.png"),
                                                               FeatureGroup.None,
                                                               Helpers.Create <Take10ForSuccessLogic>(t => t.Skill = StatType.SkillKnowledgeWorld)
                                                               ),
            };

            AvidReader.SetFeatures(AvidReaderOptions);
            choices.Add(AvidReader);

            choices.Add(UndoSelection.Feature.Value);
            socialTraits.SetFeatures(choices);
            return(socialTraits);
        }
        public static BlueprintFeatureSelection CreateCombatTraits()
        {
            var noFeature    = Helpers.PrerequisiteNoFeature(null);
            var combatTraits = Helpers.CreateFeatureSelection("CombatTrait", "Combat Trait",
                                                              "Combat traits focus on martial and physical aspects of your character’s background.",
                                                              "fab4225be98a4b3e9717883f22086c82", null, FeatureGroup.None, noFeature);

            noFeature.Feature = combatTraits;

            var choices = new List <BlueprintFeature>();

            choices.Add(Helpers.CreateFeature("AnatomistTrait", "Anatomist",
                                              "You have studied the workings of anatomy, either as a student at university or as an apprentice mortician or necromancer. You know where to aim your blows to strike vital organs.\nBenefit: You gain a +1 trait bonus on all rolls made to confirm critical hits.",
                                              "69245ef4b4ba44ddac917fc2aa10fbad",
                                              Image2Sprite.Create("Mods/EldritchArcana/sprites/anatomist.png"), // Improved Critical
                                              FeatureGroup.None,
                                              Helpers.Create <CriticalConfirmationBonus>(a => { a.Bonus = 1; a.Value = 0; })));

            choices.Add(Helpers.CreateFeature("ArmorExpertTrait", "Armor Expert",
                                              "You have worn armor as long as you can remember, either as part of your training to become a knight’s squire or simply because you were seeking to emulate a hero. Your childhood armor wasn’t the real thing as far as protection, but it did encumber you as much as real armor would have, and you’ve grown used to moving in such suits with relative grace.\nBenefit: When you wear armor of any sort, reduce that suit’s armor check penalty by 1, to a minimum check penalty of 0.",
                                              "94d526372a964b6db97c64291a3cb846",
                                              Helpers.GetIcon("3bc6e1d2b44b5bb4d92e6ba59577cf62"), // Armor Focus (light)
                                              FeatureGroup.None,
                                              Helpers.Create <ArmorCheckPenaltyIncrease>(a => a.Bonus = 1)));

            var rageResource = Traits.library.Get <BlueprintAbilityResource>("24353fcf8096ea54684a72bf58dedbc9");

            choices.Add(Helpers.CreateFeature("BerserkerOfTheSocietyTrait", "Berserker of the Society",
                                              "Your time spent as a society member has taught you new truths about the origins of the your rage ability.\nBenefit: You may use your rage ability for 3 additional rounds per day.",
                                              "8acfcecfed05442594eed93fe448ab3d",
                                              Helpers.GetIcon("1a54bbbafab728348a015cf9ffcf50a7"), // Extra Rage
                                              FeatureGroup.None,
                                              rageResource.CreateIncreaseResourceAmount(3)));

            choices.Add(Helpers.CreateFeature("BladeOfTheSocietyTrait", "Blade of the Society",
                                              "You have studied and learned the weak spots of many humanoids and monsters." +
                                              "\nBenefit: you are able to sneak attack at level 3 even if your class normaly does not and You gain a +1 trait bonus to damage rolls from sneak attacks.",
                                              "ff8c90626a58436997cc41e4b121be9a",
                                              Helpers.GetIcon("9f0187869dc23744292c0e5bb364464e"), // Accomplished Sneak Attacker
                                              FeatureGroup.None,
                                              Helpers.Create <AdditionalDamageOnSneakAttack>(a => a.Value = 1),
                                              Helpers.CreateAddStatBonusOnLevel(StatType.SneakAttack, 1, ModifierDescriptor.Trait, 3)
                                              ));

            choices.Add(Helpers.CreateFeature("DefenderOfTheSocietyTrait", "Defender of the Society",
                                              "Your time spent fighting and studying the greatest warriors of the society has taught you new defensive skills while wearing armor.\nBenefit: You gain a +1 trait bonus to Armor Class when wearing medium or heavy armor.",
                                              "545bf7e13346473caf48f179083df894",
                                              Helpers.GetIcon("7dc004879037638489b64d5016997d12"), // Armor Focus Medium
                                              FeatureGroup.None,
                                              Helpers.Create <ArmorFocus>(a => a.ArmorCategory = ArmorProficiencyGroup.Medium),
                                              Helpers.Create <ArmorFocus>(a => a.ArmorCategory = ArmorProficiencyGroup.Heavy)));

            choices.Add(Helpers.CreateFeature("DeftDodgerTrait", "Deft Dodger",
                                              "Growing up in a rough neighborhood or a dangerous environment has honed your senses.\nBenefit: You gain a +1 trait bonus on Reflex saves.",
                                              "7b57d86503314d32b753f77909c909bc",
                                              Helpers.GetIcon("15e7da6645a7f3d41bdad7c8c4b9de1e"), // Lightning Reflexes
                                              FeatureGroup.None,
                                              Helpers.CreateAddStatBonus(StatType.SaveReflex, 1, ModifierDescriptor.Trait)));

            choices.Add(Helpers.CreateFeature("DirtyFighterTrait", "Dirty Fighter",
                                              "You wouldn’t have lived to make it out of childhood without the aid of a sibling, friend, or companion you could always count on to distract your enemies long enough for you to do a little bit more damage than normal. That companion may be another PC or an NPC (who may even be recently departed from your side).\n" +
                                              "Benefit: When you hit a foe you are flanking, you deal 1 additional point of damage (this damage is added to your base damage, and is multiplied on a critical hit). This additional damage is a trait bonus.",
                                              "ac47c14063574a0a9ea6927bf637a02a",
                                              Helpers.GetIcon("5662d1b793db90c4b9ba68037fd2a768"), // precise strike
                                              FeatureGroup.None,
                                              DamageBonusAgainstFlankedTarget.Create(1)));

            var kiPowerResource = Traits.library.Get <BlueprintAbilityResource>("9d9c90a9a1f52d04799294bf91c80a82");

            choices.Add(Helpers.CreateFeature("HonoredFistOfTheSocietyTrait", "Honored First of the Society",
                                              "You have studied dozens of ancient texts on martial arts that only the Society possesses, and are more learned in these arts than most.\nBenefit: You increase your ki pool by 1 point.",
                                              "ee9c230cbbc2484084af61ac97e47e72",
                                              Helpers.GetIcon("7dc004879037638489b64d5016997d12"), // Armor Focus Medium
                                              FeatureGroup.None,
                                              kiPowerResource.CreateIncreaseResourceAmount(1)));

            // TODO: Killer

            choices.Add(Helpers.CreateFeature("ReactionaryTrait", "Reactionary",
                                              "You were bullied often as a child, but never quite developed an offensive response. Instead, you became adept at anticipating sudden attacks and reacting to danger quickly.\nBenefit: You gain a +2 trait bonus on initiative checks.",
                                              "fa2c636580ee431297de8806a046044a",
                                              Helpers.GetIcon("797f25d709f559546b29e7bcb181cc74"), // Improved Initiative
                                              FeatureGroup.None,
                                              Helpers.CreateAddStatBonus(StatType.Initiative, 2, ModifierDescriptor.Trait)));

            choices.Add(Traits.CreateAddStatBonus("RecklessTrait", "Reckless",
                                                  "You have a tendency for rash behavior, often disregarding your own safety as you move across the battlefield.",
                                                  "edb2f4d0c2c34c7baccad11f2b5bfbd4",
                                                  StatType.SkillMobility));

            choices.Add(Helpers.CreateFeature("ResilientTrait", "Resilient",
                                              "Growing up in a poor neighborhood or in the unforgiving wilds often forced you to subsist on food and water from doubtful sources. You’ve built up your constitution as a result.\nBenefit: You gain a +1 trait bonus on Fortitude saves.",
                                              "789d02217b6542ce8b0302249c86d49d",
                                              Helpers.GetIcon("79042cb55f030614ea29956177977c52"), // Great Fortitude
                                              FeatureGroup.None,
                                              Helpers.CreateAddStatBonus(StatType.SaveFortitude, 1, ModifierDescriptor.Trait)));

            choices.Add(Traits.CreateAddStatBonus("WittyReparteeTrait", "Witty Repartee",
                                                  "You are quick with your tongue and have always possessed the talent to quickly admonish your enemies.",
                                                  "c6dbc457c5de40dbb4cb9fe4d7706cd9",
                                                  StatType.SkillPersuasion));

            combatTraits.SetFeatures(choices);
            return(combatTraits);
        }