static void LoadMeteorSwarm()
        {
            var fireball = library.Get <BlueprintAbility>("2d81362af43aeac4387a3d4fced489c3");

            var spell = library.CopyAndAdd(fireball, "MeteorSwarm", "2d18f8a4de6742e2ba954da0f19a4957");

            spell.SetNameDescriptionIcon("Meteor Swarm",
                                         "Meteor swarm is a very powerful and spectacular spell that is similar to fireball in many aspects. When you cast it, four 2-foot-diameter spheres spring from your outstretched hand and streak in straight lines to the spots you select. The meteor spheres leave a fiery trail of sparks.\n" +
                                         "If you aim a sphere at a specific creature, you may make a ranged touch attack to strike the target with the meteor.Any creature struck by a sphere takes 2d6 points of bludgeoning damage(no save) and has to make a saving throw against +4 DC for the sphere’s fire damage(see below).If a targeted sphere misses its target, it simply explodes at the nearest corner of the target’s space. You may aim more than one sphere at the same target.\n" +
                                         "Once a sphere reaches its destination, it explodes in a 40-foot-radius spread, dealing 6d6 points of fire damage to each creature in the area.If a creature is within the area of more than one sphere, it must save separately against each.Despite stemming from separate spheres, all of the fire damage is added together after the saves have been made, and fire resistance is applied only once.",
                                         Image2Sprite.Create("Mods/EldritchArcana/sprites/meteor_swarm.png"));
            spell.LocalizedSavingThrow = Helpers.CreateString($"{spell.name}.SavingThrow", "None or Reflex half, see text");

            var deliverProjectile  = UnityEngine.Object.Instantiate(fireball.GetComponent <AbilityDeliverProjectile>());
            var fireballProjectile = deliverProjectile.Projectiles[0];

            deliverProjectile.Projectiles.AddToArray(fireballProjectile, fireballProjectile);

            var fire24d6 = Helpers.CreateActionDealDamage(DamageEnergyType.Fire,
                                                          DiceType.D6.CreateContextDiceValue(24), isAoE: true, halfIfSaved: true);
            var fireDmgSave = Helpers.CreateActionSavingThrow(SavingThrowType.Reflex, fire24d6);

            var conditionalDCIncrease = Harmony12.AccessTools.Inner(typeof(ContextActionSavingThrow), "ConditionalDCIncrease");
            var dcAdjustArray         = Array.CreateInstance(conditionalDCIncrease, 1);
            var dcAdjust = Activator.CreateInstance(conditionalDCIncrease);

            // If the main target was hit by the ranged touch attack, increase the DC by 4.
            Helpers.SetField(dcAdjust, "Condition", Helpers.CreateConditionsCheckerAnd(ContextConditionNearMainTarget.Create()));
            Helpers.SetField(dcAdjust, "Value", AbilitySharedValue.StatBonus.CreateContextValue());
            dcAdjustArray.SetValue(dcAdjust, 0);
            Helpers.SetField(fireDmgSave, "m_ConditionalDCIncrease", dcAdjustArray);

            var increaseDCBy4 = Helpers.Create <ContextActionChangeSharedValue>(c =>
            {
                c.SharedValue = AbilitySharedValue.StatBonus;
                c.SetValue    = 4;
                c.Type        = SharedValueChangeType.Set;
            });

            var physical2d6 = Helpers.CreateActionDealDamage(PhysicalDamageForm.Bludgeoning,
                                                             DiceType.D6.CreateContextDiceValue(2));

            spell.SetComponents(
                SpellSchool.Evocation.CreateSpellComponent(),
                SpellDescriptor.Fire.CreateSpellDescriptor(),
                deliverProjectile,
                Helpers.CreateAbilityTargetsAround(40.Feet(), TargetType.Any),
                Helpers.CreateRunActions(
                    Helpers.CreateConditional(
                        // Check if this unit is the primary target
                        ContextConditionNearMainTarget.Create(),
                        // Perform a ranged touch attack on the primary target
                        ContextActionRangedTouchAttack.Create(
                            // If ranged touch succeeded:
                            // - 4 meteors hit for 2d6 bludgeoning damage each.
                            // - target takes 24d6 fire damage, -4 penalty to reflex save for half
                            new GameAction[] {
                physical2d6, physical2d6, physical2d6, physical2d6,
                increaseDCBy4
            })),
                    // Apply fire damage to all targets in range.
                    fireDmgSave));
            spell.AddToSpellList(Helpers.wizardSpellList, 9);
            spell.AddToSpellList(Helpers.magusSpellList, 9);
            spell.AddToSpellList(Helpers.fireDomainSpellList, 9);
            //spell.AddToSpellList(Helpers.druidSpellList, 9);
            //spell.AddToSpellList(Helpers., 9);
            Helpers.AddSpellAndScroll(spell, "5b172c2c3e356eb43ba5a8f8008a8a5a"); // scroll of fireball
            meteorSwarm = spell;
        }
        static void LoadMeteorSwarm()
        {
            var fireball = library.Get <BlueprintAbility>("2d81362af43aeac4387a3d4fced489c3");

            var spell = library.CopyAndAdd(fireball, "MeteorSwarm", "2d18f8a4de6742e2ba954da0f19a4957");

            spell.SetNameDescriptionIcon(RES.MeteorSwarmAbilityName_info,
                                         RES.MeteorSwarmAbilityDescription_info,
                                         Image2Sprite.Create("Mods/EldritchArcana/sprites/meteor_swarm.png"));
            spell.LocalizedSavingThrow = Helpers.CreateString($"{spell.name}.SavingThrow", RES.MeteorSwarmSavingThrowDescription_info);

            var deliverProjectile  = UnityEngine.Object.Instantiate(fireball.GetComponent <AbilityDeliverProjectile>());
            var fireballProjectile = deliverProjectile.Projectiles[0];

            deliverProjectile.Projectiles.AddToArray(fireballProjectile, fireballProjectile);

            var fire24d6 = Helpers.CreateActionDealDamage(DamageEnergyType.Fire,
                                                          DiceType.D6.CreateContextDiceValue(24), isAoE: true, halfIfSaved: true);
            var fireDmgSave = Helpers.CreateActionSavingThrow(SavingThrowType.Reflex, fire24d6);

            var conditionalDCIncrease = Harmony12.AccessTools.Inner(typeof(ContextActionSavingThrow), "ConditionalDCIncrease");
            var dcAdjustArray         = Array.CreateInstance(conditionalDCIncrease, 1);
            var dcAdjust = Activator.CreateInstance(conditionalDCIncrease);

            // If the main target was hit by the ranged touch attack, increase the DC by 4.
            Helpers.SetField(dcAdjust, "Condition", Helpers.CreateConditionsCheckerAnd(ContextConditionNearMainTarget.Create()));
            Helpers.SetField(dcAdjust, "Value", AbilitySharedValue.StatBonus.CreateContextValue());
            dcAdjustArray.SetValue(dcAdjust, 0);
            Helpers.SetField(fireDmgSave, "m_ConditionalDCIncrease", dcAdjustArray);

            var increaseDCBy4 = Helpers.Create <ContextActionChangeSharedValue>(c =>
            {
                c.SharedValue = AbilitySharedValue.StatBonus;
                c.SetValue    = 4;
                c.Type        = SharedValueChangeType.Set;
            });

            var physical2d6 = Helpers.CreateActionDealDamage(PhysicalDamageForm.Bludgeoning,
                                                             DiceType.D6.CreateContextDiceValue(2));

            spell.SetComponents(
                SpellSchool.Evocation.CreateSpellComponent(),
                SpellDescriptor.Fire.CreateSpellDescriptor(),
                deliverProjectile,
                Helpers.CreateAbilityTargetsAround(40.Feet(), TargetType.Any),
                Helpers.CreateRunActions(
                    Helpers.CreateConditional(
                        // Check if this unit is the primary target
                        ContextConditionNearMainTarget.Create(),
                        // Perform a ranged touch attack on the primary target
                        ContextActionRangedTouchAttack.Create(
                            // If ranged touch succeeded:
                            // - 4 meteors hit for 2d6 bludgeoning damage each.
                            // - target takes 24d6 fire damage, -4 penalty to reflex save for half
                            new GameAction[] {
                physical2d6, physical2d6, physical2d6, physical2d6,
                increaseDCBy4
            })),
                    // Apply fire damage to all targets in range.
                    fireDmgSave));
            spell.AddToSpellList(Helpers.wizardSpellList, 9);
            //spell.AddToSpellList(Helpers.magusSpellList, 9);
            //spell.AddToSpellList(Helpers.fireDomainSpellList, 9);
            //spell.AddToSpellList(Helpers.druidSpellList, 9);
            //spell.AddToSpellList(Helpers., 9);
            Helpers.AddSpellAndScroll(spell, "5b172c2c3e356eb43ba5a8f8008a8a5a"); // scroll of fireball
            meteorSwarm = spell;
        }