From eb8e00a01b3d4a0955f5fbdcfe1d03dca508606c Mon Sep 17 00:00:00 2001 From: chuga-git <98280110+chuga-git@users.noreply.github.com> Date: Sat, 22 Jun 2024 17:45:13 -0500 Subject: [PATCH] Fixes wizard blind spell lasting forever (#25964) * makes blind not a genetic spell * pushes blind duration to 30 seconds (from 20), blurry duration to 40 seconds (from 30), reverts back to 1 tile click targeting. --- code/datums/spells/wizard_spells.dm | 21 +++++++++++++-------- code/game/gamemodes/wizard/spellbook.dm | 4 ++-- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/code/datums/spells/wizard_spells.dm b/code/datums/spells/wizard_spells.dm index ee83aac518d..775b4ee6404 100644 --- a/code/datums/spells/wizard_spells.dm +++ b/code/datums/spells/wizard_spells.dm @@ -301,7 +301,7 @@ cast_sound = 'sound/magic/summonitems_generic.ogg' aoe_range = 3 -/datum/spell/genetic/blind +/datum/spell/blind name = "Blind" desc = "This spell temporarily blinds a single person and does not require wizard garb." school = "transmutation" @@ -311,20 +311,25 @@ invocation_type = "whisper" message = "Your eyes cry out in pain!" cooldown_min = 2 SECONDS - traits = list(TRAIT_BLIND) - - duration = 30 SECONDS sound = 'sound/magic/blind.ogg' -/datum/spell/genetic/blind/create_new_targeting() +/datum/spell/blind/create_new_targeting() var/datum/spell_targeting/click/C = new() + C.selection_type = SPELL_SELECTION_RANGE C.allowed_type = /mob/living return C -/datum/spell/genetic/blind/do_additional_effects(mob/living/target) - target.EyeBlurry(20 SECONDS) - target.EyeBlind(10 SECONDS) +/datum/spell/blind/cast(list/targets, mob/living/user) + if(!length(targets)) + to_chat(user, "No target found in range.") + return + + var/mob/living/target = targets[1] + target.EyeBlurry(40 SECONDS) + target.EyeBlind(30 SECONDS) + SEND_SOUND(target, sound('sound/magic/blind.ogg')) + return TRUE /datum/spell/fireball name = "Fireball" diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm index d56cf4ad226..c698751b465 100644 --- a/code/game/gamemodes/wizard/spellbook.dm +++ b/code/game/gamemodes/wizard/spellbook.dm @@ -96,7 +96,7 @@ //Offensive /datum/spellbook_entry/blind name = "Blind" - spell_type = /datum/spell/genetic/blind + spell_type = /datum/spell/blind category = "Offensive" cost = 1 @@ -1024,7 +1024,7 @@ user.adjust_nutrition(-200) /obj/item/spellbook/oneuse/blind - spell = /datum/spell/genetic/blind + spell = /datum/spell/blind spellname = "blind" icon_state = "bookblind" desc = "This book looks blurry, no matter how you look at it."