Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
EgorDinamit committed Sep 24, 2023
1 parent df9de1a commit 13987bd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
25 changes: 13 additions & 12 deletions code/modules/spells/aimed/_aimed.dm
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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)
Expand All @@ -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
Expand Down
6 changes: 6 additions & 0 deletions code/modules/spells/aimed/healing.dm
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 13987bd

Please sign in to comment.