示例#1
0
        public static ContextActionDealDamage2 CreateNew(DamageEnergyType energy, ContextDiceValue damage, bool isAoE = false, bool halfIfSaved = false, bool IgnoreCritical = false)
        {
            // energy damage
            ContextActionDealDamage2 c = CreateInstance <ContextActionDealDamage2>();

            c.DamageType = new DamageTypeDescription()
            {
                Type     = Kingmaker.RuleSystem.Rules.Damage.DamageType.Energy,
                Energy   = energy,
                Common   = new DamageTypeDescription.CommomData(),
                Physical = new DamageTypeDescription.PhysicalData()
            };
            c.Duration = new ContextDurationValue()
            {
                BonusValue     = 0,
                Rate           = DurationRate.Rounds,
                DiceCountValue = 0,
                DiceType       = DiceType.Zero
            };
            c.Value          = damage;
            c.IsAoE          = isAoE;
            c.HalfIfSaved    = halfIfSaved;
            c.IgnoreCritical = IgnoreCritical;
            return(c);
        }
        static BlueprintFeature CreateElementalMetamagicFeat(ModMetamagic metamagic, DamageEnergyType energyType, String assetId, String iconAssetId)
        {
            var friendlyName = string.Format(Main.lc.GetTranslate("Metamagic.ftElementalSubName"), energyType);
            var shortName    = energyType.ToString().ToLower();
            var description  = string.Format(Main.lc.GetTranslate("Metamagic.ftElementalSubDesc"), shortName);

            return(CreateMetamagicFeat(metamagic, assetId, friendlyName, description, iconAssetId,
                                       Helpers.Create <ElementalMetamagic>(e => e.EnergyType = energyType)));
        }
示例#3
0
        static BlueprintFeature CreateElementalMetamagicFeat(ModMetamagic metamagic, DamageEnergyType energyType, String assetId, String iconAssetId)
        {
            var friendlyName = $"Elemental Spell — {energyType}";
            var shortName    = energyType.ToString().ToLower();
            var description  = $"You can manipulate the elemental nature of your spells. You may replace a spell’s normal damage with {shortName} damage.\nLevel Increase: +1";

            return(CreateMetamagicFeat(metamagic, assetId, friendlyName, description, iconAssetId,
                                       Helpers.Create <ElementalMetamagic>(e => e.EnergyType = energyType)));
        }
示例#4
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(DiceType.D6,
                                                                                        Helpers.CreateContextValue(AbilityRankType.Default),
                                                                                        Helpers.CreateContextValue(AbilityRankType.DamageBonus)),
                                                         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 1d6+2 points of energy damage, plus an additional 1d6+2 points for every 2 occultist levels you possess beyond 1st (up to a maximum of 10d6+20 at 19th 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(ContextRankProgression.StartPlusDivStep, stepLevel: 2, startLevel: 1),
                                                    createClassScalingConfig(ContextRankProgression.Custom, type: AbilityRankType.DamageBonus,
                                                                             customProgression: new (int, int)[] { (2, 2), (4, 4), (6, 6), (8, 8), (10, 10),
示例#5
0
        static BlueprintFeature CreateElementalMetamagicFeat(ModMetamagic metamagic, DamageEnergyType energyType, String assetId, Sprite icon)
        {
            var displayName = energyType.ToString().ToLower() == "magic" ? RES.NewMetamagicNamesElementalForcePrefix_info :
                              LocalizedTexts.Instance.DamageEnergy.GetText(energyType);
            var friendlyName = string.Format(RES.MetamagicFeatElementalSpellName_info, displayName);
            var description  = string.Format(RES.MetamagicFeatElementalSpellDescription_info, displayName);

            return(CreateMetamagicFeat(metamagic, assetId, friendlyName, description, icon,
                                       Helpers.Create <ElementalMetamagic>(e => e.EnergyType = energyType)));
        }
示例#6
0
            private static SpellDescriptor ElementToSpellDescriptor(DamageEnergyType element)
            {
                switch (element)
                {
                case DamageEnergyType.Fire:
                    return(SpellDescriptor.Fire);

                case DamageEnergyType.Cold:
                    return(SpellDescriptor.Cold);

                case DamageEnergyType.Electricity:
                    return(SpellDescriptor.Electricity);

                case DamageEnergyType.Acid:
                    return(SpellDescriptor.Acid);

                default:
                    return(SpellDescriptor.Fire);
                }
            }
        static void createMetamagicEnchantments()
        {
            empower_enchant = Common.createWeaponEnchantment("EmpowerWeaponEnchantment",
                                                             "Empowered",
                                                             "All variable, numeric effects of an empowered spell are increased by half including bonuses to those dice rolls.",
                                                             "",
                                                             "",
                                                             "",
                                                             0,
                                                             null,
                                                             Helpers.Create <NewMechanics.EnchantmentMechanics.WeaponMetamagicDamage>(w => w.empower = true)
                                                             );
            maximize_enchant = Common.createWeaponEnchantment("MaximizeWeaponEnchantment",
                                                              "Maximized",
                                                              "All variable, numeric effects of a spell are maximized.",
                                                              "",
                                                              "",
                                                              "",
                                                              0,
                                                              null,
                                                              Helpers.Create <NewMechanics.EnchantmentMechanics.WeaponMetamagicDamage>(w => w.maximize = true)
                                                              );

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

            foreach (var elt  in elements)
            {
                var enchant = Common.createWeaponEnchantment(elt.ToString() + "ElementalWeaponEnchantment",
                                                             elt.ToString(),
                                                             "Weapon damage type is changed to " + elt.ToString().ToLower() + ".",
                                                             "",
                                                             "",
                                                             "",
                                                             0,
                                                             null,
                                                             Helpers.Create <NewMechanics.EnchantmentMechanics.ReplaceEnergyDamage>(r => r.energy_descriptor = elt)
                                                             );
                elemental_enchants.Add(elt, enchant);
            }
        }
示例#8
0
        static void createEnergyResistanceEnchantments()
        {
            energy_resistance_enchantments = new Dictionary <DamageEnergyType, BlueprintArmorEnchantment[]>();
            DamageEnergyType[] energies = new DamageEnergyType[] { DamageEnergyType.Fire, DamageEnergyType.Cold, DamageEnergyType.Electricity, DamageEnergyType.Acid };
            int[]    dr_values          = new int[] { 10, 20, 30 };
            int[]    enchantment_cost   = new int[] { 1, 2, 4 };
            string[] prefix             = new string[] { " ", "Improved ", "Greater " };

            foreach (var e in energies)
            {
                var enchants      = new BlueprintArmorEnchantment[dr_values.Length];
                var energy_string = e.ToString();
                for (int i = 0; i < dr_values.Length; i++)
                {
                    var feature = Helpers.CreateFeature($"{energy_string}Resistance{dr_values[i]}EncahntmentFeature",
                                                        "",
                                                        "",
                                                        "",
                                                        null,
                                                        FeatureGroup.None,
                                                        Common.createEnergyDR(dr_values[i], e)
                                                        );
                    feature.HideInCharacterSheetAndLevelUp = true;

                    enchants[i] = Common.createArmorEnchantment($"{energy_string}esistance{dr_values[i]}Enchantment",
                                                                $"{prefix[i]}{energy_string} Resistance {dr_values[i]}",
                                                                $"A suit of armor or a shield with this special ability protects against {energy_string.ToLower()}. The armor absorbs the first {dr_values[i]} points of {energy_string.ToLower()} energy damage per attack that the wearer would normally take.",
                                                                "",
                                                                "",
                                                                "",
                                                                0,
                                                                enchantment_cost[i],
                                                                Helpers.Create <AddUnitFeatureEquipment>(a => a.Feature = feature)
                                                                );
                }
                energy_resistance_enchantments.Add(e, enchants);
            }
        }
        static void createPrimalBloodlines()
        {
            primal_bloodline_selection             = library.CopyAndAdd <BlueprintFeatureSelection>("24bef8d1bee12274686f6da6ccbc8914", "PrimalBloodlineSelection", "");
            primal_bloodline_selection.AllFeatures = new BlueprintFeature[0];
            primal_bloodline_selection.SetName("Primal Bloodline");

            var sorcerer        = library.Get <BlueprintCharacterClass>("b3a505fb61437dc4097f43c3f8f9a4cf");
            var bloodline_feats = library.Get <BlueprintFeature>("d2a4b74ee7e43a648b51d0f36db2aa34");

            var core_bloodline_id = new string[]
            {
                "cd788df497c6f10439c7025e87864ee4",                                     //air
                "32393034410fb2f4d9c8beaa5c8c8ab7",                                     //earth
                "17cc794d47408bc4986c55265475c06f",                                     //fire
                "7c692e90592257a4e901d12ae6ec1e41",                                     //water
            };

            var arcana_prototype_id = new string[]
            {
                "0f0cb88a2ccc0814aa64c41fd251e84e",                                     //blue dragon
                "caebe2fa3b5a94d4bbc19ccca86d1d6f",                                     //green dragon
                "a8baee8eb681d53438cc17bd1d125890",                                     //red dragon
                "456e305ebfec3204683b72a45467d87c",                                     //white
            };

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

            for (int i = 0; i < core_bloodline_id.Length; i++)
            {
                var prototype   = library.Get <BlueprintProgression>(core_bloodline_id[i]);
                var progression = library.CopyAndAdd <BlueprintProgression>(core_bloodline_id[i], "Primal" + prototype.name, "");
                progression.SetName("Primal " + progression.Name);

                var arcana = library.CopyAndAdd <BlueprintFeature>(arcana_prototype_id[i], energy[i].ToString() + "PrimalElementalArcanaFeature", "");
                arcana.SetName("Primal Bloodline Arcana");

                progression.Classes = new BlueprintCharacterClass[] { sorcerer };

                var action = Helpers.CreateActionDealDamage(energy[i], Helpers.CreateContextDiceValue(DiceType.D6, 1, 0), IgnoreCritical: true);
                var on_hit = Common.createAddInitiatorAttackWithWeaponTrigger(Helpers.CreateActionList(action));
                on_hit.AllNaturalAndUnarmed = true;
                var buff = Helpers.CreateBuff(energy[i].ToString() + "PrimalElementalistSummoningBuff",
                                              "Elementalist Summoning",
                                              "At 9th level, whenever you summon a creature, it gains energy resistance 10 against the energy type that matches your elemental bloodline, and its natural attacks deal an additional 1d6 points of damage of the same energy type. ",
                                              "",
                                              library.Get <BlueprintAbility>("333efbf776ab61c4da53e9622751d95f").Icon,
                                              null,
                                              Common.createEnergyDR(10, energy[i]),
                                              on_hit);

                var feature = Helpers.CreateFeature(energy[i].ToString() + "PrimalElementalistSummoningFeature",
                                                    buff.Name,
                                                    buff.Description,
                                                    "",
                                                    buff.Icon,
                                                    FeatureGroup.None);
                feature.AddComponent(Helpers.Create <OnSpawnBuff>(o => { o.IfHaveFact = feature; o.buff = buff; o.CheckDescriptor = true; o.SpellDescriptor = SpellDescriptor.Summoning; o.IsInfinity = true; }));

                var level_entries = new List <LevelEntry>();

                foreach (var le in prototype.LevelEntries)
                {
                    var new_le = Helpers.LevelEntry(le.Level);

                    foreach (var f in le.Features)
                    {
                        if (f.name.Contains("Arcana"))
                        {
                            new_le.Features.Add(arcana);
                        }
                        else if (f.name.Contains("ElementalBlastFeature"))
                        {
                            new_le.Features.Add(feature);
                        }
                        else
                        {
                            new_le.Features.Add(f);
                        }
                    }
                    level_entries.Add(new_le);
                }

                progression.LevelEntries = level_entries.ToArray();
                progression.UIGroups[0].Features.Add(feature);

                var feat_prereq = bloodline_feats.GetComponent <PrerequisiteFeaturesFromList>();
                feat_prereq.Features = feat_prereq.Features.AddToArray(progression);

                primal_bloodline_selection.AllFeatures = primal_bloodline_selection.AllFeatures.AddToArray(progression);
            }
        }
        public static void runActionOnDamageDealt(RuleDealDamage evt, ActionList action, int min_dmg = 1, bool only_critical = false, SavingThrowType save_type = SavingThrowType.Unknown,
                                                  BlueprintBuff context_buff = null, DamageEnergyType energy_descriptor      = DamageEnergyType.Acid, bool use_damage_energy_type = false)
        {
            if (only_critical && (evt.AttackRoll == null || !evt.AttackRoll.IsCriticalConfirmed))
            {
                return;
            }


            var target = evt.Target;

            if (target == null)
            {
                return;
            }

            if (evt.Damage <= min_dmg)
            {
                return;
            }

            if (use_damage_energy_type)
            {
                bool damage_found = false;
                foreach (var dmg in evt.DamageBundle)
                {
                    var energy_damage = (dmg as EnergyDamage);

                    if (energy_damage != null && energy_damage.EnergyType == energy_descriptor)
                    {
                        damage_found = true;
                        break;
                    }
                }

                if (!damage_found)
                {
                    return;
                }
            }

            if (save_type != SavingThrowType.Unknown)
            {
                var context_params = evt.Initiator.Buffs?.GetBuff(context_buff)?.MaybeContext?.Params;
                if (context_params == null)
                {
                    return;
                }

                var dc = context_params.DC;
                var rule_saving_throw = new RuleSavingThrow(target, save_type, dc);
                Rulebook.Trigger(rule_saving_throw);

                if (rule_saving_throw.IsPassed)
                {
                    return;
                }
            }

            var context_fact = evt.Initiator.Buffs?.GetBuff(context_buff);

            (context_fact as IFactContextOwner)?.RunActionInContext(action, target);
        }
示例#11
0
        static BlueprintFeature CreateSpellVulnerability()
        {
            //Log.Write(DrawFeatGuids[1]);
            var spellvulsprite           = Image2Sprite.Create("Mods/EldritchArcana/sprites/spell_vulnerability.png");
            int SpellVunrabilityBonus    = -4;
            var components               = new List <BlueprintComponent> {
            };
            var SpellschoolChoiceFeature = (new SpellSchool[]
            {
                SpellSchool.Abjuration,
                SpellSchool.Conjuration,
                //SpellSchool.Divination,
                SpellSchool.Enchantment,
                SpellSchool.Evocation,
                SpellSchool.Illusion,
                SpellSchool.Necromancy,
                SpellSchool.Transmutation,
                //SpellSchool.Universalist
            }).Select((school) => Helpers.CreateFeature($"SpellVulnerability{school}", $"SpellVulnerability-{school}",
                                                        $" you have {SpellVunrabilityBonus} on saves vs {school}", Helpers.MergeIds(DrawFeatGuids[1], Helpers.spellSchoolGuid(school)),
                                                        Helpers.GetIcon(Helpers.spellSchoolGuid(school)), FeatureGroup.None,
                                                        Helpers.Create <SavingThrowBonusAgainstSchool>(a =>
            {
                a.School             = school;
                a.Value              = SpellVunrabilityBonus;
                a.ModifierDescriptor = ModifierDescriptor.Penalty;
            }))).ToArray();

            var ElementalWeaknes = new DamageEnergyType[] {
                DamageEnergyType.Cold,
                DamageEnergyType.Acid,
                //divination
                DamageEnergyType.Sonic,
                DamageEnergyType.Fire,
                DamageEnergyType.Electricity,
                DamageEnergyType.Unholy,
                DamageEnergyType.Divine,
                //universalist
            };

            BlueprintFeature feature = SpellschoolChoiceFeature[1];

            for (int i = 0; i < 7; i++)
            {
                feature = SpellschoolChoiceFeature[i];
                feature.SetDescription(feature.GetDescription() + $" and Elementalweakness {ElementalWeaknes[i]}");
                feature.AddComponent(Helpers.Create <AddEnergyVulnerability>(a => { a.Type = ElementalWeaknes[i]; }));
            }

            //var noFeature = Helpers.PrerequisiteNoFeature(null);

            var feat = Helpers.CreateFeatureSelection("SpellVulnerability", "Spell Vulnerability",
                                                      "if you pick a Drawback at level one you can choose an extra feat on top\n" +
                                                      $"Bane: choose a spellschool you have {SpellVunrabilityBonus} on saves vs that spellschool.", //\n(except universalist and divination becouse there are no saves of those catagory)
                                                      DrawFeatGuids[1],
                                                      spellvulsprite,                                                                               //Helpers.NiceIcons(15),
                                                      FeatureGroup.Feat);

            //,PrerequisiteCharacterLevelExact.Create(1)
            //feat.AddComponents(ElementalWeaknesChoiceFeature);
            //noFeature.Feature = feat;

            /*
             * foreach (var choice in SpellschoolChoiceFeature)
             * {
             *  Log.Write(choice.Name);
             *  Log.Write(choice.Description);
             * }*/
            feat.SetFeatures(SpellschoolChoiceFeature);


            //feat.AddComponents(ikweethetniet);
            //components.AddRange(ikweethetniet);

            return(feat);
        }
示例#12
0
        static public EnergyArrow CreateEnergyArrowAction(ActionList action_on_hit = null, ActionList action_on_miss = null, DamageEnergyType damageType = DamageEnergyType.PositiveEnergy)
        {
            var c = Helpers.Create <EnergyArrow>();

            c.action_on_success = action_on_hit;
            c.action_on_miss    = action_on_miss;
            c.damageType        = damageType;
            return(c);
        }
示例#13
0
 public BlueprintFeature createDraconicResistance(string name_prefix, string display_name, string description, DamageEnergyType energy, UnityEngine.Sprite icon)
 {
     var feature = Helpers.CreateFeature(name_prefix + "Feature",
                                         display_name,
                                         description,
                                         "",
                                         icon,
                                         FeatureGroup.None,
                                         createClassScalingConfig(ContextRankProgression.Custom,
                                                                  customProgression: new (int, int)[] {
示例#14
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);
        }
示例#15
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);
        }