예제 #1
0
        static void createTerrefyingHowl()
        {
            var dazzling_display = library.Get <BlueprintAbility>("5f3126d4120b2b244a95cb2ec23d69fb");

            terrifying_howl_ability = library.CopyAndAdd <BlueprintAbility>("08cb5f4c3b2695e44971bf5c45205df0", "TerrifyingHowlAbility", "");
            terrifying_howl_ability.SetName("Terrifying Howl");
            terrifying_howl_ability.SetDescription("The barbarian unleashes a terrifying howl as a standard action. All shaken enemies within 30 feet must make a Will save (DC equal to 10 + 1/2 the barbarian’s level + the barbarian’s Strength modifier) or be frightened for 1d4+1 rounds.\n"
                                                   + "Once an enemy has made a save versus terrifying howl (successful or not), it is immune to this power for 24 hours.");
            terrifying_howl_ability.Type = AbilityType.Extraordinary;
            terrifying_howl_ability.RemoveComponents <SpellComponent>();
            terrifying_howl_ability.RemoveComponents <SpellListComponent>();
            terrifying_howl_ability.Range = AbilityRange.Personal;

            var frighteneed_buff = library.Get <BlueprintBuff>("f08a7239aa961f34c8301518e71d4cdf");
            var shaken_buff      = library.Get <BlueprintBuff>("25ec6cb6ab1845c48a95f9c20b034220");
            var cooldown_buff    = Helpers.CreateBuff("TerrifyingHowlCooldownBuff",
                                                      "Cooldown: Terrifying Howl",
                                                      terrifying_howl_ability.Description,
                                                      "",
                                                      terrifying_howl_ability.Icon,
                                                      null);

            cooldown_buff.SetBuffFlags(BuffFlags.RemoveOnRest);
            var on_failed_save = Common.createContextSavedApplyBuff(frighteneed_buff,
                                                                    Helpers.CreateContextDuration(Common.createSimpleContextValue(1),
                                                                                                  Kingmaker.UnitLogic.Mechanics.DurationRate.Rounds,
                                                                                                  Kingmaker.RuleSystem.DiceType.D4,
                                                                                                  Common.createSimpleContextValue(1)
                                                                                                  ),
                                                                    is_dispellable: false
                                                                    );

            var apply_cooldown = Common.createContextActionApplyBuff(cooldown_buff, Helpers.CreateContextDuration(Common.createSimpleContextValue(1),
                                                                                                                  Kingmaker.UnitLogic.Mechanics.DurationRate.Days),
                                                                     dispellable: false
                                                                     );
            PrefabLink p = new PrefabLink();

            p.AssetId = "cbfe312cb8e63e240a859efaad8e467c";
            var fx = Common.createContextActionSpawnFx(p);


            var condition = Helpers.CreateConditional(new Condition[] { Helpers.CreateConditionHasBuffFromCaster(cooldown_buff, true),
                                                                        Helpers.CreateConditionHasFact(shaken_buff),
                                                                        Helpers.Create <ContextConditionIsEnemy>() },
                                                      Common.createContextActionSavingThrow(SavingThrowType.Will, Helpers.CreateActionList(on_failed_save, apply_cooldown, fx)));

            condition.ConditionsChecker.Operation = Operation.And;

            terrifying_howl_ability.ReplaceComponent <AbilityEffectRunAction>(Helpers.CreateRunActions(condition));
            terrifying_howl_ability.AddComponent(Common.createContextCalculateAbilityParamsBasedOnClasses(new BlueprintCharacterClass[] { barbarian_class }, StatType.Strength));
            terrifying_howl_ability.AddComponent(dazzling_display.GetComponent <AbilitySpawnFx>());
            terrifying_howl_ability.AddComponent(Common.createAbilityCasterHasFacts(rage_marker_caster)); // allow to use only on rage
            terrifying_howl_feature        = Common.AbilityToFeature(terrifying_howl_ability, false);
            terrifying_howl_feature.Groups = new FeatureGroup[] { FeatureGroup.RagePower };
            terrifying_howl_feature.AddComponent(Helpers.PrerequisiteClassLevel(barbarian_class, 8));
            addToSelection(terrifying_howl_feature);
        }
예제 #2
0
        static internal BlueprintAbility CreateAddDCAbl()
        {
            AddCLDCOnNextSpell_AR component = Helpers.Create <AddCLDCOnNextSpell_AR>();

            component.valueCL     = 0;
            component.valueDC     = 1;
            component.PotentMagic = PotentMagic.exploit;
            Sprite        icon = Helpers.GetIcon("f001c73999fb5a543a199f890108d936");   //vanish
            BlueprintBuff buff = Helpers.CreateBuff("ArcanistClassReservoirAddDCBuff", "", "",
                                                    "85143f03db31082e776c095f3518a505", //MD5-32[ArcanistClass.Reservoir.AddDCBuff]
                                                    icon,
                                                    null,
                                                    component);

            buff.SetName(Helpers.CreateString("ArcanistClass.Reservoir.AddDCBuff.Name"));
            buff.SetDescription(Helpers.CreateString("ArcanistClass.Reservoir.AddDCBuff.Desc"));

            var ablResourceLogicComp = Helpers.Create <AbilityResourceLogic>();

            ablResourceLogicComp.RequiredResource = resource;
            ablResourceLogicComp.IsSpendResource  = true;
            ablResourceLogicComp.CostIsCustom     = false;
            ablResourceLogicComp.Amount           = 1;

            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 }
            };

            BlueprintAbility abl = Helpers.CreateAbility("ArcanistClassReservoirAddDCAbl", "", "",
                                                         "a572d2412acba81b25cb7ca77c129010",//MD5-32[ArcanistClass.Reservoir.AddDCAbl]
                                                         icon,
                                                         AbilityType.Supernatural,
                                                         Kingmaker.UnitLogic.Commands.Base.UnitCommand.CommandType.Free,
                                                         AbilityRange.Personal,
                                                         "",
                                                         "",
                                                         ablResourceLogicComp,
                                                         ablEffectComp,
                                                         Helpers.Create <AbilityRequirementNoSupremancy>());

            abl.SetName(Helpers.CreateString("ArcanistClass.Reservoir.AddDCAbl.Name"));
            abl.SetDescription(Helpers.CreateString("ArcanistClass.Reservoir.AddDCAbl.Desc"));
            abl.LocalizedDuration    = Helpers.CreateString("ArcaneTide.ThreeRounds");
            abl.LocalizedSavingThrow = Helpers.CreateString("ArcaneTide.WillSave.CanAbandon");
            return(abl);
        }
예제 #3
0
        static void createVirtuosoPerformance()
        {
            var performance_resource        = library.Get <BlueprintAbilityResource>("e190ba276831b5c4fa28737e5e49e6a6");
            var inspire_competence          = library.Get <BlueprintActivatableAbility>("430ab3bb57f2cfc46b7b3a68afd4f74e");
            var increase_group_size         = Common.createIncreaseActivatableAbilityGroupSize(ActivatableAbilityGroup.BardicPerformance);
            var consume_additional_resource = Helpers.Create <NewMechanics.ConsumeResourceIfAbilitiesFromGroupActivated>(c =>
            {
                c.group = ActivatableAbilityGroup.BardicPerformance;
                c.num_abilities_activated = 2;
                c.resource = performance_resource;
            }
                                                                                                                         );
            var deactivate_performance = Helpers.Create <NewMechanics.DeactivatedAbilityFromGroup>(c =>
            {
                c.group = ActivatableAbilityGroup.BardicPerformance;
                c.num_abilities_activated = 1;
            }
                                                                                                   );

            virtuoso_performance = library.CopyAndAdd <BlueprintAbility>("20b548bf09bb3ea4bafea78dcb4f3db6", "VirtuosoPerformanceAbility", ""); //echolocation
            virtuoso_performance.SetIcon(inspire_competence.Icon);
            virtuoso_performance.SetName("Virtuoso Performance");
            virtuoso_performance.SetDescription("While this spell is active, you may start a second bardic performance while maintaining another. Starting the second performance costs 2 rounds of bardic performance instead of 1. Maintaining both performances costs a total of 3 rounds of bardic performance for each round they are maintained. When this spell ends, one of the performances ends immediately.");
            virtuoso_performance.RemoveComponents <SpellListComponent>();
            virtuoso_performance.RemoveComponents <AbilityEffectRunAction>();
            virtuoso_performance.LocalizedDuration = Helpers.roundsPerLevelDuration;

            var buff = Helpers.CreateBuff("VirtuosoPerformanceBuff",
                                          virtuoso_performance.Name,
                                          virtuoso_performance.Description,
                                          "",
                                          virtuoso_performance.Icon,
                                          null,
                                          increase_group_size,
                                          Helpers.CreateAddFactContextActions(newRound: consume_additional_resource, deactivated: deactivate_performance)
                                          );
            var apply_buff = Common.createContextActionApplyBuff(buff,
                                                                 Helpers.CreateContextDuration(bonus: Helpers.CreateContextValue(AbilityRankType.Default), rate: DurationRate.Rounds),
                                                                 is_from_spell: true);

            virtuoso_performance.AddComponent(Helpers.CreateRunActions(apply_buff));
            virtuoso_performance.AddToSpellList(Helpers.bardSpellList, 4);
            virtuoso_performance.AddSpellAndScroll("33770ff24b320e343bb767815f800fc4"); //echolocation
        }
예제 #4
0
        static void createGangUp()
        {
            var freebooter_bane_buff = library.Get <BlueprintBuff>("76dabd40a1c1c644c86ce30e41ad5cab");
            var gang_up_buff         = library.CopyAndAdd <BlueprintBuff>(vindicative_smite_buff.AssetGuid, "GangUpBuff", "");

            gang_up_buff.SetName("Gang Up");
            gang_up_buff.SetIcon(freebooter_bane_buff.Icon);
            gang_up_buff.ReplaceComponent <ACBonusAgainstTarget>(a => { a.CheckCaster = false; a.CheckCasterFriend = true; });
            gang_up_buff.ReplaceComponent <AttackBonusAgainstTarget>(a => { a.CheckCaster = false; a.CheckCasterFriend = true; });
            gang_up_buff.ReplaceComponent <DamageBonusAgainstTarget>(a => { a.CheckCaster = false; a.CheckCasterFriend = true; });


            gang_up_ability = library.CopyAndAdd <BlueprintAbility>(vindicative_smite_ability.AssetGuid, "GangUpAbility", "");
            gang_up_ability.RemoveComponents <AbilityTargetHasFact>();
            gang_up_ability.RemoveComponents <AbilityResourceLogic>();
            gang_up_ability.AddComponent(Common.createAbilityTargetHasFact(false, vindicative_smite_buff));
            gang_up_ability.ActionType = CommandType.Move;

            foreach (var c in gang_up_ability.GetComponents <ContextRankConfig>().ToArray())
            {
                var new_c = c.CreateCopy();
                Helpers.SetField(new_c, "m_Min", 1);
                Helpers.SetField(new_c, "m_UseMin", true);
                Helpers.SetField(new_c, "m_Progression", ContextRankProgression.Div2);
                gang_up_ability.ReplaceComponent(c, new_c);
            }

            var apply_buff = Common.createContextActionApplyBuff(gang_up_buff, Helpers.CreateContextDuration(Helpers.CreateContextValue(AbilityRankType.SpeedBonus)), dispellable: false);

            gang_up_ability.ReplaceComponent <AbilityEffectRunAction>(a => a.Actions = Helpers.CreateActionList(apply_buff));
            gang_up_ability.AddComponent(Helpers.CreateContextRankConfig(ContextRankBaseValueType.StatBonus, min: 1, type: AbilityRankType.SpeedBonus, stat: StatType.Charisma));
            gang_up_ability.SetName(gang_up_buff.Name);
            gang_up_ability.SetIcon(gang_up_buff.Icon);
            gang_up_ability.SetDescription("At 5th level, a vindictive bastard forms a close bond with her companions. This allows her to spend a move action to grant half her vindictive smite bonus against a single target to all allies who can see and hear her. This bonus lasts for a number of rounds equal to the vindictive bastard’s Charisma modifier (minimum 1).");

            swift_gang_up_ability            = library.CopyAndAdd <BlueprintAbility>(gang_up_ability.AssetGuid, "SwiftGangUpAbility", "");
            swift_gang_up_ability.ActionType = CommandType.Swift;
            swift_gang_up_ability.SetName("Swift Justice");
            swift_gang_up_ability.SetDescription("At 11th level, a vindictive bastard can activate her gang up ability as a swift action.");

            gang_up       = Common.AbilityToFeature(gang_up_ability, false, "");
            swift_justice = Common.AbilityToFeature(swift_gang_up_ability, false, "");
        }
예제 #5
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);
        }
예제 #6
0
        static void createPsychicPoolAndDualWeapons()
        {
            var air_enchatment         = library.Get <BlueprintWeaponEnchantment>("1d64abd0002b98043b199c0e3109d3ee");
            var psychic_weapon_enchant = Common.createWeaponEnchantment("ManifestedWeaponEnchant",
                                                                        "Manifested",
                                                                        "This is a weapon manifested by the power of your will.",
                                                                        "",
                                                                        "",
                                                                        "",
                                                                        0,
                                                                        air_enchatment.WeaponFxPrefab
                                                                        );

            string description = "A mindblade gains a psychic pool, similar to a normal magus’s arcane pool. At 1st level, a mindblade can expend 1 point from her psychic pool as a standard action to manifest a light melee weapon of her choice, formed from psychic energy. By spending 2 points, the mindblade can manifest a one-handed melee weapon, and by spending 3 points, she can manifest a two-handed melee weapon (but not a double weapon). This psychic weapon can last indefinitely, but it vanishes if it leaves the mindblade’s hand. The mindblade can dismiss a held psychic weapon as a free action. When a psychic weapon vanishes, the mindblade regains the psychic energy used to create it. She can maintain only one weapon at a time.\n"
                                 + "At 1st level, a psychic weapon counts as a magic weapon of whatever type the mindblade selected, with a +1 enhancement bonus. At 3rd level and every 3 levels thereafter, the weapon’s enhancement bonus increases by 1, up to maximum of +5 at 12th level. Starting at 5th level, the mindblade can add any of the weapon special abilities listed in the arcane pool class feature in place of these bonuses, although the weapon must maintain at least a +1 bonus to benefit from any weapon special abilities. At 15th and 18th levels, the weapon gains an additional +1 enhancement bonus, which the mindblade can spend only on weapon special abilities.";
            var abilities_light  = new List <BlueprintAbility>();
            var abilities_1h     = new List <BlueprintAbility>();
            var abilities_2h     = new List <BlueprintAbility>();
            var abilities_1h2    = new List <BlueprintAbility>();
            var abilities_light2 = new List <BlueprintAbility>();
            var abilities_double = new List <BlueprintAbility>();


            var allow_two_weapons_buff = Helpers.CreateBuff("AllowTwoPsychicWeaponsBuff",
                                                            "Dual Weapons",
                                                            "At 7th level, a mindblade can maintain two psychic weapons at a time or a psychic double weapon, though each weapon (or each end of a double weapon) has an enhancement bonus 1 lower than normal. Starting at 12th level, each of the two psychic weapons (or each end of a double weapon) instead has an enhancement bonus 2 lower than normal. When using two-weapon fighting with two psychic weapons or a psychic double weapon, the mindblade can use her spell combat ability as though she had a hand free.",
                                                            "",
                                                            Helpers.GetIcon("ac8aaf29054f5b74eb18f2af950e752d"),
                                                            null);

            allow_two_weapons_buff.SetBuffFlags(BuffFlags.HiddenInUi | BuffFlags.StayOnDeath);
            var toggle_2_weapons = Helpers.CreateActivatableAbility("AllowTwoPsychicWeaponsToggleAbility",
                                                                    allow_two_weapons_buff.Name,
                                                                    allow_two_weapons_buff.Description,
                                                                    "",
                                                                    allow_two_weapons_buff.Icon,
                                                                    allow_two_weapons_buff,
                                                                    AbilityActivationType.Immediately,
                                                                    CommandType.Free,
                                                                    null);

            toggle_2_weapons.Group = ActivatableAbilityGroup.ArcaneWeaponProperty;
            toggle_2_weapons.DeactivateImmediately = true;
            var toggle_2_weapons2 = library.CopyAndAdd(toggle_2_weapons, "AllowTwoPsychicWeapons2ToggleAbility", "");

            toggle_2_weapons2.WeightInGroup = 2;


            var weapon_categories = EnumUtils.GetValues <WeaponCategory>().ToArray();

            var enchants = WeaponEnchantments.temporary_enchants;
            var resource = library.Get <BlueprintAbilityResource>("effc3e386331f864e9e06d19dc218b37");

            foreach (var wc in weapon_categories)
            {
                var weapon = Game.Instance.BlueprintRoot.Progression.CategoryDefaults.Entries.Where(e => e.Key == wc && e.DefaultWeapon != null).FirstOrDefault()?.DefaultWeapon;
                if (weapon == null || !weapon.IsMelee)
                {
                    continue;
                }
                weapon = library.CopyAndAdd(weapon, "Psychic" + weapon.name, "");
                Common.addEnchantment(weapon, WeaponEnchantments.summoned_weapon_enchant);
                Common.addEnchantment(weapon, psychic_weapon_enchant);
                if (weapon.Double)
                {
                    weapon.SecondWeapon = library.CopyAndAdd(weapon, "Psychic" + weapon.name + "Second", "");
                    Common.addEnchantment(weapon.SecondWeapon, WeaponEnchantments.summoned_weapon_enchant);
                    Common.addEnchantment(weapon.SecondWeapon, psychic_weapon_enchant);
                    weapon.SecondWeapon.SecondWeapon = weapon.SecondWeapon;
                }

                bool is_light        = weapon.IsLight;
                bool is_2h           = weapon.IsTwoHanded;
                bool is_double       = weapon.Double;
                bool is_normal       = !is_2h && !is_double && !is_light;
                bool requires_2h     = is_2h || is_double;
                int  resource_amount = 1;
                if (is_normal)
                {
                    resource_amount = 2;
                }
                else if (requires_2h)
                {
                    resource_amount = 3;
                }

                var buff = Helpers.CreateBuff(wc.ToString() + "ManifestWeaponBuff",
                                              "",
                                              "",
                                              "",
                                              null,
                                              null,
                                              Helpers.Create <NewMechanics.EnchantmentMechanics.CreateWeapon>(c => c.weapon = weapon),
                                              Common.createBuffRemainingGroupsSizeEnchantPrimaryHandWeapon(ActivatableAbilityGroup.ArcaneWeaponProperty,
                                                                                                           false, true, enchants),
                                              Helpers.CreateAddFactContextActions(deactivated: Helpers.Create <ResourceMechanics.ContextRestoreResource>(c => { c.Resource = resource; c.amount = resource_amount; }))
                                              );
                buff.SetBuffFlags(BuffFlags.HiddenInUi | BuffFlags.StayOnDeath);
                if (is_double)
                {
                    buff.AddComponent(Common.createBuffRemainingGroupsSizeEnchantPrimaryHandWeaponOffHand(ActivatableAbilityGroup.ArcaneWeaponProperty,
                                                                                                          false, true, enchants));
                }
                var apply_buff = Common.createContextActionApplyBuff(buff, Helpers.CreateContextDuration(), is_permanent: true, dispellable: false);
                var ability    = Helpers.CreateAbility(wc.ToString() + "ManifestWeaponAbility",
                                                       "Manifest " + LocalizedTexts.Instance.Stats.GetText(wc),
                                                       description,
                                                       "",
                                                       weapon.Icon,
                                                       AbilityType.Supernatural,
                                                       CommandType.Standard,
                                                       AbilityRange.Personal,
                                                       "",
                                                       "",
                                                       Helpers.CreateRunActions(apply_buff),
                                                       resource.CreateResourceLogic(amount: resource_amount),
                                                       Helpers.Create <NewMechanics.AbilityCasterPrimaryHandFree>(a => a.for_2h_item = requires_2h)
                                                       );
                if (!is_double)
                {
                    ability.AddComponent(Common.createAbilityCasterHasNoFacts(allow_two_weapons_buff));
                }
                else
                {
                    ability.AddComponent(Common.createAbilityCasterHasFacts(allow_two_weapons_buff));
                }
                ability.setMiscAbilityParametersSelfOnly();

                if (is_2h)
                {
                    abilities_2h.Add(ability);
                }
                else if (is_light)
                {
                    abilities_light.Add(ability);
                }
                else if (is_normal)
                {
                    abilities_1h.Add(ability);
                }
                else if (is_double)
                {
                    abilities_double.Add(ability);
                }

                mind_blade_weapon_buffs.Add(buff);
                if (!requires_2h)
                {
                    var buff2 = Helpers.CreateBuff(wc.ToString() + "ManifestWeaponBothHandsBuff",
                                                   "",
                                                   "",
                                                   "",
                                                   null,
                                                   null,
                                                   Helpers.Create <NewMechanics.EnchantmentMechanics.CreateWeapon>(c => { c.weapon = weapon; }),
                                                   Helpers.Create <NewMechanics.EnchantmentMechanics.CreateWeapon>(c => { c.weapon = weapon; c.create_in_offhand = true; }),
                                                   Common.createBuffRemainingGroupsSizeEnchantPrimaryHandWeapon(ActivatableAbilityGroup.ArcaneWeaponProperty,
                                                                                                                false, true, enchants),
                                                   Common.createBuffRemainingGroupsSizeEnchantPrimaryHandWeaponOffHand(ActivatableAbilityGroup.ArcaneWeaponProperty,
                                                                                                                       false, true, enchants),
                                                   Helpers.CreateAddFactContextActions(deactivated: Helpers.Create <ResourceMechanics.ContextRestoreResource>(c => { c.Resource = resource; c.amount = 2 * resource_amount; }))
                                                   );

                    var apply_buff2 = Common.createContextActionApplyBuff(buff2, Helpers.CreateContextDuration(), is_permanent: true, dispellable: false);
                    var ability2    = Helpers.CreateAbility(wc.ToString() + "ManifestWeaponBothHandsAbility",
                                                            "Manifest " + LocalizedTexts.Instance.Stats.GetText(wc) + " (Both Hands)",
                                                            description,
                                                            "",
                                                            weapon.Icon,
                                                            AbilityType.Supernatural,
                                                            CommandType.Standard,
                                                            AbilityRange.Personal,
                                                            "",
                                                            "",
                                                            Helpers.CreateRunActions(apply_buff2),
                                                            resource.CreateResourceLogic(amount: resource_amount * 2),
                                                            Common.createAbilityCasterHasFacts(allow_two_weapons_buff)
                                                            );
                    //Common.setAsFullRoundAction(ability2);
                    ability2.setMiscAbilityParametersSelfOnly();
                    mind_blade_weapon_buffs.Add(buff2);

                    if (is_light)
                    {
                        abilities_light2.Add(ability2);
                    }
                    else if (is_normal)
                    {
                        abilities_1h2.Add(ability2);
                    }
                }
            }


            ability_light = Common.createVariantWrapper("MindBladeManifestLightWeaponBase", "", abilities_light.ToArray());
            ability_light.SetName("Manifest Light Weapon");
            ability_1h = Common.createVariantWrapper("MindBladeManifest1hWeaponBase", "", abilities_1h.ToArray());
            ability_1h.SetName("Manifest One-Handed Weapon");
            ability_2h = Common.createVariantWrapper("MindBladeManifest2hWeaponBase", "", abilities_2h.ToArray());
            ability_2h.SetName("Manifest Two-Handed Weapon");
            ability_light2 = Common.createVariantWrapper("MindBladeManifestLightWeaponBase", "", abilities_light.ToArray());
            ability_light.SetName("Manifest Two Light Weapons");
            ability_1h2 = Common.createVariantWrapper("MindBladeManifest1hWeaponBase", "", abilities_1h.ToArray());
            ability_1h2.SetName("Manifest Two One-Handed Weapons");
            ability_double = Common.createVariantWrapper("MindBladeManifestDoubleWeaponBase", "", abilities_2h.ToArray());
            ability_double.SetName("Manifest Double Weapon");


            psychic_pool = Helpers.CreateFeature("PsychicPoolFeature",
                                                 "Psychic Pool",
                                                 description,
                                                 "",
                                                 null,
                                                 FeatureGroup.None,
                                                 resource.CreateAddAbilityResource(),
                                                 Helpers.CreateAddFacts(ability_light, ability_1h, ability_2h)
                                                 );

            dual_weapons = Helpers.CreateFeature("DualWeaponsFeature",
                                                 "Dual Weapons",
                                                 "At 7th level, a mindblade can maintain two psychic weapons at a time or a psychic double weapon, though each weapon (or each end of a double weapon) has an enhancement bonus 1 lower than normal. Starting at 12th level, each of the two psychic weapons (or each end of a double weapon) instead has an enhancement bonus 2 lower than normal. When using two-weapon fighting with two psychic weapons or a psychic double weapon, the mindblade can use her spell combat ability as though she had a hand free.",
                                                 "",
                                                 null,
                                                 FeatureGroup.None,
                                                 Helpers.CreateAddFacts(ability_light2, ability_1h2, ability_double),
                                                 Helpers.CreateAddFeatureOnClassLevel(Common.ActivatableAbilityToFeature(toggle_2_weapons), 12, new BlueprintCharacterClass[] { archetype.GetParentClass() }, before: true),
                                                 Helpers.CreateAddFeatureOnClassLevel(Common.ActivatableAbilityToFeature(toggle_2_weapons2), 12, new BlueprintCharacterClass[] { archetype.GetParentClass() })
                                                 );
            psychic_pool_resource = resource;
        }
예제 #7
0
        static public BlueprintAbility CreateHeighten()
        {
            var              variants     = new List <BlueprintAbility>();
            Metamagic        heighten     = Metamagic.Heighten;
            BlueprintFeature heightenFeat = library.Get <BlueprintFeature>(MetaFeats.dict[(int)heighten]);

            for (int i = 1; i <= 9; i++)
            {
                string buffname = $"ArcanistClassSponHeighten{i}SubBuff";
                var    buff_i   = Helpers.CreateBuff(buffname, "", "",
                                                     OtherUtils.GetMd5(buffname), heightenFeat.Icon, null);
                buff_i.SetName(Helpers.CreateString($"ArcanistClass.SponMetamagic.Heighten{i}.Name"));
                buff_i.SetDescription(heightenFeat.GetDescription());

                var ablEffectComp       = Helpers.Create <AbilityEffectRunAction>();
                var ablEffectCompAction = Helpers.Create <ContextActionApplyBuff>();
                ablEffectCompAction.Buff            = buff_i;
                ablEffectCompAction.Permanent       = false;
                ablEffectCompAction.DurationValue   = PresetDurations.oneRound;
                ablEffectCompAction.IsFromSpell     = false;
                ablEffectCompAction.IsNotDispelable = false;
                ablEffectCompAction.ToCaster        = false;
                ablEffectCompAction.AsChild         = true;
                ablEffectComp.Actions = new ActionList {
                    Actions = new GameAction[] { null, ablEffectCompAction }
                };

                var ablRequirementComp = Helpers.Create <AbilityRequirementFeature>();
                ablRequirementComp.Feat = heightenFeat;
                ablRequirementComp.Not  = false;

                var ablRequirementComp2 = Helpers.Create <AbilityRequirementClassSpellLevel>();
                ablRequirementComp2.characterClass     = ArcanistClass.arcanist;
                ablRequirementComp2.RequiredSpellLevel = i;

                var abl_i_name = $"ArcanistClassSponHeighten{i}SubAbl";
                var abl_i      = Helpers.CreateAbility(abl_i_name, "", "",
                                                       OtherUtils.GetMd5(abl_i_name),
                                                       heightenFeat.Icon,
                                                       AbilityType.Special,
                                                       UnitCommand.CommandType.Free,
                                                       AbilityRange.Personal,
                                                       "", "",
                                                       ablEffectComp, ablRequirementComp, ablRequirementComp2);
                abl_i.SetName(buff_i.GetName());
                abl_i.SetDescription(buff_i.GetDescription());
                abl_i.LocalizedDuration    = Helpers.CreateString("ArcaneTide.OneRound");
                abl_i.LocalizedSavingThrow = Helpers.CreateString("ArcaneTide.WillSave.NoHarm");

                variants.Add(abl_i);
                buffDict[OtherUtils.make_pair <int, int>((int)heighten, i)] = buff_i;
            }
            BlueprintAbility abl = Helpers.CreateAbility("ArcanistClassSponHeightenAbl", "", "",
                                                         OtherUtils.GetMd5("ArcanistClassSponHeightenAbl"),
                                                         heightenFeat.Icon,
                                                         AbilityType.Special,
                                                         UnitCommand.CommandType.Free,
                                                         AbilityRange.Personal,
                                                         "", "");

            abl.SetName(heightenFeat.GetName());
            abl.SetDescription(heightenFeat.GetDescription());
            abl.LocalizedDuration    = Helpers.CreateString("ArcaneTide.OneRound");
            abl.LocalizedSavingThrow = Helpers.CreateString("ArcaneTide.WillSave.NoHarm");
            abl.AddComponent(abl.CreateAbilityVariants(variants));
            return(abl);
        }
예제 #8
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);
        }
예제 #9
0
        static internal void createDeadlyJuggernaut()
        {
            var sneak_attack = library.Get <BlueprintFeature>("df4f34f7cac73ab40986bc33f87b1a3c");
            var false_life   = library.Get <BlueprintAbility>("7a5b5bf845779a941a67251539545762");

            deadly_juggernaut = library.CopyAndAdd <BlueprintAbility>("779179912e6c6fe458fa4cfb90d96e10", "DeadlyJuggernautAbility", "");
            deadly_juggernaut.RemoveComponents <SpellListComponent>();
            deadly_juggernaut.ReplaceComponent <AbilitySpawnFx>(false_life.GetComponent <AbilitySpawnFx>());
            deadly_juggernaut.ReplaceComponent <SpellComponent>(false_life.GetComponent <SpellComponent>());

            deadly_juggernaut.SetIcon(sneak_attack.Icon);
            deadly_juggernaut.SetName("Deadly Juggernaut");
            deadly_juggernaut.SetDescription("With every enemy life you take, you become increasingly dangerous and difficult to stop. During the duration of the spell, you gain a cumulative +1 luck bonus on melee attack rolls, melee weapon damage rolls, Strength checks, and Strength-based skill checks as well as DR 2/— each time you reduce a qualifying opponent to 0 or few hit points (maximum +5 bonus and DR 10/—) with a melee attack.");
            deadly_juggernaut.RemoveComponents <AbilityEffectRunAction>();


            BlueprintBuff[] buffs = new BlueprintBuff[5];

            for (int i = 0; i < buffs.Length; i++)
            {
                int bonus = i + 1;
                buffs[i] = Helpers.CreateBuff($"DeadlyJuggernaut{i + 1}Buff",
                                              $"Deadly Juggernaut (+{i + 1})",
                                              deadly_juggernaut.Description,
                                              "",
                                              deadly_juggernaut.Icon,
                                              null,
                                              Common.createAttackTypeAttackBonus(Common.createSimpleContextValue(bonus), AttackTypeAttackBonus.WeaponRangeType.Melee, ModifierDescriptor.Luck),
                                              Helpers.CreateAddStatBonus(StatType.AdditionalDamage, bonus, ModifierDescriptor.Luck),
                                              Common.createAbilityScoreCheckBonus(Common.createSimpleContextValue(bonus), ModifierDescriptor.Luck, StatType.Strength),
                                              Helpers.CreateAddStatBonus(StatType.SkillAthletics, bonus, ModifierDescriptor.Luck),
                                              Common.createPhysicalDR(bonus * 2)
                                              );
            }

            var conditional = Helpers.CreateConditional(Helpers.CreateConditionHasBuff(buffs[0]),
                                                        new GameAction[] { Common.createContextActionApplyBuff(buffs[1], Helpers.CreateContextDuration(), is_from_spell: true, is_child: true, is_permanent: true),
                                                                           Common.createContextActionRemoveBuff(buffs[0]) },
                                                        new GameAction[] { Common.createContextActionApplyBuff(buffs[0], Helpers.CreateContextDuration(), is_from_spell: true, is_child: true, is_permanent: true) }
                                                        );

            for (int i = 1; i < buffs.Length; i++)
            {
                GameAction[] if_true = null;
                if (i < buffs.Length - 1)
                {
                    if_true = new GameAction[] { Common.createContextActionRemoveBuff(buffs[i]),
                                                 Common.createContextActionApplyBuff(buffs[i + 1],
                                                                                     Helpers.CreateContextDuration(),
                                                                                     is_from_spell: true,
                                                                                     is_child: true,
                                                                                     is_permanent: true) };
                }
                conditional = Helpers.CreateConditional(Helpers.CreateConditionHasBuff(buffs[i]),
                                                        if_true,
                                                        new GameAction[] { conditional });
            }



            var on_kill = Common.createAddInitiatorAttackWithWeaponTrigger(Helpers.CreateActionList(conditional),
                                                                           reduce_hp_to_zero: true,
                                                                           check_weapon_range_type: true,
                                                                           on_initiator: true,
                                                                           range_type: AttackTypeAttackBonus.WeaponRangeType.Melee);

            var buff = Helpers.CreateBuff("DeadlyJuggernautBuff",
                                          deadly_juggernaut.Name,
                                          deadly_juggernaut.Description,
                                          "",
                                          deadly_juggernaut.Icon,
                                          null,
                                          on_kill);

            buff.Stacking = StackingType.Replace;
            var apply_buff = Common.createContextActionApplyBuff(buff,
                                                                 Helpers.CreateContextDuration(bonus: Helpers.CreateContextValue(AbilityRankType.Default), rate: DurationRate.Minutes),
                                                                 is_from_spell: true);

            deadly_juggernaut.AddComponent(Helpers.CreateRunActions(apply_buff));


            deadly_juggernaut.AddToSpellList(Helpers.clericSpellList, 3);
            deadly_juggernaut.AddToSpellList(Helpers.inquisitorSpellList, 3);
            deadly_juggernaut.AddToSpellList(Helpers.paladinSpellList, 3);
            deadly_juggernaut.AddSpellAndScroll("539ff89add7d8e4409ab92df30e6afee"); //lead_blades
        }
예제 #10
0
        static void createFlameBlade()
        {
            var bless_weapon       = library.Get <BlueprintAbility>("831e942864e924846a30d2e0678e438b");
            var flaming_enchatment = library.Get <BlueprintWeaponEnchantment>("30f90becaaac51f41bf56641966c4121");
            var scimitar_type      = library.Get <BlueprintWeaponType>("d9fbec4637d71bd4ebc977628de3daf3");
            var immaterial         = Helpers.Create <NewMechanics.Immaterial>();

            BlueprintWeaponEnchantment[] flame_blade_enchantments = new BlueprintWeaponEnchantment[11];
            var fire_damage = Common.createEnergyDamageDescription(Kingmaker.Enums.Damage.DamageEnergyType.Fire);

            for (int i = 0; i < flame_blade_enchantments.Length; i++)
            {
                var flame_blade_enchant = Helpers.Create <NewMechanics.WeaponDamageChange>(w =>
                {
                    w.bonus_damage            = i;
                    w.dice_formula            = new DiceFormula(1, DiceType.D8);
                    w.damage_type_description = fire_damage;
                });
                flame_blade_enchantments[i] = Common.createWeaponEnchantment($"FlameBlade{i}Enchantment",
                                                                             "Flame Blade",
                                                                             "You transform a non-magical scimitar into a 3-foot-long, blazing beam of red-hot fire springs. Attacks with the flame blade are melee touch attacks. The blade deals 1d8 points of fire damage + 1 point per two caster levels (maximum +10). Since the blade is immaterial, your Strength modifier does not apply to the damage. If you stop wielding it, the weapon loses magical properties.",
                                                                             "",
                                                                             "",
                                                                             "",
                                                                             0,
                                                                             flaming_enchatment.WeaponFxPrefab,
                                                                             immaterial,
                                                                             flame_blade_enchant
                                                                             );
            }


            var empower = Common.createWeaponEnchantment("EmpowerWeaponEnchantment",
                                                         "Empowered",
                                                         "All variable, numeric effects of an empowered spell are increased by half including bonuses to those dice rolls.",
                                                         "",
                                                         "",
                                                         "",
                                                         0,
                                                         null,
                                                         Helpers.Create <NewMechanics.WeaponMetamagicDamage>(w => w.empower = true)
                                                         );
            var maximize = Common.createWeaponEnchantment("MaximizeWeaponEnchantment",
                                                          "Maximized",
                                                          "All variable, numeric effects of a spell are maximized.",
                                                          "",
                                                          "",
                                                          "",
                                                          0,
                                                          null,
                                                          Helpers.Create <NewMechanics.WeaponMetamagicDamage>(w => w.maximize = true)
                                                          );


            var empower_buff = Common.createBuffContextEnchantPrimaryHandWeaponIfHasMetamagic(Kingmaker.UnitLogic.Abilities.Metamagic.Empower,
                                                                                              true, true,
                                                                                              new BlueprintWeaponType[] { scimitar_type }, empower);

            var maximize_buff = Common.createBuffContextEnchantPrimaryHandWeaponIfHasMetamagic(Kingmaker.UnitLogic.Abilities.Metamagic.Maximize,
                                                                                               true, true,
                                                                                               new BlueprintWeaponType[] { scimitar_type }, maximize);


            var buff = Helpers.CreateBuff("FlameBladeBuff",
                                          flame_blade_enchantments[0].Name,
                                          flame_blade_enchantments[0].Description,
                                          "",
                                          bless_weapon.Icon,
                                          null,
                                          Common.createBuffContextEnchantPrimaryHandWeapon(Helpers.CreateContextValue(AbilityRankType.DamageBonus), true, true,
                                                                                           new BlueprintWeaponType[] { scimitar_type }, flame_blade_enchantments),
                                          empower_buff,
                                          maximize_buff,
                                          Helpers.CreateContextRankConfig(baseValueType: ContextRankBaseValueType.CasterLevel, progression: ContextRankProgression.OnePlusDivStep,
                                                                          type: AbilityRankType.DamageBonus, stepLevel: 2)
                                          );

            buff.Stacking = Kingmaker.UnitLogic.Buffs.Blueprints.StackingType.Replace;

            flame_blade = library.CopyAndAdd <BlueprintAbility>(shillelagh.AssetGuid, "FlameBladeAbility", "");
            flame_blade.SetIcon(bless_weapon.Icon);
            flame_blade.SetName(buff.Name);
            flame_blade.SetDescription(buff.Description);

            flame_blade.ReplaceComponent <AbilityCasterMainWeaponCheck>(Common.createAbilityCasterMainWeaponCheck(scimitar_type.Category));
            flame_blade.ReplaceComponent <SpellComponent>(Helpers.CreateSpellComponent(Kingmaker.Blueprints.Classes.Spells.SpellSchool.Evocation));

            var apply_buff = Common.createContextActionApplyBuff(buff,
                                                                 Helpers.CreateContextDuration(Helpers.CreateContextValue(AbilityRankType.Default), DurationRate.Minutes)
                                                                 );

            flame_blade.ReplaceComponent <AbilityEffectRunAction>(Helpers.CreateRunActions(apply_buff));
            flame_blade.AvailableMetamagic = flame_blade.AvailableMetamagic | Kingmaker.UnitLogic.Abilities.Metamagic.Empower | Kingmaker.UnitLogic.Abilities.Metamagic.Maximize;
            flame_blade.AddComponent(Helpers.CreateSpellDescriptor(SpellDescriptor.Fire));

            flame_blade.AddToSpellList(Helpers.druidSpellList, 2);
            flame_blade.AddSpellAndScroll("fbdd06f0414c3ef458eb4b2a8072e502"); //bless weapon
        }