Removes Shadowstep. replace it with 2 powers for each vampire type. (#18951)

* WIP

* shadow boxing

* garg + hemomancer

* dantalion and stuff

* oops

* some tweaks

* sprites, tweaks and TGUI

* ready for review

* review

* forgot some sean comments

* oops

* prevents people walking over shockwaves

* shadow boxing DPS down to 20

* oops

* affected review
This commit is contained in:
Charlie
2022-09-30 12:32:53 -05:00
committed by GitHub
parent ef133c5187
commit 5785c3638f
18 changed files with 580 additions and 68 deletions
+11 -3
View File
@@ -314,13 +314,20 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell))
if(!length(targets))
to_chat(user, "<span class='warning'>No suitable target found.</span>")
return FALSE
remove_ranged_ability(user) // Targeting succeeded. So remove the click interceptor if there is one. Even if the cast didn't succeed afterwards
if(should_remove_click_intercept()) // returns TRUE by default
remove_ranged_ability(user) // Targeting succeeded. So remove the click interceptor if there is one. Even if the cast didn't succeed afterwards
if(!cast_check(TRUE, TRUE, user))
return
perform(targets, should_recharge_after_cast, user)
/**
* Called in `try_perform` before removing the click interceptor. useful to override if you have a spell that requires more than 1 click
*/
/obj/effect/proc_holder/spell/proc/should_remove_click_intercept()
return TRUE
/**
* Handles all the code for performing a spell once the targets are known
*
@@ -338,7 +345,8 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell))
write_custom_logs(targets, user)
if(create_attack_logs)
add_attack_logs(user, targets, "cast the spell [name]", ATKLOG_ALL)
cooldown_handler.start_recharge()
if(recharge)
cooldown_handler.start_recharge()
if(sound)
playMagSound()
+2
View File
@@ -45,6 +45,8 @@
return blood_cost
/datum/spell_handler/vampire/after_cast(list/targets, mob/user, obj/effect/proc_holder/spell/spell)
if(!spell.should_recharge_after_cast)
return
if(!required_blood)
return
var/datum/antagonist/vampire/vampire = user.mind.has_antag_datum(/datum/antagonist/vampire)
+58 -1
View File
@@ -98,7 +98,7 @@
/datum/status_effect/void_price/refresh()
price++
return ..()
/datum/status_effect/blooddrunk
id = "blooddrunk"
duration = 10
@@ -478,3 +478,60 @@
else
to_chat(owner, "<span class='cultitalic'>[pick(un_hopeful_messages)]</span>")
/datum/status_effect/thrall_net
id = "thrall_net"
tick_interval = 2 SECONDS
duration = -1
alert_type = null
var/blood_cost_per_tick = 5
var/list/target_UIDs = list()
var/datum/antagonist/vampire/vamp
/datum/status_effect/thrall_net/on_creation(mob/living/new_owner, datum/antagonist/vampire/V, ...)
. = ..()
vamp = V
START_PROCESSING(SSfastprocess, src)
target_UIDs += owner.UID()
var/list/view_cache = view(7, owner)
for(var/datum/mind/M in owner.mind.som.serv)
if(!M.has_antag_datum(/datum/antagonist/mindslave/thrall))
continue
if(!(M.current in view_cache))
continue
if(M.current.stat == DEAD)
continue
target_UIDs += M.current.UID()
M.current.Beam(owner, "sendbeam", time = 2 SECONDS, maxdistance = 7)
/datum/status_effect/thrall_net/tick()
var/total_damage = 0
var/list/view_cache = view(7, owner)
for(var/uid in target_UIDs)
var/mob/living/L = locateUID(uid)
if(!(L in view_cache) || L.stat == DEAD)
target_UIDs -= uid
continue
total_damage += (L.maxHealth - L.health)
L.Beam(owner, "sendbeam", time = 2 SECONDS, maxdistance = 7)
var/average_damage = total_damage / length(target_UIDs)
for(var/uid in target_UIDs)
var/mob/living/L = locateUID(uid)
var/current_damage = L.maxHealth - L.health
if(current_damage == average_damage)
continue
if(current_damage > average_damage)
var/heal_amount = current_damage - average_damage
L.heal_ordered_damage(heal_amount, list(BRUTE, BURN, TOX, OXY, CLONE))
else
var/damage_amount = average_damage - current_damage
L.adjustFireLoss(damage_amount)
vamp.bloodusable = max(vamp.bloodusable - blood_cost_per_tick, 0)
if(!vamp.bloodusable || length(target_UIDs) <= 1) // if there is one left in the list, its only the vampire.
qdel(src)
/datum/status_effect/thrall_net/on_remove()
. = ..()
vamp = null
+20
View File
@@ -247,6 +247,26 @@
/datum/status_effect/bluespace_slowdown/on_remove()
owner.next_move_modifier /= 2
/datum/status_effect/shadow_boxing
id = "shadow barrage"
alert_type = null
duration = 10 SECONDS
tick_interval = 0.4 SECONDS
var/damage = 8
var/source_UID
/datum/status_effect/shadow_boxing/on_creation(mob/living/new_owner, mob/living/source)
. = ..()
source_UID = source.UID()
/datum/status_effect/shadow_boxing/tick()
var/mob/living/attacker = locateUID(source_UID)
if(attacker in view(owner, 2))
attacker.do_attack_animation(owner, ATTACK_EFFECT_PUNCH)
owner.apply_damage(damage, BRUTE)
shadow_to_animation(get_turf(attacker), get_turf(owner), attacker)
// start of `living` level status procs.
/**