コード例 #1
0
        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 channelEnergyEmpyrealResource   = Traits.library.Get <BlueprintAbilityResource>("f9af9354fb8a79649a6e512569387dc5");
            var channelEnergyHospitalerResource = Traits.library.Get <BlueprintAbilityResource>("b0e0c7716ab27c64fb4b131c9845c596");

            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),
                                              LifeMystery.channelResource.CreateIncreaseResourceAmount(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." +
                                                        "Benefit: 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, Helpers.Create <ReplaceBaseStatForStatTypeLogic>(x =>
            {
                x.StatTypeToReplaceBastStatFor = StatType.SkillKnowledgeArcana;
                x.NewBaseStatType = StatType.Wisdom;
            })
                                                        );



            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.CheckIntimidate,
                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);
        }
コード例 #2
0
        public static BlueprintFeatureSelection CreateCombatTraits()
        {
            var noFeature    = Helpers.PrerequisiteNoFeature(null);
            var combatTraits = Helpers.CreateFeatureSelection("CombatTrait", RES.CombatTraitName_info,
                                                              RES.CombatTraitDescription_info,
                                                              "fab4225be98a4b3e9717883f22086c82", null, FeatureGroup.None, noFeature);

            noFeature.Feature = combatTraits;

            var choices = new List <BlueprintFeature>();

            choices.Add(Helpers.CreateFeature("AnatomistTrait", RES.AnatomistTraitName_info,
                                              RES.AnatomistTraitDescription_info,
                                              "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", RES.ArmorExpertTraitName_info,
                                              RES.ArmorExpertTraitDescription_info,
                                              "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", RES.BerserkerOfTheSocietyTraitName_info,
                                              RES.BerserkerOfTheSocietyTraitDescription_info,
                                              "8acfcecfed05442594eed93fe448ab3d",
                                              Helpers.GetIcon("1a54bbbafab728348a015cf9ffcf50a7"), // Extra Rage
                                              FeatureGroup.None,
                                              rageResource.CreateIncreaseResourceAmount(3)));

            choices.Add(Helpers.CreateFeature("BladeOfTheSocietyTrait", RES.BladeOfTheSocietyTraitName_info,
                                              RES.BladeOfTheSocietyTraitDescription_info,
                                              "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", RES.DefenderOfTheSocietyTraitName_info,
                                              RES.DefenderOfTheSocietyTraitDescription_info,
                                              "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", RES.DeftDodgerTraitName_info,
                                              RES.DeftDodgerTraitDescription_info,
                                              "7b57d86503314d32b753f77909c909bc",
                                              Helpers.GetIcon("15e7da6645a7f3d41bdad7c8c4b9de1e"), // Lightning Reflexes
                                              FeatureGroup.None,
                                              Helpers.CreateAddStatBonus(StatType.SaveReflex, 1, ModifierDescriptor.Trait)));

            choices.Add(Helpers.CreateFeature("DirtyFighterTrait", RES.DirtyFighterTraitName_info,
                                              RES.DirtyFighterTraitDescription_info,
                                              "ac47c14063574a0a9ea6927bf637a02a",
                                              Helpers.GetIcon("5662d1b793db90c4b9ba68037fd2a768"), // precise strike
                                              FeatureGroup.None,
                                              DamageBonusAgainstFlankedTarget.Create(1)));

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

            choices.Add(Helpers.CreateFeature("HonoredFistOfTheSocietyTrait", RES.HonoredFistOfTheSocietyTraitName_info,
                                              RES.HonoredFistOfTheSocietyTraitDescription_info,
                                              "ee9c230cbbc2484084af61ac97e47e72",
                                              Helpers.GetIcon("7dc004879037638489b64d5016997d12"), // Armor Focus Medium
                                              FeatureGroup.None,
                                              kiPowerResource.CreateIncreaseResourceAmount(1)));

            // TODO: Killer

            choices.Add(Helpers.CreateFeature("ReactionaryTrait", RES.ReactionaryTraitName_info,
                                              RES.ReactionaryTraitDescription_info,
                                              "fa2c636580ee431297de8806a046044a",
                                              Helpers.GetIcon("797f25d709f559546b29e7bcb181cc74"), // Improved Initiative
                                              FeatureGroup.None,
                                              Helpers.CreateAddStatBonus(StatType.Initiative, 2, ModifierDescriptor.Trait)));

            choices.Add(Traits.CreateAddStatBonus("RecklessTrait", RES.RecklessTraitName_info,
                                                  RES.RecklessTraitDescription_info,
                                                  "edb2f4d0c2c34c7baccad11f2b5bfbd4",
                                                  StatType.SkillMobility));

            choices.Add(Helpers.CreateFeature("ResilientTrait", RES.ResilientTraitName_info,
                                              RES.ResilientTraitDescription_info,
                                              "789d02217b6542ce8b0302249c86d49d",
                                              Helpers.GetIcon("79042cb55f030614ea29956177977c52"), // Great Fortitude
                                              FeatureGroup.None,
                                              Helpers.CreateAddStatBonus(StatType.SaveFortitude, 1, ModifierDescriptor.Trait)));

            choices.Add(Traits.CreateAddStatBonus("WittyReparteeTrait", RES.WittyReparteeTraitName_info,
                                                  RES.WittyReparteeTraitDescription_info,
                                                  "c6dbc457c5de40dbb4cb9fe4d7706cd9",
                                                  StatType.SkillPersuasion));

            choices.Add(UndoSelection.Feature.Value);
            combatTraits.SetFeatures(choices);
            return(combatTraits);
        }
コード例 #3
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 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);
        }
コード例 #4
0
        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);
        }
コード例 #5
0
        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.SkillUseMagicDevice;
                x.NewBaseStatType = StatType.Intelligence;
            })
                                              ));


            choices.Add(UndoSelection.Feature.Value);
            magicTraits.SetFeatures(choices);
            return(magicTraits);
        }
コード例 #6
0
        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);

            choices.Add(UndoSelection.Feature.Value);
            regionalTraits.SetFeatures(choices);
            return(regionalTraits);
        }
コード例 #7
0
        public static BlueprintFeatureSelection CreateRaceTraits(BlueprintFeatureSelection adopted)
        {
            var noFeature  = Helpers.PrerequisiteNoFeature(null);
            var raceTraits = Helpers.CreateFeatureSelection("RaceTrait", RES.RaceTraitName_info,
                                                            RES.RaceTraitDescription_info,
                                                            "6264aa9515be40cda55892da93685764", null, FeatureGroup.None,
                                                            Helpers.PrerequisiteNoFeature(adopted), noFeature);

            noFeature.Feature = raceTraits;

            var humanReq = Helpers.PrerequisiteFeaturesFromList(Helpers.human, Helpers.halfElf, Helpers.halfOrc,
                                                                // Note: Aasimar/Tiefling included under the assumption they have "Scion of Humanity"/"Pass for Human"
                                                                Helpers.aasimar, Helpers.tiefling);

            var halfElfReq  = Helpers.PrerequisiteFeature(Helpers.halfElf);
            var halfOrcReq  = Helpers.PrerequisiteFeature(Helpers.halfOrc);
            var elfReq      = Helpers.PrerequisiteFeaturesFromList(Helpers.elf, Helpers.halfElf);
            var dwarfReq    = Helpers.PrerequisiteFeature(Helpers.dwarf);
            var halflingReq = Helpers.PrerequisiteFeature(Helpers.halfling);
            var gnomeReq    = Helpers.PrerequisiteFeature(Helpers.gnome);
            var aasimarReq  = Helpers.PrerequisiteFeature(Helpers.aasimar);
            var tieflingReq = Helpers.PrerequisiteFeature(Helpers.tiefling);

            // TODO: how do we code prerequisites so they aren't ignored by "Adopted"?
            // (only race prereq should be ignored, not others)
            //
            // Note: half-elf, half-orc can take traits from either race.
            // Also Aasimar/Tiefling are treated as having Scion of Humanity/Pass for Human in the game.
            var choices = new List <BlueprintFeature>();

            // Human:
            // - Carefully Hidden (+1 will save, +2 vs divination)
            // - Fanatic (Arcana)
            // - Historian (World and +1 bardic knowledge if Bard)
            // - Shield Bearer (+1 dmg shield bash)
            // - Superstitious (+1 save arcane spells)
            // - World Traveler (choose: persuasion, perception, or world)

            var components = new List <BlueprintComponent> {
                humanReq
            };

            components.Add(Helpers.CreateAddStatBonus(StatType.SaveWill, 1, ModifierDescriptor.Trait));
            components.Add(Helpers.Create <SavingThrowBonusAgainstSchool>(a =>
            {
                a.School             = SpellSchool.Divination;
                a.Value              = 2;
                a.ModifierDescriptor = ModifierDescriptor.Trait;
            }));
            choices.Add(Helpers.CreateFeature("CarefullyHiddenTrait", RES.RaceCarefullyHiddenTraitName_info,
                                              RES.RaceCarefullyHiddenTraitDescription_info,
                                              "38b92d2ebb4c4cdb8e946e29f5b2f178",
                                              Helpers.GetIcon("175d1577bb6c9a04baf88eec99c66334"), // Iron Will
                                              FeatureGroup.None,
                                              components.ToArray()));

            choices.Add(Traits.CreateAddStatBonus("FanaticTrait", RES.RaceFanaticTraitName_info,
                                                  RES.RaceFanaticTraitDescription_info,
                                                  "6427e81ba399406c93b463c284a42055",
                                                  StatType.SkillKnowledgeArcana,
                                                  humanReq));

            var bardicKnowledge = Traits.library.Get <BlueprintFeature>("65cff8410a336654486c98fd3bacd8c5");

            components.Clear();
            components.Add(humanReq);
            components.AddRange((new StatType[] {
                StatType.SkillKnowledgeArcana,
                StatType.SkillKnowledgeWorld,
                StatType.SkillLoreNature,
                StatType.SkillLoreReligion,
            }).Select((skill) => Helpers.Create <AddStatBonusIfHasFact>(a =>
            {
                a.Stat        = skill;
                a.Value       = 1;
                a.CheckedFact = bardicKnowledge;
                a.Descriptor  = ModifierDescriptor.UntypedStackable;
            })));

            var historian = Traits.CreateAddStatBonus("HistorianTrait", RES.RaceHistorianTraitName_info,
                                                      RES.RaceHistorianTraitDescription_info,
                                                      "4af3871899e4440bae03d4c33d4b52fd",
                                                      StatType.SkillKnowledgeWorld,
                                                      components.ToArray());

            choices.Add(historian);

            components.Clear();
            components.Add(humanReq);
            components.AddRange(new String[] {
                "98a0dc03586a6d04791901c41700e516", // SpikedLightShield
                "1fd965e522502fe479fdd423cca07684", // WeaponLightShield
                "a1b85d048fb5003438f34356df938a9f", // SpikedHeavyShield
                "be9b6408e6101cb4997a8996484baf19"  // WeaponHeavyShield
            }.Select(id => Helpers.Create <WeaponTypeDamageBonus>(w => { w.DamageBonus = 1; w.WeaponType = Traits.library.Get <BlueprintWeaponType>(id); })));

            choices.Add(Helpers.CreateFeature("ShieldBearerTrait", RES.RaceShieldBearerTraitName_info,
                                              RES.RaceShieldBearerTraitDescription_info,
                                              "044ebbbadfba4d58afa11bfbf38df199",
                                              Helpers.GetIcon("121811173a614534e8720d7550aae253"), // Shield Bash
                                              FeatureGroup.None,
                                              components.ToArray()));

            choices.Add(Helpers.CreateFeature("SuperstitiousTrait", RES.RaceSuperstitiousTraitName_info,
                                              RES.RaceSuperstitiousTraitDescription_info,
                                              "f5d79e5fbb87473ca0b13ed15b742079",
                                              Helpers.GetIcon("2483a523984f44944a7cf157b21bf79c"), // Elven Immunities
                                              FeatureGroup.None,
                                              humanReq,
                                              Helpers.Create <SavingThrowBonusAgainstSpellSource>()));

            //var travelerDescription = "Your family has taken the love of travel to an extreme, roaming the world extensively. You've seen dozens of cultures and have learned to appreciate the diversity of what the world has to offer.";
            var worldTraveler = Helpers.CreateFeatureSelection("WorldTravelerTrait", RES.RaceWorldTravelerTraitName_info,
                                                               RES.RaceWorldTravelerTraitDescription_info + RES.RaceWorldTravelerTraitBenefit_info,
                                                               "ecacfcbeddfe453cafc8d60fc1db7d34",
                                                               Helpers.GetIcon("3adf9274a210b164cb68f472dc1e4544"), // Human Skilled
                                                               FeatureGroup.None,
                                                               humanReq);

            var travelerFeats = new StatType[] {
                StatType.SkillPersuasion,
                StatType.SkillKnowledgeWorld,
                StatType.SkillPerception
            }.Select(skill => Traits.CreateAddStatBonus(
                         $"WorldTraveler{skill}Trait",
                         String.Format(RES.TypeHyphenSubtype_info,
                                       RES.RaceWorldTravelerTraitName_info.Substring(0, RES.RaceWorldTravelerTraitName_info.IndexOf("(") >= 0 ?
                                                                                     RES.RaceWorldTravelerTraitName_info.IndexOf("(") : RES.RaceWorldTravelerTraitName_info.IndexOf("(")),
                                       UIUtility.GetStatText(skill)),
                         RES.RaceWorldTravelerTraitDescription_info,
                         Helpers.MergeIds(Helpers.GetSkillFocus(skill).AssetGuid, "9b03b7ff17394007a3fbec18aa42604b"),
                         skill)).ToArray();

            worldTraveler.SetFeatures(travelerFeats);
            choices.Add(worldTraveler);

            // Elf:
            // - Dilettante Artist (persuasion)
            // - Forlorn (+1 fort save)
            // - Warrior of the Old (+2 init)
            // - Youthful Mischief (+1 ref)
            choices.Add(Traits.CreateAddStatBonus("DilettanteArtistTrait", RES.DilettanteArtistTraitName_info,
                                                  RES.DilettanteArtistTraitDescription_info,
                                                  "ac5a16e72ef74b4884c674dcbb61692c",
                                                  StatType.SkillPersuasion, elfReq));

            choices.Add(Helpers.CreateFeature("ForlornTrait", RES.ForlornTraitName_info,
                                              RES.ForlornTraitDescription_info,
                                              "1511289c92ea4233b14c4f51072ea10f",
                                              Helpers.GetIcon("79042cb55f030614ea29956177977c52"), // Great Fortitude
                                              FeatureGroup.None,
                                              elfReq,
                                              Helpers.CreateAddStatBonus(StatType.SaveFortitude, 1, ModifierDescriptor.Trait)
                                              ));

            choices.Add(Helpers.CreateFeature("WarriorOfOldTrait", RES.WarriorOfOldTraitName_info,
                                              RES.WarriorOfOldTraitDescription_info,
                                              "dc36a2c52abb4e6dbff549ac65a5a171",
                                              Helpers.GetIcon("797f25d709f559546b29e7bcb181cc74"), // Improved Initiative
                                              FeatureGroup.None,
                                              elfReq,
                                              Helpers.CreateAddStatBonus(StatType.Initiative, 2, ModifierDescriptor.Trait)));

            choices.Add(Helpers.CreateFeature("YouthfulMischiefTrait", RES.YouthfulMischiefTraitName_info,
                                              RES.YouthfulMischiefTraitDescription_info,
                                              "bfcc574d1f214455ac369fa46e07200e",
                                              Helpers.GetIcon("15e7da6645a7f3d41bdad7c8c4b9de1e"), // Lightning Reflexes
                                              FeatureGroup.None,
                                              elfReq,
                                              Helpers.CreateAddStatBonus(StatType.SaveReflex, 1, ModifierDescriptor.Trait)));

            // Half-orc:
            // - Brute (persuasion)
            // - Legacy of Sand (+1 will save)
            var brute = Traits.CreateAddStatBonus("BruteTrait", RES.BruteTraitName_info,
                                                  RES.BruteTraitDescription_info,
                                                  "1ee0ce55ace74ccbb798e2fdc13181f6", StatType.SkillPersuasion, halfOrcReq);

            brute.SetIcon(Helpers.GetIcon("885f478dff2e39442a0f64ceea6339c9")); // Intimidating
            choices.Add(brute);

            BlueprintItemWeapon bite = Traits.library.CopyAndAdd <BlueprintItemWeapon>("35dfad6517f401145af54111be04d6cf", "Tusked",
                                                                                       "44dfad6517f401145af54111be04d644");

            choices.Add(Helpers.CreateFeature("TuskedTrait", RES.TuskedTraitName_info,
                                              RES.TuskedTraitDescription_info,
                                              "1511289c92ea4233b14c4f51072ea09g",
                                              Image2Sprite.Create("Mods/EldritchArcana/sprites/halforc_tusked.png"), // Great Fortitude
                                              FeatureGroup.None,
                                              halfOrcReq,
                                              Helpers.Create <AddAdditionalLimb>(x => x.Weapon = bite)
                                              ));

            choices.Add(Helpers.CreateFeature("LegacyOfSandTrait", RES.LegacyOfSandTraitName_info,
                                              RES.LegacyOfSandTraitDescription_info,
                                              "e5fb1675eb6e4ef9accef7eb3a10862a",
                                              Image2Sprite.Create("Mods/EldritchArcana/sprites/halforc_legacy_of_sand.png"),
                                              FeatureGroup.None,
                                              halfOrcReq,
                                              Helpers.CreateAddStatBonus(StatType.SaveWill, 1, ModifierDescriptor.Trait)));

            // Half-elf:
            // - Elven Relexes (+2 initiative)
            // - Failed Apprentice (+1 save arcane spells)
            choices.Add(Helpers.CreateFeature("ElvenReflexsTrait", RES.ElvenReflexsTraitName_info,
                                              RES.ElvenReflexsTraitDescription_info,
                                              "9975678ce2fc420da9cd6ec4fe8c8b9b",
                                              Helpers.GetIcon("797f25d709f559546b29e7bcb181cc74"), // Improved Initiative
                                              FeatureGroup.None,
                                              halfElfReq,
                                              Helpers.CreateAddStatBonus(StatType.Initiative, 2, ModifierDescriptor.Trait)));

            choices.Add(Helpers.CreateFeature("FailedAprenticeTrait", RES.FailedAprenticeTraitName_info,
                                              RES.FailedAprenticeTraitDescription_info,
                                              "8ed66066751f43c2920055dd6358adc8",
                                              Helpers.GetIcon("2483a523984f44944a7cf157b21bf79c"), // Elven Immunities
                                              FeatureGroup.None,
                                              halfElfReq,
                                              Helpers.Create <SavingThrowBonusAgainstSpellSource>()));

            // Halfling:
            // - Freed Slave (world)
            // - Freedom Fighter (mobility)
            // - Well-Informed (persuasion)
            choices.Add(Traits.CreateAddStatBonus("FreedSlaveTrait", RES.FreedSlaveTraitName_info,
                                                  RES.FreedSlaveTraitDescription_info,
                                                  "d2fc5fe0c64142a79e0ebee18f14b0be", StatType.SkillKnowledgeWorld, halflingReq));
            choices.Add(Traits.CreateAddStatBonus("FreedomFighterTrait", RES.FreedomFighterTraitName_info,
                                                  RES.FreedomFighterTraitDescription_info,
                                                  "3a4d2cd14dc446319085c865570ccc3d", StatType.SkillMobility, halflingReq));
            choices.Add(Traits.CreateAddStatBonus("WellInformedTrait", RES.WellInformedTraitName_info,
                                                  RES.WellInformedTraitDescription_info,
                                                  "940ced5d41594b9aa22ee22217fbd46f", StatType.SkillPersuasion, halflingReq));

            // Dwarf:
            // - Grounded (+2 mobility, +1 reflex)
            // - Militant Merchant (perception)Owner.HPLeft
            // - Ruthless (+1 confirm crits)
            // - Zest for Battle (+1 trait dmg if has morale attack bonus)

            var GloryOfOld = Helpers.CreateFeature("GloryOfOldTrait", RES.GloryOfOldTraitName_info,
                                                   RES.GloryOfOldTraitDescription_info,
                                                   "4283a523984f44944a7cf157b21bf7c9",
                                                   Image2Sprite.Create("Mods/EldritchArcana/sprites/spell_perfection.png"),
                                                   FeatureGroup.None,
                                                   dwarfReq,
                                                   Helpers.Create <SavingThrowBonusAgainstDescriptor>(s => { s.SpellDescriptor = SpellDescriptor.Poison; s.Value = 1; s.ModifierDescriptor = ModifierDescriptor.Racial; }),
                                                   Helpers.Create <SavingThrowBonusAgainstDescriptor>(s => { s.SpellDescriptor = SpellDescriptor.BreathWeapon; s.Value = 1; s.ModifierDescriptor = ModifierDescriptor.Trait; }));

            components.Clear();
            components.AddRange((new SpellSchool[]
            {
                SpellSchool.Abjuration,
                SpellSchool.Conjuration,
                SpellSchool.Divination,
                SpellSchool.Enchantment,
                SpellSchool.Evocation,
                SpellSchool.Illusion,
                SpellSchool.Necromancy,
                SpellSchool.Transmutation,
                SpellSchool.Universalist
            }).Select((school) => Helpers.Create <SavingThrowBonusAgainstSchool>(a =>
            {
                a.School             = school;
                a.Value              = 1;
                a.ModifierDescriptor = ModifierDescriptor.Racial;
            })));

            GloryOfOld.AddComponents(components);

            choices.Add(GloryOfOld);

            choices.Add(Helpers.CreateFeature("GroundedTrait", RES.GroundedTraitName_info,
                                              RES.GroundedTraitDescription_info,
                                              "9b13923527a64c3bbf8de904c5a9ef8b",
                                              Helpers.GetIcon("3a8d34905eae4a74892aae37df3352b9"), // Skill Focus Stealth (mobility)
                                              FeatureGroup.None,
                                              dwarfReq,
                                              Helpers.CreateAddStatBonus(StatType.SkillMobility, 2, ModifierDescriptor.Racial),
                                              Helpers.CreateAddStatBonus(StatType.SaveReflex, 1, ModifierDescriptor.Racial)));

            choices.Add(Traits.CreateAddStatBonus("MilitantMerchantTrait", RES.MilitantMerchantTraitName_info,
                                                  RES.MilitantMerchantTraitDescription_info,
                                                  "38226f4ad9ed4211878ef95497d01857", StatType.SkillPerception, dwarfReq));

            choices.Add(Helpers.CreateFeature("RuthlessTrait", RES.RuthlessTraitName_info,
                                              RES.RuthlessTraitDescription_info,
                                              "58d18289cb7f4ad4a690d9502d397a3a",
                                              Helpers.GetIcon("f4201c85a991369408740c6888362e20"), // Improved Critical
                                              FeatureGroup.None,
                                              dwarfReq,
                                              Helpers.Create <CriticalConfirmationBonus>(a => { a.Bonus = 1; a.Value = 0; })));


            var Frostborn = Helpers.CreateFeature("FrostbornTrait", RES.FrostbornTraitName_info,
                                                  RES.FrostbornTraitDescription_info,
                                                  "f987f5e69db44cdd99983985e37a6c3c",
                                                  Helpers.GetIcon("121811173a614534e8720d7550aae253"), // Weapon Specialization
                                                  FeatureGroup.None,
                                                  dwarfReq);

            Frostborn.AddComponent(Helpers.Create <AddDamageResistanceEnergy>(r => { r.Type = Kingmaker.Enums.Damage.DamageEnergyType.Cold; r.Value = 4; }));
            Frostborn.AddComponent(Helpers.Create <SavingThrowBonusAgainstDescriptor>(s => { s.SpellDescriptor = SpellDescriptor.Cold; s.ModifierDescriptor = ModifierDescriptor.Racial; s.Bonus = 1; }));
            choices.Add(Frostborn);

            choices.Add(Helpers.CreateFeature("ZestForBattleTrait", RES.ZestForBattleTraitName_info,
                                              RES.ZestForBattleTraitDescription_info,
                                              "a987f5e69db44cdd98983985e37a6c2a",
                                              Helpers.GetIcon("31470b17e8446ae4ea0dacd6c5817d86"), // Weapon Specialization
                                              FeatureGroup.None,
                                              dwarfReq,
                                              Helpers.Create <DamageBonusIfMoraleBonus>()));

            // Gnome:
            // - Animal Friend (+1 will save and lore nature class skill, must have familar or animal companion)
            // - Rapscallion (+1 init, +1 thievery)
            components.Clear();
            components.Add(gnomeReq);
            components.Add(Helpers.Create <AddClassSkill>(a => a.Skill = StatType.SkillLoreNature));
            // TODO: is there a cleaner way to implement this rather than a hard coded list?
            // (Ideally: it should work if a party NPC has a familiar/animal companion too.)
            // See also: PrerequisitePet.
            components.AddRange((new String[] {
                // Animal companions
                "f6f1cdcc404f10c4493dc1e51208fd6f",
                "afb817d80b843cc4fa7b12289e6ebe3d",
                "f9ef7717531f5914a9b6ecacfad63f46",
                "f894e003d31461f48a02f5caec4e3359",
                "e992949eba096644784592dc7f51a5c7",
                "aa92fea676be33d4dafd176d699d7996",
                "2ee2ba60850dd064e8b98bf5c2c946ba",
                "6adc3aab7cde56b40aa189a797254271",
                "ece6bde3dfc76ba4791376428e70621a",
                "126712ef923ab204983d6f107629c895",
                "67a9dc42b15d0954ca4689b13e8dedea",
                // Familiars
                "1cb0b559ca2e31e4d9dc65de012fa82f",
                "791d888c3f87da042a0a4d0f5c43641c",
                "1bbca102706408b4cb97281c984be5d5",
                "f111037444d5b6243bbbeb7fc9056ed3",
                "7ba93e2b888a3bd4ba5795ae001049f8",
                "97dff21a036e80948b07097ad3df2b30",
                "952f342f26e2a27468a7826da426f3e7",
                "61aeb92c176193e48b0c9c50294ab290",
                "5551dd90b1480e84a9caf4c5fd5adf65",
                "adf124729a6e01f4aaf746abbed9901d",
                "4d48365690ea9a746a74d19c31562788",
                "689b16790354c4c4c9b0f671f68d85fc",
                "3c0b706c526e0654b8af90ded235a089",
            }).Select(id => Helpers.Create <AddStatBonusIfHasFact>(a =>
            {
                a.Stat        = StatType.SaveWill;
                a.Value       = 1;
                a.Descriptor  = ModifierDescriptor.Trait;
                a.CheckedFact = Traits.library.Get <BlueprintFeature>(id);
            })));

            choices.Add(Helpers.CreateFeature("AnimalFriendTrait", RES.AnimalFriendTraitName_info,
                                              RES.AnimalFriendTraitDescription_info,
                                              "91c612b225d54adaa4ce4c633501b58e",
                                              Image2Sprite.Create("Mods/EldritchArcana/sprites/gnome_animal_friend.png"),//Helpers.GetIcon("1670990255e4fe948a863bafd5dbda5d"), // Boon Companion
                                              FeatureGroup.None,
                                              components.ToArray()));

            choices.Add(Helpers.CreateFeature("RapscallionTrait", RES.RapscallionTraitName_info,
                                              RES.RapscallionTraitDescription_info,
                                              "4f95abdcc70e4bda818be5b8860585c5",
                                              Helpers.GetSkillFocus(StatType.SkillMobility).Icon,
                                              FeatureGroup.None,
                                              gnomeReq,
                                              Helpers.CreateAddStatBonus(StatType.SkillMobility, 1, ModifierDescriptor.Trait),
                                              Helpers.CreateAddStatBonus(StatType.Initiative, 1, ModifierDescriptor.Trait)));

            // Aasimar:
            // - Martyr's Blood (+1 attack if HP below half).
            // - Toxophilite (+2 crit confirm with bows)
            // - Wary (+1 perception/persuasion)

            // TODO: Enlightened Warrior

            choices.Add(Helpers.CreateFeature("MartyrsBloodTrait", RES.MartyrsBloodTraitName_info,
                                              RES.MartyrsBloodTraitDescription_info,
                                              "729d27ad020d485f843264844f0f2155",
                                              Helpers.GetIcon("3ea2215150a1c8a4a9bfed9d9023903e"), // Iron Will Improved
                                              FeatureGroup.None,
                                              aasimarReq,
                                              Helpers.Create <AttackBonusIfAlignmentAndHealth>(a =>
            {
                a.TargetAlignment = AlignmentComponent.Evil;
                a.Descriptor      = ModifierDescriptor.Trait;
                a.Value           = 1;
                a.HitPointPercent = 0.5f;
            })));

            choices.Add(Helpers.CreateFeature("ToxophiliteTrait", RES.ToxophiliteTraitName_info,
                                              RES.ToxophiliteTraitDescription_info,
                                              "6c434f07c8984971b1d842cecdf144c6",
                                              Helpers.GetIcon("f4201c85a991369408740c6888362e20"), // Improved Critical
                                              FeatureGroup.None,
                                              aasimarReq,
                                              Helpers.Create <CriticalConfirmationBonus>(a =>
            {
                a.Bonus = 2;
                a.Value = 0;
                a.CheckWeaponRangeType = true;
                a.Type = AttackTypeAttackBonus.WeaponRangeType.RangedNormal;
            })));

            choices.Add(Helpers.CreateFeature("WaryTrait", RES.WaryTraitName_info,
                                              RES.WaryTraitDescription_info,
                                              "7a72a0e956784cc38ea049e503189810",
                                              Helpers.GetIcon("86d93a5891d299d4983bdc6ef3987afd"), // Persuasive
                                              FeatureGroup.None,
                                              aasimarReq,
                                              Helpers.CreateAddStatBonus(StatType.SkillPerception, 1, ModifierDescriptor.Trait),
                                              Helpers.CreateAddStatBonus(StatType.SkillPerception, 1, ModifierDescriptor.Trait)));

            // Tiefling:
            // - Ever Wary (retain half dex bonus AC during surpise round)
            // - Prolong Magic (racial spell-like abilities get free extend spell)
            // - God Scorn (Demodand heritage; +1 saves vs divine spells)
            // - Shadow Stabber (+2 damage if opponent can't see you)

            choices.Add(Helpers.CreateFeature("EverWaryTrait", RES.EverWaryTraitName_info,
                                              RES.EverWaryTraitDescripton_info,
                                              "0400c9c99e704a1f81a769aa88044a03",
                                              Helpers.GetIcon("3c08d842e802c3e4eb19d15496145709"), // uncanny dodge
                                              FeatureGroup.None,
                                              tieflingReq,
                                              Helpers.Create <ACBonusDuringSurpriseRound>()));

            var tieflingHeritageDemodand = Traits.library.Get <BlueprintFeature>("a53d760a364cd90429e16aa1e7048d0a");

            choices.Add(Helpers.CreateFeature("GodScornTrait", RES.GodScornTraitName_info,
                                              RES.GodScornTraitDescription_info,
                                              "db41263f6fd3450ea0a3bc45c98330f7",
                                              Helpers.GetIcon("2483a523984f44944a7cf157b21bf79c"), // Elven Immunities
                                              FeatureGroup.None,
                                              Helpers.PrerequisiteFeature(tieflingHeritageDemodand),
                                              Helpers.Create <SavingThrowBonusAgainstSpellSource>(s => s.Source = SpellSource.Divine)));

            var tieflingHeritageSelection = Traits.library.Get <BlueprintFeatureSelection>("c862fd0e4046d2d4d9702dd60474a181");

            choices.Add(Helpers.CreateFeature("ProlongMagicTrait", RES.ProlongMagicTraitName_info,
                                              RES.ProlongMagicTraitDescription_info,
                                              "820f697f59114993a55c46044c98bf9c",
                                              tieflingHeritageSelection.Icon,
                                              FeatureGroup.None,
                                              tieflingReq,
                                              // TODO: double check that this actually works for SLAs.
                                              Helpers.Create <AutoMetamagic>(a => { a.Metamagic = Metamagic.Extend; a.Abilities = Traits.CollectTieflingAbilities(tieflingHeritageSelection); })));

            choices.Add(Helpers.CreateFeature("ShadowStabberTrait", RES.ShadowStabberTraitName_info,
                                              RES.ShadowStabberTraitDescription_info,
                                              "b67d04e21a9147e3b8f9bd81ba36f409",
                                              Helpers.GetIcon("9f0187869dc23744292c0e5bb364464e"), // accomplished sneak attacker
                                              FeatureGroup.None,
                                              tieflingReq,
                                              Helpers.Create <DamageBonusIfInvisibleToTarget>(d => d.Bonus = 2)));

            choices.Add(UndoSelection.Feature.Value);
            raceTraits.SetFeatures(choices);
            adopted.SetFeatures(raceTraits.Features);
            adopted.AddComponent(Helpers.PrerequisiteNoFeature(raceTraits));

            return(raceTraits);
        }
コード例 #8
0
        public static BlueprintFeatureSelection CreateRaceTraits(BlueprintFeatureSelection adopted)
        {
            var noFeature  = Helpers.PrerequisiteNoFeature(null);
            var raceTraits = Helpers.CreateFeatureSelection("RaceTrait", "Race Trait",
                                                            "Race traits are keyed to specific races or ethnicities, which your character must belong to in order to select the trait.",
                                                            "6264aa9515be40cda55892da93685764", null, FeatureGroup.None,
                                                            Helpers.PrerequisiteNoFeature(adopted), noFeature);

            noFeature.Feature = raceTraits;

            var humanReq = Helpers.PrerequisiteFeaturesFromList(Helpers.human, Helpers.halfElf, Helpers.halfOrc,
                                                                // Note: Aasimar/Tiefling included under the assumption they have "Scion of Humanity"/"Pass for Human"
                                                                Helpers.aasimar, Helpers.tiefling);

            var halfElfReq  = Helpers.PrerequisiteFeature(Helpers.halfElf);
            var halfOrcReq  = Helpers.PrerequisiteFeature(Helpers.halfOrc);
            var elfReq      = Helpers.PrerequisiteFeaturesFromList(Helpers.elf, Helpers.halfElf);
            var dwarfReq    = Helpers.PrerequisiteFeature(Helpers.dwarf);
            var halflingReq = Helpers.PrerequisiteFeature(Helpers.halfling);
            var gnomeReq    = Helpers.PrerequisiteFeature(Helpers.gnome);
            var aasimarReq  = Helpers.PrerequisiteFeature(Helpers.aasimar);
            var tieflingReq = Helpers.PrerequisiteFeature(Helpers.tiefling);

            // TODO: how do we code prerequisites so they aren't ignored by "Adopted"?
            // (only race prereq should be ignored, not others)
            //
            // Note: half-elf, half-orc can take traits from either race.
            // Also Aasimar/Tiefling are treated as having Scion of Humanity/Pass for Human in the game.
            var choices = new List <BlueprintFeature>();

            // Human:
            // - Carefully Hidden (+1 will save, +2 vs divination)
            // - Fanatic (Arcana)
            // - Historian (World and +1 bardic knowledge if Bard)
            // - Shield Bearer (+1 dmg shield bash)
            // - Superstitious (+1 save arcane spells)
            // - World Traveler (choose: persuasion, perception, or world)
            //e62f392949c24eb4b8fb2bc9db4345e3 // cleric orisons
            // IllusionMirrorImageAbility.62a04a20dcd3067468565f89e3d7c687/
            //TrickeryDomainBaseFeature.cd1f4a784e0820647a34fe9bd5ffa770  /// copycat
            //TrickeryDomainBaseResource.148c9ad7e47f4284b9c3686bb440c08c
            //ring of radiant arrows 3 arcane missles
            //blessed signet ring 3 times bless
            //MesmerizingNecklaceFeature.6fbea605b47e3354481683233511051b 3 times color spray
            //var copycatresource = Traits.library.Get<BlueprintAbilityResource>("148c9ad7e47f4284b9c3686bb440c08c");

            //var triflerDescription = "A childhood spent at your mystically gifted grandmother’s side has taught you the basics of real magic.";
            //var trifler = Helpers.CreateFeatureSelection("TriflerTrait", "Trifler (grandma)",
            //    triflerDescription + "\nBenefits: You may choose one of the level 1 spells and that spell you can cast 3 times per day as a spell-like ability.",
            //    "ecacfccfddfe456cafc8d60fc1db7d34",
            //    Helpers.GetIcon("3adf9274a210b164cb68f472dc1e4544"), // Human Skilled
            //    FeatureGroup.None);

            //var colorspray = Traits.library.CopyAndAdd<BlueprintFeature>(
            //    "6fbea605b47e3354481683233511051b",
            //    "TriflerTraitColorspray",
            //    "cd1f4a784e0b20647a34fe9bd5ffa7a0");
            //colorspray.SetDescription(triflerDescription + "\n Benefit: You may cast color spray 3 times per day as a spell-like ability.");
            //colorspray.SetName("Trifler color spray");

            //var colorspray = Traits.library.CopyAndAdd<BlueprintFeature>(
            //    "cd1f4a784e0820647a34fe9bd5ffa770",
            //    "TriflerTraitColorspray",
            //    "6fbea605b47e3354481683233511051b");
            //colorspray.SetDescription(triflerDescription + "\n Benefit: You may cast color spray 3 times per day as a spell-like ability.");
            //colorspray.SetName("Trifler color spray");

            //var TriflerFeatures = new List<BlueprintFeature>()
            //{
            //    colorspray
            //};

            //choices.Add(trifler);
            //choices.Add(colorspray);


            var components = new List <BlueprintComponent> {
                humanReq
            };

            components.Add(Helpers.CreateAddStatBonus(StatType.SaveWill, 1, ModifierDescriptor.Trait));
            components.Add(Helpers.Create <SavingThrowBonusAgainstSchool>(a =>
            {
                a.School             = SpellSchool.Divination;
                a.Value              = 2;
                a.ModifierDescriptor = ModifierDescriptor.Trait;
            }));
            choices.Add(Helpers.CreateFeature("CarefullyHiddenTrait", "Carefully Hidden (Human)",
                                              "Your life as a member of an unpopular ethnic group has given you an uncanny knack for avoiding detection.\nBenefit: You gain a +1 trait bonus to Will saves and a +2 trait bonus to saving throws versus divination effects.",
                                              "38b92d2ebb4c4cdb8e946e29f5b2f178",
                                              Helpers.GetIcon("175d1577bb6c9a04baf88eec99c66334"), // Iron Will
                                              FeatureGroup.None,
                                              components.ToArray()));
            choices.Add(Traits.CreateAddStatBonus("FanaticTrait", "Fanatic (Human)",
                                                  "Your years spent in libraries reading every musty tome you could find about ancient lost civilizations has given you insight into the subjects of history and the arcane.",
                                                  "6427e81ba399406c93b463c284a42055",
                                                  StatType.SkillKnowledgeArcana,
                                                  humanReq));

            var bardicKnowledge = Traits.library.Get <BlueprintFeature>("65cff8410a336654486c98fd3bacd8c5");

            components.Clear();
            components.Add(humanReq);
            components.AddRange((new StatType[] {
                StatType.SkillKnowledgeArcana,
                StatType.SkillKnowledgeWorld,
                StatType.SkillLoreNature,
                StatType.SkillLoreReligion,
            }).Select((skill) => Helpers.Create <AddStatBonusIfHasFact>(a =>
            {
                a.Stat        = skill;
                a.Value       = 1;
                a.CheckedFact = bardicKnowledge;
                a.Descriptor  = ModifierDescriptor.UntypedStackable;
            })));

            var historian = Traits.CreateAddStatBonus("HistorianTrait", "Historian (Human)",
                                                      "Your parents were scholars of history, whether genealogists of your own family tree, sages on the subject of ancient empires, or simply hobbyists with a deep and abiding love for the past.\nBenefits: You gain a +1 trait bonus on Knowledge (history) checks and bardic knowledge checks, and Knowledge (history) is always a class skill for you.",
                                                      "4af3871899e4440bae03d4c33d4b52fd",
                                                      StatType.SkillKnowledgeWorld,
                                                      components.ToArray());

            choices.Add(historian);

            components.Clear();
            components.Add(humanReq);
            components.AddRange(new String[] {
                "98a0dc03586a6d04791901c41700e516", // SpikedLightShield
                "1fd965e522502fe479fdd423cca07684", // WeaponLightShield
                "a1b85d048fb5003438f34356df938a9f", // SpikedHeavyShield
                "be9b6408e6101cb4997a8996484baf19"  // WeaponHeavyShield
            }.Select(id => Helpers.Create <WeaponTypeDamageBonus>(w => { w.DamageBonus = 1; w.WeaponType = Traits.library.Get <BlueprintWeaponType>(id); })));

            choices.Add(Helpers.CreateFeature("ShieldBearerTrait", "Shield Bearer (Human)",
                                              "You have survived many battles thanks to your skill with your shield.\nBenefit: When performing a shield bash, you deal 1 additional point of damage.",
                                              "044ebbbadfba4d58afa11bfbf38df199",
                                              Helpers.GetIcon("121811173a614534e8720d7550aae253"), // Shield Bash
                                              FeatureGroup.None,
                                              components.ToArray()));

            choices.Add(Helpers.CreateFeature("SuperstitiousTrait", "Superstitious (Human)",
                                              "You have a healthy fear of sorcerers’ speech and wizards’ words that has helped you to survive their charms.\nBenefit: You gain a +1 trait bonus on saving throws against arcane spells.",
                                              "f5d79e5fbb87473ca0b13ed15b742079",
                                              Helpers.GetIcon("2483a523984f44944a7cf157b21bf79c"), // Elven Immunities
                                              FeatureGroup.None,
                                              humanReq,
                                              Helpers.Create <SavingThrowBonusAgainstSpellSource>()));

            var travelerDescription = "Your family has taken the love of travel to an extreme, roaming the world extensively. You’ve seen dozens of cultures and have learned to appreciate the diversity of what the world has to offer.";
            var worldTraveler       = Helpers.CreateFeatureSelection("WorldTravelerTrait", "World Traveler (Human)",
                                                                     travelerDescription + "\nBenefits: Select one of the following skills: Persuasion, Knowledge (world), or Perception. You gain a +1 trait bonus on checks with that skill, and it is always a class skill for you.",
                                                                     "ecacfcbeddfe453cafc8d60fc1db7d34",
                                                                     Helpers.GetIcon("3adf9274a210b164cb68f472dc1e4544"), // Human Skilled
                                                                     FeatureGroup.None,
                                                                     humanReq);

            var travelerFeats = new StatType[] {
                StatType.SkillPersuasion,
                StatType.SkillKnowledgeWorld,
                StatType.SkillPerception
            }.Select(skill => Traits.CreateAddStatBonus(
                         $"WorldTraveler{skill}Trait",
                         $"World Traveler — {UIUtility.GetStatText(skill)}",
                         travelerDescription,
                         Helpers.MergeIds(Helpers.GetSkillFocus(skill).AssetGuid, "9b03b7ff17394007a3fbec18aa42604b"),
                         skill)).ToArray();

            worldTraveler.SetFeatures(travelerFeats);
            choices.Add(worldTraveler);

            // Elf:
            // - Dilettante Artist (persuasion)
            // - Forlorn (+1 fort save)
            // - Warrior of the Old (+2 init)
            // - Youthful Mischief (+1 ref)
            choices.Add(Traits.CreateAddStatBonus("DilettanteArtistTrait", "Dilettante Artist (Elf)",
                                                  "Art for you is a social gateway and you use it to influence and penetrate high society.",
                                                  "ac5a16e72ef74b4884c674dcbb61692c", StatType.SkillPersuasion, elfReq));

            BlueprintItemWeapon bite = Traits.library.CopyAndAdd <BlueprintItemWeapon>("35dfad6517f401145af54111be04d6cf", "Tusked",
                                                                                       "44dfad6517f401145af54111be04d644");



            choices.Add(Helpers.CreateFeature("ForlornTrait", "Forlorn (Elf)",
                                              "Having lived outside of traditional elf society for much or all of your life, you know the world can be cruel, dangerous, and unforgiving of the weak.\nBenefit: You gain a +1 trait bonus on Fortitude saving throws.",
                                              "1511289c92ea4233b14c4f51072ea10f",
                                              Helpers.GetIcon("79042cb55f030614ea29956177977c52"), // Great Fortitude
                                              FeatureGroup.None,
                                              elfReq,
                                              Helpers.CreateAddStatBonus(StatType.SaveFortitude, 1, ModifierDescriptor.Trait)
                                              ));

            choices.Add(Helpers.CreateFeature("TuskedTrait", "Tusked (Half-orc)",
                                              "Benefit: Huge, sharp tusks bulge from your mouth, and you receive a bite attack (1d4 damage for Medium characters). If used as part of a full attack action, the bite attack is made at your full base attack bonus –5.",
                                              "1511289c92ea4233b14c4f51072ea09g",
                                              Image2Sprite.Create("Mods/EldritchArcana/sprites/halforc_tusked.png"), // Great Fortitude
                                              FeatureGroup.None,
                                              halfOrcReq,
                                              Helpers.Create <AddAdditionalLimb>(x => x.Weapon = bite)
                                              ));

            choices.Add(Helpers.CreateFeature("WarriorOfOldTrait", "Warrior of Old (Elf)",
                                              "As a child, you put in long hours on combat drills, and though time has made this training a dim memory, you still have a knack for quickly responding to trouble.\nBenefit: You gain a +2 trait bonus on initiative checks.",
                                              "dc36a2c52abb4e6dbff549ac65a5a171",
                                              Helpers.GetIcon("797f25d709f559546b29e7bcb181cc74"), // Improved Initiative
                                              FeatureGroup.None,
                                              elfReq,
                                              Helpers.CreateAddStatBonus(StatType.Initiative, 2, ModifierDescriptor.Trait)));

            choices.Add(Helpers.CreateFeature("YouthfulMischiefTrait", "Youthful Mischeif (Elf)",
                                              "Though you gave up the life of a padfoot, scout, or minstrel decades before, you still know how to roll with the punches when things turn sour.\nBenefit: You gain a +1 trait bonus on Reflex saves.",
                                              "bfcc574d1f214455ac369fa46e07200e",
                                              Helpers.GetIcon("15e7da6645a7f3d41bdad7c8c4b9de1e"), // Lightning Reflexes
                                              FeatureGroup.None,
                                              elfReq,
                                              Helpers.CreateAddStatBonus(StatType.SaveReflex, 1, ModifierDescriptor.Trait)));

            // Half-orc:
            // - Brute (persuasion)
            // - Legacy of Sand (+1 will save)
            var brute = Traits.CreateAddStatBonus("BruteTrait", "Brute (Half-Orc)",
                                                  "You have worked for a crime lord, either as a low-level enforcer or as a guard, and are adept at frightening away people.",
                                                  "1ee0ce55ace74ccbb798e2fdc13181f6", StatType.SkillPersuasion, halfOrcReq);

            brute.SetIcon(Helpers.GetIcon("885f478dff2e39442a0f64ceea6339c9")); // Intimidating
            choices.Add(brute);

            var GloryOfOld = Helpers.CreateFeature("GloryOfOldTrait", "Glory of old",
                                                   "You are part of the old Guard" +
                                                   "\nYou belong to the elite veteran regiments of The old king and his army and are intensely loyal to him. It was you who made the last charge at the dwarven kingdom." +
                                                   "Benefit: You receive a +1 trait bonus on saving throws against spells, spell-like abilities, and poison",
                                                   "4283a523984f44944a7cf157b21bf7c9",
                                                   Image2Sprite.Create("Mods/EldritchArcana/sprites/spell_perfection.png"),
                                                   FeatureGroup.None,
                                                   dwarfReq,
                                                   Helpers.Create <SavingThrowBonusAgainstDescriptor>(s => { s.SpellDescriptor = SpellDescriptor.Poison; s.Value = 1; s.ModifierDescriptor = ModifierDescriptor.Racial; }),
                                                   Helpers.Create <SavingThrowBonusAgainstDescriptor>(s => { s.SpellDescriptor = SpellDescriptor.BreathWeapon; s.Value = 1; s.ModifierDescriptor = ModifierDescriptor.Trait; }));

            components.Clear();
            components.AddRange((new SpellSchool[]
            {
                SpellSchool.Abjuration,
                SpellSchool.Conjuration,
                SpellSchool.Divination,
                SpellSchool.Enchantment,
                SpellSchool.Evocation,
                SpellSchool.Illusion,
                SpellSchool.Necromancy,
                SpellSchool.Transmutation,
                SpellSchool.Universalist
            }).Select((school) => Helpers.Create <SavingThrowBonusAgainstSchool>(a =>
            {
                a.School             = school;
                a.Value              = 1;
                a.ModifierDescriptor = ModifierDescriptor.Racial;
            })));

            GloryOfOld.AddComponents(components);

            choices.Add(GloryOfOld);



            choices.Add(Helpers.CreateFeature("LegacyOfSandTrait", "Legacy of Sand (Half-Orc)",
                                              "A large tribe of orcs adapted to life in the desert once dwelt in southeastern Katapesh. Although this tribe is long extinct, some half-orcs of Katapesh carry the traits of this tribe in their particularly large jaws, broad shoulders, and shockingly pale eyes. You often have dreams of hunts and strange ceremonies held under moonlight in the desert sands. Some ascribe these dreams to racial memory, others to visions or prophecies. These dreams have instilled in you a fierce sense of tradition.\nBenefit: You gain a +1 trait bonus on all Will saving throws.",
                                              "e5fb1675eb6e4ef9accef7eb3a10862a",
                                              Image2Sprite.Create("Mods/EldritchArcana/sprites/halforc_legacy_of_sand.png"),
                                              FeatureGroup.None,
                                              halfOrcReq,
                                              Helpers.CreateAddStatBonus(StatType.SaveWill, 1, ModifierDescriptor.Trait)));

            // Half-elf:
            // - Elven Relexes (+2 initiative)
            // - Failed Apprentice (+1 save arcane spells)
            choices.Add(Helpers.CreateFeature("ElvenReflexsTrait", "Elven Reflexes (Half-Elf)",
                                              "One of your parents was a member of a wild elven tribe, and you’ve inherited a portion of your elven parent’s quick reflexes.\nBenefit: You gain a +2 trait bonus on initiative checks.",
                                              "9975678ce2fc420da9cd6ec4fe8c8b9b",
                                              Helpers.GetIcon("797f25d709f559546b29e7bcb181cc74"), // Improved Initiative
                                              FeatureGroup.None,
                                              halfElfReq,
                                              Helpers.CreateAddStatBonus(StatType.Initiative, 2, ModifierDescriptor.Trait)));

            choices.Add(Helpers.CreateFeature("FailedAprenticeTrait", "Failed Apprentice (Half-Elf)",
                                              "You have a healthy fear of sorcerers’ speech and wizards’ words that has helped you to survivAs a child, your parents sent you to a distant wizard’s tower as an apprentice so that you could learn the arcane arts. Unfortunately, you had no arcane talent whatsoever, though you did learn a great deal about the workings of spells and how to resist them.\nBenefit: You gain a +1 trait bonus on saves against arcane spells.",
                                              "8ed66066751f43c2920055dd6358adc8",
                                              Helpers.GetIcon("2483a523984f44944a7cf157b21bf79c"), // Elven Immunities
                                              FeatureGroup.None,
                                              halfElfReq,
                                              Helpers.Create <SavingThrowBonusAgainstSpellSource>()));

            // Halfling:
            // - Freed Slave (world)
            // - Freedom Fighter (mobility)
            // - Well-Informed (persuasion)
            choices.Add(Traits.CreateAddStatBonus("FreedSlaveTrait", "Freed Slave (Halfling)",
                                                  "You grew up as a slave and know the ins and outs of nobility better than most.",
                                                  "d2fc5fe0c64142a79e0ebee18f14b0be", StatType.SkillKnowledgeWorld, halflingReq));
            choices.Add(Traits.CreateAddStatBonus("FreedomFighterTrait", "Freedom Fighter (Halfling)",
                                                  "Your parents allowed escaping slaves to hide in your home, and the stories you’ve heard from them instilled into you a deep loathing of slavery, and a desire to help slaves evade capture and escape.",
                                                  "3a4d2cd14dc446319085c865570ccc3d", StatType.SkillMobility, halflingReq));
            choices.Add(Traits.CreateAddStatBonus("WellInformedTrait", "Well-Informed (Halfling)",
                                                  "You make it a point to know everyone and to be connected to everything around you. You frequent the best taverns, attend all of the right events, and graciously help anyone who needs it.",
                                                  "940ced5d41594b9aa22ee22217fbd46f", StatType.SkillPersuasion, halflingReq));

            // Dwarf:
            // - Grounded (+2 mobility, +1 reflex)
            // - Militant Merchant (perception)Owner.HPLeft
            // - Ruthless (+1 confirm crits)
            // - Zest for Battle (+1 trait dmg if has morale attack bonus)
            choices.Add(Helpers.CreateFeature("GroundedTrait", "Grounded (Dwarf)",
                                              "You are well balanced, both physically and mentally.\nBenefit: You gain a +2 trait bonus on Mobility checks, and a +1 trait bonus on Reflex saves.",
                                              "9b13923527a64c3bbf8de904c5a9ef8b",
                                              Helpers.GetIcon("3a8d34905eae4a74892aae37df3352b9"), // Skill Focus Stealth (mobility)
                                              FeatureGroup.None,
                                              dwarfReq,
                                              Helpers.CreateAddStatBonus(StatType.SkillMobility, 2, ModifierDescriptor.Racial),
                                              Helpers.CreateAddStatBonus(StatType.SaveReflex, 1, ModifierDescriptor.Racial)));

            choices.Add(Traits.CreateAddStatBonus("MilitantMerchantTrait", "Militant Merchant (Dwarf)",
                                                  "You know what it takes to get your goods to market and will stop at nothing to protect your products. Years of fending off thieves, cutthroats, and brigands have given you a sixth sense when it comes to danger.",
                                                  "38226f4ad9ed4211878ef95497d01857", StatType.SkillPerception, dwarfReq));

            choices.Add(Helpers.CreateFeature("RuthlessTrait", "Ruthless (Dwarf)",
                                              "You never hesitate to strike a killing blow.\nBenefit: You gain a +1 trait bonus on attack rolls to confirm critical hits.",
                                              "58d18289cb7f4ad4a690d9502d397a3a",
                                              Helpers.GetIcon("f4201c85a991369408740c6888362e20"), // Improved Critical
                                              FeatureGroup.None,
                                              dwarfReq,
                                              Helpers.Create <CriticalConfirmationBonus>(a => { a.Bonus = 1; a.Value = 0; })));


            var Frostborn = Helpers.CreateFeature("FrostbornTrait", "Frostborn (Dwarf)",
                                                  "You were raised in the icy tundra\nBenefit:Benefit: You gain a +4 trait bonus to resist the effects of cold environments, as well as a +1 trait bonus on all saving throws against cold effects.",
                                                  "f987f5e69db44cdd99983985e37a6c3c",
                                                  Helpers.GetIcon("121811173a614534e8720d7550aae253"), // Weapon Specialization
                                                  FeatureGroup.None,
                                                  dwarfReq);

            Frostborn.AddComponent(Helpers.Create <AddDamageResistanceEnergy>(r => { r.Type = Kingmaker.Enums.Damage.DamageEnergyType.Cold; r.Value = 4; }));
            Frostborn.AddComponent(Helpers.Create <SavingThrowBonusAgainstDescriptor>(s => { s.SpellDescriptor = SpellDescriptor.Cold; s.ModifierDescriptor = ModifierDescriptor.Racial; s.Bonus = 1; }));
            choices.Add(Frostborn);

            choices.Add(Helpers.CreateFeature("ZestForBattleTrait", "Zest for Battle (Dwarf)",
                                              "Your greatest joy is being in the thick of battle, and smiting your enemies for a righteous or even dastardly cause.\nBenefit: Whenever you have a morale bonus to weapon attack rolls, you also receive a +1 trait bonus on weapon damage rolls.",
                                              "a987f5e69db44cdd98983985e37a6c2a",
                                              Helpers.GetIcon("31470b17e8446ae4ea0dacd6c5817d86"), // Weapon Specialization
                                              FeatureGroup.None,
                                              dwarfReq,
                                              Helpers.Create <DamageBonusIfMoraleBonus>()));

            // Gnome:
            // - Animal Friend (+1 will save and lore nature class skill, must have familar or animal companion)
            // - Rapscallion (+1 init, +1 thievery)
            components.Clear();
            components.Add(gnomeReq);
            components.Add(Helpers.Create <AddClassSkill>(a => a.Skill = StatType.SkillLoreNature));
            // TODO: is there a cleaner way to implement this rather than a hard coded list?
            // (Ideally: it should work if a party NPC has a familiar/animal companion too.)
            // See also: PrerequisitePet.
            components.AddRange((new String[] {
                // Animal companions
                "f6f1cdcc404f10c4493dc1e51208fd6f",
                "afb817d80b843cc4fa7b12289e6ebe3d",
                "f9ef7717531f5914a9b6ecacfad63f46",
                "f894e003d31461f48a02f5caec4e3359",
                "e992949eba096644784592dc7f51a5c7",
                "aa92fea676be33d4dafd176d699d7996",
                "2ee2ba60850dd064e8b98bf5c2c946ba",
                "6adc3aab7cde56b40aa189a797254271",
                "ece6bde3dfc76ba4791376428e70621a",
                "126712ef923ab204983d6f107629c895",
                "67a9dc42b15d0954ca4689b13e8dedea",
                // Familiars
                "1cb0b559ca2e31e4d9dc65de012fa82f",
                "791d888c3f87da042a0a4d0f5c43641c",
                "1bbca102706408b4cb97281c984be5d5",
                "f111037444d5b6243bbbeb7fc9056ed3",
                "7ba93e2b888a3bd4ba5795ae001049f8",
                "97dff21a036e80948b07097ad3df2b30",
                "952f342f26e2a27468a7826da426f3e7",
                "61aeb92c176193e48b0c9c50294ab290",
                "5551dd90b1480e84a9caf4c5fd5adf65",
                "adf124729a6e01f4aaf746abbed9901d",
                "4d48365690ea9a746a74d19c31562788",
                "689b16790354c4c4c9b0f671f68d85fc",
                "3c0b706c526e0654b8af90ded235a089",
            }).Select(id => Helpers.Create <AddStatBonusIfHasFact>(a =>
            {
                a.Stat        = StatType.SaveWill;
                a.Value       = 1;
                a.Descriptor  = ModifierDescriptor.Trait;
                a.CheckedFact = Traits.library.Get <BlueprintFeature>(id);
            })));

            choices.Add(Helpers.CreateFeature("AnimalFriendTrait", "Animal Friend (Gnome)",
                                              "You’ve long been a friend to animals, and feel safer when animals are nearby.\nBenefits: You gain a +1 trait bonus on Will saving throws as long as you have an animal companion or familiar, and Lore (Nature) is always a class skill for you.",
                                              "91c612b225d54adaa4ce4c633501b58e",
                                              Image2Sprite.Create("Mods/EldritchArcana/sprites/gnome_animal_friend.png"),//Helpers.GetIcon("1670990255e4fe948a863bafd5dbda5d"), // Boon Companion
                                              FeatureGroup.None,
                                              components.ToArray()));

            choices.Add(Helpers.CreateFeature("Rapscallion", "Rapscallion (Gnome)",
                                              "You’ve spent your entire life thumbing your nose at the establishment and take pride in your run-ins with the law. Somehow, despite all your mischievous behavior, you’ve never been caught.\nBenefits: You gain a +1 trait bonus on Mobility checks and a +1 trait bonus on initiative checks.",
                                              "4f95abdcc70e4bda818be5b8860585c5",
                                              Helpers.GetSkillFocus(StatType.SkillMobility).Icon,
                                              FeatureGroup.None,
                                              gnomeReq,
                                              Helpers.CreateAddStatBonus(StatType.SkillMobility, 1, ModifierDescriptor.Trait),
                                              Helpers.CreateAddStatBonus(StatType.Initiative, 1, ModifierDescriptor.Trait)));

            // Aasimar:
            // - Martyr’s Blood (+1 attack if HP below half).
            // - Toxophilite (+2 crit confirm with bows)
            // - Wary (+1 perception/persuasion)

            // TODO: Enlightened Warrior

            choices.Add(Helpers.CreateFeature("MartyrsBloodTrait", "Martyr’s Blood (Aasimar)",
                                              "You carry the blood of a self-sacrificing celestial, and strive to live up to your potential for heroism.\nBenefit(s): As long as your current hit point total is less than half of your maximum hit points possible, you gain a +1 trait bonus on attack rolls against evil foes.",
                                              "729d27ad020d485f843264844f0f2155",
                                              Helpers.GetIcon("3ea2215150a1c8a4a9bfed9d9023903e"), // Iron Will Improved
                                              FeatureGroup.None,
                                              aasimarReq,
                                              Helpers.Create <AttackBonusIfAlignmentAndHealth>(a =>
            {
                a.TargetAlignment = AlignmentComponent.Evil;
                a.Descriptor      = ModifierDescriptor.Trait;
                a.Value           = 1;
                a.HitPointPercent = 0.5f;
            })));

            choices.Add(Helpers.CreateFeature("ToxophiliteTrait", "Toxophilite (Aasimar)",
                                              "You’ve inherited some of your celestial ancestor’s prowess with the bow.\nBenefit: You gain a +2 trait bonus on attack rolls made to confirm critical hits with bows.",
                                              "6c434f07c8984971b1d842cecdf144c6",
                                              Helpers.GetIcon("f4201c85a991369408740c6888362e20"), // Improved Critical
                                              FeatureGroup.None,
                                              aasimarReq,
                                              Helpers.Create <CriticalConfirmationBonus>(a =>
            {
                a.Bonus = 2;
                a.Value = 0;
                a.CheckWeaponRangeType = true;
                a.Type = AttackTypeAttackBonus.WeaponRangeType.RangedNormal;
            })));

            choices.Add(Helpers.CreateFeature("WaryTrait", "Wary (Aasimar)",
                                              "You grew up around people who were jealous of and hostile toward you. Perhaps your parents were not pleased to have a child touched by the divine—they may have berated or beaten you, or even sold you into slavery for an exorbitant price. You grew up mistrustful of others and believing your unique appearance to be a curse.\nBenefit: You gain a +1 trait bonus on Persuasion and Perception checks.",
                                              "7a72a0e956784cc38ea049e503189810",
                                              Helpers.GetIcon("86d93a5891d299d4983bdc6ef3987afd"), // Persuasive
                                              FeatureGroup.None,
                                              aasimarReq,
                                              Helpers.CreateAddStatBonus(StatType.SkillPersuasion, 1, ModifierDescriptor.Trait),
                                              Helpers.CreateAddStatBonus(StatType.SkillPerception, 1, ModifierDescriptor.Trait)));

            // Tiefling:
            // - Ever Wary (retain half dex bonus AC during surpise round)
            // - Prolong Magic (racial spell-like abilities get free extend spell)
            // - God Scorn (Demodand heritage; +1 saves vs divine spells)
            // - Shadow Stabber (+2 damage if opponent can't see you)

            choices.Add(Helpers.CreateFeature("EverWaryTrait", "Ever wary (Tiefling)",
                                              "Constant fear that your fiendish nature might provoke a sudden attack ensures that you never completely let down your guard.\nBenefit During the surprise round and before your first action in combat, you can apply half your Dexterity bonus (if any) to your AC. You still count as flat-footed for the purposes of attacks and effects.",
                                              "0400c9c99e704a1f81a769aa88044a03",
                                              Helpers.GetIcon("3c08d842e802c3e4eb19d15496145709"), // uncanny dodge
                                              FeatureGroup.None,
                                              tieflingReq,
                                              Helpers.Create <ACBonusDuringSurpriseRound>()));

            var tieflingHeritageDemodand = Traits.library.Get <BlueprintFeature>("a53d760a364cd90429e16aa1e7048d0a");

            choices.Add(Helpers.CreateFeature("GodScornTrait", "God Scorn (Demodand Tiefling)",
                                              "Your contempt for the gods and their sad little priests makes it easier to shake off the effects of their prayers.\nBenefit You gain a +1 trait bonus on saving throws against divine spells.",
                                              "db41263f6fd3450ea0a3bc45c98330f7",
                                              Helpers.GetIcon("2483a523984f44944a7cf157b21bf79c"), // Elven Immunities
                                              FeatureGroup.None,
                                              Helpers.PrerequisiteFeature(tieflingHeritageDemodand),
                                              Helpers.Create <SavingThrowBonusAgainstSpellSource>(s => s.Source = SpellSource.Divine)));

            var tieflingHeritageSelection = Traits.library.Get <BlueprintFeatureSelection>("c862fd0e4046d2d4d9702dd60474a181");

            choices.Add(Helpers.CreateFeature("ProlongMagicTrait", "Prolong Magic (Tiefling)",
                                              "Constant drills and preparation allow you to get more out of your innate magic.\nBenefit Whenever you use a spell - like ability gained through your tiefling heritage, it automatically acts as if affected by the Extend Spell metamagic feat.",
                                              "820f697f59114993a55c46044c98bf9c",
                                              tieflingHeritageSelection.Icon,
                                              FeatureGroup.None,
                                              tieflingReq,
                                              // TODO: double check that this actually works for SLAs.
                                              Helpers.Create <AutoMetamagic>(a => { a.Metamagic = Metamagic.Extend; a.Abilities = Traits.CollectTieflingAbilities(tieflingHeritageSelection); })));

            choices.Add(Helpers.CreateFeature("ShadowStabberTrait", "Shadow Stabber (Tiefling)",
                                              "An instinct for dishonorable conduct serves you well when fighting opponents who are blind, oblivious, or blundering around in the dark.\nBenefit You gain a +2 trait bonus on melee weapon damage rolls made against foes that cannot see you.",
                                              "b67d04e21a9147e3b8f9bd81ba36f409",
                                              Helpers.GetIcon("9f0187869dc23744292c0e5bb364464e"), // accomplished sneak attacker
                                              FeatureGroup.None,
                                              tieflingReq,
                                              Helpers.Create <DamageBonusIfInvisibleToTarget>(d => d.Bonus = 2)));

            choices.Add(UndoSelection.Feature.Value);
            raceTraits.SetFeatures(choices);
            adopted.SetFeatures(raceTraits.Features);
            adopted.AddComponent(Helpers.PrerequisiteNoFeature(raceTraits));

            return(raceTraits);
        }
コード例 #9
0
        public static BlueprintFeatureSelection CreateMagicTraits()
        {
            var noFeature   = Helpers.PrerequisiteNoFeature(null);
            var magicTraits = Helpers.CreateFeatureSelection("MagicTrait", RES.MagicTraitName_info,
                                                             RES.MagicTraitDescription_info,
                                                             "d89181c607e4431084f9d97532c5c554", null, FeatureGroup.None, noFeature);

            noFeature.Feature = magicTraits;

            var choices = new List <BlueprintFeature>();

            choices.Add(Traits.CreateAddStatBonus("ClassicallySchooledTrait", RES.ClassicallySchooledTraitName_info,
                                                  RES.ClassicallySchooledTraitDescription_info,
                                                  "788098518aa9436782397fa318c64c69",
                                                  StatType.SkillKnowledgeArcana));

            choices.Add(Traits.CreateAddStatBonus("DangerouslyCuriousTrait", RES.DangerouslyCuriousTraitName_info,
                                                  RES.DangerouslyCuriousTraitDescription_info,
                                                  "0c72c573cc404b42916dc7265ea6f59a",
                                                  StatType.SkillUseMagicDevice));


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


            choices.Add(Helpers.CreateFeature("BeastOfSocietyTrait", RES.BeastOfSocietyTraitName_info,
                                              RES.BeastOfSocietyTraitDescription_info,
                                              "e34889a2dd7e4e9ebfdfa76bfb8f4445",
                                              Image2Sprite.Create("Mods/EldritchArcana/sprites/beast_of_society.png"),
                                              FeatureGroup.None,
                                              WildShapeResource.CreateIncreaseResourceAmount(4)));

            choices.Add(Helpers.CreateFeature("FocusedMindTrait", RES.FocusedMindTraitName_info,
                                              RES.FocusedMindTraitDescription_info,
                                              "e34889a2dd7e4e9ebfdfa76bfb8f5556",
                                              Helpers.GetIcon("06964d468fde1dc4aa71a92ea04d930d"), // Combat Casting
                                              FeatureGroup.None,
                                              Helpers.Create <ConcentrationBonus>(a => a.Value = 2)));

            var giftedAdept = Helpers.CreateFeatureSelection("GiftedAdeptTrait", RES.GiftedAdeptTraitName_info,
                                                             RES.GiftedAdeptTraitDescription_info,
                                                             "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", RES.MagicalKnackTraitName_info,
                                              RES.MagicalKnackTraitDescription_info,
                                              "8fd15d5aa003497aa7f976530d21e430",
                                              Helpers.GetIcon("16fa59cc9a72a6043b566b49184f53fe"), // Spell Focus
                                              FeatureGroup.None,
                                                                                                   //Helpers.Create<IncreaseCasterLevel>(),
                                              Helpers.Create <IncreaseCasterLevelUpToCharacterLevel>()));

            var magicalLineage = Helpers.CreateFeatureSelection("MagicalLineageTrait", RES.MagicalLineageTraitName_info,
                                                                RES.MagicalLineageTraitDescription_info,
                                                                "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", RES.PragmaticActivatorTraitName_info,
                                              RES.PragmaticActivatorTraitDescription_info,
                                              "d982f3e69db44cdd34263985e37a6d4c",
                                              Image2Sprite.Create("Mods/EldritchArcana/sprites/spell_perfection.png"),
                                              FeatureGroup.None,
                                              Helpers.Create <ReplaceBaseStatForStatTypeLogic>(x =>
            {
                x.StatTypeToReplaceBastStatFor = StatType.SkillUseMagicDevice;
                x.NewBaseStatType = StatType.Intelligence;
            })
                                              ));

            choices.Add(UndoSelection.Feature.Value);
            magicTraits.SetFeatures(choices);
            return(magicTraits);
        }
コード例 #10
0
        public static BlueprintFeatureSelection CreateFaithTraits()
        {
            var noFeature   = Helpers.PrerequisiteNoFeature(null);
            var faithTraits = Helpers.CreateFeatureSelection("FaithTrait", RES.FaithTraitName_info,
                                                             RES.FaithTraitDescription_info,
                                                             "21d0fe2d88e44e5cbfb28becadf86110", null, FeatureGroup.None, noFeature);

            noFeature.Feature = faithTraits;

            var choices = new List <BlueprintFeature>();

            choices.Add(Helpers.CreateFeature("BirthmarkTrait", RES.BirthmarkTraitName_info,
                                              RES.BirthmarkTraitDescription_info,
                                              "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", RES.DefyMadnessTraitName_info,
                                              RES.DefyMadnessTraitDescription_info,
                                              "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", RES.ChildOfTheTempleTraitName_info,
                                                  RES.ChildOfTheTempleTraitDescription_info,
                                                  "cb79816f17d84a51b173ef74aa325561",
                                                  StatType.SkillLoreReligion));

            choices.Add(Traits.CreateAddStatBonus("DevoteeOfTheGreenTrait", RES.DevoteeOfTheGreenTraitName_info,
                                                  RES.DevoteeOfTheGreenTraitDescription_info,
                                                  "6b8e68de9fc04139af0f1127d2a33984",
                                                  StatType.SkillLoreNature));

            choices.Add(Traits.CreateAddStatBonus("EaseOfFaithTrait", RES.EaseOfFaithTraitName_info,
                                                  RES.EaseOfFaithTraitDescription_info,
                                                  "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");

            choices.Add(Helpers.CreateFeature("ExaltedOfTheSocietyTrait", RES.ExaltedOfTheSocietyTraitName_info,
                                              RES.ExaltedOfTheSocietyTraitDescription,
                                              "3bb1b077ad0845b59663c0e1b343011a",
                                              Helpers.GetIcon("cd9f19775bd9d3343a31a065e93f0c47"), // Extra Channel
                                              FeatureGroup.None,
                                              channelEnergyResource.CreateIncreaseResourceAmount(1),
                                              channelEnergyEmpyrealResource.CreateIncreaseResourceAmount(1),
                                              channelEnergyHospitalerResource.CreateIncreaseResourceAmount(1),
                                              LifeMystery.channelResource.CreateIncreaseResourceAmount(1)));

            choices.Add(Helpers.CreateFeature("SacredConduitTrait", RES.SacredConduitTraitName_info,
                                              RES.SacredConduitTraitDescription_info,
                                              "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", RES.FatesFavoredTraitName_info,
                                              RES.FatesFavoredTraitDescription_info,
                                              "0c5dcccc21e148cdaf0fb3c643249bfb",
                                              Image2Sprite.Create("Mods/EldritchArcana/sprites/fey_foundling.png"), // blessing luck & resolve
                                              FeatureGroup.None,
                                              Helpers.Create <ExtraLuckBonus>()));

            var planar = Helpers.CreateFeatureSelection("PlanarSavantTrait", RES.PlanarSavantTraitName_info,
                                                        RES.PlanarSavantTraitDescription_info,
                                                        "2e4dcecc32e148cbaf0fb3c643249cbf",
                                                        Helpers.NiceIcons(19),
                                                        FeatureGroup.None);

            var planarOptions = new List <BlueprintFeature>()
            {
                Helpers.CreateFeature("PlanarSavantTraitArcana", RES.PlanarSavantTraitArcanaName_info,
                                      RES.PlanarSavantTraitArcanaDescription_info,
                                      $"a982f3e69db44cdd33963985e37a6d2b",
                                      Helpers.NiceIcons(32),
                                      FeatureGroup.None,
                                      Helpers.Create <ReplaceBaseStatForStatTypeLogic>(x =>
                {
                    x.StatTypeToReplaceBastStatFor = StatType.SkillKnowledgeArcana;
                    x.NewBaseStatType = StatType.Charisma;
                })
                                      ), Helpers.CreateFeature("PlanarSavantTraitWorld", RES.PlanarSavantTraitWorldName_info,
                                                               RES.PlanarSavantTraitWorldDescription_info,
                                                               $"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", RES.WisdomintheFleshTraitName_info,
                                                          RES.WisdomintheFleshTraitDescription_info,
                                                          "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.CheckIntimidate,
                StatType.SkillAthletics,
                //StatType.SkillKnowledgeWorld,
                StatType.SkillStealth,
                StatType.SkillPersuasion,
            };

            for (int i = 0; i < 6; i++)
            {
                WisFleshOptions[i] = Helpers.CreateFeature($"EmpathicDiplomatTrait{Stats[i]}",
                                                           String.Format(RES.EmpathicDiplomatStatTraitName_info, UIUtility.GetStatText(Stats[i])),
                                                           String.Format(RES.EmpathicDiplomatStatTraitDescription_info, UIUtility.GetStatText(Stats[i]), UIUtility.GetStatText(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", RES.IndomitableFaithTraitName_info,
                                              RES.IndomitableFaithTraitDescription_info,
                                              "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;
            Random ran = new Random();
            int    rnd = ran.Next(3, 20);

            var Chaldira = Helpers.CreateFeatureSelection("ChaldiraTrait", RES.ChaldiraTraitName_info,
                                                          RES.ChaldiraTraitDescription,
                                                          "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", RES.ChaldiraTraitOriginalName_info,
                                                      RES.ChaldiraTraitOriginalDescription_info,
                                                      $"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}",
                                                          String.Format(RES.ChaldiraTraitHBName_info, i),
                                                          String.Format(RES.ChaldiraTraitHBDescription_info, (int)(12 / i), i),
                                                          $"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", RES.ScholarOfTheGreatBeyondTraitName_info,
                                                  RES.ScholarOfTheGreatBeyondTraitDescription_info,
                                                  "0896fea4f7ca4635aa4e5338a673610d",
                                                  StatType.SkillKnowledgeWorld));

            choices.Add(UndoSelection.Feature.Value);
            // TODO: Stalwart of the Society
            faithTraits.SetFeatures(choices);
            return(faithTraits);
        }