Files
vgstation13/code/modules/spells/helpers.dm
adacovsk 58a58c9573 Zombie buttons (#32608)
* zombie

* works

* Update alien_powers.dm

* there

* Update death.dm

* Update necro_powers.dm

* Update necro_powers.dm
2022-05-17 14:58:50 -05:00

44 lines
1.3 KiB
Plaintext

/* User_type
* USER_TYPE_WIZARD : a classical wizard spell (found in simple spellbook)
* USER_TYPE_CULT
* USER_TYPE_GENETIC
* USER_TYPE_XENOMORPH
* USER_TYPE_MALFAI
* USER_TYPE_VAMPIRE
* USER_TYPE_SPELLBOOK : found in spellbooks
* USER_TYPE_ARTIFACT : used by artifacts
* USER_TYPE_NOUSER : generic/abstract spells
* USER_TYPE_OTHER : misc (not debug)
*/
/proc/getAllSpellsByType(var/type)
var/list/spell/spellList = list()
for (var/type_S in typesof(/spell))
var/spell/S = type_S
if (initial(S.user_type) == type)
spellList += S
return spellList
/proc/getAllWizSpells()
return getAllSpellsByType(USER_TYPE_WIZARD)
/proc/getAllCultSpells()
return getAllSpellsByType(USER_TYPE_CULT)
/proc/getAllGeneticSpells()
return getAllSpellsByType(USER_TYPE_GENETIC)
/proc/getAllMalfSpells()
return getAllSpellsByType(USER_TYPE_MALFAI)
/proc/getAllPulseDemonSpells()
return getAllSpellsByType(USER_TYPE_PULSEDEMON)
/proc/getAllXenoSpells()
return getAllSpellsByType(USER_TYPE_XENOMORPH)
/proc/getAllZombieSpells()
return getAllSpellsByType(USER_TYPE_ZOMBIE)
/proc/getAllVampSpells()
return getAllSpellsByType(USER_TYPE_VAMPIRE)
/mob/proc/has_spell_with_flag(var/spell_flag)
for(var/spell/S in spell_list)
if(S.spell_aspect_flags & spell_flag)
return S
return 0