Skip to content

Commit

Permalink
Dispell projectile, more tweaks to spell book
Browse files Browse the repository at this point in the history
  • Loading branch information
EgorDinamit committed Sep 23, 2023
1 parent b4024d8 commit 03df5a5
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 3 deletions.
1 change: 1 addition & 0 deletions baystation12.dme
Original file line number Diff line number Diff line change
Expand Up @@ -3125,6 +3125,7 @@
#include "code\modules\spells\racial_wizard.dm"
#include "code\modules\spells\spell_projectile.dm"
#include "code\modules\spells\aimed\_aimed.dm"
#include "code\modules\spells\aimed\dispell.dm"
#include "code\modules\spells\aimed\fireball.dm"
#include "code\modules\spells\aimed\passage.dm"
#include "code\modules\spells\aoe_turf\aoe_turf.dm"
Expand Down
7 changes: 4 additions & 3 deletions code/modules/spellbook/_spellbook.dm
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,13 @@ GLOBAL_LIST_EMPTY(spells_by_categories)
/datum/spell/targeted/projectile/magic_missile,
)

// Free for all spell book!
// Free for all spell book that contains low-end spells that do not require wizard robes.
/obj/item/spellbook/minor_free
book_flags = NO_OWNER
allowed_spells = list(
/datum/spell/aimed/passage,
/datum/spell/aoe_turf/knock,
/datum/spell/targeted/ethereal_jaunt,
/datum/spell/aoe_turf/blink,
/datum/spell/targeted/heal_target/touch,
/datum/spell/aoe_turf/exchange_wounds,
/datum/spell/aoe_turf/smoke,
)
43 changes: 43 additions & 0 deletions code/modules/spells/aimed/dispell.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/datum/spell/aimed/dispell_projectile
name = "Dispelling projectile"
desc = "Launches a magic bolt capable of dispelling magic."
charge_max = 50
spell_flags = 0
invocation = "Ma'Gi-Di!"
invocation_type = INVOKE_SHOUT
range = 15
level_max = list(UPGRADE_TOTAL = 2, UPGRADE_SPEED = 0, UPGRADE_POWER = 2)
duration = 15
projectile_type = /obj/item/projectile/spell_projectile/dispell
var/amt_range = 0

active_msg = "You prepare to cast the bolt of dispell!"
deactive_msg = "You decide against using the bolt of dispell."

hud_state = "wiz_dispell_proj"
cast_sound = 'sound/magic/staff_healing.ogg'

spell_cost = 2
mana_cost = 15

/datum/spell/aimed/dispell_projectile/prox_cast(list/targets, atom/spell_holder)
var/atom/movable/A = targets[1]
if(amt_range > 0)
for(var/atom/movable/AA in range(amt_range, A))
AA.Dispell()
else
A.Dispell()

playsound(A, 'sound/magic/smoke.ogg', min(100, 25 * amt_range))

/datum/spell/aimed/dispell_projectile/empower_spell()
if(!..())
return FALSE

amt_range += 1

return "[src] now affects multiple targets within a [amt_range <= 1 ? "small" : "big"] area."

/obj/item/projectile/spell_projectile/dispell
name = "bolt of dispell"
icon_state = "spark_green"
Binary file modified icons/mob/screen_spells.dmi
Binary file not shown.

0 comments on commit 03df5a5

Please sign in to comment.