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

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

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

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

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

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

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

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

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

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

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