Exemplo n.º 1
0
        //spirit armor = air barrier shaman hex


        public BlueprintFeature createStormOfSouls(string name_prefix, string display_name, string description)
        {
            var icon     = LoadIcons.Image2Sprite.Create(@"AbilityIcons/StormOfSouls.png");
            var resource = Helpers.CreateAbilityResource($"{name_prefix}Resource", "", "", "", null);

            resource.SetIncreasedByLevelStartPlusDivStep(1, 11, 1, 4, 1, 0, 0, classes, getArchetypeArray());

            var dmg = Helpers.CreateActionDealDamage(DamageEnergyType.Divine, Helpers.CreateContextDiceValue(BalanceFixes.getDamageDie(DiceType.D8), Helpers.CreateContextValue(AbilityRankType.DamageDice)),
                                                     halfIfSaved: true, isAoE: true);
            var dmg_undead = Helpers.CreateActionDealDamage(DamageEnergyType.Divine, Helpers.CreateContextDiceValue(BalanceFixes.getDamageDie(DiceType.D8), Helpers.CreateContextValue(AbilityRankType.DamageDiceAlternative)),
                                                            halfIfSaved: true, isAoE: true);
            var undead = library.Get <BlueprintFeature>("734a29b693e9ec346ba2951b27987e33");

            var effect = Helpers.CreateConditional(Helpers.CreateConditionHasFact(undead), dmg_undead, dmg);

            var ability = Helpers.CreateAbility($"{name_prefix}Ability",
                                                display_name,
                                                description,
                                                "",
                                                icon,
                                                AbilityType.Supernatural,
                                                CommandType.Standard,
                                                AbilityRange.Medium,
                                                "",
                                                "Fortitude half",
                                                createClassScalingConfig(ContextRankProgression.Div2, AbilityRankType.DamageDice),
                                                createClassScalingConfig(ContextRankProgression.AsIs, AbilityRankType.DamageDiceAlternative),
                                                Helpers.CreateRunActions(SavingThrowType.Fortitude, effect),
                                                Helpers.CreateAbilityTargetsAround(20.Feet(), Kingmaker.UnitLogic.Abilities.Components.TargetType.Any),
                                                Common.createAbilitySpawnFx("872f843a900d8f442896e5fdae6d44d1", anchor: AbilitySpawnFxAnchor.ClickedTarget),
                                                Helpers.CreateResourceLogic(resource),
                                                Common.createContextCalculateAbilityParamsBasedOnClassesWithArchetypes(classes, getArchetypeArray(), stat)
                                                );

            ability.setMiscAbilityParametersRangedDirectional();

            var feature = Helpers.CreateFeature(name_prefix + "Feature",
                                                ability.Name,
                                                ability.Description,
                                                "",
                                                ability.Icon,
                                                FeatureGroup.None,
                                                resource.CreateAddAbilityResource(),
                                                Helpers.CreateAddFact(ability)
                                                );

            addMinLevelPrerequisite(feature, 7);
            return(feature);
        }
Exemplo n.º 2
0
        static void createEmpoweredHealing()
        {
            var sigil_of_creation_feature = library.Get <BlueprintFeature>("3e354532d3e41b548b883f7a67f27acf");

            empowered_healing = Helpers.CreateFeature("EmpoweredHealingKineticHealerFeatureFeature",
                                                      "Greater Healing",
                                                      "A kinetic chirurgeon can choose to roll one additional die when using kinetic healer. This increases to two additional dice at 11th level, and to three additional dice at 17th level. ",
                                                      "",
                                                      Helpers.GetIcon("a1de1e4f92195b442adb946f0e2b9d4e"),
                                                      FeatureGroup.KineticWildTalent,
                                                      Common.createPrerequisiteArchetypeLevel(archetype.GetParentClass(), archetype, 5)
                                                      );

            var kinetic_healer = library.Get <BlueprintAbility>("eff667a3a43a77d45a193bb7c94b3a6c"); //kinetic healer

            var heal_varinats = kinetic_healer.GetComponent <AbilityVariants>();

            for (int i = 0; i < 2; i++)
            {
                var ability = library.CopyAndAdd(heal_varinats.Variants[i], "Empowered" + heal_varinats.Variants[i].name, "");
                var actions = ability.GetComponent <AbilityEffectRunAction>().Actions.Actions;
                actions = Common.changeAction <ContextActionHealTarget>(actions, c => c.Value = Helpers.CreateContextDiceValue(BalanceFixes.getDamageDie(DiceType.D6), Helpers.CreateContextValue(AbilityRankType.ProjectilesCount), c.Value.BonusValue));
                ability.ReplaceComponent <AbilityEffectRunAction>(a => a.Actions = Helpers.CreateActionList(actions));
                ability.AddComponent(Helpers.CreateContextRankConfig(ContextRankBaseValueType.MaxClassLevelWithArchetype, ContextRankProgression.DelayedStartPlusDivStep, AbilityRankType.ProjectilesCount,
                                                                     startLevel: 5, stepLevel: 6, classes: new BlueprintCharacterClass[] { archetype.GetParentClass() },
                                                                     archetype: archetype)
                                     );
                ability.AddComponent(Common.createAbilityShowIfCasterHasFact(empowered_healing));
                ability.SetNameDescriptionIcon(heal_varinats.Variants[i].Name + " (Greater Healing)", empowered_healing.Description, empowered_healing.Icon);
                heal_varinats.Variants = heal_varinats.Variants.AddToArray(ability);
                sigil_of_creation_feature.GetComponent <AutoMetamagic>().Abilities.Add(ability);
            }
        }
Exemplo n.º 3
0
        static void createBloodfireAndBloodrain()
        {
            bloodfire = Helpers.CreateFeature("BloodFireHolyVindicatorFeature",
                                              "Bloodfire",
                                              $"At 5th level, while a vindicator’s stigmata are bleeding, his blood runs down his weapons like sacred or profane liquid energy; when he uses Channel Smite, the damage increases by 1d{BalanceFixes.getDamageDieString(DiceType.D6)}, and if the target fails its save, it is sickened and takes 1d6 points of bleed damage each round on its turn. The target can attempt a new save every round to end the sickened and bleed effects.",
                                              "",
                                              null,
                                              FeatureGroup.None);

            var bloodfire_buff = Helpers.CreateBuff("BloodFireHolyVindicatorBuff",
                                                    bloodfire.Name,
                                                    bloodfire.Description,
                                                    "",
                                                    null,
                                                    null);

            bloodfire_buff.SetBuffFlags(BuffFlags.HiddenInUi);

            bloodrain = Helpers.CreateFeature("BloodRainHolyVindicatorFeature",
                                              "Bloodrain",
                                              $"At 9th level, while his stigmata are bleeding, the vindicator’s harmful channeled energy is accompanied by a burst of sacred or profane liquid energy, increasing the damage by 1d{BalanceFixes.getDamageDieString(DiceType.D6)}. Creatures failing their saves against the channeled energy become sickened and take 1d6 points of bleed damage each round. Affected creatures can attempt a new save every round to end the sickened and bleed effects.",
                                              "",
                                              null,
                                              FeatureGroup.None);

            var bloodrain_buff = Helpers.CreateBuff("BloodRainHolyVindicatorBuff",
                                                    bloodrain.Name,
                                                    bloodrain.Description,
                                                    "",
                                                    null,
                                                    null);

            bloodrain_buff.SetBuffFlags(BuffFlags.HiddenInUi);

            foreach (var buff_list in stigmata_buffs.Values)
            {
                foreach (var buff in buff_list)
                {
                    Common.addContextActionApplyBuffOnFactsToActivatedAbilityBuffNoRemove(buff, bloodfire_buff, bloodfire);
                    Common.addContextActionApplyBuffOnFactsToActivatedAbilityBuffNoRemove(buff, bloodrain_buff, bloodrain);
                }
            }

            var bleed_buff    = library.Get <BlueprintBuff>("75039846c3d85d940aa96c249b97e562");
            var sickened_buff = library.Get <BlueprintBuff>("4e42460798665fd4cb9173ffa7ada323");

            var blood_buff = Helpers.CreateBuff("HolyVindicatorBloodBuff",
                                                "",
                                                "",
                                                "",
                                                null,
                                                null,
                                                Helpers.CreateAddFactContextActions(new GameAction[] { Common.createContextActionApplyBuff(bleed_buff, Helpers.CreateContextDuration(), is_permanent: true, dispellable: false),
                                                                                                       Common.createContextActionApplyBuff(sickened_buff, Helpers.CreateContextDuration(), is_permanent: true, dispellable: false) }),
                                                Helpers.Create <NewMechanics.BuffRemoveOnSave>(b => b.SaveType = SavingThrowType.Will)
                                                );

            blood_buff.SetBuffFlags(BuffFlags.HiddenInUi);

            var save_failed_action = Common.createContextSavedApplyBuff(blood_buff, DurationRate.Rounds, is_permanent: true, is_dispellable: false);

            /*var save_failed_action = Common.createContextActionSavingThrow(SavingThrowType.Will,
             *                                                             Helpers.CreateActionList(Common.createContextSavedApplyBuff(sickened_buff, DurationRate.Rounds, is_permanent: true, is_dispellable: false))
             * ;
             *                                                             );*/

            var positive_damage = Helpers.CreateActionDealDamage(DamageEnergyType.PositiveEnergy, Helpers.CreateContextDiceValue(BalanceFixes.getDamageDie(DiceType.D6), 1), IgnoreCritical: true);
            var negative_damage = Helpers.CreateActionDealDamage(DamageEnergyType.NegativeEnergy, Helpers.CreateContextDiceValue(BalanceFixes.getDamageDie(DiceType.D6), 1), IgnoreCritical: true);

            var smite_positive_action = Helpers.CreateConditional(Common.createContextConditionCasterHasFact(bloodfire_buff), new GameAction[] { positive_damage, save_failed_action });
            var smite_negative_action = Helpers.CreateConditional(Common.createContextConditionCasterHasFact(bloodfire_buff), new GameAction[] { negative_damage, save_failed_action });
            var positive_action       = Helpers.CreateConditional(Common.createContextConditionCasterHasFact(bloodrain_buff), new GameAction[] { positive_damage, save_failed_action });
            var negative_action       = Helpers.CreateConditional(Common.createContextConditionCasterHasFact(bloodrain_buff), new GameAction[] { negative_damage, save_failed_action });

            ChannelEnergyEngine.addBloodfireAndBloodrainActions(positive_action, negative_action, smite_positive_action, smite_negative_action);
        }
Exemplo n.º 4
0
        public BlueprintFeature createErosionTouch(string name_prefix, string display_name, string description)
        {
            var resource = Helpers.CreateAbilityResource($"{name_prefix}Resource", "", "", "", null);

            resource.SetIncreasedByLevelStartPlusDivStep(1, 3, 1, 3, 1, 0, 0, classes, getArchetypeArray());
            var construct_damage = Helpers.CreateActionDealDamage(DamageEnergyType.Magic, BalanceFixes.getDamageDie(DiceType.D6).CreateContextDiceValue(Helpers.CreateContextValue(AbilityRankType.DamageDice)));

            construct_damage.DamageType.Type = Kingmaker.RuleSystem.Rules.Damage.DamageType.Direct;

            var effect = Helpers.CreateConditional(Common.createContextConditionHasFact(Common.construct), construct_damage);

            var ability = Helpers.CreateAbility($"{name_prefix}Ability",
                                                display_name,
                                                description,
                                                "",
                                                Helpers.GetIcon("5bf3315ce1ed4d94e8805706820ef64d"),  // touch of fatigue
                                                AbilityType.Supernatural,
                                                CommandType.Standard,
                                                AbilityRange.Touch,
                                                "",
                                                Helpers.savingThrowNone,
                                                Helpers.CreateDeliverTouch(),
                                                createClassScalingConfig(ContextRankProgression.AsIs, AbilityRankType.DamageDice),
                                                Helpers.CreateRunActions(effect),
                                                Common.createAbilitySpawnFx("9a38d742801be084d89bd34318c600e8", anchor: AbilitySpawnFxAnchor.SelectedTarget),
                                                Common.createContextCalculateAbilityParamsBasedOnClassesWithArchetypes(classes, getArchetypeArray(), stat),
                                                Common.createAbilityTargetHasFact(true, Common.construct)
                                                );

            ability.setMiscAbilityParametersTouchHarmful();

            var feat = Helpers.CreateFeature(name_prefix + "Feature",
                                             ability.Name,
                                             ability.Description,
                                             "",
                                             ability.Icon,
                                             FeatureGroup.None,
                                             resource.CreateAddAbilityResource(),
                                             ability.CreateTouchSpellCast(resource).CreateAddFact()
                                             );

            return(feat);
        }
Exemplo n.º 5
0
        public BlueprintFeature createHeatAura(string name_prefix, string display_name, string description)
        {
            var resource = Helpers.CreateAbilityResource($"{name_prefix}Resource", "", "", "", null);

            resource.SetIncreasedByLevelStartPlusDivStep(1, 5, 1, 5, 1, 0, 0, classes, getArchetypeArray());

            var blur = library.Get <BlueprintBuff>("dd3ad347240624d46a11a092b4dd4674");

            var damage = Helpers.CreateConditional(Helpers.Create <ContextConditionIsCaster>(),
                                                   null,
                                                   Helpers.CreateActionSavingThrow(SavingThrowType.Reflex,
                                                                                   Helpers.CreateActionDealDamage(DamageEnergyType.Fire, BalanceFixes.getDamageDie(DiceType.D4).CreateContextDiceValue(), isAoE: true, halfIfSaved: true))
                                                   );

            var apply_blur = Helpers.CreateConditional(Helpers.Create <ContextConditionIsCaster>(), Common.createContextActionApplyBuff(blur, Helpers.CreateContextDuration(1), dispellable: false));
            var ability    = Helpers.CreateAbility($"{name_prefix}Ability",
                                                   display_name,
                                                   description,
                                                   "",
                                                   NewSpells.wall_of_fire.Icon,
                                                   AbilityType.Supernatural,
                                                   CommandType.Swift,
                                                   AbilityRange.Personal,
                                                   Helpers.oneRoundDuration,
                                                   Helpers.reflexHalfDamage,
                                                   Helpers.CreateRunActions(damage, apply_blur),
                                                   Helpers.CreateAbilityTargetsAround(10.Feet(), Kingmaker.UnitLogic.Abilities.Components.TargetType.Any),
                                                   createClassScalingConfig(ContextRankProgression.Div2, min: 1),
                                                   resource.CreateResourceLogic(),
                                                   Helpers.CreateSpellDescriptor(SpellDescriptor.Fire),
                                                   Common.createContextCalculateAbilityParamsBasedOnClassesWithArchetypes(classes, getArchetypeArray(), stat));

            ability.setMiscAbilityParametersSelfOnly();

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

            feature.AddComponent(Helpers.CreateAddAbilityResource(resource));
            return(feature);
        }
Exemplo n.º 6
0
        public BlueprintFeature createLightningBreath(string name_prefix, string display_name, string description)
        {
            var icon = library.Get <BlueprintAbility>("d2cff9243a7ee804cb6d5be47af30c73").Icon; //lightning bolt

            var resource = Helpers.CreateAbilityResource(name_prefix + "Resource", "", "", "", null);

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

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

            var ability = Helpers.CreateAbility(name_prefix + "Ability",
                                                display_name,
                                                description,
                                                "",
                                                icon,
                                                AbilityType.Supernatural,
                                                CommandType.Standard,
                                                AbilityRange.Projectile,
                                                "",
                                                Helpers.reflexHalfDamage,
                                                Helpers.CreateRunActions(SavingThrowType.Reflex, dmg),
                                                createClassScalingConfig(),
                                                Helpers.CreateSpellDescriptor(SpellDescriptor.Electricity),
                                                Helpers.CreateResourceLogic(resource),
                                                library.Get <BlueprintAbility>("c073af2846b8e054fb28e6f72bc02749").GetComponent <AbilityDeliverProjectile>(),//kinetic thunderstorm torrent,
                                                Common.createContextCalculateAbilityParamsBasedOnClassesWithArchetypes(classes, getArchetypeArray(), stat)
                                                );

            ability.setMiscAbilityParametersRangedDirectional();

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

            feature.AddComponent(Helpers.CreateAddAbilityResource(resource));
            return(feature);
        }
Exemplo n.º 7
0
        public BlueprintFeature createEnergyBlast()
        {
            var fx_id = new string[]
            {
                "2e4bb367a72490b46944654f321b91a4", //acid
                "070bd772af57d3c46ae89218032dad80", //cold
                "448260fa84101684ca32750574089663", //electricity
                "c152c5cb0af124a40bc94087f9e2bb29", //fire
            };

            var energy = new DamageEnergyType[]
            {
                DamageEnergyType.Acid, DamageEnergyType.Cold, DamageEnergyType.Electricity, DamageEnergyType.Fire
            };

            var descriptors = new SpellDescriptor[]
            {
                SpellDescriptor.Acid, SpellDescriptor.Cold, SpellDescriptor.Electricity, SpellDescriptor.Fire
            };

            var icons = new UnityEngine.Sprite[]
            {
                LoadIcons.Image2Sprite.Create(@"AbilityIcons/AcidBall.png"),
                Helpers.GetIcon("9f10909f0be1f5141bf1c102041f93d9"), //snowball
                NewSpells.aggressive_thundercloud.Icon,
                Helpers.GetIcon("2d81362af43aeac4387a3d4fced489c3"), //fireball
            };

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

            var abilities = new BlueprintAbility[names.Length];

            for (int i = 0; i < abilities.Length; i++)
            {
                var dmg = Helpers.CreateActionDealDamage(energy[i],
                                                         Helpers.CreateContextDiceValue(BalanceFixes.getDamageDie(DiceType.D4),
                                                                                        Helpers.CreateContextValue(AbilityRankType.Default),
                                                                                        0),
                                                         isAoE: true, halfIfSaved: true);

                var ability = Helpers.CreateAbility(prefix + names[i] + "EnergyBlastAbility",
                                                    "Energy Blast: " + names[i],
                                                    $"As a standard action that provokes attacks of opportunity, you can expend 2 points of mental focus to unleash a blast of energy. This blast has a range of 60 feet, and deals 1d{BalanceFixes.getDamageDieString(DiceType.D4)} points of energy damage per occultist level. The blast deals damage to each creature in a 20-foot-radius burst, but each affected creature can attempt a Reflex save to halve the damage. When you unleash an energy blast, you must decide what type of damage it deals (acid, cold, electricity, or fire). You must be at least 5th level to select this focus power.",
                                                    "",
                                                    icons[i],
                                                    AbilityType.SpellLike,
                                                    CommandType.Standard,
                                                    AbilityRange.Medium,
                                                    "",
                                                    "",
                                                    Helpers.CreateRunActions(SavingThrowType.Reflex, dmg),
                                                    Helpers.CreateSpellComponent(SpellSchool.Evocation),
                                                    Helpers.CreateSpellDescriptor(descriptors[i]),
                                                    createDCScaling(),
                                                    createClassScalingConfig(),
                                                    resource.CreateResourceLogic(amount: 2),
                                                    Common.createAbilitySpawnFx(fx_id[i], anchor: AbilitySpawnFxAnchor.ClickedTarget),
                                                    Helpers.CreateAbilityTargetsAround(20.Feet(), TargetType.Any)
                                                    );
                ability.SpellResistance = true;
                ability.setMiscAbilityParametersRangedDirectional();
                abilities[i] = ability;
            }

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

            wrapper.SetName("Energy Blast");
            addFocusInvestmentCheck(wrapper, SpellSchool.Evocation);
            var feature = Common.AbilityToFeature(wrapper, false);

            addMinLevelPrerequisite(feature, 5);
            return(feature);
        }
Exemplo n.º 8
0
        public BlueprintFeature createBlizzard(string name_prefix, string display_name, string description)
        {
            var resource = Helpers.CreateAbilityResource($"{name_prefix}Resource", "", "", "", null);

            resource.SetFixedResource(1);

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

            var buff = Helpers.CreateBuff(name_prefix + "Buff",
                                          display_name,
                                          description,
                                          "",
                                          icon,
                                          null,
                                          Common.createAddCondition(Kingmaker.UnitLogic.UnitCondition.DifficultTerrain),
                                          Helpers.Create <AddConcealment>(c => { c.Concealment = Concealment.Total; c.Descriptor = ConcealmentDescriptor.Fog; c.CheckDistance = true; c.DistanceGreater = 5.Feet(); }),
                                          Helpers.Create <ConcealementMechanics.AddOutgoingConcealment>(c => { c.Concealment = Concealment.Total; c.Descriptor = ConcealmentDescriptor.Fog; c.CheckDistance = true; c.DistanceGreater = 5.Feet(); }),
                                          Helpers.Create <ConcealementMechanics.AddOutgoingConcealment>(c => { c.Concealment = Concealment.Partial; c.Descriptor = ConcealmentDescriptor.Fog; }),
                                          Helpers.Create <AddConcealment>(c => { c.Concealment = Concealment.Partial; c.Descriptor = ConcealmentDescriptor.Fog; })
                                          );


            var can_not_move_buff = Helpers.CreateBuff(name_prefix + "CanNotMoveBuff",
                                                       $"{display_name} (Can Not Move)",
                                                       "You can not move through the blizzard.",
                                                       "",
                                                       icon,
                                                       null,
                                                       Common.createAddCondition(Kingmaker.UnitLogic.UnitCondition.CantMove)
                                                       );

            can_not_move_buff.Stacking = StackingType.Replace;


            var area = library.CopyAndAdd <BlueprintAbilityAreaEffect>("6ea87a0ff5df41c459d641326f9973d5", name_prefix + "Area", "");

            var apply_can_not_move = Common.createContextActionApplyBuff(can_not_move_buff, Helpers.CreateContextDuration(1), dispellable: false, is_child: true);

            var damage = Helpers.CreateActionDealDamage(DamageEnergyType.Cold, Helpers.CreateContextDiceValue(BalanceFixes.getDamageDie(DiceType.D4), Helpers.CreateContextValue(AbilityRankType.DamageDice)),
                                                        isAoE: true, halfIfSaved: true);
            var damage_save = Common.createContextActionSavingThrow(SavingThrowType.Reflex,
                                                                    Helpers.CreateActionList(damage));
            var check_movement = Helpers.CreateConditional(new Condition[] { Helpers.Create <CombatManeuverMechanics.ContextConditionTargetSizeLessOrEqual>(c => c.target_size = Size.Medium),
                                                                             Helpers.CreateConditionHasFact(NewSpells.immunity_to_wind, not: true) },
                                                           Common.createContextActionSkillCheck(StatType.Strength,
                                                                                                failure: Helpers.CreateActionList(apply_can_not_move),
                                                                                                custom_dc: 10)
                                                           );

            var actions = Helpers.CreateActionList(damage_save, check_movement);

            area.ComponentsArray = new BlueprintComponent[]
            {
                Helpers.Create <NewMechanics.AbilityAreaEffectRunActionWithFirstRound>(a =>
                {
                    a.UnitEnter  = actions;
                    a.Round      = actions;
                    a.FirstRound = actions;
                }),
                Helpers.Create <AbilityAreaEffectBuff>(a => { a.Buff = buff; a.Condition = Helpers.CreateConditionsCheckerOr(); }),
                createClassScalingConfig(type: AbilityRankType.DamageDice),
            };


            var spawn_area = Common.createContextActionSpawnAreaEffect(area, Helpers.CreateContextDuration(Helpers.CreateContextValue(AbilityRankType.Default)));


            var ability = Helpers.CreateAbility(name_prefix + "Ability",
                                                buff.Name,
                                                buff.Description,
                                                "",
                                                icon,
                                                AbilityType.Supernatural,
                                                UnitCommand.CommandType.Standard,
                                                AbilityRange.Close,
                                                $"1 round/{stat.ToString()} modifier",
                                                "",
                                                Helpers.CreateRunActions(spawn_area),
                                                Common.createAbilityAoERadius(20.Feet(), TargetType.Any),
                                                Helpers.CreateSpellDescriptor(SpellDescriptor.Cold),
                                                Helpers.CreateContextRankConfig(baseValueType: ContextRankBaseValueType.StatBonus, stat: stat),
                                                Helpers.CreateResourceLogic(resource),
                                                Common.createContextCalculateAbilityParamsBasedOnClassesWithArchetypes(classes, getArchetypeArray(), stat)
                                                );

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

            feature.AddComponent(Helpers.CreateAddAbilityResource(resource));
            addMinLevelPrerequisite(feature, 11);
            return(feature);
        }
Exemplo n.º 9
0
        public BlueprintFeature createWallOfPower()
        {
            var areas = new BlueprintAbilityAreaEffect[]
            {
                library.Get <BlueprintAbilityAreaEffect>("2a9cebe780b6130428f3bf4b18270021"), //acid
                library.Get <BlueprintAbilityAreaEffect>("608d84e25f42d6044ba9b96d9f60722a"), //cold
                library.Get <BlueprintAbilityAreaEffect>("2175d68215aa61644ad1d877d4915ece"), //electricity
                library.Get <BlueprintAbilityAreaEffect>("ac8737ccddaf2f948adf796b5e74eee7")  //fire
            };

            var icons = new UnityEngine.Sprite[]
            {
                Helpers.GetIcon("1e418794638cf95409f6e33c8c3dbe1a"), //acid wall
                Helpers.GetIcon("e377feb2ecec95e478e0565da621ea55"), //cold wall
                Helpers.GetIcon("8ba05ef69b06ea04c9430427a95685f6"), //elec wall
                Helpers.GetIcon("77d255c06e4c6a745b807400793cf7b1"), //fire wall
            };

            var energy = new DamageEnergyType[]
            {
                DamageEnergyType.Acid, DamageEnergyType.Cold, DamageEnergyType.Electricity, DamageEnergyType.Fire
            };

            var descriptors = new SpellDescriptor[]
            {
                SpellDescriptor.Acid, SpellDescriptor.Cold, SpellDescriptor.Electricity, SpellDescriptor.Fire
            };

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

            var abilities = new BlueprintAbility[areas.Length];


            for (int i = 0; i < abilities.Length; i++)
            {
                var dmg = Helpers.CreateActionDealDamage(energy[i],
                                                         Helpers.CreateContextDiceValue(BalanceFixes.getDamageDie(DiceType.D6),
                                                                                        2,
                                                                                        Helpers.CreateContextValue(AbilityRankType.Default)),
                                                         isAoE: true);

                var dmg_action = Helpers.CreateActionList(dmg);
                var area       = library.CopyAndAdd(areas[i], prefix + names[i] + "WallOfPowerArea", "");
                area.ComponentsArray = new BlueprintComponent[]
                {
                    Helpers.Create <NewMechanics.AbilityAreaEffectRunActionWithFirstRound>(a =>
                    {
                        a.Round     = dmg_action;
                        a.UnitEnter = dmg_action;
                    }),
                    createClassScalingConfig()
                };
                area.SpellResistance = true;
                var ability = Helpers.CreateAbility(prefix + names[i] + "WallOfPowerAbility",
                                                    "Wall of Power: " + names[i],
                                                    $"By expending 1 point of mental focus as a standard action, you can create a wall of pure energy with a length of up to 5 feet per occultist level you possess. This wall is 10 feet high and 1 foot thick. It doesn’t block passage, line of sight, or line of effect, but does deal damage to anyone passing through it. The wall deals 2d{BalanceFixes.getDamageDieString(DiceType.D6)} points of energy damage + 1 point of energy damage per occultist level you possess. You must select acid, cold, electricity, or fire when you create the wall to determine the type of damage it deals. The wall lasts for 1 round per occultist level you possess. You must be at least 9th level to select this focus power.",
                                                    "",
                                                    icons[i],
                                                    AbilityType.SpellLike,
                                                    CommandType.Standard,
                                                    AbilityRange.Medium,
                                                    "",
                                                    "",
                                                    Helpers.CreateRunActions(Common.createContextActionSpawnAreaEffect(area, Helpers.CreateContextDuration(Helpers.CreateContextValue(AbilityRankType.Default)))),
                                                    Helpers.CreateSpellDescriptor(descriptors[i]),
                                                    Helpers.CreateSpellComponent(SpellSchool.Evocation),
                                                    createClassScalingConfig(),
                                                    resource.CreateResourceLogic()
                                                    );

                ability.setMiscAbilityParametersRangedDirectional();
                abilities[i] = ability;
            }

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

            wrapper.SetName("Wall of Power");
            addFocusInvestmentCheck(wrapper, SpellSchool.Evocation);
            var feature = Common.AbilityToFeature(wrapper, false);

            addMinLevelPrerequisite(feature, 9);
            return(feature);
        }
Exemplo n.º 10
0
        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));
        }
Exemplo n.º 11
0
        //combat healer is the same as in battle mystery


        public BlueprintFeature createEnergyBody(string name_prefix, string display_name, string description)
        {
            var resource = Helpers.CreateAbilityResource(name_prefix + "Resource", "", "", "", null);

            resource.SetIncreasedByLevel(0, 1, classes, getArchetypeArray());

            var icon = library.Get <BlueprintAbility>("1bc83efec9f8c4b42a46162d72cbf494").Icon; //burst of glory


            var heal_living = Helpers.CreateConditional(new Condition[] { Helpers.Create <UndeadMechanics.ContextConditionHasNegativeEnergyAffinity>(),
                                                                          Helpers.Create <ContextConditionIsAlly>() },
                                                        new GameAction[0],
                                                        new GameAction[] { Helpers.Create <ContextActionSpawnFx>(c => c.PrefabLink = Common.createPrefabLink("61602c5b0ac793d489c008e9cb58f631")),
                                                                           Common.createContextActionHealTarget(Helpers.CreateContextDiceValue(BalanceFixes.getDamageDie(DiceType.D6), 1, Helpers.CreateContextValue(AbilityRankType.Default))) }
                                                        );
            var aura_of_healing = library.Get <BlueprintAbilityAreaEffect>("be47154a20220f64f9bea767587e700a");

            var area_effect = library.CopyAndAdd(aura_of_healing, $"{name_prefix}Area", "");

            area_effect.Size = 5.Feet();
            area_effect.SetComponents(createClassScalingConfig(),
                                      Helpers.CreateAreaEffectRunAction(round: heal_living)
                                      );
            var undead_damage = Helpers.CreateConditional(Helpers.Create <UndeadMechanics.ContextConditionHasNegativeEnergyAffinity>(),
                                                          Helpers.CreateActionDealDamage(DamageEnergyType.PositiveEnergy,
                                                                                         Helpers.CreateContextDiceValue(BalanceFixes.getDamageDie(DiceType.D6), 1, Helpers.CreateContextValue(AbilityRankType.Default)),
                                                                                         IgnoreCritical: true
                                                                                         )
                                                          );
            var buff = Helpers.CreateBuff(name_prefix + "Buff",
                                          display_name,
                                          description,
                                          "",
                                          icon,
                                          Common.createPrefabLink("f5eaec10b715dbb46a78890db41fa6a0"), //fiery body
                                          Helpers.CreateAddFact(Common.elemental),
                                          Common.createAddTargetAttackWithWeaponTrigger(action_attacker: Helpers.CreateActionList(undead_damage)),
                                          createClassScalingConfig(),
                                          Common.createAddAreaEffect(area_effect)
                                          );

            var ability = Helpers.CreateActivatableAbility(name_prefix + "ActivatableAbility",
                                                           display_name,
                                                           description,
                                                           "",
                                                           icon,
                                                           buff,
                                                           Kingmaker.UnitLogic.ActivatableAbilities.AbilityActivationType.WithUnitCommand,
                                                           CommandType.Standard,
                                                           null,
                                                           Helpers.CreateActivatableResourceLogic(resource, ResourceSpendType.NewRound)
                                                           );
            var feature = Common.ActivatableAbilityToFeature(ability, false);

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

            return(feature);
        }
Exemplo n.º 12
0
        public BlueprintFeature createAgingTouch(string name_prefix, string display_name, string description)
        {
            var resource = Helpers.CreateAbilityResource($"{name_prefix}Resource", "", "", "", null);

            resource.SetIncreasedByLevelStartPlusDivStep(1, 5, 1, 5, 1, 0, 0, classes, getArchetypeArray());

            var construct        = library.Get <BlueprintFeature>("fd389783027d63343b4a5634bd81645f");
            var undead           = library.Get <BlueprintFeature>("734a29b693e9ec346ba2951b27987e33");
            var construct_damage = Helpers.CreateActionDealDamage(DamageEnergyType.Magic, BalanceFixes.getDamageDie(DiceType.D6).CreateContextDiceValue(Helpers.CreateContextValue(AbilityRankType.DamageDice)));

            construct_damage.DamageType.Type = Kingmaker.RuleSystem.Rules.Damage.DamageType.Direct;
            var effect = Helpers.CreateConditional(Helpers.CreateConditionHasFact(construct),
                                                   construct_damage,
                                                   Helpers.CreateConditional(Helpers.CreateConditionHasFact(undead),
                                                                             null,
                                                                             Helpers.CreateActionDealDamage(StatType.Strength, Helpers.CreateContextDiceValue(DiceType.Zero, bonus: Helpers.CreateContextValue(AbilityRankType.Default)))
                                                                             )
                                                   );

            var ability = Helpers.CreateAbility($"{name_prefix}Ability",
                                                display_name,
                                                description,
                                                "",
                                                Helpers.GetIcon("5bf3315ce1ed4d94e8805706820ef64d"),  // touch of fatigue
                                                AbilityType.Supernatural,
                                                CommandType.Standard,
                                                AbilityRange.Touch,
                                                "",
                                                Helpers.savingThrowNone,
                                                Helpers.CreateDeliverTouch(),

                                                createClassScalingConfig(ContextRankProgression.AsIs,          // configure construct damage (1d6 per level)
                                                                         AbilityRankType.DamageDice),
                                                createClassScalingConfig(ContextRankProgression.Div2, min: 1), // configure strength damage (1 per two oracle levels).
                                                Helpers.CreateRunActions(effect),
                                                Common.createAbilitySpawnFx("9a38d742801be084d89bd34318c600e8", anchor: AbilitySpawnFxAnchor.SelectedTarget),
                                                Common.createContextCalculateAbilityParamsBasedOnClassesWithArchetypes(classes, getArchetypeArray(), stat)
                                                );

            ability.setMiscAbilityParametersTouchHarmful();

            var feat = Helpers.CreateFeature(name_prefix + "Feature",
                                             ability.Name,
                                             ability.Description,
                                             "",
                                             ability.Icon,
                                             FeatureGroup.None,
                                             resource.CreateAddAbilityResource(),
                                             ability.CreateTouchSpellCast(resource).CreateAddFact()
                                             );

            return(feat);
        }
Exemplo n.º 13
0
            void createGreaterSpiritAbility()
            {
                var icon = library.Get <BlueprintFeature>("52292a32bb5d0ab45a86621bac2c4c9a").Icon;

                var resource = Helpers.CreateAbilityResource(prefix + "FrigidBlastResource", "", "", "", null);

                resource.SetFixedResource(3);
                var cooldown_buff = Helpers.CreateBuff(prefix + "FrigidBlastCooldownBuff",
                                                       "Frigid Blast: Cooldown",
                                                       $"As a standard action, she can summon an icy blast in a 20-foot-radius burst originating from a point she can see within 30 feet. This blast deals cold damage equal to 1d{BalanceFixes.getDamageDieString(DiceType.D6)} per shaman level she has to each creature caught in the burst. Each target can attempt a Reflex saving throw to halve this damage. The shaman can use this ability three times per day, but she must wait at least 1d4 rounds between each use.",
                                                       "",
                                                       icon,
                                                       null);
                var apply_cooldown = Common.createContextActionApplyBuff(cooldown_buff, Helpers.CreateContextDuration(0, diceType: DiceType.D4, diceCount: 1), dispellable: false);
                var dmg            = Helpers.CreateActionDealDamage(DamageEnergyType.Cold, Helpers.CreateContextDiceValue(BalanceFixes.getDamageDie(DiceType.D6), Helpers.CreateContextValue(AbilityRankType.Default)), true, true);
                var frigid_blast   = Helpers.CreateAbility(prefix + "FrigidBlastAbility",
                                                           "Frigid Blast",
                                                           cooldown_buff.Description,
                                                           "",
                                                           icon,
                                                           AbilityType.Supernatural,
                                                           CommandType.Standard,
                                                           AbilityRange.Close,
                                                           "",
                                                           Helpers.reflexHalfDamage,
                                                           Helpers.CreateRunActions(SavingThrowType.Reflex, dmg),
                                                           Helpers.CreateAbilityTargetsAround(20.Feet(), TargetType.Any),
                                                           Common.createAbilitySpawnFx("b1e9a6f1066c22d45adc8ad0701b5b70", anchor: AbilitySpawnFxAnchor.ClickedTarget),
                                                           Helpers.CreateSpellDescriptor(SpellDescriptor.Cold),
                                                           Common.createAbilityExecuteActionOnCast(Helpers.CreateActionList(Common.createContextActionOnContextCaster(apply_cooldown))),
                                                           Helpers.CreateResourceLogic(resource),
                                                           Common.createContextCalculateAbilityParamsBasedOnClasses(hex_engine.hex_classes, primary_stat),
                                                           Common.createAbilityCasterHasNoFacts(cooldown_buff)
                                                           );

                frigid_blast.setMiscAbilityParametersRangedDirectional();

                greater_spirit_ability = Helpers.CreateFeature(prefix + "FrigidBlastFeature",
                                                               frigid_blast.Name,
                                                               "The shaman gains cold resistance 10. In addition, as a standard action, she can summon an icy blast in a 20-foot-radius burst originating from a point she can see within 30 feet. This blast deals cold damage equal to 1d6 per shaman level she has to each creature caught in the burst. Each target can attempt a Reflex saving throw to halve this damage. The shaman can use this ability three times per day, but she must wait at least 1d4 rounds between each use.",
                                                               "",
                                                               frigid_blast.Icon,
                                                               FeatureGroup.None,
                                                               Helpers.CreateAddFact(frigid_blast),
                                                               Helpers.CreateAddAbilityResource(resource),
                                                               Common.createEnergyDR(10, DamageEnergyType.Cold)
                                                               );
            }
Exemplo n.º 14
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);
        }
Exemplo n.º 15
0
            void createGreaterSpiritAbility()
            {
                var icon = library.Get <BlueprintAbility>("d2cff9243a7ee804cb6d5be47af30c73").Icon; //lightning bolt

                var resource = Helpers.CreateAbilityResource(prefix + "SparkSoulResource", "", "", "", null);

                resource.SetFixedResource(3);
                var cooldown_buff = Helpers.CreateBuff(prefix + "SparkSoulCooldownBuff",
                                                       "Spark Soul: Cooldown",
                                                       $"As a standard action shaman can unleash a 30-foot line of sparks from her fingertips, dealing 1d{BalanceFixes.getDamageDieString(DiceType.D4)} points of electricity damage per shaman level she possesses. A successful Reflex saving throw halves this damage. The shaman can use this ability three times per day, but she must wait 1d4 rounds between each use.",
                                                       "",
                                                       icon,
                                                       null);
                var apply_cooldown = Common.createContextActionApplyBuff(cooldown_buff, Helpers.CreateContextDuration(0, diceType: DiceType.D4, diceCount: 1), dispellable: false);

                var dmg = Helpers.CreateActionDealDamage(DamageEnergyType.Electricity, Helpers.CreateContextDiceValue(BalanceFixes.getDamageDie(DiceType.D4), Helpers.CreateContextValue(AbilityRankType.Default)),
                                                         isAoE: true, halfIfSaved: true);
                var sparkling_soul = Helpers.CreateAbility(prefix + "SparklingSoulAbility",
                                                           "Sparkling Soul",
                                                           cooldown_buff.Description,
                                                           "",
                                                           icon,
                                                           AbilityType.Supernatural,
                                                           CommandType.Standard,
                                                           AbilityRange.Close,
                                                           "",
                                                           Helpers.reflexHalfDamage,
                                                           Helpers.CreateRunActions(SavingThrowType.Reflex, dmg),
                                                           Helpers.CreateContextRankConfig(baseValueType: ContextRankBaseValueType.ClassLevel, classes: hex_engine.hex_classes),
                                                           Helpers.CreateSpellDescriptor(SpellDescriptor.Electricity),
                                                           Helpers.CreateResourceLogic(resource),
                                                           library.Get <BlueprintAbility>("c073af2846b8e054fb28e6f72bc02749").GetComponent <AbilityDeliverProjectile>(),//kinetic thunderstorm torrent,
                                                           Common.createContextCalculateAbilityParamsBasedOnClasses(hex_engine.hex_classes, primary_stat),
                                                           Common.createAbilityCasterHasNoFacts(cooldown_buff),
                                                           Common.createAbilityExecuteActionOnCast(Helpers.CreateActionList(Common.createContextActionOnContextCaster(apply_cooldown)))
                                                           );

                sparkling_soul.setMiscAbilityParametersRangedDirectional();
                greater_spirit_ability = Helpers.CreateFeature(prefix + "SparklingSoulFeature",
                                                               sparkling_soul.Name,
                                                               $"The shaman gains electricity resistance 10. In addition, as a standard action she can unleash a 20-foot line of sparks from her fingertips, dealing 1d{BalanceFixes.getDamageDieString(DiceType.D4)} points of electricity damage per shaman level she possesses. A successful Reflex saving throw halves this damage. The shaman can use this ability three times per day, but she must wait 1d4 rounds between each use.",
                                                               "",
                                                               sparkling_soul.Icon,
                                                               FeatureGroup.None,
                                                               Helpers.CreateAddFact(sparkling_soul),
                                                               Helpers.CreateAddAbilityResource(resource),
                                                               Common.createEnergyDR(10, DamageEnergyType.Electricity)
                                                               );
            }
Exemplo n.º 16
0
        public BlueprintFeature createFleshRot()
        {
            var icon    = NewSpells.ghoul_touch.Icon;
            var dmg     = Helpers.CreateActionDealDamage(DamageEnergyType.Unholy, Helpers.CreateContextDiceValue(BalanceFixes.getDamageDie(DiceType.D8), Helpers.CreateContextValue(AbilityRankType.DamageDice), Helpers.CreateContextValue(AbilityRankType.DamageBonus)));
            var ability = Helpers.CreateAbility(prefix + "FleshRotAbility",
                                                "Flesh Rot",
                                                $"As a standard action, you can make a melee touch attack and expend 1 point of mental focus to cause the flesh of a living creature to rot and wither. If the attack hits, the target takes 1d{BalanceFixes.getDamageDieString(DiceType.D8)} points of damage + 1 point per occultist level you possess. For every 4 occultist levels you possess beyond 3rd, the target takes an additional 1d{BalanceFixes.getDamageDieString(DiceType.D8)} points of damage (to a maximum of 5d{BalanceFixes.getDamageDieString(DiceType.D8)} at 19th level). If you miss with the melee touch attack, this power is wasted with no effect. You must be at least 3rd level to select this focus power.",
                                                "",
                                                icon,
                                                AbilityType.SpellLike,
                                                CommandType.Standard,
                                                AbilityRange.Touch,
                                                "",
                                                "",
                                                Helpers.CreateRunActions(Helpers.CreateConditional(Common.createContextConditionHasFacts(false, Common.undead, Common.elemental, Common.construct),
                                                                                                   null,
                                                                                                   dmg)
                                                                         ),
                                                createClassScalingConfig(type: AbilityRankType.DamageBonus),
                                                createClassScalingConfig(type: AbilityRankType.DamageDice, progression: ContextRankProgression.StartPlusDivStep, startLevel: 3, stepLevel: 4),
                                                Common.createAbilitySpawnFx("9a38d742801be084d89bd34318c600e8", anchor: AbilitySpawnFxAnchor.SelectedTarget),
                                                Common.createAbilityTargetHasFact(true, Common.undead, Common.construct, Common.elemental),
                                                Helpers.CreateSpellComponent(SpellSchool.Necromancy),
                                                Helpers.CreateDeliverTouch()
                                                );

            ability.setMiscAbilityParametersTouchHarmful();
            ability.SpellResistance = true;
            var cast_ability = Helpers.CreateTouchSpellCast(ability, resource);

            cast_ability.AddComponent(Common.createAbilityTargetHasFact(true, Common.undead, Common.construct, Common.elemental));
            var feature = Common.AbilityToFeature(cast_ability, false);

            addMinLevelPrerequisite(feature, 3);
            addFocusInvestmentCheck(cast_ability, SpellSchool.Necromancy);
            return(feature);
        }
Exemplo n.º 17
0
            void createGreaterSpiritAbility()
            {
                var resource = Helpers.CreateAbilityResource(prefix + "BodyOfEarthResource", "", "", "", null);

                resource.SetFixedResource(3);

                var icon = library.Get <BlueprintAbility>("4aa7942c3e62a164387a73184bca3fc1").Icon;//disintegrate

                var cooldown_buff = Helpers.CreateBuff(prefix + "BodyOfEarthCooldownBuff",
                                                       "Body of Earth: Cooldown",
                                                       $"As a standard action, she can cause jagged pieces of stone to explode from her body in a 10-foot-radius burst. This deals 1d{BalanceFixes.getDamageDie(DiceType.D6)} points of piercing damage per 2 shaman levels she possesses. A successful Reflex saving throw halves this damage. The shaman can use this ability three times per day, but she must wait 1d4 rounds between each use.",
                                                       "",
                                                       icon,
                                                       null);
                var apply_cooldown = Common.createContextActionApplyBuff(cooldown_buff, Helpers.CreateContextDuration(0, diceType: DiceType.D4, diceCount: 1), dispellable: false);
                var dmg            = Helpers.CreateActionDealDamage(PhysicalDamageForm.Piercing,
                                                                    Helpers.CreateContextDiceValue(BalanceFixes.getDamageDie(DiceType.D6), Helpers.CreateContextValue(AbilityRankType.Default)),
                                                                    isAoE: true, halfIfSaved: true);

                var effect = Helpers.CreateConditional(Common.createContextConditionIsCaster(),
                                                       null,
                                                       Common.createContextActionSavingThrow(SavingThrowType.Reflex, Helpers.CreateActionList(dmg))
                                                       );

                var body_of_Earth_ability = Helpers.CreateAbility(prefix + "BodyOfEarthAbility",
                                                                  "Body of Earth",
                                                                  cooldown_buff.Description,
                                                                  "",
                                                                  icon,
                                                                  AbilityType.Supernatural,
                                                                  CommandType.Standard,
                                                                  AbilityRange.Personal,
                                                                  "",
                                                                  Helpers.reflexHalfDamage,
                                                                  Helpers.CreateRunActions(effect),
                                                                  Helpers.CreateContextRankConfig(baseValueType: ContextRankBaseValueType.ClassLevel, progression: ContextRankProgression.Div2,
                                                                                                  classes: hex_engine.hex_classes),
                                                                  Helpers.CreateAbilityTargetsAround(10.Feet(), TargetType.Any),
                                                                  Common.createAbilitySpawnFx("2644dac00cee8b840a35f2445c4dffd9", anchor: AbilitySpawnFxAnchor.Caster),
                                                                  Common.createContextCalculateAbilityParamsBasedOnClasses(hex_engine.hex_classes, primary_stat),
                                                                  Common.createAbilityExecuteActionOnCast(Helpers.CreateActionList(Common.createContextActionOnContextCaster(apply_cooldown))),
                                                                  Common.createAbilityCasterHasNoFacts(cooldown_buff),
                                                                  Helpers.CreateResourceLogic(resource)
                                                                  );

                body_of_Earth_ability.setMiscAbilityParametersSelfOnly();
                body_of_Earth_ability.AddComponent(Common.createAbilityCasterHasNoFacts(cooldown_buff));

                greater_spirit_ability = Common.AbilityToFeature(body_of_Earth_ability, false);
                greater_spirit_ability.AddComponents(Common.createMaterialDR(Helpers.CreateContextValue(AbilityRankType.Default), PhysicalDamageMaterial.Adamantite),
                                                     Helpers.CreateContextRankConfig(baseValueType: ContextRankBaseValueType.ClassLevel, progression: ContextRankProgression.DivStep,
                                                                                     classes: hex_engine.hex_classes, stepLevel: 4),
                                                     Helpers.CreateAddAbilityResource(resource)
                                                     );
                greater_spirit_ability.SetDescription("The shaman gains DR 2/adamantine. This DR increases by 1 for every 4 levels beyond 8th the shaman possesses. In addition, as a standard action, she can cause jagged pieces of stone to explode from her body in a 10-foot-radius burst. This deals 1d6 points of piercing damage per 2 shaman levels she possesses. A successful Reflex saving throw halves this damage. The shaman can use this ability three times per day, but she must wait 1d4 rounds between each use.");
            }
Exemplo n.º 18
0
        public BlueprintFeature createFleshMend()
        {
            var icon = Helpers.GetIcon("caae1dc6fcf7b37408686971ee27db13");//lay on hands

            var ability = Helpers.CreateAbility(prefix + "FleshMendAbility",
                                                "Flesh Mend",
                                                $"As a standard action, you can expend 1 point of mental focus to heal a living creature with a touch. The creature is healed an amount of damage equal to 1d{BalanceFixes.getDamageDieString(DiceType.D8)} + your occultist level. For every 4 occultist levels you possess beyond 3rd, the creature is healed an additional 1d{BalanceFixes.getDamageDieString(DiceType.D8)} points of damage, to a maximum of 5d{BalanceFixes.getDamageDieString(DiceType.D8)}+19 at 19th level. This has no effect on undead creatures. You must be at least 3rd level to select this focus power.",
                                                "",
                                                icon,
                                                AbilityType.SpellLike,
                                                CommandType.Standard,
                                                AbilityRange.Touch,
                                                "",
                                                "",
                                                Helpers.CreateRunActions(Common.createContextActionHealTarget(Helpers.CreateContextDiceValue(BalanceFixes.getDamageDie(DiceType.D8), Helpers.CreateContextValue(AbilityRankType.DamageDice), Helpers.CreateContextValue(AbilityRankType.DamageBonus)))),
                                                createClassScalingConfig(type: AbilityRankType.DamageBonus),
                                                createClassScalingConfig(type: AbilityRankType.DamageDice, progression: ContextRankProgression.StartPlusDivStep, startLevel: 3, stepLevel: 4),
                                                Common.createAbilitySpawnFx("224fb8fd952ec4d45b6d3436a77663d9", anchor: AbilitySpawnFxAnchor.SelectedTarget),
                                                Helpers.Create <AbilityUseOnRest>(a => a.Type = AbilityUseOnRestType.HealDamage),
                                                Common.createAbilityTargetHasFact(true, Common.undead, Common.construct, Common.elemental),
                                                resource.CreateResourceLogic(),
                                                Helpers.CreateSpellDescriptor(SpellDescriptor.Cure | SpellDescriptor.RestoreHP),
                                                Helpers.CreateSpellComponent(SpellSchool.Conjuration)
                                                );

            ability.setMiscAbilityParametersTouchFriendly();
            addFocusInvestmentCheck(ability, SpellSchool.Conjuration);

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

            addMinLevelPrerequisite(feature, 3);
            return(feature);
        }
Exemplo n.º 19
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,
                                                                                                                 BalanceFixes.getDamageDie(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);
        }