Пример #1
0
        static void fixGroundSpells()
        {
            //grease, entangles
            //tar pool, obsidian flow
            //spike stones, spike growth
            //tremor, ice slick,

            //entangle is already set in vanilla
            var spells = new BlueprintAbility[]
            {
                library.Get <BlueprintAbility>("7d700cdf260d36e48bb7af3a8ca5031f"), //tar pool
                library.Get <BlueprintAbility>("e48638596c955a74c8a32dbc90b518c1"), //obsidian flow
                library.Get <BlueprintAbility>("d1afa8bc28c99104da7d784115552de5"), //spike stones
                library.Get <BlueprintAbility>("29b0f9026ad05e14789d84e867cc6dff")  //spike growth
            };

            foreach (var s in spells)
            {
                s.AddComponent(Helpers.CreateSpellDescriptor(Kingmaker.Blueprints.Classes.Spells.SpellDescriptor.Ground));
            }

            var areas = new BlueprintAbilityAreaEffect[]
            {
                library.Get <BlueprintAbilityAreaEffect>("d59890fb468915946bae085439bd0881"), //tar pool
                library.Get <BlueprintAbilityAreaEffect>("d64b08ae01012e34cbc55b3a27ea29b7"), //obsidian flow
                library.Get <BlueprintAbilityAreaEffect>("eca936a9e235875498d1e74ff7c09ecd"), //spike stones
                library.Get <BlueprintAbilityAreaEffect>("16e0e4c6a16f68c49832340b93706499"), //spike growth
                library.Get <BlueprintAbilityAreaEffect>("bcb6329cefc66da41b011299a43cc681")  //entangle
            };

            foreach (var a in areas)
            {
                a.AddComponent(Helpers.CreateSpellDescriptor(Kingmaker.Blueprints.Classes.Spells.SpellDescriptor.Ground));
            }
        }
Пример #2
0
        internal static void ChangeInspireRage()
        {
            BlueprintBuff inspiredRageBuff = library.Get <BlueprintBuff>("77038b4555324455b1d110fbe2fbc0ef");

            inspiredRageBuff.RemoveComponents <SpellDescriptorComponent>();
            BlueprintBuff inspireRageEffectBuff = library.Get <BlueprintBuff>("78a69c73d07842c0b46aa9038c40114c");

            inspireRageEffectBuff.RemoveComponents <SpellDescriptorComponent>();
            BlueprintAbilityAreaEffect inspireRageArea = library.Get <BlueprintAbilityAreaEffect>("5421df42956841e7a0499568080421b7");

            inspireRageArea.RemoveComponents <SpellDescriptorComponent>();
        }
Пример #3
0
        static void fixGroundSpells()
        {
            //grease, entangles
            //tar pool, obsidian flow
            //spike stones, spike growth
            //tremor, ice slick,

            //entangle is already set in vanilla
            var spells = new BlueprintAbility[]
            {
                library.Get <BlueprintAbility>("7d700cdf260d36e48bb7af3a8ca5031f"), //tar pool
                library.Get <BlueprintAbility>("e48638596c955a74c8a32dbc90b518c1"), //obsidian flow
                library.Get <BlueprintAbility>("d1afa8bc28c99104da7d784115552de5"), //spike stones
                library.Get <BlueprintAbility>("29b0f9026ad05e14789d84e867cc6dff"), //spike growth
                library.Get <BlueprintAbility>("29ccc62632178d344ad0be0865fd3113"), //create pit
                library.Get <BlueprintAbility>("1407fb5054d087d47a4c40134c809f12"), //acid pit
                library.Get <BlueprintAbility>("46097f610219ac445b4d6403fc596b9f"), //spiked pit
                library.Get <BlueprintAbility>("f63f4d1806b78604a952b3958892ce1c"), //hungry pit
                library.Get <BlueprintAbility>("dd3dacafcf40a0145a5824c838e2698d"), //rift of ruin
            };

            foreach (var s in spells)
            {
                var comp = s.GetComponent <SpellDescriptorComponent>();
                if (comp != null)
                {
                    comp.Descriptor = comp.Descriptor | SpellDescriptor.Ground;
                }
                else
                {
                    s.AddComponent(Helpers.CreateSpellDescriptor(SpellDescriptor.Ground));
                }
            }

            pit_spell_immunity = Helpers.CreateFeature("PitSpellsImmunityFeature", "", "", "e069c9dd1109436b934728d204411d49", null, FeatureGroup.None);
            pit_spell_immunity.HideInCharacterSheetAndLevelUp = true;

            var areas = new BlueprintAbilityAreaEffect[]
            {
                library.Get <BlueprintAbilityAreaEffect>("d59890fb468915946bae085439bd0881"), //tar pool
                library.Get <BlueprintAbilityAreaEffect>("d64b08ae01012e34cbc55b3a27ea29b7"), //obsidian flow
                library.Get <BlueprintAbilityAreaEffect>("eca936a9e235875498d1e74ff7c09ecd"), //spike stones
                library.Get <BlueprintAbilityAreaEffect>("16e0e4c6a16f68c49832340b93706499"), //spike growth
                library.Get <BlueprintAbilityAreaEffect>("bcb6329cefc66da41b011299a43cc681"), //entangle
                library.Get <BlueprintAbilityAreaEffect>("72328360f1eeeb94d8a43d51db96eccb"), //sickeneing entangle
                library.Get <BlueprintAbilityAreaEffect>("d46313be45054b248a1f1656ddb38614"), //grease
                library.Get <BlueprintAbilityAreaEffect>("7d7821abf06fae744a4e37e48077a43a"), //mud golem area
                library.Get <BlueprintAbilityAreaEffect>("cf742a1d377378e4c8799f6a3afff1ba"), //create pit area
                library.Get <BlueprintAbilityAreaEffect>("e122151e93e44e0488521aed9e51b617"), //acid pit area
                library.Get <BlueprintAbilityAreaEffect>("beccc33f543b1f8469c018982c23ac06"), //spiked pit area
                library.Get <BlueprintAbilityAreaEffect>("d086b1aeb367a5b43808d34c321955d1"), //hungry pit area
                library.Get <BlueprintAbilityAreaEffect>("9b51157a5305dbf4184bf15bdad39226"), //rift of ruin area
            };

            foreach (var a in areas)
            {
                var comp = a.GetComponent <SpellDescriptorComponent>();
                if (comp != null)
                {
                    comp.Descriptor = comp.Descriptor | SpellDescriptor.Ground;
                }
                else
                {
                    a.AddComponent(Helpers.CreateSpellDescriptor(SpellDescriptor.Ground));
                }

                var pit = a.GetComponent <AreaEffectPit>();
                if (pit == null)
                {
                    continue;
                }
                pit.ImmunityFacts = pit.ImmunityFacts.AddToArray(pit_spell_immunity);
            }
        }
Пример #4
0
        static void addClassToAreaEffect(BlueprintCharacterClass class_to_add, BlueprintArchetype[] archetypes_to_add, BlueprintAbilityAreaEffect a)
        {
            var components = a.ComponentsArray;

            foreach (var c in components)
            {
                if (c is ContextRankConfig)
                {
                    addClassToContextRankConfig(class_to_add, archetypes_to_add, c as ContextRankConfig, a.name);
                }
                else if (c is AbilityAreaEffectBuff)
                {
                    addClassToBuff(class_to_add, archetypes_to_add, (c as AbilityAreaEffectBuff).Buff);
                }
                else if (c is AbilityAreaEffectRunAction)
                {
                    var c_typed = c as AbilityAreaEffectRunAction;
                    if (c_typed.Round != null)
                    {
                        addClassToActionList(class_to_add, archetypes_to_add, c_typed.Round);
                    }
                    if (c_typed.UnitEnter != null)
                    {
                        addClassToActionList(class_to_add, archetypes_to_add, c_typed.UnitEnter);
                    }
                    if (c_typed.UnitEnter != null)
                    {
                        addClassToActionList(class_to_add, archetypes_to_add, c_typed.UnitExit);
                    }
                    if (c_typed.UnitMove != null)
                    {
                        addClassToActionList(class_to_add, archetypes_to_add, c_typed.UnitMove);
                    }
                }
            }
        }
Пример #5
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);
        }