# ui_extra_spells function library

Dependencies: alter_effect, ds, lib_2da, lib_2daq, lib_anon, lib_array, lib_class, lib_cre, lib_data, lib_eff, lib_fn, lib_ids, lib_ietool, lib_ini, lib_kit, lib_script, lib_sfo, lib_spl, lib_splconv, lib_ssl, lib_struct, lib_sugar, lib_tools, lib_ui, lib_vtable, resolve_spell, ui_add_subraces, ui_bonus_spells, ui_deolvynize, ui_detect_class_kit, ui_dual_class_kits, ui_externalize_hlas, ui_externalize_proficiencies, ui_on_open, ui_shared_code, ui_spell_system, ui_system_call, ui_virtual_class

## Description

## Public functions

add_to_clab_level_1(clab:s, spell:s)=() dimorphic

Lightweight adder that just adds the spell to a CLAB file

extended_add_spell(force_extended:i, replace:i, id:s, file:s, path:s, location:s, locbase:s, exclude_alignment:s, exclude_kit:s, include_class:s)=(resref:s) action

extended_add_spell_helper(force_extended:i, level:i, type_num:i, type:s, id:s)=(resref:s, lua_line_needed:s) action

extended_spell_test()=() action

This just copies 10 spells of each level into the 51-55 and extended namespaces, for testing. It also makes the Doom copy (SPPR1A3) good-only

install_extended_spell_functions()=() action

Add the LUA functions and menu edits to enable extended spells. Most of this is now externalized to the onOpen and systemcall libraries.

make_extended_spell_line(add_to_clab:i, resref:s, include_class:s, exclude_kit:s, exclude_alignment:s)=(line:s, no_align_restrictions:s, lua_array:s, class_bar:a, kit_bar:a, align_bar:a) patch

process_extended_spells()=() action

Get the extended-namespace spells into lua and into auto-grant spells.

spell_system_extension_setup()=() action

spl_basic_ability_localcopy()=() patch

## Internal functions

These should not be called from outside the library itself.

ext_priest_book_edit()=() patch

extended_spell_test_helper()=() patch