known spells that are absorbed will now upgrade speed and power by one, instead of doing nothing

This commit is contained in:
gurfan
2020-07-16 21:07:56 -05:00
parent 26263f913e
commit b6b00e1281

View File

@@ -35,12 +35,21 @@
if(do_after(holder, target, 5 SECONDS))
qdel(P)
var/hasAbsorbed = FALSE
var/knownspell = FALSE
var/canAbsorb = TRUE
for(var/spell/targetspell in C.spell_list)
canAbsorb = TRUE
for(var/spell/holderspell in L.spell_list)
if(targetspell.type == holderspell.type)
knownspell = TRUE
if(!knownspell)
canAbsorb = FALSE
if(holderspell.can_improve(Sp_POWER))
to_chat(holder, "<span class='notice'>You asborb the magical energies from your foe and have empowered [targetspell.name]!</span>")
holderspell.apply_upgrade(Sp_POWER)
hasAbsorbed = TRUE
if(holderspell.can_improve(Sp_SPEED))
to_chat(holder, "<span class='notice'>You asborb the magical energies from your foe and have quickened [targetspell.name]!</span>")
holderspell.apply_upgrade(Sp_SPEED)
hasAbsorbed = TRUE
if(canAbsorb)
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)