replaces is_type_in_list

This commit is contained in:
gurfan
2020-07-16 20:03:47 -05:00
parent aa9f1c0b70
commit 5b48726563

View File

@@ -35,8 +35,12 @@
if(do_after(holder, target, 5 SECONDS))
qdel(P)
var/hasAbsorbed = FALSE
var/knownspell = FALSE
for(var/spell/targetspell in C.spell_list)
if(!is_type_in_list(targetspell, L.spell_list))
for(var/spell/holderspell in L.spell_list)
if(targetspell.type == holderspell.type)
knownspell = TRUE
if(!knownspell)
to_chat(holder, "<span class='notice'>You asborb the magical energies from your foe and have learned [targetspell.name]!</span>")
L.attack_log += text("\[[time_stamp()] <font color='orange'>[L.real_name] ([L.ckey]) absorbed the spell [targetspell.name] from [C.real_name] ([C.ckey]).</font>")
C.remove_spell(targetspell)