# ui_spell_system_elemental 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_extra_spells, ui_on_open, ui_shared_code, ui_spell_system, ui_system_call, ui_virtual_class

## Description

This is an auxiliary library to ui_spell_system, that sets up the elemental-spell lists.

## Public functions

add_elem_spell_desc(elem_string:s, spell:s)=() action

make_elemental_spell_lists(adjust_description:i=1, tra:s=sfo_lua, tra_path:s="DEFAULT")=(earth_names:s, air_names:s, fire_names:s, water_names:s, all_names:s) action

Create LUA spell lists for each element.

make_force_spell_lists()=() action

Create LUA lists of all force spells.

## Internal functions

These should not be called from outside the library itself.

analyse_elemental_type(earth:i, air:i, water:i, fire:i)=(earth:s, air:s, fire:s, water:s) patch

analyse_elemental_type_core(opcode:i, parameter2b_offset:i, resource_offset:i, earth:i, air:i, water:i, fire:i)=(earth:s, air:s, fire:s, water:s) patch

find_elemental_spells()=(earth:a, air:a, fire:a, water:a, earth_shared:a, air_shared:a, fire_shared:a, water_shared:a) action