Exemple #1
0
        static void createTripleTime()
        {
            var buff = library.Get <BlueprintBuff>("035ed56eb973f0e469a288ff5991c9ff"); //longstrider

            var apply_buff = Common.createContextActionApplyBuff(buff, Helpers.CreateContextDuration(1, DurationRate.Hours), dispellable: false);

            var ability = Helpers.CreateAbility("TripleTimeAbility",
                                                "Triple Time",
                                                "Effect: This bright and spritely tune mimics the sound of human feet, slowly building to a steady, ground-eating pace. When you complete this performance, you affect one ally in hearing range per bard level. This masterpiece increases the affected target’s base land speed by 10 feet for 1 hour.",
                                                "",
                                                buff.Icon,
                                                AbilityType.Extraordinary,
                                                UnitCommand.CommandType.Standard,
                                                AbilityRange.Personal,
                                                "1 hour",
                                                "",
                                                Helpers.CreateRunActions(apply_buff),
                                                Helpers.CreateAbilityTargetsAround(30.Feet(), TargetType.Ally),
                                                performance_resource.CreateResourceLogic(),
                                                Common.createAbilitySpawnFx("20d09f919accddf41bde3820341d08b7", anchor: Kingmaker.UnitLogic.Abilities.Components.Base.AbilitySpawnFxAnchor.SelectedTarget),
                                                Common.createAbilityCasterHasNoFacts(NewSpells.silence_buff),
                                                Common.createAbilityTargetHasFact(true, NewSpells.silence_buff)
                                                );

            ability.setMiscAbilityParametersSelfOnly();
            Common.setAsFullRoundAction(ability);

            triple_time        = Common.AbilityToFeature(ability, false);
            triple_time.Groups = new FeatureGroup[] { FeatureGroup.Feat };
            triple_time.AddComponents(Helpers.PrerequisiteClassLevel(bard_class, 3, any: true),
                                      Helpers.PrerequisiteClassLevel(Skald.skald_class, 3, any: true));;
        }
Exemple #2
0
        static void createFlurryOfDarts()
        {
            var buff = Helpers.CreateBuff("FlurryOfDartsBuff",
                                          "Flurry of Darts",
                                          "A ninja with this ability can expend 1 ki point from her ki pool as a swift action before she makes a full-attack attack with darts. During that attack, she can throw two additional darts at her highest attack bonus, but all of her darts attacks are made at a –2 penalty, including the two extra attacks.\n"
                                          + "Additionaly, darts are considered as light weapons for the purpose of two-weapon fighting.",
                                          "",
                                          Helpers.GetIcon("b296531ffe013c8499ad712f8ae97f6b"), //acid dart
                                          null,
                                          Helpers.Create <NewMechanics.BuffExtraAttackCategorySpecific>(b => { b.categories = new WeaponCategory[] { WeaponCategory.Dart }; b.num_attacks = 2; b.attack_bonus = -2; })
                                          );

            var apply_buff = Common.createContextActionApplyBuff(buff, Helpers.CreateContextDuration(1), dispellable: false);

            var ability = Helpers.CreateAbility("FlurryOfDartsAbility",
                                                buff.Name,
                                                buff.Description,
                                                "",
                                                buff.Icon,
                                                AbilityType.Extraordinary,
                                                CommandType.Swift,
                                                AbilityRange.Personal,
                                                Helpers.oneRoundDuration,
                                                "",
                                                Helpers.CreateRunActions(apply_buff),
                                                ki_resource.CreateResourceLogic(),
                                                Helpers.Create <AbilityCasterMainWeaponCheck>(a => a.Category = new WeaponCategory[] { WeaponCategory.Dart })
                                                );

            ability.setMiscAbilityParametersSelfOnly();

            flurry_of_darts = Common.AbilityToFeature(ability, false);
            flurry_of_darts.AddComponent(Helpers.Create <HoldingItemsMechanics.ConsiderWeaponCategoriesAsLightWeapon>(c => c.categories = new WeaponCategory[] { WeaponCategory.Dart }));
        }
Exemple #3
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));
        }
Exemple #4
0
        public BlueprintFeature createGhostlyHorde(BlueprintAbilityResource initial_resource)
        {
            var display_name = "Ghostly Horde";
            var description  = "At 5th level, a necroccultist can spend 1 point of mental focus from a necromancy implement to summon a mob of ghostly spirits to harass his enemies.\n"
                               + "Summoning the ghostly horde is a standard action that doesn’t provoke attacks of opportunity. The ghostly horde appears within 60 feet of the necroccultist, fills an area 20 feet in diameter, and always hovers a few inches off the ground (thus ignoring any difficult terrain). The necroccultist can command the ghostly horde to move up to 30 feet each round as a move action, though the farthest edge of the ghostly horde can never be more than 60 feet from the necroccultist.\n"
                               + $"Any creature caught inside the ghostly horde takes 1d{BalanceFixes.getDamageDieString(DiceType.D6)} points of damage per 2 occultist levels at the start of its turn(up to a maximum of 10d{BalanceFixes.getDamageDieString(DiceType.D6)} points of damage at 20th level). A successful Fortitude save (DC = 10 + 1/2 the necroccultist’s occultist level +the necroccultist’s Intelligence modifier) halves this damage.This damage is not negative energy—it manifests in the form of physical wounds and aches as if from supernatural aging.Nonliving creatures and creatures immune to magical aging are immune to this damage, but otherwise the damage bypasses all forms of damage reduction. The ghostly horde remains for 1 round, though at the beginning of his turn, the necroccultist can expend 1 point of mental focus as a swift action to extend the duration for 1 additional round. The necroccultist can use this ability once per day at 5th level, plus one additional time per day for every 5 occultist levels thereafter.";
            var icon = library.Get <BlueprintAbility>("b24583190f36a8442b212e45226c54fc").Icon; //wail of banshee

            var area = library.CopyAndAdd <BlueprintAbilityAreaEffect>("6fa0adacca8d00f4aaba1e8df77a318f", prefix + "GhostlyHordeArea", "");


            var dmg = Helpers.CreateActionDealDamage(DamageEnergyType.Unholy, Helpers.CreateContextDiceValue(BalanceFixes.getDamageDie(DiceType.D6), Helpers.CreateContextValue(AbilityRankType.Default)), halfIfSaved: true, isAoE: true);


            var actions = Helpers.CreateActionList(Helpers.CreateConditional(Common.createContextConditionHasFacts(false, Common.undead, Common.elemental, Common.construct),
                                                                             null,
                                                                             Helpers.CreateActionSavingThrow(SavingThrowType.Fortitude, dmg))
                                                   );

            area.ComponentsArray = new BlueprintComponent[]
            {
                Helpers.Create <NewMechanics.AbilityAreaEffectRunActionWithFirstRound>(a =>
                {
                    a.UnitEnter  = Helpers.CreateActionList();
                    a.Round      = actions;
                    a.FirstRound = Helpers.CreateActionList();
                }),
                Helpers.CreateSpellDescriptor(SpellDescriptor.Death),
                createDCScaling(),
                createClassScalingConfig()
            };

            var caster_buff = Helpers.CreateBuff(prefix + "GhostlyHordeCasterBuff",
                                                 display_name + " (Caster)",
                                                 description,
                                                 "",
                                                 icon,
                                                 null
                                                 );

            caster_buff.AddComponent(Helpers.CreateAddFactContextActions(deactivated: Helpers.Create <NewMechanics.RemoveUniqueArea>(a => a.feature = caster_buff)));
            area.AddComponent(Helpers.Create <UniqueAreaEffect>(u => u.Feature = caster_buff));
            caster_buff.Stacking = StackingType.Summ;

            var spawn_area = Common.createContextActionSpawnAreaEffect(area, Helpers.CreateContextDuration(100));


            var move_ability = Helpers.CreateAbility(prefix + "GhostlyHordeMoveAbility",
                                                     display_name,
                                                     description,
                                                     "",
                                                     icon,
                                                     AbilityType.Supernatural,
                                                     UnitCommand.CommandType.Move,
                                                     AbilityRange.Medium,
                                                     "",
                                                     "Fortitude half",
                                                     Helpers.CreateRunActions(spawn_area),
                                                     Common.createAbilityAoERadius(20.Feet(), TargetType.Any),
                                                     Helpers.CreateSpellDescriptor(SpellDescriptor.Death),
                                                     Helpers.CreateSpellComponent(SpellSchool.Necromancy),
                                                     Common.createAbilityCasterHasFacts(caster_buff)
                                                     );

            move_ability.setMiscAbilityParametersRangedDirectional();

            //caster_buff.AddComponent(Helpers.CreateAddFact(move_ability));
            caster_buff.AddComponent(Helpers.Create <ReplaceAbilityParamsWithContext>(r => r.Ability = move_ability));


            var apply_caster_buff      = Common.createContextActionApplyBuffToCaster(caster_buff, Helpers.CreateContextDuration(1));
            var apply_caster_buff_init = Common.createContextActionApplyBuffToCaster(caster_buff, Helpers.CreateContextDuration(), duration_seconds: 9);

            var ability = Helpers.CreateAbility(prefix + "GhostlyHordeAbility",
                                                display_name,
                                                description,
                                                "",
                                                icon,
                                                AbilityType.Supernatural,
                                                UnitCommand.CommandType.Standard,
                                                AbilityRange.Medium,
                                                Helpers.oneRoundDuration,
                                                "Fortitude half",
                                                Helpers.CreateRunActions(spawn_area),
                                                createDCScaling(),
                                                Common.createAbilityAoERadius(20.Feet(), TargetType.Any),
                                                Helpers.CreateSpellDescriptor(SpellDescriptor.Death),
                                                Helpers.CreateSpellComponent(SpellSchool.Necromancy),
                                                Common.createAbilityExecuteActionOnCast(Helpers.CreateActionList(apply_caster_buff_init)),
                                                initial_resource.CreateResourceLogic()
                                                );

            ability.setMiscAbilityParametersRangedDirectional();

            var prolong_ability = Helpers.CreateAbility(prefix + "GhostlyHordeProlongAbility",
                                                        display_name + " Prolongation",
                                                        description,
                                                        "",
                                                        icon,
                                                        AbilityType.Spell,
                                                        UnitCommand.CommandType.Swift,
                                                        AbilityRange.Personal,
                                                        Helpers.oneRoundDuration,
                                                        "",
                                                        Helpers.CreateRunActions(apply_caster_buff),
                                                        resource.CreateResourceLogic(),
                                                        Common.createAbilityCasterHasFacts(caster_buff)
                                                        );

            prolong_ability.setMiscAbilityParametersSelfOnly();

            addFocusInvestmentCheck(ability, SpellSchool.Necromancy);


            var wrapper = Common.createVariantWrapper(prefix + "GhostlyHordeBaseAbility", "", ability, move_ability, prolong_ability);
            var feature = Common.AbilityToFeature(wrapper, false);

            return(feature);
        }
        public BlueprintFeature createSpaceRendingSpell()
        {
            var dimension_door = library.Get <BlueprintAbility>("a9b8be9b87865744382f7c64e599aeb2");

            var actions   = new ActionList[10];
            var buffs     = new BlueprintBuff[9];
            var abilities = new BlueprintAbility[9];

            for (int i = 0; i < 9; i++)
            {
                buffs[i] = Helpers.CreateBuff(name_prefix + $"{i + 1}SpaceRendingSpellBuff",
                                              "Space-rending Spell " + Common.roman_id[i + 1],
                                              "The psychic can warp space with her mind, teleporting herself as she casts her linked spell. She teleports herself 10 feet per point she spends from her phrenic pool (as dimension door). The maximum number of points she can spend in this way is equal to the linked spell’s level.",
                                              "",
                                              dimension_door.Icon,
                                              null);

                abilities[i] = Helpers.CreateAbility(name_prefix + $"{i + 1}SpaceRendingSpellAbility",
                                                     buffs[i].Name,
                                                     buffs[i].Description,
                                                     "",
                                                     buffs[i].Icon,
                                                     AbilityType.Supernatural,
                                                     UnitCommand.CommandType.Free,
                                                     AbilityRange.Custom,
                                                     "",
                                                     "",
                                                     resource.CreateResourceLogic(amount: i + 1),
                                                     Helpers.CreateRunActions(Helpers.Create <ContextActionCastSpell>(c => c.Spell = dimension_door))
                                                     );
                abilities[i].CustomRange = ((i + 1) * 10).Feet();
                abilities[i].setMiscAbilityParametersRangedDirectional();
                actions[i + 1] = Helpers.CreateActionList(Common.createContextActionApplyBuff(buffs[i], Helpers.CreateContextDuration(1), dispellable: false));
            }

            for (int i = 0; i < 9; i++)
            {
                abilities[i].AddComponent(Common.createAbilityCasterHasFacts(buffs.Skip(i).ToArray()));
                var remove_buffs = Common.createContextActionOnContextCaster(Helpers.Create <NewMechanics.ContextActionRemoveBuffs>(c => c.Buffs = buffs));
                abilities[i].ReplaceComponent <AbilityEffectRunAction>(a => a.Actions.Actions = a.Actions.Actions.AddToArray(remove_buffs));
            }

            var ability = Common.createVariantWrapper(name_prefix + "SpaceRendingSpellAbility", "", abilities);

            ability.SetName("Space-rending Spell");

            var buff = Helpers.CreateBuff(name_prefix + "SpaceRendingSpellBuff",
                                          ability.Name,
                                          ability.Description,
                                          "",
                                          ability.Icon,
                                          null,
                                          Helpers.Create <OnCastMechanics.RunActionAfterSpellCastBasedOnLevel>(r => { r.specific_class = character_class; r.actions = actions; })
                                          );

            var toggle = Common.buffToToggle(buff, UnitCommand.CommandType.Free, true,
                                             resource.CreateActivatableResourceLogic(spendType: ActivatableAbilityResourceLogic.ResourceSpendType.Never)
                                             );

            toggle.Group = ActivatableAbilityGroupExtension.PhrenicAmplification.ToActivatableAbilityGroup();
            var feature = Common.ActivatableAbilityToFeature(toggle, false);

            feature.AddComponent(Helpers.CreateAddFact(ability));
            return(feature);
        }