コード例 #1
0
        static void createLightSteps()
        {
            var ability = library.CopyAndAdd <BlueprintAbility>("336a841704b7e2341b51f89fc9491f54", "NinjaLightSteps", "");

            ability.RemoveComponents <AbilityResourceLogic>();
            ability.Range = AbilityRange.Medium;
            Common.setAsFullRoundAction(ability);
            ability.SetNameDescription("Light Steps",
                                       "At 6th level, a ninja learns to move while barely touching the surface underneath her. As a full-round action, she can move to any location within medium range, ignoring difficult terrain. While moving in this way, any surface will support her, no matter how much she weighs. This allows her to move across water, lava, or even the thinnest tree branches. She must end her move on a surface that can support her normally. She cannot move across air in this way, nor can she walk up walls or other vertical surfaces. When moving in this way, she does not take damage from surfaces or hazards that react to being touched, such as lava or caltrops, nor does she need to make Acrobatics checks to avoid falling on slippery or rough surfaces. Finally, when using light steps, the ninja ignores any mechanical traps that use a location-based trigger.");
            light_steps = Common.AbilityToFeature(ability, false);
        }
コード例 #2
0
        static void createSeeTheUnseen()
        {
            var see_invisibility = library.Get <BlueprintAbility>("30e5dc243f937fc4b95d2f8f4e1b7ff3");

            var ability = Common.convertToSuperNatural(see_invisibility, "NinjaSeeTheUnseen", getRogueArray(), StatType.Charisma, ki_resource);

            ability.SetName("See the Unseen");
            ability.ActionType = CommandType.Swift;
            see_the_unseen     = Common.AbilityToFeature(ability, false);
            see_the_unseen.SetDescription("A ninja with this trick learns how to see that which cannot be seen. As a swift action, the ninja can cast see invisibility, using her level as the caster level. Each use of this ability uses up 1 ki point.");
        }
コード例 #3
0
        public BlueprintFeature createSuddenSpeed()
        {
            var ability = Common.convertToSpellLike(library.Get <BlueprintAbility>("4f8181e7a7f1d904fbaea64220e83379"), prefix, classes, stat, resource, archetypes: getArchetypeArray());

            ability.SetNameDescription("Sudden Speed",
                                       "As a swift action, you can expend 1 point of mental focus to grant yourself a burst of speed. This increases your land speed by 30 feet for 1 minute. This ability does not stack with itself.");
            ability.ReplaceComponent <AbilityEffectRunAction>(a => a.Actions = Helpers.CreateActionList(Common.changeAction <ContextActionApplyBuff>(a.Actions.Actions, c => c.DurationValue = Helpers.CreateContextDuration(1, DurationRate.Minutes))));
            ability.ActionType        = CommandType.Swift;
            ability.LocalizedDuration = Helpers.CreateString(ability.name + ".Duration", Helpers.oneMinuteDuration);
            addFocusInvestmentCheck(ability, SpellSchool.Transmutation);
            return(Common.AbilityToFeature(ability, false));
        }
コード例 #4
0
        public BlueprintFeature CreateFirestorm(string name_prefix, string display_name, string description)
        {
            // This is a cross between Fire Storm and Incendiary Cloud.
            // Like Fire Storm, it does 1d6 per caster level.
            // Like Incendiary Cloud, it's a persistent AOE (shorter duration though).

            var name = name_prefix + "";
            var area = library.CopyAndAdd <BlueprintAbilityAreaEffect>(
                "35a62ad81dd5ae3478956c61d6cd2d2e",             // IncendiaryCloudArea, used by brass golem breath
                $"{name}Area", "");

            // TODO: offer the option to place more, using an activatable ability?
            area.Size = 20.Feet();
            area.SetComponents(
                createClassScalingConfig(ContextRankProgression.AsIs, AbilityRankType.DamageDice),
                Helpers.CreateAreaEffectRunAction(round:
                                                  Helpers.CreateActionSavingThrow(SavingThrowType.Reflex,
                                                                                  Helpers.CreateActionDealDamage(DamageEnergyType.Fire,
                                                                                                                 DiceType.D6.CreateContextDiceValue(AbilityRankType.DamageDice.CreateContextValue()),
                                                                                                                 halfIfSaved: true))));

            var resource = Helpers.CreateAbilityResource($"{name}Resource", "", "", "", null);

            resource.SetFixedResource(1);

            var spawn_area = Common.createContextActionSpawnAreaEffect(area, Helpers.CreateContextDuration(Helpers.CreateContextValue(AbilityRankType.Default)));
            var ability    = Helpers.CreateAbility($"{name}Ability",
                                                   display_name,
                                                   description,
                                                   "",
                                                   NewSpells.incendiary_cloud.Icon,
                                                   AbilityType.Supernatural,
                                                   CommandType.Standard,
                                                   AbilityRange.Close,
                                                   $"1 round/{stat.ToString()} modifier",
                                                   Helpers.reflexHalfDamage,
                                                   resource.CreateResourceLogic(),
                                                   Common.createAbilityAoERadius(area.Size, Kingmaker.UnitLogic.Abilities.Components.TargetType.Any),
                                                   Helpers.CreateSpellDescriptor(SpellDescriptor.Fire),
                                                   Helpers.CreateContextRankConfig(ContextRankBaseValueType.StatBonus, ContextRankProgression.AsIs, stat: stat),
                                                   Helpers.CreateRunActions(spawn_area),
                                                   Common.createContextCalculateAbilityParamsBasedOnClassesWithArchetypes(classes, getArchetypeArray(), stat)
                                                   );

            ability.setMiscAbilityParametersRangedDirectional();

            var feature = Common.AbilityToFeature(ability, false);

            feature.AddComponent(Helpers.CreateAddAbilityResource(resource));
            addMinLevelPrerequisite(feature, 11);
            return(feature);
        }
コード例 #5
0
        public BlueprintFeature createSoulboundPuppet()
        {
            var display_name = "Soulbound Puppet";
            var description  = "As a full-round action, you can expend 1 point of mental focus to create a soulbound puppet from a bone, doll, or skull. If you use a bone or a skull, your power builds a Tiny or Small flesh puppet around it that vaguely resembles the original creature from which the bones were taken. If the implement is a doll, the doll comes to life. Treat this as a familiar, using your occultist level as your wizard level to determine its powers and abilities. You can have no more than one soulbound puppet active at any given time.\n"
                               + "The soulbound puppet remains animated for 10 minutes per occultist level you possess.";
            var icon = LoadIcons.Image2Sprite.Create(@"AbilityIcons/SoulboundPuppet.png");
            var familiar_selection = library.Get <BlueprintFeatureSelection>("363cab72f77c47745bf3a8807074d183");
            var abilities          = new List <BlueprintAbility>();
            var buffs = new List <BlueprintBuff>();

            var remove_buffs = Helpers.Create <NewMechanics.ContextActionRemoveBuffs>(b => b.Buffs = new BlueprintBuff[0]);

            foreach (var f in familiar_selection.AllFeatures)
            {
                var buff = Helpers.CreateBuff(prefix + f.name + "SoulboundPuppetBuff",
                                              display_name + ": " + f.Name,
                                              description + "\n" + f.Description,
                                              "",
                                              icon,
                                              null,
                                              Helpers.CreateAddFact(f)
                                              );
                remove_buffs.Buffs = remove_buffs.Buffs.AddToArray(buff);

                var apply_buff = Common.createContextActionApplyBuff(buff, Helpers.CreateContextDuration(Helpers.CreateContextValue(AbilityRankType.Default), DurationRate.TenMinutes), dispellable: false);
                var ability    = Helpers.CreateAbility(prefix + f.name + "SoulboundPuppetAbility",
                                                       buff.Name,
                                                       buff.Description,
                                                       "",
                                                       buff.Icon,
                                                       AbilityType.Supernatural,
                                                       CommandType.Standard,
                                                       AbilityRange.Personal,
                                                       Helpers.tenMinPerLevelDuration,
                                                       "",
                                                       Helpers.CreateRunActions(apply_buff),
                                                       createClassScalingConfig(),
                                                       Common.createAbilityExecuteActionOnCast(Helpers.CreateActionList(remove_buffs)),
                                                       Common.createAbilityCasterHasNoFacts(familiar_selection.AllFeatures),
                                                       resource.CreateResourceLogic()
                                                       );
                Common.setAsFullRoundAction(ability);
                ability.setMiscAbilityParametersSelfOnly();
                abilities.Add(ability);
            }

            var wrapper = Common.createVariantWrapper(prefix + "SoulboundPuppetAbilityBase", "", abilities.ToArray());

            wrapper.SetNameDescription(display_name, description);
            addFocusInvestmentCheck(wrapper, SpellSchool.Necromancy);
            return(Common.AbilityToFeature(wrapper));
        }
コード例 #6
0
ファイル: Time.cs プロジェクト: srpattison/KingmakerRebalance
        public BlueprintFeature createTimeFlicker(string name_prefix, string display_name, string description)
        {
            var resource = Helpers.CreateAbilityResource($"{name_prefix}Resource", "", "", "", null);

            resource.SetIncreasedByLevel(0, 1, classes);
            // Note: reworked to use Displacement instead of Blink
            var blur         = library.Get <BlueprintBuff>("dd3ad347240624d46a11a092b4dd4674");
            var displacement = library.Get <BlueprintBuff>("00402bae4442a854081264e498e7a833");

            var apply_blur = Common.createContextActionApplyBuff(blur, Helpers.CreateContextDuration(1, DurationRate.Minutes), dispellable: false);

            var ability = Helpers.CreateAbility(name_prefix + "Ability",
                                                display_name,
                                                description,
                                                "",
                                                blur.Icon,
                                                AbilityType.Supernatural,
                                                CommandType.Standard,
                                                AbilityRange.Personal,
                                                Helpers.oneMinuteDuration,
                                                "",
                                                Helpers.CreateRunActions(apply_blur),
                                                Helpers.CreateResourceLogic(resource)
                                                );

            ability.setMiscAbilityParametersSelfOnly();

            var ability2 = Helpers.CreateActivatableAbility(name_prefix + "ActivatableAbility",
                                                            display_name + ": Displacement",
                                                            description,
                                                            "",
                                                            blur.Icon,
                                                            displacement,
                                                            Kingmaker.UnitLogic.ActivatableAbilities.AbilityActivationType.Immediately,
                                                            CommandType.Standard,
                                                            null,
                                                            Helpers.CreateActivatableResourceLogic(resource, Kingmaker.UnitLogic.ActivatableAbilities.ActivatableAbilityResourceLogic.ResourceSpendType.NewRound)
                                                            );

            var feature = Common.AbilityToFeature(ability, hide: false);

            feature.AddComponent(Helpers.CreateAddAbilityResource(resource));

            var feature2 = Common.ActivatableAbilityToFeature(ability2);

            feature.AddComponent(Helpers.CreateAddFeatureOnClassLevel(feature2, 7, classes));
            foreach (var c in classes)
            {
                feature.AddComponents(Helpers.PrerequisiteClassLevel(c, 3, any: true));
            }
            return(feature);
        }
コード例 #7
0
        public BlueprintFeature createMindEye()
        {
            var ability = Common.convertToSpellLikeVariants(NewSpells.arcane_eye, prefix, classes, stat, resource, archetypes: getArchetypeArray(), self_only: false);

            ability.SetNameDescription("Mind Eye",
                                       "As a standard action, you can expend 1 point of mental focus to create a mind eye—a magical sensor through which you can see and hear. The mind eye is invisible and its size is Fine, giving it an AC of 18. The eye moves with a fly speed of 30 feet.");
            Common.unsetAsFullRoundAction(ability);
            addFocusInvestmentCheck(ability, SpellSchool.Divination);
            var feature = Common.AbilityToFeature(ability, false);

            addMinLevelPrerequisite(feature, 5);
            return(feature);
        }
コード例 #8
0
        public BlueprintFeature createMindOverGravity()
        {
            var ability = Common.convertToSpellLike(NewSpells.fly, prefix, classes, stat, resource, archetypes: getArchetypeArray());

            ability.Range = AbilityRange.Personal;
            ability.SetNameDescription("Mind Over Gravity",
                                       "As a standard action, you can expend 1 point of mental focus to give yourself an ability to fly and increase your speed by 10 feet. This effect lasts for 1 minute per occultist level you possess. You must be at least 7th level to select this focus power.");
            var feature = Common.AbilityToFeature(ability, false);

            addFocusInvestmentCheck(ability, SpellSchool.Transmutation);
            addMinLevelPrerequisite(feature, 7);
            return(feature);
        }
コード例 #9
0
        public BlueprintFeature createTrickstersEdge()
        {
            var ability = library.CopyAndAdd <BlueprintAbility>("fa12d155c229c134dbbbebf0d7b980f0", prefix + "TrickstersEdgeAbility", "");

            ability.ReplaceComponent <AbilityResourceLogic>(a => { a.RequiredResource = resource; a.Amount = 2; });
            ability.SetNameDescription("Trickster's Edge",
                                       "The occultist can expend 2 points of mental focus as a swift action, allowing him to anticipate his opponent's defenses. Enemies are denied their Dexterity bonus against the occultist's attacks until the end of the occultist's next turn.");

            addFocusInvestmentCheck(ability, SpellSchool.Enchantment, SpellSchool.Illusion);
            var feature = Common.AbilityToFeature(ability, false);

            return(feature);
        }
コード例 #10
0
        static void createKiPool()
        {
            var rogue_class = ResourcesLibrary.TryGetBlueprint <BlueprintCharacterClass>("299aa766dee3cbf4790da4efb8c72484");

            ki_resource = Helpers.CreateAbilityResource("NinjaKiResource", "", "", "", null);
            ki_resource.SetIncreasedByStat(0, StatType.Charisma);
            ki_resource.SetIncreasedByLevelStartPlusDivStep(0, 0, 0, 2, 1, 0, 0.0f, getRogueArray());

            var buff_extra_attack = library.Get <BlueprintBuff>("cadf8a5c42002494cabfc6c1196b514a");

            buff_extra_attack.SetNameDescription("", ""); //inherit from parent ability

            var ki_extra_attack = library.CopyAndAdd <BlueprintAbility>("ca948bb4ce1a2014fbf4d8d44b553074", "NinjaKiExtraAttackAbility", "");

            ki_extra_attack.SetDescription("By spending 1 point from his ki pool as a swift action, a ninja can make one additional attack at his highest attack bonus when making a full attack. This bonus attack stacks with haste and similar effects.");
            ki_extra_attack.ReplaceComponent <AbilityResourceLogic>(a => a.RequiredResource = ki_resource);

            var ki_speed_buff = library.CopyAndAdd <BlueprintBuff>("9ea4ec3dc30cd7940a372a4d699032e7", "NinjaKiSpeedBoostBuff", "");

            ki_speed_buff.ReplaceComponent <BuffMovementSpeed>(b => b.Value = 20);
            var ki_speed_burst = library.CopyAndAdd <BlueprintAbility>("8c98b8f3ac90fa245afe14116e48c7da", "NinjaKiSpeedBoostAbility", "");

            var new_actions = Common.changeAction <ContextActionApplyBuff>(ki_speed_burst.GetComponent <AbilityEffectRunAction>().Actions.Actions,
                                                                           c =>
            {
                c.Buff          = ki_speed_buff;
                c.DurationValue = Helpers.CreateContextDuration(1, DurationRate.Rounds);
            }
                                                                           );

            ki_speed_burst.ReplaceComponent <AbilityEffectRunAction>(Helpers.CreateRunActions(new_actions));
            ki_speed_burst.ReplaceComponent <AbilityResourceLogic>(a => a.RequiredResource = ki_resource);
            ki_speed_burst.SetNameDescription("Ki Speed Burst",
                                              "A ninja with this ki power can spend 1 point from his ki pool as a swift action to grant himself a sudden burst of speed. This increases the ninja's base land speed by 20 feet for 1 round.");


            var ki_extra_attack_feature = Common.AbilityToFeature(ki_extra_attack);

            ki_pool = Helpers.CreateFeature("KiPoolNinjaFeature",
                                            "Ki Pool",
                                            "At 2nd level, a ninja gains a pool of ki points, supernatural energy she can use to accomplish amazing feats. The number of points in the ninja’s ki pool is equal to 1/2 her ninja level + her Charisma modifier.\n"
                                            + "By spending 1 point from her ki pool, a ninja can make one additional attack at her highest attack bonus, but she can do so only when making a full attack. In addition, she can spend 1 point to increase her speed by 20 feet for 1 round. Each of these powers is activated as a swift action. A ninja can gain additional powers that consume points from her ki pool by selecting certain ninja tricks.",
                                            "",
                                            null,
                                            FeatureGroup.None,
                                            Helpers.CreateAddFacts(ki_speed_burst),
                                            Helpers.CreateAddFeatureOnClassLevel(ki_extra_attack_feature, 5, new BlueprintCharacterClass[] { archetype.GetParentClass() }, before: true),
                                            ki_resource.CreateAddAbilityResource());

            ninja_ki_extra_attack_ability = ki_extra_attack;
        }
コード例 #11
0
        public BlueprintFeature createBreathWeapon(string name_prefix, string display_name, string description, BlueprintAbility breath_weapon_prototype)
        {
            var resource = Helpers.CreateAbilityResource(name_prefix + "Resource", "", "", "", null);

            resource.SetIncreasedByLevelStartPlusDivStep(1, 5, 1, 5, 1, 0, 0.0f, classes);

            var ability = library.CopyAndAdd <BlueprintAbility>(breath_weapon_prototype.AssetGuid, name_prefix + "Ability", "");

            ability.SetDescription(description);
            ability.RemoveComponents <ContextRankConfig>();
            ability.RemoveComponents <AbilityResourceLogic>();

            ability.AddComponent(Helpers.CreateResourceLogic(resource));
            ability.AddComponent(Helpers.CreateContextRankConfig(baseValueType: ContextRankBaseValueType.ClassLevel,
                                                                 progression: ContextRankProgression.Div2, min: 1,
                                                                 classes: classes));
            ability.AddComponent(Common.createContextCalculateAbilityParamsBasedOnClasses(classes, stat));

            //at 20th level after revelation
            var ability2 = library.CopyAndAdd <BlueprintAbility>(ability.AssetGuid, name_prefix + "FinalAbility", "");

            ability2.RemoveComponents <AbilityResourceLogic>();

            var cooldown_buff = Helpers.CreateBuff(name_prefix + "CooldownBuff",
                                                   display_name + " Cooldown",
                                                   description,
                                                   "",
                                                   ability.Icon,
                                                   null);

            var apply_cooldown = Common.createContextActionApplyBuff(cooldown_buff, Helpers.CreateContextDuration(1, DurationRate.Rounds, DiceType.D4, 1), dispellable: false);

            ability2.AddComponent(Common.createAbilityExecuteActionOnCast(Helpers.CreateActionList(Common.createContextActionOnContextCaster(apply_cooldown))));
            ability2.AddComponent(Common.createAbilityCasterHasNoFacts(cooldown_buff));

            var feature1 = Common.AbilityToFeature(ability);

            feature1.AddComponent(Helpers.CreateAddAbilityResource(resource));
            var feature2 = Common.AbilityToFeature(ability2);
            var feature  = Helpers.CreateFeature(name_prefix + "Feature",
                                                 display_name,
                                                 description,
                                                 "",
                                                 ability.Icon,
                                                 FeatureGroup.None,
                                                 Helpers.CreateAddFeatureOnClassLevel(feature1, 20, classes, before: true),
                                                 Helpers.CreateAddFeatureOnClassLevel(feature2, 20, classes)
                                                 );

            return(feature);
        }
コード例 #12
0
            void createSpiritAbility()
            {
                var resource = Helpers.CreateAbilityResource(prefix + "MonstrousInsightResource", "", "", "", null);

                resource.SetIncreasedByStat(3, secondary_stat);
                var icon = library.Get <BlueprintFeature>("ee0b69e90bac14446a4cf9a050f87f2e").Icon; //detect magic

                var lore_action = Helpers.Create <NewMechanics.MonsterLore.ContextMonsterLoreCheck>(c =>
                {
                    c.value      = Helpers.CreateContextValue(AbilityRankType.Default);
                    c.descriptor = ModifierDescriptor.Insight;
                }
                                                                                                    );

                var buff = Helpers.CreateBuff(prefix + "MonstrousInsightBuff",
                                              "Monstrous Insight",
                                              "The shaman can identify creatures and gain insight into their strengths and weaknesses. As a standard action, the shaman can attempt a Knowledge skill check to identify a creature and its abilities (using the appropriate skill for the monster’s type) with an insight bonus equal to her shaman level. Whether or not the check is successful, she also gains a +2 insight bonus for 1 minute on attack rolls made against that creature and a +2 insight bonus to her AC against attacks made by that creature. The shaman can use this ability a number of times per day equal to 3 + her Charisma modifier.",
                                              "",
                                              icon,
                                              null,
                                              Helpers.Create <AttackBonusAgainstTarget>(c => { c.Value = Common.createSimpleContextValue(2); c.CheckCaster = true; }),
                                              Helpers.Create <ACBonusAgainstTarget>(c => { c.Value = Common.createSimpleContextValue(2); c.CheckCaster = true; c.Descriptor = ModifierDescriptor.Insight; })
                                              );
                var apply_buff = Common.createContextActionApplyBuff(buff, Helpers.CreateContextDuration(1, DurationRate.Minutes), dispellable: false);
                var ability    = Helpers.CreateAbility(prefix + "MonstrousInsightAbility",
                                                       buff.Name,
                                                       buff.Description,
                                                       "",
                                                       buff.Icon,
                                                       AbilityType.Supernatural,
                                                       CommandType.Standard,
                                                       AbilityRange.Touch,
                                                       Helpers.oneMinuteDuration,
                                                       Helpers.savingThrowNone,
                                                       Helpers.CreateDeliverTouch(),
                                                       Helpers.CreateRunActions(lore_action, apply_buff),
                                                       Helpers.Create <NewMechanics.MonsterLore.AbilityTargetCanBeInspected>(a => a.allow_reinspect = true),
                                                       Common.createAbilitySpawnFx("749bb96fb50ee5b4685645472d718465", anchor: AbilitySpawnFxAnchor.SelectedTarget),
                                                       Helpers.CreateContextRankConfig(baseValueType: ContextRankBaseValueType.ClassLevel, classes: hex_engine.hex_classes)

                                                       );

                ability.setMiscAbilityParametersTouchHarmful();
                var sticky_touch = Helpers.CreateTouchSpellCast(ability, resource);

                sticky_touch.AddComponent(Helpers.Create <NewMechanics.MonsterLore.AbilityTargetCanBeInspected>(a => a.allow_reinspect = true));

                spirit_ability = Common.AbilityToFeature(sticky_touch, hide: false);
                spirit_ability.AddComponent(Helpers.CreateAddAbilityResource(resource));
            }
コード例 #13
0
        public BlueprintFeature createUnraveling()
        {
            var dispel_magic = library.Get <BlueprintAbility>("143775c49ae6b7446b805d3b2e702298");
            var ability      = Common.convertToSpellLike(dispel_magic, prefix, classes, stat, resource, archetypes: getArchetypeArray());

            ability.setMiscAbilityParametersTouchHarmful();
            ability.SetNameDescription("Unraveling",
                                       "As a standard action, you can expend 1 point of mental focus to unravel a magical effect. This functions as a targeted dispel magic spell, but you must be adjacent to the effect to unravel it.");
            var feature = Common.AbilityToFeature(ability, false);

            addMinLevelPrerequisite(feature, 5);
            addFocusInvestmentCheck(ability, SpellSchool.Abjuration);
            return(feature);
        }
コード例 #14
0
        public BlueprintFeature createFormOfFlame(string name_prefix, string display_name, string description)
        {
            var resource = Helpers.CreateAbilityResource($"{name_prefix}Resource", "", "", "", null);

            resource.SetFixedResource(1);

            var form_ids = new string[] {
                "bb6bb6d6d4b27514dae8ec694433dcd3",
                "9a87d2fb0e288664c8dff299ff030a38",
                "2c40b391368f05e4b91aa8a8a51109ef",
                "c281eeecc554b72449fef43924e522ce"
            };

            var feature = Helpers.CreateFeature(name_prefix + "Feature",
                                                display_name,
                                                description,
                                                "",
                                                Helpers.GetIcon(form_ids[0]),
                                                FeatureGroup.None,
                                                Helpers.CreateAddAbilityResource(resource)
                                                );


            for (int i = 0; i < form_ids.Length; i++)
            {
                var spell   = library.Get <BlueprintAbility>(form_ids[i]);
                var ability = Common.convertToSuperNatural(spell, name_prefix, classes, stat, resource);

                var new_actions = Common.changeAction <ContextActionApplyBuff>(ability.GetComponent <AbilityEffectRunAction>().Actions.Actions, c => c.DurationValue = Helpers.CreateContextDuration(c.DurationValue.BonusValue, DurationRate.Hours));
                ability.ReplaceComponent <AbilityEffectRunAction>(a => a.Actions = Helpers.CreateActionList(new_actions));
                ability.LocalizedDuration = Helpers.CreateString(ability.name + ".Duration", Helpers.hourPerLevelDuration);
                ability.SetName(display_name + " " + Common.roman_id[i + 1]);

                if (i == 0)
                {
                    feature.AddComponent(Helpers.CreateAddFact(ability));
                }
                else
                {
                    var feat = Common.AbilityToFeature(ability);
                    feature.AddComponent(Helpers.CreateAddFeatureOnClassLevel(feat, 7 + i * 2, classes));
                }
            }
            foreach (var c in classes)
            {
                feature.AddComponents(Helpers.PrerequisiteClassLevel(c, 7, any: true));
            }
            return(feature);
        }
コード例 #15
0
        public BlueprintFeature createLifeDrain(BlueprintAbilityResource initial_resource)
        {
            var enervation = library.Get <BlueprintAbility>("f34fb78eaaec141469079af124bcfa0f");

            var actions = new ActionList[4];

            for (int i = 0; i < actions.Length; i++)
            {
                var level_drain = Helpers.CreateActionEnergyDrain(Helpers.CreateContextDiceValue(DiceType.Zero, 0, i + 1),
                                                                  Helpers.CreateContextDuration(Helpers.CreateContextValue(AbilityRankType.Default), DurationRate.Minutes),
                                                                  Kingmaker.RuleSystem.Rules.EnergyDrainType.Temporary
                                                                  );

                var recover_hp = Common.createContextActionOnContextCaster(Common.createContextActionHealTarget(Helpers.CreateContextDiceValue(DiceType.Zero, 0, Helpers.CreateContextValue(AbilityRankType.Default))));

                var effect = Helpers.CreateConditional(Common.createContextConditionHasFacts(false, Common.undead, Common.elemental, Common.construct),
                                                       new GameAction[0],
                                                       new GameAction[] { level_drain }.AddToArray(Enumerable.Repeat(recover_hp, i + 1))
                                                       );
                actions[i] = Helpers.CreateActionList(effect);
            }

            var ability = Helpers.CreateAbility(prefix + "LifeDrainAbility",
                                                "Life Drain",
                                                "At 8th level, a necroccultist can expend 1 point of mental focus from a necromancy implement to unleash a life-draining ray as a ranged touch attack that causes the target to accrue 1d4 negative levels. The ray has a medium range. The negative levels last a number of minutes equal to the necroccultist’s occultist level.\n"
                                                + "For each negative level this attack gives a target, the necroccultist regains a number of hit points equal to his occultist level. The necroccultist can use this ability once per day at 8th level, plus one additional time per day for every 3 occultist levels thereafter.",
                                                "",
                                                enervation.Icon,
                                                AbilityType.SpellLike,
                                                CommandType.Standard,
                                                AbilityRange.Medium,
                                                "",
                                                "",
                                                Helpers.CreateRunActions(Common.createContextActionRandomize(actions)),
                                                Helpers.CreateSpellDescriptor(SpellDescriptor.Death),
                                                Helpers.CreateSpellComponent(SpellSchool.Necromancy),
                                                enervation.GetComponent <AbilityDeliverProjectile>(),
                                                createClassScalingConfig(),
                                                createDCScaling(),
                                                initial_resource.CreateResourceLogic()
                                                );

            ability.setMiscAbilityParametersSingleTargetRangedHarmful(true);
            ability.SpellResistance = true;

            addFocusInvestmentCheck(ability, SpellSchool.Necromancy);

            return(Common.AbilityToFeature(ability, false));
        }
コード例 #16
0
        static void createCallCelestialAlly()
        {
            var resource = Helpers.CreateAbilityResource("SacredServantCelestialAllyResource", "", "", "", null);

            resource.SetFixedResource(1);
            var summons = new BlueprintAbility[]
            {
                library.Get <BlueprintAbility>("0964bf88b582bed41b74e79596c4f6d9"), //sm v
                library.Get <BlueprintAbility>("eb6df7ddfc0669d4fb3fc9af4bd34bca"), //sm vii
                library.Get <BlueprintAbility>("e96593e67d206ab49ad1b567327d1e75")  //sm ix
            };

            var summon_actions = new List <ActionList>();

            foreach (var s in summons)
            {
                var sa = s.GetComponent <AbilityEffectRunAction>().Actions.Actions;
                sa = Common.changeAction <ContextActionSpawnMonster>(sa, c => c.DurationValue = Helpers.CreateContextDuration(c.DurationValue.BonusValue, DurationRate.Minutes, c.DurationValue.DiceType, c.DurationValue.DiceCountValue));
                summon_actions.Add(Helpers.CreateActionList(sa));
            }


            var ability = Helpers.CreateAbility("SacredServantCallCelestialAllyAbility",
                                                "Call Celestial Ally",
                                                "At 8th level, a sacred servant can call upon her deity for aid, in the form of a powerful servant. This allows the sacred servant to bralani azata once per day as a spell-like ability for 1 minute per sacred servant level. At 12th level, she can summon movanic deva instead. Finally, at 16th level, a sacred servant can summon ghaelle azata.",
                                                "",
                                                Helpers.GetIcon("b1c7576bd06812b42bda3f09ab202f14"),
                                                AbilityType.SpellLike,
                                                CommandType.Standard,
                                                AbilityRange.Close,
                                                Helpers.minutesPerLevelDuration,
                                                "",
                                                resource.CreateResourceLogic(),
                                                Helpers.CreateContextRankConfig(ContextRankBaseValueType.ClassLevel, classes: new BlueprintCharacterClass[] { archetype.GetParentClass() }),
                                                Helpers.CreateContextRankConfig(ContextRankBaseValueType.ClassLevel, ContextRankProgression.DelayedStartPlusDivStep, AbilityRankType.SpeedBonus,
                                                                                classes: new BlueprintCharacterClass[] { archetype.GetParentClass() }, startLevel: 8, stepLevel: 4),
                                                Helpers.CreateSpellComponent(SpellSchool.Conjuration),
                                                Helpers.CreateSpellDescriptor(SpellDescriptor.Summoning),
                                                Helpers.CreateRunActions(Common.createRunActionsDependingOnContextValue(Helpers.CreateContextValue(AbilityRankType.SpeedBonus),
                                                                                                                        summon_actions.ToArray()
                                                                                                                        )
                                                                         )
                                                );

            Common.setAsFullRoundAction(ability);
            ability.setMiscAbilityParametersRangedDirectional();
            call_celestial_ally = Common.AbilityToFeature(ability, false);
            call_celestial_ally.AddComponent(resource.CreateAddAbilityResource());
        }
コード例 #17
0
        static void createSunbeam()
        {
            var sunbeam_resource = Helpers.CreateAbilityResource("DawnflowerAnchoriteSunbeamResource", "", "", "", null);

            sunbeam_resource.SetIncreasedByLevelStartPlusDivStep(1, 10, 1, 100, 0, 0, 0.0f, getDawnflowerAcnchoriteArray());

            var sunbeam_ability = library.CopyAndAdd <BlueprintAbility>("1fca0ba2fdfe2994a8c8bc1f0f2fc5b1", "DawnflowerAnchoriteSunbeam", "");

            sunbeam_ability.Type = AbilityType.SpellLike;
            sunbeam_ability.AddComponent(sunbeam_resource.CreateResourceLogic());

            sunbeam = Common.AbilityToFeature(sunbeam_ability, false);
            sunbeam.AddComponent(sunbeam_resource.CreateAddAbilityResource());
            sunbeam.SetDescription("At 7th level, a Dawnflower anchorite gains the ability to cast sunbeam once per day as a spell-like ability. His caster level is equal to his Hit Dice, and the save DC is Charisma-based. At 10th level, the Dawnflower anchorite can use this ability twice per day.");
        }
コード例 #18
0
        public BlueprintFeature createBattleCry(string name_prefix, string display_name, string description)
        {
            var bless    = library.Get <BlueprintAbility>("90e59f4a4ada87243b7b3535a06d0638");
            var resource = Helpers.CreateAbilityResource(name_prefix + "Resource", "", "", "", null);

            resource.SetIncreasedByLevelStartPlusDivStep(1, 5, 1, 5, 1, 0, 0.0f, classes);
            var rage = library.Get <BlueprintBuff>("a1ffec0ce7c167a40aaea13dc49b757b");
            var buff = Helpers.CreateBuff(name_prefix + "EffectBuff",
                                          display_name,
                                          description,
                                          "",
                                          rage.Icon,
                                          rage.FxOnStart,
                                          Helpers.Create <BuffAllSkillsBonus>(b => { b.Descriptor = ModifierDescriptor.Morale; b.Value = 1; b.Multiplier = Helpers.CreateContextValue(AbilityRankType.StatBonus); }),
                                          Helpers.CreateAddContextStatBonus(StatType.SaveWill, ModifierDescriptor.Morale, rankType: AbilityRankType.StatBonus),
                                          Helpers.CreateAddContextStatBonus(StatType.SaveFortitude, ModifierDescriptor.Morale, rankType: AbilityRankType.StatBonus),
                                          Helpers.CreateAddContextStatBonus(StatType.SaveReflex, ModifierDescriptor.Morale, rankType: AbilityRankType.StatBonus),
                                          Helpers.CreateAddContextStatBonus(StatType.AdditionalAttackBonus, ModifierDescriptor.Morale, rankType: AbilityRankType.StatBonus),
                                          Helpers.CreateAddContextStatBonus(StatType.AdditionalDamage, ModifierDescriptor.Morale, rankType: AbilityRankType.StatBonus),
                                          Helpers.CreateContextRankConfig(baseValueType: ContextRankBaseValueType.ClassLevel, progression: ContextRankProgression.OnePlusDivStep,
                                                                          classes: classes, stepLevel: 10, type: AbilityRankType.StatBonus, max: 2)
                                          );

            var apply_buff = Common.createContextActionApplyBuff(buff, Helpers.CreateContextDuration(Helpers.CreateContextValue(AbilityRankType.Default)), dispellable: false);
            var ability    = Helpers.CreateAbility($"{name_prefix}Ability",
                                                   display_name,
                                                   description,
                                                   "",
                                                   buff.Icon,
                                                   AbilityType.Extraordinary,
                                                   CommandType.Standard,
                                                   AbilityRange.Personal,
                                                   $"1 round/{stat.ToString()} modifier",
                                                   "",
                                                   bless.GetComponent <AbilitySpawnFx>(),
                                                   Helpers.CreateAbilityTargetsAround(50.Feet(), Kingmaker.UnitLogic.Abilities.Components.TargetType.Ally),
                                                   Helpers.CreateResourceLogic(resource),
                                                   Helpers.CreateRunActions(apply_buff),
                                                   Helpers.CreateContextRankConfig(baseValueType: ContextRankBaseValueType.StatBonus, stat: stat)
                                                   );

            ability.setMiscAbilityParametersSelfOnly();

            var feature = Common.AbilityToFeature(ability, false);

            feature.AddComponent(Helpers.CreateAddAbilityResource(resource));
            return(feature);
        }
コード例 #19
0
        public BlueprintFeature createPuppetMaster()
        {
            var dominate = library.Get <BlueprintAbility>("3c17035ec4717674cae2e841a190e757");
            var ability  = Common.convertToSuperNatural(dominate, prefix, classes, StatType.Intelligence, resource, archetypes: getArchetypeArray(), cost: 3);

            ability.Type = AbilityType.SpellLike;
            ability.AddComponent(createClassScalingConfig(progression: ContextRankProgression.Div2));
            ability.SetNameDescription("Puppet Master",
                                       "By taking a standard action and expending 3 points of mental focus, you can dominate the mind of a creature. This functions as per dominate monster (using your occultist level as the caster level), except that the saving throw DC is equal to 10 + half your occultist level + your Intelligence modifier and the duration is equal to 1 round per 2 occultist levels. You must be at least 9th level to select this focus power.");
            ability.LocalizedDuration = Helpers.CreateString(ability.name + ".Duration", "1 round/2 levels");
            addFocusInvestmentCheck(ability, SpellSchool.Enchantment, SpellSchool.Illusion);
            var feature = Common.AbilityToFeature(ability, false);

            addMinLevelPrerequisite(feature, 9);
            return(feature);
        }
コード例 #20
0
        public BlueprintFeature createDivinersFortune()
        {
            var diviners_fortune = library.CopyAndAdd <BlueprintAbility>("0d10ea99df0b06249823c760c46029b4", prefix + "DivinersFortuneAbility", "");

            diviners_fortune.ReplaceComponent <ContextRankConfig>(createClassScalingConfig(progression: ContextRankProgression.Div2, min: 1));
            diviners_fortune.SetDescription("You can expend 1 point of mental focus and touch any creature as a standard action to give it an insight bonus on all of its attack rolls, skill checks, ability checks, and saving throws equal to 1/2 your occultist level (minimum + 1) for 1 round.");
            var buff = library.CopyAndAdd <BlueprintBuff>("6d338078b1a8cdc41bf3a39f65247161", prefix + "DivinersFortuneBuff", "");

            diviners_fortune.ReplaceComponent <AbilityEffectRunAction>(a => a.Actions = Helpers.CreateActionList(Common.createContextActionApplySpellBuff(buff, Helpers.CreateContextDuration(1))));
            buff.ReplaceComponent <ContextRankConfig>(createClassScalingConfig(progression: ContextRankProgression.Div2, min: 1));
            var cast_ability = Helpers.CreateTouchSpellCast(diviners_fortune, resource);
            var feature      = Common.AbilityToFeature(cast_ability, false);

            addFocusInvestmentCheck(cast_ability, SpellSchool.Divination);
            return(feature);
        }
コード例 #21
0
        public BlueprintFeature createDangerSight()
        {
            var guidance_buff = library.Get <BlueprintBuff>("ec931b882e806ce42906597e5585c13f");

            var buff = Helpers.CreateBuff(prefix + "DangerSightBuff",
                                          "Danger Sight",
                                          "As a swift action, you can protect yourself from harm by expending 1 point of mental focus.  Doing so grants you an insight bonus to your AC or on your saving throw equal to 1/2 your occultist level. This bonus applies only to the next attack against you or saving throw you attempt, and if not applied within one minute, the protection fades and you gain no benefit. You must be at least 3rd level to select this focus power.",
                                          "",
                                          NewSpells.countless_eyes.Icon,
                                          null,
                                          Helpers.CreateAddContextStatBonus(StatType.AC, ModifierDescriptor.Insight),
                                          Helpers.CreateAddContextStatBonus(StatType.SaveFortitude, ModifierDescriptor.Insight),
                                          Helpers.CreateAddContextStatBonus(StatType.SaveReflex, ModifierDescriptor.Insight),
                                          Helpers.CreateAddContextStatBonus(StatType.SaveWill, ModifierDescriptor.Insight),
                                          Common.createAbilityScoreCheckBonus(Helpers.CreateContextValue(AbilityRankType.Default), ModifierDescriptor.Insight),
                                          createClassScalingConfig(progression: ContextRankProgression.Div2, min: 1)
                                          );

            var remove_self = Helpers.CreateActionList(Common.createContextActionRemoveBuff(buff));

            buff.AddComponents(guidance_buff.GetComponent <AddInitiatorSavingThrowTrigger>().CreateCopy(a => a.Action = remove_self),
                               Helpers.Create <AddTargetAttackRollTrigger>(a => { a.OnlyHit = false; a.ActionsOnAttacker = Helpers.CreateActionList(); a.ActionOnSelf = remove_self; })
                               );

            var ability = Helpers.CreateAbility(prefix + "DangerSightAbility",
                                                buff.Name,
                                                buff.Description,
                                                "",
                                                buff.Icon,
                                                AbilityType.SpellLike,
                                                CommandType.Swift,
                                                AbilityRange.Personal,
                                                Helpers.oneMinuteDuration,
                                                "",
                                                Helpers.CreateSpellComponent(SpellSchool.Divination),
                                                Helpers.CreateRunActions(Common.createContextActionApplySpellBuff(buff, Helpers.CreateContextDuration(1, DurationRate.Minutes))),
                                                Common.createAbilitySpawnFx("c388856d0e8855f429a83ccba67944ba", anchor: AbilitySpawnFxAnchor.SelectedTarget),
                                                resource.CreateResourceLogic()
                                                );

            ability.setMiscAbilityParametersSelfOnly();
            addFocusInvestmentCheck(ability, SpellSchool.Divination);
            var feature = Common.AbilityToFeature(ability, false);

            addMinLevelPrerequisite(feature, 3);
            return(feature);
        }
コード例 #22
0
ファイル: Evocation.cs プロジェクト: nstgc/KingmakerRebalance
        public BlueprintFeature createEnergyRay()
        {
            var rays = new BlueprintAbility[]
            {
                library.Get <BlueprintAbility>("435222be97067a447b2b40d3c58a058e"), //acid
                library.Get <BlueprintAbility>("7ef096fdc8394e149a9e8dced7576fee"), //cold
                library.Get <BlueprintAbility>("96ca3143601d6b242802655336620d91"), //electricity
                library.Get <BlueprintAbility>("cdb106d53c65bbc4086183d54c3b97c7")  //fire
            };

            var names = new string[] { "Acid", "Cold", "Electricity", "Fire" };

            var abilities = new BlueprintAbility[rays.Length];

            for (int i = 0; i < abilities.Length; i++)
            {
                var dmg_type = (rays[i].GetComponent <AbilityEffectRunAction>().Actions.Actions[0] as ContextActionDealDamage).DamageType.Energy;
                var ability  = Helpers.CreateAbility(prefix + names[i] + "EnergyRayAbility",
                                                     "Energy Ray: " + names[i],
                                                     $"As a standard action that provokes attacks of opportunity, you can expend 1 point of mental focus to unleash a ray of pure energy as a ranged touch attack. This ray has a range of 25 feet. The ray deals an amount of energy damage equal to 1d{BalanceFixes.getDamageDieString(DiceType.D6)} points + 1d{BalanceFixes.getDamageDieString(DiceType.D6)} points for every 2 occultist levels you possess beyond 1st (2d{BalanceFixes.getDamageDieString(DiceType.D6)} at 3rd level, 3d{BalanceFixes.getDamageDieString(DiceType.D6)} at 5th, and so on, to a maximum of 10d{BalanceFixes.getDamageDieString(DiceType.D6)} at 19th level). When you unleash an energy ray, you must decide what type of damage it deals (acid, cold, electricity, or fire).",
                                                     "",
                                                     rays[i].Icon,
                                                     AbilityType.SpellLike,
                                                     CommandType.Standard,
                                                     AbilityRange.Close,
                                                     "",
                                                     "",
                                                     Helpers.CreateRunActions(Helpers.CreateActionDealDamage(dmg_type, Helpers.CreateContextDiceValue(BalanceFixes.getDamageDie(DiceType.D6), Helpers.CreateContextValue(AbilityRankType.Default), 0))),
                                                     rays[i].GetComponent <AbilityDeliverProjectile>().CreateCopy(a => { a.Projectiles = new BlueprintProjectile[] { a.Projectiles[0] }; a.UseMaxProjectilesCount = false; }),
                                                     Helpers.CreateSpellComponent(SpellSchool.Evocation),
                                                     rays[i].GetComponent <SpellDescriptorComponent>(),
                                                     createClassScalingConfig(ContextRankProgression.StartPlusDivStep, stepLevel: 2, startLevel: 1),
                                                     resource.CreateResourceLogic()
                                                     );
                ability.SpellResistance = true;
                ability.setMiscAbilityParametersSingleTargetRangedHarmful(true);
                abilities[i] = ability;
            }

            var wrapper = Common.createVariantWrapper(prefix + "EnergyRayAbilityBase", "", abilities);

            wrapper.SetName("Energy Ray");
            addFocusInvestmentCheck(wrapper, SpellSchool.Evocation);
            return(Common.AbilityToFeature(wrapper, false));
        }
コード例 #23
0
        static void createValorInquisition()
        {
            var touch_of_resolve = library.CopyAndAdd <BlueprintAbility>("55a037e514c0ee14a8e3ed14b47061de", "TouchOfResolveAbility", ""); //remove fear

            touch_of_resolve.setMiscAbilityParametersTouchFriendly();
            touch_of_resolve.RemoveComponents <SpellListComponent>();
            touch_of_resolve.RemoveComponents <SpellComponent>();
            touch_of_resolve.RemoveComponents <AbilityTargetsAround>();
            touch_of_resolve.Range = AbilityRange.Touch;
            touch_of_resolve.SetNameDescription("Touch of Resolve", "You may use remove fear on a single creature a number of times per day equal to your 3 + your Wisdom bonus.");


            var touch_of_resolve_resource = Helpers.CreateAbilityResource("TouchOfResolveResource", "", "", "", null);

            touch_of_resolve_resource.SetIncreasedByStat(3, StatType.Wisdom);
            touch_of_resolve.AddComponent(Helpers.CreateResourceLogic(touch_of_resolve_resource));
            var touch_of_resolve_feat = Common.AbilityToFeature(touch_of_resolve, false);

            touch_of_resolve_feat.AddComponent(Helpers.CreateAddAbilityResource(touch_of_resolve_resource));

            var fearless = Helpers.CreateFeature("ValorFearlessFeature",
                                                 "Fearless",
                                                 "At 8th level, you become immune to fear.",
                                                 "",
                                                 library.Get <BlueprintActivatableAbility>("be68c660b41bc9247bcab727b10d2cd1").Icon, //defensive stance
                                                 FeatureGroup.None,
                                                 library.Get <BlueprintBuff>("993a5300cc84fde4bb4df441bf92d701").ComponentsArray     //fearless defensive stance power
                                                 );

            valor = Helpers.CreateProgression("ValorInquisitionProgression",
                                              "Valor Inquisition",
                                              "It takes courage to confront the enemies of your faith.",
                                              "",
                                              null,
                                              FeatureGroup.Domain);
            valor.Classes = scaling_classes;

            valor.LevelEntries = new LevelEntry[] {
                Helpers.LevelEntry(1, touch_of_resolve_feat),
                Helpers.LevelEntry(8, fearless)
            };
            valor.UIGroups = Helpers.CreateUIGroups(touch_of_resolve_feat, fearless);

            addToDomainSelection(valor, "CaydenCailean", "Erastil", "Iomedae", "Sarenrae");
        }
コード例 #24
0
        public BlueprintFeature createSuddenInsight()
        {
            var guidance_buff = library.Get <BlueprintBuff>("ec931b882e806ce42906597e5585c13f");

            var buff = Helpers.CreateBuff(prefix + "SuddenInsightBuff",
                                          "Sudden Insight",
                                          "As a swift action, you can expend 1 point of mental focus to gain an insight into your immediate future.\n"
                                          + "You gain an insight bonus on that roll equal to 1/2 your occultist level (minimum + 1) on your next ability check, attack roll, or skill check. If it’s not used by the end of your turn, the insight fades and you gain no benefit.",
                                          "",
                                          guidance_buff.Icon,
                                          null,
                                          Helpers.CreateAddContextStatBonus(StatType.AdditionalAttackBonus, ModifierDescriptor.Insight),
                                          Common.createAbilityScoreCheckBonus(Helpers.CreateContextValue(AbilityRankType.Default), ModifierDescriptor.Insight),
                                          Helpers.Create <BuffAllSkillsBonus>(b => { b.Value = 1; b.Descriptor = ModifierDescriptor.Insight; b.Multiplier = Helpers.CreateContextValue(AbilityRankType.Default); }),
                                          createClassScalingConfig(progression: ContextRankProgression.Div2, min: 1)
                                          );

            var remove_self = Helpers.CreateActionList(Common.createContextActionRemoveBuff(buff));

            buff.AddComponents(guidance_buff.GetComponent <AddInitiatorAttackRollTrigger>().CreateCopy(a => a.Action     = remove_self),
                               guidance_buff.GetComponent <AddInitiatorPartySkillRollTrigger>().CreateCopy(a => a.Action = remove_self),
                               guidance_buff.GetComponent <AddInitiatorSkillRollTrigger>().CreateCopy(a => a.Action      = remove_self)
                               );

            var ability = Helpers.CreateAbility(prefix + "SuddenInsightAbility",
                                                buff.Name,
                                                buff.Description,
                                                "",
                                                buff.Icon,
                                                AbilityType.SpellLike,
                                                CommandType.Swift,
                                                AbilityRange.Personal,
                                                Helpers.oneRoundDuration,
                                                "",
                                                Helpers.CreateSpellComponent(SpellSchool.Divination),
                                                Helpers.CreateRunActions(Common.createContextActionApplySpellBuff(buff, Helpers.CreateContextDuration(1))),
                                                Common.createAbilitySpawnFx("c388856d0e8855f429a83ccba67944ba", anchor: AbilitySpawnFxAnchor.SelectedTarget),
                                                resource.CreateResourceLogic()
                                                );

            ability.setMiscAbilityParametersSelfOnly();
            addFocusInvestmentCheck(ability, SpellSchool.Divination);

            return(Common.AbilityToFeature(ability, false));
        }
コード例 #25
0
        public BlueprintFeature createColorBeam()
        {
            var blinding_ray = library.Get <BlueprintAbility>("9b4d07751dd104243a94b495c571c9dd");

            var ability = library.CopyAndAdd(blinding_ray, prefix + "ColorBeam", "");

            ability.RemoveComponents <AbilityResourceLogic>();
            ability.RemoveComponents <ContextRankConfig>();
            ability.AddComponent(createClassScalingConfig(type: AbilityRankType.DamageDice));
            ability.AddComponent(resource.CreateResourceLogic());
            Common.addSpellDescriptor(ability, SpellDescriptor.MindAffecting);
            ability.SetNameDescription("Color Beam",
                                       "As a standard action, you can expend 1 point of mental focus to unleash a beam of cascading colors at any one target within 30 feet. Doing so requires a ranged touch attack. If the beam hits, the target is blinded for 1 round if it has a number of Hit Dice equal to or lower than your occultist level. A foe with a number of Hit Dice greater than your occultist level is instead dazzled for 1 round.\n"
                                       + "This is a mind-affecting illusion effect."
                                       );
            addFocusInvestmentCheck(ability, SpellSchool.Illusion);
            return(Common.AbilityToFeature(ability, false));
        }
コード例 #26
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, "");
        }
コード例 #27
0
        public BlueprintFeature createInspiredAssault()
        {
            var heroism = library.Get <BlueprintAbility>("5ab0d42fb68c9e34abae4921822b9d63");

            var buff = Helpers.CreateBuff(prefix + "InspiredAssaultBuff",
                                          "Inspired Assault",
                                          "As a standard action, you can inspire a living creature with a touch by expending 1 point of mental focus. The creature receives a morale bonus on attack rolls, damage rolls and savingthrows equal to 1 + 1 for every 6 occultist levels you possess(to a maximum bonus of + 4 at 18th level). This bonus lasts for 1 minute per occultist level.",
                                          "",
                                          heroism.Icon,
                                          null,
                                          Helpers.CreateAddContextStatBonus(StatType.AdditionalAttackBonus, ModifierDescriptor.Morale),
                                          Helpers.CreateAddContextStatBonus(StatType.AdditionalDamage, ModifierDescriptor.Morale),
                                          Helpers.CreateAddContextStatBonus(StatType.SaveFortitude, ModifierDescriptor.Morale),
                                          Helpers.CreateAddContextStatBonus(StatType.SaveReflex, ModifierDescriptor.Morale),
                                          Helpers.CreateAddContextStatBonus(StatType.SaveWill, ModifierDescriptor.Morale),
                                          createClassScalingConfig(ContextRankProgression.OnePlusDivStep, stepLevel: 6)
                                          );

            var ability = Helpers.CreateAbility(prefix + "InspiredAssaultAbility",
                                                buff.Name,
                                                buff.Description,
                                                "",
                                                buff.Icon,
                                                AbilityType.SpellLike,
                                                CommandType.Standard,
                                                AbilityRange.Touch,
                                                Helpers.minutesPerLevelDuration,
                                                "",
                                                Helpers.CreateRunActions(Common.createContextActionApplySpellBuff(buff, Helpers.CreateContextDuration(Helpers.CreateContextValue(AbilityRankType.Default), DurationRate.Minutes))),
                                                createClassScalingConfig(),
                                                Helpers.CreateSpellComponent(SpellSchool.Enchantment),
                                                resource.CreateResourceLogic(),
                                                Helpers.CreateSpellDescriptor(SpellDescriptor.MindAffecting | SpellDescriptor.Compulsion),
                                                heroism.GetComponent <AbilitySpawnFx>()
                                                );

            ability.SpellResistance = true;
            ability.setMiscAbilityParametersTouchFriendly();
            addFocusInvestmentCheck(ability, SpellSchool.Enchantment);
            var feature = Common.AbilityToFeature(ability, false);

            return(feature);
        }
コード例 #28
0
        public BlueprintFeature createPsychicFog()
        {
            var fog_cloud = Common.convertToSpellLike(NewSpells.obscuring_mist, prefix, classes, stat, resource, archetypes: getArchetypeArray());
            var solid_fog = Common.convertToSpellLike(NewSpells.solid_fog, prefix, classes, stat, resource, archetypes: getArchetypeArray(), cost: 2);

            fog_cloud.SetName("Psychic Fog (Obscuring Mist)");
            solid_fog.SetName("Psychic Fog (Solid Fog)");
            solid_fog.AddComponent(Helpers.Create <NewMechanics.AbilityShowIfHasClassLevels>(a => { a.level = 7; a.character_classes = classes; }));

            var wrapper = Common.createVariantWrapper(prefix + "PsychicFogBase", "", fog_cloud, solid_fog);

            wrapper.SetNameDescription("Psychic Fog",
                                       "As a standard action, you can expend 1 point of mental focus to create a cloud of fog. This fog lasts for 1 minute per occultist level you possess. It functions as fog cloud, except it can’t be dispersed by wind. At 7th level, You can expend 1 additional point of mental focus when creating this fog, causing it to become more tangible and function as solid fog.");

            addFocusInvestmentCheck(wrapper, SpellSchool.Conjuration);
            var feature = Common.AbilityToFeature(wrapper, false);

            return(feature);
        }
コード例 #29
0
        public BlueprintFeature createBedevelingAura()
        {
            var buff = Helpers.CreateBuff(prefix + "BedevelingAuraEffectBuff",
                                          "Bedeveling Aura",
                                          "By expending one point of mental focus, you can emit a 30-foot aura that bedevils your enemies with phantasmal assailants. Enemies within this aura move at half speed, are unable to take attacks of opportunity, and are considered to be flanked. This is a mind-affecting effect. The aura lasts for a number of round equal to 1/2 your occultist level.\n"
                                          + "You must be at least 9th level to select this focus power.",
                                          "",
                                          Helpers.GetIcon("b48674cef2bff5e478a007cf57d8345b"), //remove curse
                                          null,
                                          Common.createAddCondition(Kingmaker.UnitLogic.UnitCondition.Slowed),
                                          Common.createAddCondition(Kingmaker.UnitLogic.UnitCondition.DisableAttacksOfOpportunity),
                                          Helpers.Create <FlankingMechanics.AlwaysFlanked>(),
                                          Helpers.CreateSpellDescriptor(SpellDescriptor.MindAffecting)
                                          );

            var area_buff = Common.createBuffAreaEffect(buff, 30.Feet(), Helpers.CreateConditionsCheckerOr(Helpers.Create <ContextConditionIsEnemy>()));

            area_buff.GetComponent <AddAreaEffect>().AreaEffect.Fx = Common.createPrefabLink("dfadb7fa26de0384d9d9a6dabb0bea72");
            area_buff.SetBuffFlags(0);

            var ability = Helpers.CreateAbility(prefix + "BedevelingAuraAbility",
                                                buff.Name,
                                                buff.Description,
                                                "",
                                                buff.Icon,
                                                AbilityType.Supernatural,
                                                CommandType.Standard,
                                                AbilityRange.Personal,
                                                "1 round/2 levels",
                                                "",
                                                Helpers.CreateRunActions(Common.createContextActionApplyBuff(area_buff, Helpers.CreateContextDuration(Helpers.CreateContextValue(AbilityRankType.Default)))),
                                                createClassScalingConfig(ContextRankProgression.Div2),
                                                resource.CreateResourceLogic()
                                                );

            ability.setMiscAbilityParametersSelfOnly();

            addFocusInvestmentCheck(ability, SpellSchool.Illusion);
            var feature = Common.AbilityToFeature(ability, false);

            addMinLevelPrerequisite(feature, 9);
            return(feature);
        }
コード例 #30
0
        public BlueprintFeature createRestoringTouch()
        {
            var action = Helpers.Create <ContextActionHealStatDamage>(c =>
            {
                c.HealDrain = false;
                c.Value     = Helpers.CreateContextDiceValue(DiceType.Zero, 0, Helpers.CreateContextValue(AbilityRankType.Default));
            }
                                                                      );
            var action_drain = action.CreateCopy(c => c.HealDrain = true);

            var ability = Helpers.CreateAbility(prefix + "RestoratingTouchAbility",
                                                "Restorating Touch",
                                                "As a standard action, you can expend 2 points of mental focus to cure a living creature you touch of temporary ability damage. You cure 1 point of temporary ability damage to a single ability score for every 3 occultist levels you have. At 10th level, you can expend an additional point of mental focus to instead restore the same amount of permanent ability drain.",
                                                "",
                                                Helpers.GetIcon("f2115ac1148256b4ba20788f7e966830"),
                                                AbilityType.SpellLike,
                                                CommandType.Standard,
                                                AbilityRange.Touch,
                                                "",
                                                "",
                                                Helpers.CreateRunActions(action),
                                                Common.createAbilitySpawnFx("621885df4b6add9489c8edd14b844ad6"),
                                                resource.CreateResourceLogic(amount: 2),
                                                createClassScalingConfig(ContextRankProgression.DivStep, stepLevel: 3, min: 1)
                                                );

            ability.setMiscAbilityParametersTouchFriendly();

            var ability_drain = library.CopyAndAdd(ability, prefix + "RestoratingTouchDrainAbility", "");

            ability_drain.SetName("Restorating Touch: (Heal Ability Drain)");
            ability_drain.ReplaceComponent <AbilityResourceLogic>(a => a.Amount = 3);
            ability_drain.ReplaceComponent <AbilityEffectRunAction>(a => { a.Actions = Helpers.CreateActionList(action_drain); });
            ability_drain.AddComponent(Helpers.Create <NewMechanics.AbilityShowIfHasClassLevels>(a => a.character_classes = classes));

            addFocusInvestmentCheck(ability, SpellSchool.Conjuration, SpellSchool.Abjuration);
            addFocusInvestmentCheck(ability_drain, SpellSchool.Conjuration, SpellSchool.Abjuration);
            var wrapper = Common.createVariantWrapper(prefix + "RestoratingTouchAbilityBase", "", ability, ability_drain);

            var feature = Common.AbilityToFeature(wrapper, false);

            return(feature);
        }