From 13987bd06e8152aeb0350494c9e7932dca9661ed Mon Sep 17 00:00:00 2001 From: EgorDinamit Date: Sun, 24 Sep 2023 15:43:16 +0300 Subject: [PATCH] Fixes --- code/modules/spells/aimed/_aimed.dm | 25 +++++++++++++------------ code/modules/spells/aimed/healing.dm | 6 ++++++ 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/code/modules/spells/aimed/_aimed.dm b/code/modules/spells/aimed/_aimed.dm index cadc0acb8ea..d74156f8435 100644 --- a/code/modules/spells/aimed/_aimed.dm +++ b/code/modules/spells/aimed/_aimed.dm @@ -1,7 +1,7 @@ /datum/spell/aimed hud_state = "projectile" - var/projectile_type = /obj/item/projectile + var/projectile_type = null var/deactive_msg = "You discharge your projectile..." var/active_msg = "You charge your projectile!" var/active_icon_state = "projectile" @@ -48,7 +48,7 @@ if(..()) return FALSE var/ran_out = (current_amount <= 0) - if(!cast_check(!ran_out, ranged_ability_user, list(target) || !TargetCastCheck(ranged_ability_user, target))) + if(!cast_check(!ran_out, ranged_ability_user, list(target)) || !TargetCastCheck(ranged_ability_user, target)) remove_ranged_ability() return FALSE var/list/targets = list(target) @@ -69,16 +69,17 @@ /datum/spell/aimed/proc/fire_projectile(mob/living/user, atom/target) current_amount-- - for(var/i in 1 to projectiles_per_fire) - var/obj/item/projectile/P = new projectile_type(user.loc) - if(istype(P, /obj/item/projectile/spell_projectile)) - var/obj/item/projectile/spell_projectile/SP = P - SP.carried = src //casting is magical - P.original = target - P.current = target - P.starting = get_turf(user) - P.shot_from = user - P.launch(target, user.zone_sel.selecting, user) + if(projectile_type) + for(var/i in 1 to projectiles_per_fire) + var/obj/item/projectile/P = new projectile_type(user.loc) + if(istype(P, /obj/item/projectile/spell_projectile)) + var/obj/item/projectile/spell_projectile/SP = P + SP.carried = src //casting is magical + P.original = target + P.current = target + P.starting = get_turf(user) + P.shot_from = user + P.launch(target, user.zone_sel.selecting, user) return TRUE // For spell_projectile types diff --git a/code/modules/spells/aimed/healing.dm b/code/modules/spells/aimed/healing.dm index b29d6e0b12f..64b27b6fcf8 100644 --- a/code/modules/spells/aimed/healing.dm +++ b/code/modules/spells/aimed/healing.dm @@ -1,6 +1,9 @@ /datum/spell/aimed/heal_target name = "Cure Light Wounds" desc = "A rudimentary spell used mainly by wizards to heal papercuts. Does not require wizard garb." + deactive_msg = "You discharge the healing spell..." + active_msg = "You charge the healing spell!" + spell_flags = 0 charge_max = 20 SECONDS invocation = "Di'Nath!" invocation_type = INVOKE_SHOUT @@ -42,6 +45,7 @@ return ..() /datum/spell/aimed/heal_target/fire_projectile(mob/living/user, mob/living/target) + . = ..() target.adjustBruteLoss(brute_damage) target.adjustFireLoss(burn_damage) target.adjustToxLoss(tox_damage) @@ -229,6 +233,8 @@ /datum/spell/aimed/revoke_death name = "Revoke Death" desc = "Revoke that of death itself. Comes at a cost that may be hard to manage for some." + deactive_msg = "You discharge the healing spell..." + active_msg = "You charge the healing spell!" charge_type = SPELL_CHARGES charge_max = 1