Esempio n. 1
0
        static public BlueprintFeature CreateReservoir()
        {
            if (library.BlueprintsByAssetId.ContainsKey("46c10437728d31d5b7611eb34f6cb011"))
            {
                // has created arcane reservoir already.
                return(library.Get <BlueprintFeature>("46c10437728d31d5b7611eb34f6cb011"));
            }
            Sprite          icon_AR        = library.Get <BlueprintFeature>("55edf82380a1c8540af6c6037d34f322").Icon;//use icon of Elven Magic(elf race feature)
            LocalizedString reservoir_name = Helpers.CreateString("ArcanistClass.Reservoir.Name");
            LocalizedString reservoir_desc = Helpers.CreateString("ArcanistClass.Reservoir.Desc");

            BlueprintAbilityResource reservoir_resource = Helpers.CreateAbilityResource("ArcanistArcaneReservoirResource",
                                                                                        "", "",
                                                                                        "b0fb97baca84839a03906195bbc06a1b",//MD5-32[ArcanistClass.ArcaneReservoir.Resource]
                                                                                        icon_AR);

            reservoir_resource.LocalizedName        = reservoir_name;
            reservoir_resource.LocalizedDescription = reservoir_desc;
            resource = reservoir_resource;
            resource.SetIncreasedByLevel(3, 1, new BlueprintCharacterClass[] { arcanist });

            var comp1 = Helpers.Create <AddAbilityResources>(a => a.Resource = resource);

            comp1.RestoreAmount = false;
            comp1.Amount        = 3;
            reservoir           = Helpers.CreateFeature("ArcanistClassArcaneReservoir",
                                                        "", "", "46c10437728d31d5b7611eb34f6cb011",//MD5-32[ArcanistClass.ArcaneReservoir]
                                                        icon_AR,
                                                        FeatureGroup.None,
                                                        comp1);
            reservoir.SetName(reservoir_name);
            reservoir.SetDescription(reservoir_desc);
            return(reservoir);
        }
Esempio n. 2
0
        static public BlueprintFeature CreateAddDCCLFeature()
        {
            if (library.BlueprintsByAssetId.ContainsKey("930d62a76ccde4a698d396b4bb932d6a"))
            {
                return(library.Get <BlueprintFeature>("930d62a76ccde4a698d396b4bb932d6a"));
            }
            if (!ArcaneExploits.loadedPre)
            {
                UnityModManagerNet.UnityModManager.Logger.Log("[Error]Arcanist: you should initiate exploits before calling ArcaneReservoir::CreateAndDCCLFeature()");
                return(null);
            }
            var icon = Helpers.GetIcon("f001c73999fb5a543a199f890108d936");//vanish
            BlueprintFeature feat = Helpers.CreateFeature(
                "ArcanistClassReservoirAddDCCLFeat",
                "",
                "",
                "930d62a76ccde4a698d396b4bb932d6a",//MD5-32[ArcanistClass.Reservoir.AddDCCLFeat]
                icon,
                FeatureGroup.None,
                Helpers.Create <AddFacts>(a => a.Facts = new BlueprintUnitFact[] { CreateAddCLAbl(), CreateAddDCAbl() })
                );

            feat.SetName(Helpers.CreateString("ArcanistClass.Reservoir.AddDCCLFeat.Name"));
            feat.SetDescription(Helpers.CreateString("ArcanistClass.Reservoir.AddDCCLFeat.Desc"));
            feat.HideInUI = true;
            return(feat);
        }
 static void createHinterlanderProficiencies()
 {
     hinterlander_proficiencies = library.CopyAndAdd <BlueprintFeature>("8c971173613282844888dc20d572cfc9", "HinterlanderProficiencies", "");//cleric
     hinterlander_proficiencies.AddComponent(Common.createAddWeaponProficiencies(WeaponCategory.Longbow));
     hinterlander_proficiencies.SetName("Hinterlander Proficiencies");
     hinterlander_proficiencies.SetDescription("A hinterlander is proficient with all simple weapons, longbows, light armor, medium armor, and shields (except tower shields).");
 }
Esempio n. 4
0
 static void CreateDeadeyeDevoteeProficiencies()
 {
     deadeyeDevoteeProficiencies = library.CopyAndAdd <BlueprintFeature>(
         "c5e479367d07d62428f2fe92f39c0341", // ranger proficiencies
         "DeadeyeDevoteeProficiencies",
         "");
     deadeyeDevoteeProficiencies.SetName("Deadeye Devotee Proficiencies");
     deadeyeDevoteeProficiencies.SetDescription("A deadeye devotee is proficient with all simple and martial weapons, light armor, medium armor, and shields");
 }
Esempio n. 5
0
        static void createRostlandBravoProficiencies()
        {
            rostland_bravo_proficiencies = library.CopyAndAdd <BlueprintFeature>("8f8c2640ffad89349883fc2e5ff2091e", //magus proficiencies
                                                                                 "RostlandBravoSwashbucklerProficiencies",
                                                                                 "12f3c40bac26460f97ec10e3e5e28035");

            rostland_bravo_proficiencies.RemoveComponents <ArcaneArmorProficiency>();
            rostland_bravo_proficiencies.AddComponent(Common.createAddWeaponProficiencies(WeaponCategory.DuelingSword));
            rostland_bravo_proficiencies.SetName("Rostland Bravo Proficiencies");
            rostland_bravo_proficiencies.SetDescription("The Rostland bravo is not proficient with bucklers.");
        }
Esempio n. 6
0
 static public BlueprintFeature Create()
 {
     if (library.BlueprintsByAssetId.ContainsKey("2bfed724fae781a0a427c598f9620a8f"))
     {
         return(library.Get <BlueprintFeature>("2bfed724fae781a0a427c598f9620a8f"));
     }
     feat = Helpers.CreateFeature("", "", "",
                                  "2bfed724fae781a0a427c598f9620a8f",//MD5-32[ArcanistClass.GreaterExploits.Feat]
                                  null,
                                  FeatureGroup.None);
     feat.SetName(Helpers.CreateString("ArcanistClass.GreaterExploits.Feat.Name"));
     feat.SetDescription(Helpers.CreateString("ArcanistClass.GreaterExploits.Feat.Desc"));
     return(feat);
 }
Esempio n. 7
0
        static void createAuraOfSelfRighteousness()
        {
            var effect_buff = library.CopyAndAdd <BlueprintBuff>("44939bb018ccac24f8e055f3eddc16f2", "AuraOfSelfRighteousnessEffectBuff", "");

            effect_buff.SetName("Aura of Self-Righteousness");
            effect_buff.SetDescription("At 17th level, a vindictive bastard gains DR 5/lawful or good and immunity to compulsion spells and spell-like abilities. Each ally within 10 feet of her gains a +4 morale bonus on saving throws against compulsion effects. Aura of self-righteousness functions only while the vindictive bastard is conscious, not if she is unconscious or dead.");
            var area = library.CopyAndAdd <BlueprintAbilityAreaEffect>("0c523f9b68ded1a4ca152f3169066a0f", "AuraOfSelfRighteousnessArea", "");

            area.ReplaceComponent <AbilityAreaEffectBuff>(a => a.Buff = effect_buff);
            var buff = library.CopyAndAdd <BlueprintBuff>("bacdf633f8ffdfd4b92bc7f2de43a1c5", "AuraOfSelfRighteousnessBuff", "");

            buff.ReplaceComponent <AddAreaEffect>(a => a.AreaEffect = area);

            aura_of_self_righteousness = library.CopyAndAdd <BlueprintFeature>("6bd4a71232014254e80726f3a3756962", "AuraOfSelfRighteousnessFeature", "");
            aura_of_self_righteousness.ReplaceComponent <AuraFeatureComponent>(a => a.Buff             = buff);
            aura_of_self_righteousness.ReplaceComponent <AddDamageResistancePhysical>(a => a.Alignment = DamageAlignment.Good | DamageAlignment.Lawful);
            aura_of_self_righteousness.SetName(effect_buff.Name);
            aura_of_self_righteousness.SetDescription(effect_buff.Description);
        }
Esempio n. 8
0
        static void createVindicativeSmite()
        {
            vindicative_smite_buff = library.CopyAndAdd <BlueprintBuff>("b6570b8cbb32eaf4ca8255d0ec3310b0", "VindicativeSmiteBuff", "");
            vindicative_smite_buff.SetName("Vindictive Smite");
            vindicative_smite_buff.RemoveComponents <IgnoreTargetDR>();

            Common.addConditionToResoundingBlow(Common.createContextConditionHasBuffFromCaster(vindicative_smite_buff));


            var vindicative_smite_allowed = Helpers.CreateBuff("VindicativeSmiteAllowedBuff",
                                                               "Vindictive Smite Allowed",
                                                               "",
                                                               "",
                                                               vindicative_smite_buff.Icon,
                                                               null);

            vindicative_smite_allowed.SetBuffFlags(BuffFlags.RemoveOnRest);


            vindicative_smite_ability = library.CopyAndAdd <BlueprintAbility>("7bb9eb2042e67bf489ccd1374423cdec", "VindicativeSmiteAbility", "");
            vindicative_smite_ability.SetName(vindicative_smite_buff.Name);
            vindicative_smite_ability.SetDescription("A vindictive bastard is particularly ruthless against those who have harmed her or her allies. Once per day as a swift action, she can smite one target within sight who has dealt hit point damage to her or an ally. She adds her Charisma modifier to her attack rolls and adds her paladin level to damage rolls against the target of her smite. In addition, while vindictive smite is in effect, the vindictive bastard gains a deflection bonus equal to her Charisma bonus (if any) to her AC against attacks by the target of the smite.\n"
                                                     + "The vindictive smite effect remains until the target of the smite is dead or the next time the vindictive bastard rests and regains her uses of this ability. At 4th level and every 3 levels thereafter, the vindictive bastard can invoke her vindictive smite one additional time per day, to a maximum of seven times per day at 19th level.");

            vindicative_smite_ability.ReplaceComponent <AbilityCasterAlignment>(Common.createAbilityTargetHasFact(false, vindicative_smite_allowed));
            vindicative_smite_ability.AddComponent(Common.createAbilityTargetHasFact(true, vindicative_smite_buff));

            var apply_buff = Common.createContextActionApplyBuff(vindicative_smite_buff, Helpers.CreateContextDuration(), is_permanent: true, dispellable: false);

            vindicative_smite_ability.ReplaceComponent <AbilityEffectRunAction>(a => a.Actions = Helpers.CreateActionList(apply_buff));

            var config     = vindicative_smite_ability.GetComponents <ContextRankConfig>().Where(c => c.IsBasedOnClassLevel).FirstOrDefault();
            var new_config = config.CreateCopy();

            Helpers.SetField(new_config, "m_Class", getVindicativeBastardArray());
            vindicative_smite_ability.ReplaceComponent(config, new_config);

            var apply_allowed = Common.createContextActionApplyBuff(vindicative_smite_allowed, Helpers.CreateContextDuration(), is_permanent: true, dispellable: false);

            GameAction trigger = apply_allowed;

            if (!test_mode)
            {
                trigger = Helpers.CreateConditional(Helpers.Create <ContextConditionIsEnemy>(), trigger);
            }

            var vindicative_smite_trigger = Helpers.CreateBuff("VindicativeSmiteTriggerBuff",
                                                               "",
                                                               "",
                                                               "",
                                                               null,
                                                               null,
                                                               Helpers.Create <NewMechanics.AddIncomingDamageTriggerOnAttacker>(c => c.Actions = Helpers.CreateActionList(trigger))
                                                               );

            vindicative_smite_trigger.SetBuffFlags(BuffFlags.HiddenInUi);

            var vindicative_smite_trigger_area = library.CopyAndAdd <BlueprintAbilityAreaEffect>("7ced0efa297bd5142ab749f6e33b112b", "VindicativeSmiteTriggerArea", "");

            vindicative_smite_trigger_area.Size = 100.Feet();
            vindicative_smite_trigger_area.ReplaceComponent <AbilityAreaEffectBuff>(a => a.Buff = vindicative_smite_trigger);

            var vindicative_smite_area_buff = library.CopyAndAdd <BlueprintBuff>("c96380f6dcac83c45acdb698ae70ffc4", "VindicativeSmiteTriggerAreaBuff", "");

            vindicative_smite_area_buff.ReplaceComponent <AddAreaEffect>(a => a.AreaEffect = vindicative_smite_trigger_area);
            smite_resource = library.Get <BlueprintAbilityResource>("b4274c5bb0bf2ad4190eb7c44859048b");//smite_evil_resource

            vindicative_smite = Helpers.CreateFeature("VindicativeSmiteFeature",
                                                      vindicative_smite_ability.Name,
                                                      vindicative_smite_ability.Description,
                                                      "",
                                                      vindicative_smite_ability.Icon,
                                                      FeatureGroup.None,
                                                      Common.createAuraFeatureComponent(vindicative_smite_area_buff),
                                                      Helpers.CreateAddAbilityResource(smite_resource),
                                                      Helpers.CreateAddFact(vindicative_smite_ability)
                                                      );

            add_vindicative_smite_use = library.CopyAndAdd <BlueprintFeature>("0f5c99ffb9c084545bbbe960b825d137", "VindicativeSmiteAdditionalUse", "");
            add_vindicative_smite_use.SetName("Vindicative Smite - Additional Use");
            add_vindicative_smite_use.SetDescription(vindicative_smite.Description);
        }
Esempio n. 9
0
        static void createMajorMagic()
        {
            var druid  = library.Get <BlueprintCharacterClass>("610d836f3a3a9ed42a4349b62f002e96");
            var spells = Helpers.wizardSpellList.SpellsByLevel[1].Spells;

            major_magic = Helpers.CreateFeatureSelection("MajorMagicRogueTalent",
                                                         "Major Magic",
                                                         "A rogue with this talent gains the ability to cast a 1st-level spell from the sorcerer/wizard spell list once per day as a spell-like ability for every 2 rogue levels she possesses. The rogue’s caster level for this ability is equal to her rogue level. The save DC for this spell is 11 + the rogue’s Intelligence modifier. A rogue must have the minor magic rogue talent and an Intelligence score of at least 11 to select this talent.",
                                                         "",
                                                         Helpers.GetIcon("4ac47ddb9fa1eaf43a1b6809980cfbd2"), //magic missile
                                                         FeatureGroup.RogueTalent,
                                                         Helpers.PrerequisiteStatValue(StatType.Intelligence, 11),
                                                         Helpers.PrerequisiteFeature(minor_magic)
                                                         );

            var classes = new BlueprintCharacterClass[] { library.Get <BlueprintCharacterClass>("299aa766dee3cbf4790da4efb8c72484"), //rogue
                                                          library.Get <BlueprintCharacterClass>("c75e0971973957d4dbad24bc7957e4fb"),
                                                          Investigator.investigator_class,
                                                          druid,                                                                       //for nature fang
                                                          Skald.skald_class,                                                           //for red tongue
                                                          library.Get <BlueprintCharacterClass>("772c83a25e2268e448e841dcd548235f"),   //bard for archaelogist
                                                          library.Get <BlueprintCharacterClass>("f1a70d9e1b0b41e49874e1fa9052a1ce") }; //inquisitor for sanctified slayer


            foreach (var s in spells)
            {
                var resource = Helpers.CreateAbilityResource("MajorMagic" + s.name + "Resource", "", "", Helpers.MergeIds("27fea41a99cd46609f8ab2283d1afce0", s.AssetGuid), null);
                resource.SetIncreasedByLevelStartPlusDivStep(0, 2, 1, 2, 1, 0, 0.0f, classes);
                BlueprintFeature feature = null;
                if (!s.HasVariants)
                {
                    var spell_like = Common.convertToSpellLike(s, "MajorMagic", classes, StatType.Intelligence, resource, no_scaling: true,
                                                               guid: Helpers.MergeIds("0e6a36ac029049c98a682f688e419f45", s.AssetGuid));
                    feature = Common.AbilityToFeatureMaybeReuseGuid(spell_like, false, Helpers.MergeIds("fb026930ab7943da96f6e17b7c778f2b", s.AssetGuid));
                    spell_like.AddComponent(Helpers.Create <NewMechanics.BindAbilitiesToClassFixedLevel>(b =>
                    {
                        b.Abilites          = new BlueprintAbility[] { spell_like };
                        b.CharacterClass    = classes[0];
                        b.AdditionalClasses = classes.Skip(1).ToArray();
                        b.Cantrip           = false;
                        b.Stat        = StatType.Intelligence;
                        b.fixed_level = 1;
                        b.Archetypes  = new BlueprintArchetype[] { Archetypes.SanctifiedSlayer.archetype, Archetypes.NatureFang.archetype };
                    }
                                                                                                         )
                                            );
                }
                else
                {
                    List <BlueprintAbility> spell_likes = new List <BlueprintAbility>();
                    foreach (var v in s.Variants)
                    {
                        spell_likes.Add(Common.convertToSpellLike(v, "MajorMagic", classes, StatType.Intelligence, resource, no_scaling: true,
                                                                  guid: Helpers.MergeIds("0e6a36ac029049c98a682f688e419f45", v.AssetGuid)));
                    }
                    var wrapper = Common.createVariantWrapper("MajorMagic" + s.name, guid: Helpers.MergeIds("0e6a36ac029049c98a682f688e419f45", s.AssetGuid), spell_likes.ToArray());
                    wrapper.SetNameDescriptionIcon(s.Name, s.Description, s.Icon);
                    feature = Common.AbilityToFeatureMaybeReuseGuid(wrapper, false, Helpers.MergeIds("3704cc05c1b64ea990ae6a2b97d35311", s.AssetGuid));
                    feature.AddComponent(Helpers.Create <NewMechanics.BindAbilitiesToClassFixedLevel>(b =>
                    {
                        b.Abilites          = spell_likes.ToArray();
                        b.CharacterClass    = classes[0];
                        b.AdditionalClasses = classes.Skip(1).ToArray();
                        b.Cantrip           = false;
                        b.Stat        = StatType.Intelligence;
                        b.fixed_level = 1;
                        b.Archetypes  = new BlueprintArchetype[] { Archetypes.SanctifiedSlayer.archetype, Archetypes.NatureFang.archetype };
                    }
                                                                                                      )
                                         );
                }
                feature.SetName("Major Magic: " + feature.Name);
                feature.Groups = new FeatureGroup[] { FeatureGroup.RogueTalent };
                feature.AddComponent(resource.CreateAddAbilityResource());
                major_magic.AllFeatures = major_magic.AllFeatures.AddToArray(feature);
            }
            addToTalentSelection(major_magic);
        }
Esempio n. 10
0
        static void createMinorMagic()
        {
            var druid  = library.Get <BlueprintCharacterClass>("610d836f3a3a9ed42a4349b62f002e96");
            var spells = Helpers.wizardSpellList.SpellsByLevel[0].Spells;

            minor_magic = Helpers.CreateFeatureSelection("MinorMagicRogueTalent",
                                                         "Minor Magic",
                                                         "A rogue with this talent gains the ability to cast a 0-level spell from the sorcerer/wizard spell list. This spell can be cast three times a day as a spell-like ability. The caster level for this ability is equal to the rogue’s level. The save DC for this spell is 10 + the rogue’s Intelligence modifier.",
                                                         "",
                                                         Helpers.GetIcon("16e23c7a8ae53cc42a93066d19766404"), //jolt
                                                         FeatureGroup.RogueTalent,
                                                         Helpers.PrerequisiteStatValue(StatType.Intelligence, 10)
                                                         );

            var classes = new BlueprintCharacterClass[] { library.Get <BlueprintCharacterClass>("299aa766dee3cbf4790da4efb8c72484"),   //rogue
                                                          library.Get <BlueprintCharacterClass>("c75e0971973957d4dbad24bc7957e4fb"),   //slayer
                                                          Investigator.investigator_class,
                                                          druid,                                                                       //for nature fang
                                                          Skald.skald_class,                                                           //skald for red tongue
                                                          library.Get <BlueprintCharacterClass>("772c83a25e2268e448e841dcd548235f"),   //bard for archaelogist
                                                          library.Get <BlueprintCharacterClass>("f1a70d9e1b0b41e49874e1fa9052a1ce") }; //inquisitor for sanctified slayer


            foreach (var s in spells)
            {
                BlueprintFeature feature = null;
                if (!s.HasVariants)
                {
                    var spell_like = Common.convertToSpellLike(s, "MinorMagic", classes, StatType.Intelligence, no_resource: true, no_scaling: true,
                                                               guid: Helpers.MergeIds("0e6a36ac029049c98a682f688e419f45", s.AssetGuid));
                    feature = Common.AbilityToFeatureMaybeReuseGuid(spell_like, false, Helpers.MergeIds("fb026930ab7943da96f6e17b7c778f2b", s.AssetGuid));
                    feature.AddComponent(Helpers.Create <BindAbilitiesToClass>(b =>
                    {
                        b.Abilites          = new BlueprintAbility[] { spell_like };
                        b.CharacterClass    = classes[0];
                        b.AdditionalClasses = classes.Skip(1).ToArray();
                        b.Cantrip           = true;
                        b.Stat       = StatType.Intelligence;
                        b.Archetypes = new BlueprintArchetype[] { Archetypes.SanctifiedSlayer.archetype, Archetypes.NatureFang.archetype };
                    }
                                                                               )
                                         );
                }
                else
                {
                    List <BlueprintAbility> spell_likes = new List <BlueprintAbility>();
                    foreach (var v in s.Variants)
                    {
                        spell_likes.Add(Common.convertToSpellLike(v, "MinorMagic", classes, StatType.Intelligence, no_resource: true, no_scaling: true,
                                                                  guid: Helpers.MergeIds("0e6a36ac029049c98a682f688e419f45", v.AssetGuid)));
                    }
                    var wrapper = Common.createVariantWrapper("MinorMagic" + s.name, Helpers.MergeIds("0e6a36ac029049c98a682f688e419f45", s.AssetGuid), spell_likes.ToArray());
                    wrapper.SetNameDescriptionIcon(s.Name, s.Description, s.Icon);
                    feature = Common.AbilityToFeatureMaybeReuseGuid(wrapper, false, Helpers.MergeIds("fb026930ab7943da96f6e17b7c778f2b", s.AssetGuid));
                    feature.AddComponent(Helpers.Create <BindAbilitiesToClass>(b =>
                    {
                        b.Abilites          = spell_likes.ToArray();
                        b.CharacterClass    = classes[0];
                        b.AdditionalClasses = classes.Skip(1).ToArray();
                        b.Cantrip           = true;
                        b.Stat       = StatType.Intelligence;
                        b.Archetypes = new BlueprintArchetype[] { Archetypes.SanctifiedSlayer.archetype, Archetypes.NatureFang.archetype };
                    }
                                                                               )
                                         );
                }
                feature.SetName("Minor Magic: " + feature.Name);
                feature.Groups          = new FeatureGroup[] { FeatureGroup.RogueTalent };
                minor_magic.AllFeatures = minor_magic.AllFeatures.AddToArray(feature);
            }
            addToTalentSelection(minor_magic);
        }
Esempio n. 11
0
        static void createStigmata()
        {
            ModifierDescriptor[] bonus_descriptors = new ModifierDescriptor[] { ModifierDescriptor.Sacred, ModifierDescriptor.Profane };
            StatType[]           stats             = new StatType[] { StatType.AC, StatType.AdditionalAttackBonus, StatType.AdditionalDamage };
            string []            stats_description = new string[] { "Armor Class Bonus", "Attack Bonus", "Damage Bonus" };

            var icon_profane = library.Get <BlueprintAbility>("a6e59e74cba46a44093babf6aec250fc").Icon; //slay living
            var icon_sacred  = library.Get <BlueprintAbility>("f6f95242abdfac346befd6f4f6222140").Icon; //slay living

            stigmata = Helpers.CreateFeature("HolyVindicatorStigmata",
                                             "Stigmata",
                                             "A vindicator willingly gives his blood in service to his faith, and is marked by scarified wounds appropriate to his deity. At 2nd level, he may stop or start the flow of blood by force of will as a standard action; at 6th level it becomes a move action, and at 10th level it becomes a swift action. Activating stigmata causes holy or unholy damage equal to half the vindicator’s class level every round. While the stigmata are bleeding, the vindicator gains a sacred bonus (if he channels positive energy) or profane bonus (if he channels negative energy) equal to half his class level. Each time he activates his stigmata, the vindicator decides if the bonus applies to attack rolls, weapon damage rolls, Armor Class, saving throws or spell penetration checks; to change what the bonus applies to, the vindicator must deactivate and reactivate his stigmata. While his stigmata are burning, the vindicator ignores blood drain and bleed damage from any other source.",
                                             "",
                                             icon_sacred,
                                             FeatureGroup.None);

            stigmata_move = library.CopyAndAdd <BlueprintFeature>(stigmata.AssetGuid, "HolyVindicatorStigmataMove", "");
            stigmata_move.SetName("Stigmata: Move Action");
            stigmata_move.AddComponent(Helpers.Create <ActivatableAbilityActionTypeModierMechanics.ModifyActivatableAbilityGroupActionType>(m =>
                                                                                                                                            { m.group = ActivatableAbilityGroupExtension.Stigmata.ToActivatableAbilityGroup();
                                                                                                                                              m.action = CommandType.Move; }
                                                                                                                                            )
                                       );

            stigmata_swift = library.CopyAndAdd <BlueprintFeature>(stigmata.AssetGuid, "HolyVindicatorStigmataSwift", "");
            stigmata_swift.AddComponent(Common.createRemoveFeatureOnApply(stigmata_move));
            stigmata_swift.SetName("Stigmata: Swift Action");
            stigmata_swift.AddComponent(Helpers.Create <ActivatableAbilityActionTypeModierMechanics.ModifyActivatableAbilityGroupActionType>(m =>
            {
                m.group  = ActivatableAbilityGroupExtension.Stigmata.ToActivatableAbilityGroup();
                m.action = CommandType.Swift;
            }
                                                                                                                                             )
                                        );



            var bleed_immunity = Common.createBuffDescriptorImmunity(SpellDescriptor.Bleed);

            foreach (var bonus_descriptor in bonus_descriptors)
            {
                var icon                = bonus_descriptor == ModifierDescriptor.Sacred ? icon_sacred : icon_profane;
                var buffs               = new List <BlueprintBuff>();
                var dmg_type            = bonus_descriptor == ModifierDescriptor.Sacred ? DamageEnergyType.Holy : DamageEnergyType.Unholy;
                var add_context_actions = Helpers.CreateAddFactContextActions(Common.createContextActionRemoveBuffsByDescriptor(SpellDescriptor.Bleed),
                                                                              null,
                                                                              Helpers.CreateActionDealDamage(dmg_type,
                                                                                                             Helpers.CreateContextDiceValue(DiceType.Zero, bonus: Helpers.CreateContextValue(AbilityRankType.StatBonus))
                                                                                                             )
                                                                              );
                var context_rank_config = Helpers.CreateContextRankConfig(baseValueType: ContextRankBaseValueType.ClassLevel, classes: getHolyVindicatorArray(),
                                                                          type: AbilityRankType.StatBonus, progression: ContextRankProgression.Div2);

                for (int i = 0; i < stats.Length; i++)
                {
                    var buff = Helpers.CreateBuff(bonus_descriptor.ToString() + "Stigmata" + stats[i].ToString() + "Buff",
                                                  $"{bonus_descriptor.ToString()} Stigmata: {stats_description[i]}",
                                                  stigmata.Description,
                                                  "",
                                                  icon,
                                                  null,
                                                  add_context_actions,
                                                  bleed_immunity,
                                                  Helpers.CreateAddContextStatBonus(stats[i], bonus_descriptor, rankType: AbilityRankType.StatBonus),
                                                  context_rank_config
                                                  );
                    buffs.Add(buff);
                }

                var saves_buff = Helpers.CreateBuff(bonus_descriptor.ToString() + "Stigmata" + "SavesBuff",
                                                    $"{bonus_descriptor.ToString()} Stigmata: Saving Throws Bonus",
                                                    buffs[0].Description,
                                                    "",
                                                    icon,
                                                    null,
                                                    Helpers.CreateAddContextStatBonus(StatType.SaveFortitude, bonus_descriptor, rankType: AbilityRankType.StatBonus),
                                                    Helpers.CreateAddContextStatBonus(StatType.SaveReflex, bonus_descriptor, rankType: AbilityRankType.StatBonus),
                                                    Helpers.CreateAddContextStatBonus(StatType.SaveWill, bonus_descriptor, rankType: AbilityRankType.StatBonus),
                                                    context_rank_config
                                                    );
                buffs.Add(saves_buff);
                var spell_penetration_buff = Helpers.CreateBuff(bonus_descriptor.ToString() + "Stigmata" + "SpellPenetrationBuff",
                                                                $"{bonus_descriptor.ToString()} Stigmata: Caster Level Check Bonus",
                                                                buffs[0].Description,
                                                                "",
                                                                icon,
                                                                null,
                                                                Helpers.Create <NewMechanics.CasterLevelCheckBonus>(s => s.Value = Helpers.CreateContextValue(AbilityRankType.StatBonus)),
                                                                context_rank_config
                                                                );
                buffs.Add(spell_penetration_buff);

                stigmata_buffs.Add(bonus_descriptor, buffs);

                stigmata_abilities.Add(bonus_descriptor, new List <BlueprintActivatableAbility>());
                foreach (var b in buffs)
                {
                    var ability = Helpers.CreateActivatableAbility(b.name.Replace("Buff", "ActivatableAbility"),
                                                                   b.Name,
                                                                   b.Description,
                                                                   "",
                                                                   icon,
                                                                   b,
                                                                   AbilityActivationType.Immediately,
                                                                   CommandType.Standard,
                                                                   null
                                                                   );

                    ability.Group = ActivatableAbilityGroupExtension.Stigmata.ToActivatableAbilityGroup();
                    ability.DeactivateIfCombatEnded      = !test_mode;
                    ability.DeactivateIfOwnerDisabled    = true;
                    ability.DeactivateIfOwnerUnconscious = true;
                    stigmata_abilities[bonus_descriptor].Add(ability);
                }

                var add_stigmata = Helpers.CreateFeature($"HolyVindicator{bonus_descriptor.ToString()}StigmataFeature",
                                                         "",
                                                         "",
                                                         "",
                                                         null,
                                                         FeatureGroup.None,
                                                         Helpers.CreateAddFacts(stigmata_abilities[bonus_descriptor].ToArray())
                                                         );
                add_stigmata.HideInUI = true;

                stigmata.AddComponent(Helpers.Create <NewMechanics.AddFeatureIfHasFactsFromList>(a => { a.Feature = add_stigmata; a.CheckedFacts = new BlueprintUnitFact[0]; }));
            }

            ChannelEnergyEngine.registerStigmata(stigmata);
        }
Esempio n. 12
0
 static void createHolyVindicatorProficiencies()
 {
     holy_vindicator_proficiencies = library.CopyAndAdd <BlueprintFeature>("b10ff88c03308b649b50c31611c2fefb", "HolyVindicatorProficiencies", "");//paladin
     holy_vindicator_proficiencies.SetName("Holy Vindicator Proficiencies");
     holy_vindicator_proficiencies.SetDescription("A vindicator is proficient with all simple and martial weapons and all armor and shields (except tower shields).");
 }
Esempio n. 13
0
        static public BlueprintFeature Create()
        {
            MagicSupremancyBuffComp comp = Helpers.Create <MagicSupremancyBuffComp>();

            comp.resource = ArcaneReservoir.resource;
            buff          = Helpers.CreateBuff("ArcanistClassMagicSupremancyBuff", "", "",
                                               "d4a2fc38efec094263696cb8342bd274",//MD5-32[ArcanistClass.MagaicSupremancy.Buff]
                                               IconSet.tsunami,
                                               null,
                                               comp);
            buff.SetName(Helpers.CreateString("ArcanistClass.MagaicSupremancy.Buff.Name"));
            buff.SetDescription(Helpers.CreateString("ArcanistClass.MagaicSupremancy.Buff.Desc"));
            //When buff finds the first spell to apply, add buff2 to caster as a flag
            buff2 = Helpers.CreateBuff("ArcanistClassMagicSupremancyBuff2", "", "",
                                       "b1e2b39dd4ecb343322098b3403d11df",//MD5-32[ArcanistClass.MagaicSupremancy.Buff_FindProperSpell]
                                       IconSet.tsunami, null);
            var comp_res = Helpers.Create <AbilityResourceLogic>();

            comp_res.Amount           = 1;
            comp_res.RequiredResource = ArcaneReservoir.resource;
            comp_res.IsSpendResource  = true;
            comp_res.CostIsCustom     = false;

            var ablEffectComp       = Helpers.Create <AbilityEffectRunAction>();
            var ablEffectCompAction = Helpers.Create <ContextActionApplyBuff>();

            ablEffectCompAction.Buff            = buff;
            ablEffectCompAction.Permanent       = false;
            ablEffectCompAction.DurationValue   = PresetDurations.threeRounds;
            ablEffectCompAction.IsFromSpell     = false;
            ablEffectCompAction.IsNotDispelable = false;
            ablEffectCompAction.ToCaster        = false;
            ablEffectCompAction.AsChild         = true;
            ablEffectComp.Actions = new ActionList {
                Actions = new GameAction[] { null, ablEffectCompAction }
            };

            var abl = Helpers.CreateAbility("ArcanistClassMagicSupremancyAbl", "", "",
                                            "fb2a3383e82cbc6ad9c13ac0bca46723",//MD5-32[ArcanistClass.MagicSupremancy.Abl]
                                            IconSet.tsunami,
                                            AbilityType.Supernatural,
                                            UnitCommand.CommandType.Free,
                                            AbilityRange.Personal,
                                            "", "",
                                            comp_res,
                                            ablEffectComp);

            abl.SetName(Helpers.CreateString("ArcanistClass.MagicSupremancy.Abl.Name"));
            abl.SetDescription(Helpers.CreateString("ArcanistClass.MagicSupremancy.Abl.Desc"));
            abl.LocalizedDuration    = Helpers.CreateString("ArcaneTide.ThreeRounds");
            abl.LocalizedSavingThrow = Helpers.CreateString("ArcaneTide.NoSave");

            feat = Helpers.CreateFeature("ArcanistClassMagicSupremancyFeat", "", "",
                                         "e9438c7efd1c9df62a041ba6e360a5c1",//MD5-32[ArcanistClass.MagicSupremancy.Feat]
                                         IconSet.tsunami,
                                         FeatureGroup.None,
                                         Helpers.Create <AddFacts>(a => a.Facts = new BlueprintUnitFact[] { abl }));
            feat.SetName(Helpers.CreateString("ArcanistClass.MagicSupremancy.Feat.Name"));
            feat.SetDescription(Helpers.CreateString("ArcanistClass.MagicSupremancy.Feat.Desc"));
            return(feat);
        }
        static void createMinorMagic()
        {
            var spells = Helpers.wizardSpellList.SpellsByLevel[0].Spells;

            minor_magic = Helpers.CreateFeatureSelection("MinorMagicRogueTalent",
                                                         "Minor Magic",
                                                         "A rogue with this talent gains the ability to cast a 0-level spell from the sorcerer/wizard spell list. This spell can be cast three times a day as a spell-like ability. The caster level for this ability is equal to the rogue’s level. The save DC for this spell is 10 + the rogue’s Intelligence modifier.",
                                                         "",
                                                         Helpers.GetIcon("16e23c7a8ae53cc42a93066d19766404"), //jolt
                                                         FeatureGroup.RogueTalent,
                                                         Helpers.PrerequisiteStatValue(StatType.Intelligence, 10)
                                                         );

            var classes = new BlueprintCharacterClass[] { library.Get <BlueprintCharacterClass>("299aa766dee3cbf4790da4efb8c72484"), //rogue
                                                          library.Get <BlueprintCharacterClass>("c75e0971973957d4dbad24bc7957e4fb"), //slayer
                                                          Investigator.investigator_class };


            foreach (var s in spells)
            {
                BlueprintFeature feature = null;
                if (!s.HasVariants)
                {
                    var spell_like = Common.convertToSpellLike(s, "MinorMagic", classes, StatType.Intelligence, no_resource: true, no_scaling: true,
                                                               guid: Helpers.MergeIds("0e6a36ac029049c98a682f688e419f45", s.AssetGuid));
                    feature = Common.AbilityToFeature(spell_like, false);
                    feature.AddComponent(Helpers.Create <BindAbilitiesToClass>(b =>
                    {
                        b.Abilites          = new BlueprintAbility[] { spell_like };
                        b.CharacterClass    = classes[0];
                        b.AdditionalClasses = classes.Skip(1).ToArray();
                        b.Cantrip           = true;
                        b.Stat = StatType.Intelligence;
                    }
                                                                               )
                                         );
                }
                else
                {
                    List <BlueprintAbility> spell_likes = new List <BlueprintAbility>();
                    foreach (var v in s.Variants)
                    {
                        spell_likes.Add(Common.convertToSpellLike(v, "MinorMagic", classes, StatType.Intelligence, no_resource: true, no_scaling: true,
                                                                  guid: Helpers.MergeIds("0e6a36ac029049c98a682f688e419f45", v.AssetGuid)));
                    }
                    var wrapper = Common.createVariantWrapper("MinorMagic" + s.name, Helpers.MergeIds("0e6a36ac029049c98a682f688e419f45", s.AssetGuid), spell_likes.ToArray());
                    wrapper.SetNameDescriptionIcon(s.Name, s.Description, s.Icon);
                    feature = Common.AbilityToFeature(wrapper, false);
                    feature.AddComponent(Helpers.Create <BindAbilitiesToClass>(b =>
                    {
                        b.Abilites          = spell_likes.ToArray();
                        b.CharacterClass    = classes[0];
                        b.AdditionalClasses = classes.Skip(1).ToArray();
                        b.Cantrip           = true;
                        b.Stat = StatType.Intelligence;
                    }
                                                                               )
                                         );
                }
                feature.SetName("Minor Magic: " + feature.Name);
                feature.Groups          = new FeatureGroup[] { FeatureGroup.RogueTalent };
                minor_magic.AllFeatures = minor_magic.AllFeatures.AddToArray(feature);
            }
            addToTalentSelection(minor_magic);
        }
Esempio n. 15
0
        static public BlueprintFeature Create()
        {
            if (ArcaneReservoir.resource == null)
            {
                UnityModManagerNet.UnityModManager.Logger.Log("[Arcanist ConsumeSpell]Arcane Reservoir Pool must be created before ConsumeSpells::Create()");
                return(null);
            }
            if (library.BlueprintsByAssetId.ContainsKey("6e48c034817eabd99df991e0435025ed"))
            {
                return(library.Get <BlueprintFeature>("6e48c034817eabd99df991e0435025ed"));
            }
            consume_resource = Helpers.CreateAbilityResource("ArcanistClassConsumeSpellAblResource", "", "",
                                                             "56e3d1e34251f5c628ae08e78dbf0360",//MD5-32[ArcanistClass.ConsumeSpell.AblResource]
                                                             IconSet.vanish_icon);
            consume_resource.SetIncreasedByStat(3, StatType.Charisma);

            var variants = new List <BlueprintAbility>();

            for (int i = 1; i <= 9; i++)
            {
                int least_arcanist_level = (i == 1) ? 1 : 2 * i;
                AbilityRequirementClassSpellLevel comp_pre = Helpers.Create <AbilityRequirementClassSpellLevel>();
                comp_pre.characterClass     = arcanist;
                comp_pre.RequiredSpellLevel = i;

                AbilityResourceLogic comp_res = Helpers.Create <AbilityResourceLogic>();
                comp_res.Amount           = 1;
                comp_res.IsSpendResource  = true;
                comp_res.RequiredResource = consume_resource;
                comp_res.CostIsCustom     = false;

                AbilityEffectRunAction         comp_act = Helpers.Create <AbilityEffectRunAction>();
                ConsumeSpellForReservoirAction act      = Helpers.Create <ConsumeSpellForReservoirAction>();
                act.resource           = ArcaneReservoir.resource;
                act.spellLevel         = i;
                act.blueprintSpellbook = arcanist.Spellbook;
                comp_act.Actions       = new ActionList {
                    Actions = new GameAction[] { act }
                };

                BlueprintAbility abl_i = Helpers.CreateAbility($"ArcanistClassConsumeSpellLevel{i}Abl", "", "",
                                                               OtherUtils.GetMd5($"ArcanistClassConsumeSpellLevel{i}Abl"), IconSet.magus_spellrecall, AbilityType.Supernatural,
                                                               UnitCommand.CommandType.Move, AbilityRange.Personal,
                                                               "", "", comp_pre, comp_res, comp_act);
                abl_i.SetName(Helpers.CreateString($"ArcanistClass.ConsumeSpell.Level{i}.Abl.Name"));
                abl_i.SetDescription(Helpers.CreateString($"ArcanistClass.ConsumeSpell.Level{i}.Abl.Desc"));
                abl_i.LocalizedDuration    = Helpers.CreateString("ArcaneTide.Instant");
                abl_i.LocalizedSavingThrow = Helpers.CreateString("ArcaneTide.NoSave");
                variants.Add(abl_i);
                ablList.Add(abl_i);
            }

            AbilityResourceLogic comp_res0 = Helpers.Create <AbilityResourceLogic>();

            comp_res0.Amount           = 1;
            comp_res0.IsSpendResource  = true;
            comp_res0.RequiredResource = consume_resource;
            comp_res0.CostIsCustom     = false;

            abl = Helpers.CreateAbility("ArcanistClassConsumeSpellAbl", "", "",
                                        "33bec6603df0f7cfe904525e9a44432e",//MD5-32[ArcanistClass.ConsumeSpells.Abl]
                                        IconSet.magus_spellrecall,
                                        AbilityType.Supernatural,
                                        UnitCommand.CommandType.Move,
                                        AbilityRange.Personal,
                                        "",
                                        "",
                                        comp_res0);
            abl.SetName(Helpers.CreateString("ArcanistClass.ConsumeSpells.Abl.Name"));
            abl.SetDescription(Helpers.CreateString("ArcanistClass.ConsumeSpells.Abl.Desc"));
            abl.LocalizedDuration    = Helpers.CreateString("ArcaneTide.Instant");
            abl.LocalizedSavingThrow = Helpers.CreateString("ArcaneTide.NoSave");
            abl.AddComponent(abl.CreateAbilityVariants(variants.ToArray <BlueprintAbility>()));
            ablList.Add(abl);
            feat = Helpers.CreateFeature("ArcanistClassConsumeSpellsFeat", "", "",
                                         "6e48c034817eabd99df991e0435025ed",//MD5-32[ArcanistClass.ConsumeSpells.Feat]
                                         IconSet.magus_spellrecall,
                                         FeatureGroup.None,
                                         Helpers.Create <AddAbilityResources>(a => a.Resource = consume_resource),
                                         Helpers.Create <AddFacts>(a => a.Facts = new BlueprintUnitFact[] { abl }));
            feat.SetName(Helpers.CreateString("ArcanistClass.ConsumeSpells.Name"));
            feat.SetDescription(Helpers.CreateString("ArcanistClass.ConsumeSpells.Desc"));
            return(feat);
        }
Esempio n. 16
0
        static void createSolarInvocation()
        {
            solar_invocation_resource = Helpers.CreateAbilityResource("SolarInvocationResource", "", "", "", null);
            solar_invocation_resource.SetIncreasedByLevel(0, 2, getDawnflowerAcnchoriteArray());
            solar_invocation_resource.SetIncreasedByStat(0, StatType.Charisma);

            bask_in_radiance = Helpers.CreateFeature("BaskInRadianceFeature",
                                                     "Bask in Radiance",
                                                     "At 3rd level, when a Dawnflower anchorite uses his solar invocation ability, he can designate any number of allies within 30 feet to gain the bonuses granted by solar invocation for as long as he maintains the ability.",
                                                     "",
                                                     Helpers.GetIcon("0d657aa811b310e4bbd8586e60156a2d"), //cure critical wounds
                                                     FeatureGroup.None
                                                     );

            var icon = LoadIcons.Image2Sprite.Create(@"AbilityIcons/FontOfSpiritMagic.png");

            var effect_buff = Helpers.CreateBuff("SolarInvocationEffectBuff",
                                                 "Solar Invocation",
                                                 "A Dawnflower anchorite can harness the sun’s life-giving warmth to protect the innocent and smite the wicked. At 1st level, he can invoke the sun as a standard action, granting him a +1 competence bonus on attack rolls and damage rolls against evil creatures and adding 1 to the DC of his spells and spell-like abilities against evil creatures. The bonus on attack rolls and damage rolls increases to +2 at 5th level and +3 at 9th level. If a Dawnflower anchorite has an animal companion, the companion also gains the competence bonus on attack and damage rolls while this ability is active.\n"
                                                 + "A Dawnflower anchorite can invoke the sun for a number of rounds per day equal to twice his Dawnflower anchorite class level + his Charisma modifier. Maintaining this ability on subsequent rounds is a free action. These bonuses apply only when the Dawnflower anchorite is standing in an outdoor area.\n",
                                                 "",
                                                 icon,
                                                 null,
                                                 Helpers.Create <NewMechanics.AttackBonusAgainstAlignment>(a => { a.value = Helpers.CreateContextValue(AbilityRankType.Default); a.descriptor = ModifierDescriptor.Competence; a.alignment = AlignmentComponent.Evil; }),
                                                 Helpers.Create <NewMechanics.SpellsDCBonusAgainstAlignment>(a => { a.value = Helpers.CreateContextValue(AbilityRankType.StatBonus); a.descriptor = ModifierDescriptor.UntypedStackable; a.alignment = AlignmentComponent.Evil; }),
                                                 Helpers.Create <NewMechanics.DamageBonusAgainstAlignment>(a => { a.value = Helpers.CreateContextValue(AbilityRankType.Default); a.descriptor = ModifierDescriptor.Competence; a.alignment = AlignmentComponent.Evil; })
                                                 );

            var defense_effect_buff = Helpers.CreateBuff("SolarDefenseEffectBuff",
                                                         "Solar Defense",
                                                         "While using solar invocation, the Dawnflower anchorite adds his competence bonus on attack rolls to his Armor Class as a dodge bonus and to Reflex saving throws as a sacred bonus against evil creatures. The Dawnflower anchorite can select this credence twice—the second time he does so, the bonus to Armor Class and on Ref lex saves also applies to any companions who gain bonuses from the Dawnflower anchorite’s solar invocation.",
                                                         "",
                                                         Helpers.GetIcon("62888999171921e4dafb46de83f4d67d"), //shield of dawn
                                                         null,
                                                         Helpers.Create <NewMechanics.ArmorClassBonusAgainstAlignment>(a => { a.value = Helpers.CreateContextValue(AbilityRankType.Default); a.descriptor = ModifierDescriptor.Dodge; a.alignment = AlignmentComponent.Evil; }),
                                                         Helpers.Create <NewMechanics.ContextSavingThrowBonusAgainstAlignment>(a => { a.value = Helpers.CreateContextValue(AbilityRankType.Default); a.descriptor = ModifierDescriptor.Sacred; a.alignment = AlignmentComponent.Evil; a.save_type = SavingThrowType.Reflex; })
                                                         );

            solar_defense = Helpers.CreateFeature("SolarDefenseFeature",
                                                  "Solar Defense I",
                                                  defense_effect_buff.Description,
                                                  "",
                                                  defense_effect_buff.Icon,
                                                  FeatureGroup.None
                                                  );

            solar_defense2 = Helpers.CreateFeature("SolarDefense2Feature",
                                                   "Solar Defense II",
                                                   defense_effect_buff.Description,
                                                   "",
                                                   defense_effect_buff.Icon,
                                                   FeatureGroup.None,
                                                   Helpers.PrerequisiteFeature(solar_defense)
                                                   );

            var flaming            = library.Get <BlueprintWeaponEnchantment>("30f90becaaac51f41bf56641966c4121");
            var solar_weapons_buff = Helpers.CreateBuff("SolarWeaponsEffectBuff",
                                                        "Solar Weapons",
                                                        "While using solar invocation, the Dawnflower anchorite grants the flaming weapon special ability to one weapon of each creature affected by the Dawnflower anchorite’s solar invocation.",
                                                        "",
                                                        LoadIcons.Image2Sprite.Create(@"AbilityIcons/FlameBlade.png"),
                                                        null,
                                                        Common.createBuffContextEnchantPrimaryHandWeapon(1, false, true, new BlueprintWeaponEnchantment[] { flaming })
                                                        );

            solar_weapons = Helpers.CreateFeature("SolarWeaponsFeature",
                                                  solar_weapons_buff.Name,
                                                  solar_weapons_buff.Description,
                                                  "",
                                                  solar_weapons_buff.Icon,
                                                  FeatureGroup.None
                                                  );

            var apply_solar_defense = Common.createContextActionApplyBuff(defense_effect_buff, Helpers.CreateContextDuration(), false, true, true, false);
            var apply_solar_weapons = Common.createContextActionApplyBuff(solar_weapons_buff, Helpers.CreateContextDuration(), false, true, true, false);

            Common.addContextActionApplyBuffOnConditionToActivatedAbilityBuffNoRemove(effect_buff,
                                                                                      Helpers.CreateConditional(Common.createContextConditionCasterHasFact(solar_weapons),
                                                                                                                apply_solar_weapons
                                                                                                                )
                                                                                      );
            Common.addContextActionApplyBuffOnConditionToActivatedAbilityBuffNoRemove(effect_buff,
                                                                                      Helpers.CreateConditional(Common.createContextConditionCasterHasFact(solar_defense),
                                                                                                                Helpers.CreateConditional(Helpers.CreateConditionsCheckerOr(Common.createContextConditionIsCaster(),
                                                                                                                                                                            Common.createContextConditionCasterHasFact(solar_defense2)
                                                                                                                                                                            ),
                                                                                                                                          apply_solar_defense)
                                                                                                                )
                                                                                      );
            var toggle = Common.createToggleAreaEffect(effect_buff, 30.Feet(),
                                                       Helpers.CreateConditionsCheckerOr(Common.createContextConditionIsCaster(),
                                                                                         Helpers.Create <CompanionMechanics.ContextConditionIsPet>(),
                                                                                         Helpers.Create <NewMechanics.ContextConditionIsAllyAndCasterHasFact>(c => c.fact = bask_in_radiance)
                                                                                         ),
                                                       AbilityActivationType.WithUnitCommand,
                                                       UnitCommand.CommandType.Standard,
                                                       Common.createPrefabLink("dfc59904273f7ee49ab00e5278d86e16"),
                                                       Common.createPrefabLink("9353083f430e5a44a8e9d6e26faec248")
                                                       );

            toggle.AddComponents(solar_invocation_resource.CreateActivatableResourceLogic(ResourceSpendType.NewRound));
            toggle.DeactivateIfCombatEnded   = true;
            toggle.DeactivateIfOwnerDisabled = true;
            toggle.Buff.SetBuffFlags(BuffFlags.HiddenInUi);
            toggle.Group     = ActivatableAbilityGroupExtension.SolarInvocation.ToActivatableAbilityGroup();
            solar_invocation = Common.ActivatableAbilityToFeature(toggle, false);
            solar_invocation.AddComponents(solar_invocation_resource.CreateAddAbilityResource());

            solar_invocation2 = SaveGameFix.createDummyFeature("SolarInvocation2Feature", "");
            solar_invocation3 = SaveGameFix.createDummyFeature("SolarInvocation3Feature", "");
            var solar_invocation4 = SaveGameFix.createDummyFeature("SolarInvocation4Feature", "");

            solar_invocation2.HideInCharacterSheetAndLevelUp = true;
            solar_invocation2.HideInUI = true;
            solar_invocation3.HideInCharacterSheetAndLevelUp = true;
            solar_invocation3.HideInUI = true;
            solar_invocation4.HideInCharacterSheetAndLevelUp = true;
            solar_invocation4.HideInUI = true;
            solar_invocation.AddComponents(Helpers.CreateAddFeatureOnClassLevel(solar_invocation2, 5, getDawnflowerAcnchoriteArray()),
                                           Helpers.CreateAddFeatureOnClassLevel(solar_invocation3, 9, getDawnflowerAcnchoriteArray()));

            //add scaling to buffs and dawnflower invocation

            var dawnflower_invocation_buff = Helpers.CreateBuff("DawnflowerInvocationBuff",
                                                                "Dawnflower Invocation",
                                                                "At 10th level, a Dawnflower anchorite is able to, once per day, use his solar invocation ability for 1 minute. The Dawnflower anchorite can also use this ability indoors or underground. While using Dawnflower invocation, all bonuses gained from solar invocation increase by 1. Using this ability doesn’t cost rounds per day of solar invocation.",
                                                                "",
                                                                Helpers.GetIcon("e67efd8c84f69d24ab472c9f546fff7e"),
                                                                null,
                                                                Helpers.CreateAddFactContextActions(activated: Common.createContextActionApplyBuff(toggle.Buff, Helpers.CreateContextDuration(), false, true, true, false)),
                                                                Helpers.CreateAddFact(solar_invocation4)
                                                                );

            var dawnflower_invocation_resource = Helpers.CreateAbilityResource("DawnflowerInvocationResource", "", "", "", null);

            dawnflower_invocation_resource.SetFixedResource(1);
            var dawnflower_invocation_ability = Helpers.CreateAbility("DawnflowerInvocationAbility",
                                                                      dawnflower_invocation_buff.Name,
                                                                      dawnflower_invocation_buff.Description,
                                                                      "",
                                                                      dawnflower_invocation_buff.Icon,
                                                                      AbilityType.Supernatural,
                                                                      CommandType.Swift,
                                                                      AbilityRange.Personal,
                                                                      Helpers.oneMinuteDuration,
                                                                      "",
                                                                      Helpers.CreateRunActions(Common.createContextActionApplyBuff(dawnflower_invocation_buff, Helpers.CreateContextDuration(1, DurationRate.Minutes), dispellable: false)),
                                                                      Common.createAbilitySpawnFx("52d413df527f9fa4a8cf5391fd593edd", anchor: AbilitySpawnFxAnchor.SelectedTarget, position_anchor: AbilitySpawnFxAnchor.None, orientation_anchor: AbilitySpawnFxAnchor.None),
                                                                      dawnflower_invocation_resource.CreateResourceLogic()
                                                                      );

            dawnflower_invocation_ability.setMiscAbilityParametersSelfOnly();
            dawnflower_invocation = Common.AbilityToFeature(dawnflower_invocation_ability, false);
            dawnflower_invocation.AddComponent(dawnflower_invocation_resource.CreateAddAbilityResource());

            toggle.AddComponent(Common.createActivatableAbilityRestrictionHasFact(dawnflower_invocation_buff, not: true));
            var config = Helpers.CreateContextRankConfig(ContextRankBaseValueType.FeatureList,
                                                         featureList: new BlueprintFeature[] { solar_invocation, solar_invocation2, solar_invocation3, solar_invocation4 }
                                                         );
            var config2 = Helpers.CreateContextRankConfig(ContextRankBaseValueType.FeatureList, type: AbilityRankType.StatBonus,
                                                          featureList: new BlueprintFeature[] { solar_invocation, solar_invocation4 }
                                                          );

            effect_buff.AddComponents(config, config2);
            defense_effect_buff.AddComponent(config);

            solar_invocation_move_action = Helpers.CreateFeature("SolarInvocationMoveActionFeature",
                                                                 "Solar Invocation: Move Action",
                                                                 "At 5th level, a Dawnflower anchorite can invoke the sun as a move action instead of a standard action. At 10th level, he can invoke the sun as a swift action.",
                                                                 "",
                                                                 Helpers.GetIcon("03a9630394d10164a9410882d31572f0"), //aid
                                                                 FeatureGroup.None,
                                                                 Helpers.Create <ActivatableAbilityActionTypeModierMechanics.ModifyActivatableAbilityGroupActionType>(m =>
            {
                m.group  = ActivatableAbilityGroupExtension.SolarInvocation.ToActivatableAbilityGroup();
                m.action = CommandType.Move;
            }
                                                                                                                                                                      )
                                                                 );
            solar_invocation_swift_action = library.CopyAndAdd(solar_invocation_move_action, "SolarInvocationSwiftActionFeature", "");
            solar_invocation_swift_action.SetName("Solar Invocation: Swift Action");
            solar_invocation_swift_action.ReplaceComponent <ActivatableAbilityActionTypeModierMechanics.ModifyActivatableAbilityGroupActionType>(m => m.action = CommandType.Swift);

            divine_light = Helpers.CreateFeature("DivineLightFeature",
                                                 "Divine Light",
                                                 "The Dawnflower anchorite can use solar invocation indoors or underground. He can use solar invocation 2 additional rounds per day.",
                                                 "",
                                                 Helpers.GetIcon("be2062d6d85f4634ea4f26e9e858c3b8"), //cleanse
                                                 FeatureGroup.None,
                                                 Helpers.Create <IncreaseResourceAmount>(i => { i.Resource = solar_invocation_resource; i.Value = 2; })
                                                 );

            toggle.AddComponent(Helpers.Create <NewMechanics.OutdoorsUnlessHasFact>(o => o.fact = divine_light));
        }
        static void createMajorMagic()
        {
            var spells = Helpers.wizardSpellList.SpellsByLevel[1].Spells;

            major_magic = Helpers.CreateFeatureSelection("MajorMagicRogueTalent",
                                                         "Major Magic",
                                                         "A rogue with this talent gains the ability to cast a 1st-level spell from the sorcerer/wizard spell list once per day as a spell-like ability for every 2 rogue levels she possesses. The rogue’s caster level for this ability is equal to her rogue level. The save DC for this spell is 11 + the rogue’s Intelligence modifier. A rogue must have the minor magic rogue talent and an Intelligence score of at least 11 to select this talent.",
                                                         "",
                                                         Helpers.GetIcon("4ac47ddb9fa1eaf43a1b6809980cfbd2"), //magic missile
                                                         FeatureGroup.RogueTalent,
                                                         Helpers.PrerequisiteStatValue(StatType.Intelligence, 11),
                                                         Helpers.PrerequisiteFeature(minor_magic)
                                                         );

            var classes = new BlueprintCharacterClass[] { library.Get <BlueprintCharacterClass>("299aa766dee3cbf4790da4efb8c72484"), //rogue
                                                          library.Get <BlueprintCharacterClass>("c75e0971973957d4dbad24bc7957e4fb"),
                                                          Investigator.investigator_class };


            foreach (var s in spells)
            {
                var resource = Helpers.CreateAbilityResource("MajorMagic" + s.name + "Resource", "", "", Helpers.MergeIds("27fea41a99cd46609f8ab2283d1afce0", s.AssetGuid), null);
                resource.SetIncreasedByLevelStartPlusDivStep(0, 2, 1, 2, 1, 0, 0.0f, classes);
                BlueprintFeature feature = null;
                if (!s.HasVariants)
                {
                    var spell_like = Common.convertToSpellLike(s, "MajorMagic", classes, StatType.Intelligence, resource, no_scaling: true,
                                                               guid: Helpers.MergeIds("0e6a36ac029049c98a682f688e419f45", s.AssetGuid));
                    feature = Common.AbilityToFeature(spell_like, false);
                    spell_like.AddComponent(Helpers.Create <NewMechanics.BindAbilitiesToClassFixedLevel>(b =>
                    {
                        b.Abilites          = new BlueprintAbility[] { spell_like };
                        b.CharacterClass    = classes[0];
                        b.AdditionalClasses = classes.Skip(1).ToArray();
                        b.Cantrip           = false;
                        b.Stat        = StatType.Intelligence;
                        b.fixed_level = 1;
                    }
                                                                                                         )
                                            );
                }
                else
                {
                    List <BlueprintAbility> spell_likes = new List <BlueprintAbility>();
                    foreach (var v in s.Variants)
                    {
                        spell_likes.Add(Common.convertToSpellLike(v, "MajorMagic", classes, StatType.Intelligence, resource, no_scaling: true,
                                                                  guid: Helpers.MergeIds("0e6a36ac029049c98a682f688e419f45", v.AssetGuid)));
                    }
                    var wrapper = Common.createVariantWrapper("MajorMagic" + s.name, guid: Helpers.MergeIds("0e6a36ac029049c98a682f688e419f45", s.AssetGuid), spell_likes.ToArray());
                    wrapper.SetNameDescriptionIcon(s.Name, s.Description, s.Icon);
                    feature = Common.AbilityToFeature(wrapper, false);
                    feature.AddComponent(Helpers.Create <NewMechanics.BindAbilitiesToClassFixedLevel>(b =>
                    {
                        b.Abilites          = spell_likes.ToArray();
                        b.CharacterClass    = classes[0];
                        b.AdditionalClasses = classes.Skip(1).ToArray();
                        b.Cantrip           = false;
                        b.Stat        = StatType.Intelligence;
                        b.fixed_level = 1;
                    }
                                                                                                      )
                                         );
                }
                feature.SetName("Major Magic: " + feature.Name);
                feature.Groups = new FeatureGroup[] { FeatureGroup.RogueTalent };
                feature.AddComponent(resource.CreateAddAbilityResource());
                major_magic.AllFeatures = major_magic.AllFeatures.AddToArray(feature);
            }
            addToTalentSelection(major_magic);
        }