From 271d9cf59bc065230ae16dfe071d2646c51239e4 Mon Sep 17 00:00:00 2001 From: Szyszkrzyneczka Date: Fri, 13 Dec 2024 17:06:43 +0100 Subject: [PATCH] Fixes various things I found (mainly smoke!!!) --- code/datums/components/anti_magic.dm | 2 +- code/modules/antagonists/heretic/heretic_antag.dm | 2 +- code/modules/antagonists/heretic/magic/ash_ascension.dm | 1 + code/modules/antagonists/heretic/magic/void_phase.dm | 4 ++-- code/modules/projectiles/projectile/magic/spellcard.dm | 5 +++-- code/modules/spells/spell.dm | 6 ++---- code/modules/spells/spell_types/bee_spells/cluwnecurse.dm | 2 ++ code/modules/spells/spell_types/pointed/spell_cards.dm | 2 +- code/modules/spells/spell_types/self/smoke.dm | 6 +++--- code/modules/spells/spell_types/teleport/blink.dm | 2 +- code/modules/spells/spell_types/teleport/teleport.dm | 2 +- 11 files changed, 18 insertions(+), 16 deletions(-) diff --git a/code/datums/components/anti_magic.dm b/code/datums/components/anti_magic.dm index 26b768a80eac1..565d75e6c703d 100644 --- a/code/datums/components/anti_magic.dm +++ b/code/datums/components/anti_magic.dm @@ -153,7 +153,7 @@ // Block success! Add this parent to the list of antimagic sources antimagic_sources += parent - if((charges != INFINITY) && charge_cost > 0) + if((charges != INFINITY) && charge_cost > 0 && drain_antimagic) drain_antimagic?.Invoke(source, parent) charges -= charge_cost if(charges <= 0) diff --git a/code/modules/antagonists/heretic/heretic_antag.dm b/code/modules/antagonists/heretic/heretic_antag.dm index ab621861dffc2..e50a61fcc3362 100644 --- a/code/modules/antagonists/heretic/heretic_antag.dm +++ b/code/modules/antagonists/heretic/heretic_antag.dm @@ -186,7 +186,7 @@ var/mob/living/our_mob = mob_override || owner.current handle_clown_mutation(our_mob, "Ancient knowledge described to you has allowed you to overcome your clownish nature, allowing you to wield weapons without harming yourself.") our_mob.faction |= FACTION_HERETIC - RegisterSignal(our_mob, list(COMSIG_MOB_BEFORE_SPELL_CAST, COMSIG_MOB_SPELL_ACTIVATED), PROC_REF(on_spell_cast)) + RegisterSignals(our_mob, list(COMSIG_MOB_BEFORE_SPELL_CAST, COMSIG_MOB_SPELL_ACTIVATED), PROC_REF(on_spell_cast)) RegisterSignal(our_mob, COMSIG_MOB_ITEM_AFTERATTACK, PROC_REF(on_item_afterattack)) RegisterSignal(our_mob, COMSIG_MOB_LOGIN, PROC_REF(fix_influence_network)) update_heretic_icons_added() diff --git a/code/modules/antagonists/heretic/magic/ash_ascension.dm b/code/modules/antagonists/heretic/magic/ash_ascension.dm index b79bb0c35b33a..2369d69e9f90d 100644 --- a/code/modules/antagonists/heretic/magic/ash_ascension.dm +++ b/code/modules/antagonists/heretic/magic/ash_ascension.dm @@ -157,3 +157,4 @@ continue hit_list += M M.take_damage(45, BURN, MELEE, 1) + sleep(0.15 SECONDS) diff --git a/code/modules/antagonists/heretic/magic/void_phase.dm b/code/modules/antagonists/heretic/magic/void_phase.dm index 6899e9bcc065a..e2cc243895bb7 100644 --- a/code/modules/antagonists/heretic/magic/void_phase.dm +++ b/code/modules/antagonists/heretic/magic/void_phase.dm @@ -42,12 +42,12 @@ playsound(targeted_turf, 'sound/magic/voidblink.ogg', 60, FALSE) for(var/mob/living/living_mob in range(damage_radius, source_turf)) - if(IS_HERETIC_OR_MONSTER(living_mob) || living_mob == cast_on) + if(IS_HERETIC_OR_MONSTER(living_mob) || living_mob == cast_on || living_mob.can_block_magic(MAGIC_RESISTANCE)) continue living_mob.apply_damage(40, BRUTE) for(var/mob/living/living_mob in range(damage_radius, targeted_turf)) - if(IS_HERETIC_OR_MONSTER(living_mob) || living_mob == cast_on) + if(IS_HERETIC_OR_MONSTER(living_mob) || living_mob == cast_on || living_mob.can_block_magic(MAGIC_RESISTANCE)) continue living_mob.apply_damage(40, BRUTE) diff --git a/code/modules/projectiles/projectile/magic/spellcard.dm b/code/modules/projectiles/projectile/magic/spellcard.dm index 45c9e3f04d998..2089a22547edf 100644 --- a/code/modules/projectiles/projectile/magic/spellcard.dm +++ b/code/modules/projectiles/projectile/magic/spellcard.dm @@ -1,10 +1,11 @@ -/obj/projectile/spellcard +/obj/projectile/magic/spellcard name = "enchanted card" desc = "A piece of paper enchanted to give it extreme durability and stiffness, along with edges sharp enough to slice anyone unfortunate enough to get hit by a charged one." icon_state = "spellcard" damage_type = BRUTE damage = 2 -/obj/projectile/spellcard/New(loc, spell_level) +/obj/projectile/magic/spellcard/New(loc, spell_level) . = ..() damage += spell_level + diff --git a/code/modules/spells/spell.dm b/code/modules/spells/spell.dm index a838f5cb60502..ec89fe54d6a49 100644 --- a/code/modules/spells/spell.dm +++ b/code/modules/spells/spell.dm @@ -304,10 +304,8 @@ do_sparks(sparks_amt, FALSE, get_turf(owner)) - if(ispath(smoke_type, /datum/effect_system/smoke_spread)) - var/datum/effect_system/smoke_spread/smoke = new smoke_type() - smoke.set_up(smoke_amt, src) - smoke.start() + if(ispath(smoke_type, /obj/effect/particle_effect/smoke)) + do_smoke(smoke_amt, owner.loc, smoke_type) /// Provides feedback after a spell cast occurs, in the form of a cast sound and/or invocation diff --git a/code/modules/spells/spell_types/bee_spells/cluwnecurse.dm b/code/modules/spells/spell_types/bee_spells/cluwnecurse.dm index 2674af4365113..e14056294e389 100644 --- a/code/modules/spells/spell_types/bee_spells/cluwnecurse.dm +++ b/code/modules/spells/spell_types/bee_spells/cluwnecurse.dm @@ -12,6 +12,8 @@ /datum/action/cooldown/spell/pointed/cluwnecurse/cast(mob/living/carbon/cast_on) . = ..() + if(cast_on.can_block_magic(MAGIC_RESISTANCE|MAGIC_RESISTANCE_HOLY|MAGIC_RESISTANCE_MIND)) + return cast_on.cluwneify() /datum/spellbook_entry/cluwnecurse diff --git a/code/modules/spells/spell_types/pointed/spell_cards.dm b/code/modules/spells/spell_types/pointed/spell_cards.dm index 0cb8a7e9a1817..9d53815716076 100644 --- a/code/modules/spells/spell_types/pointed/spell_cards.dm +++ b/code/modules/spells/spell_types/pointed/spell_cards.dm @@ -14,7 +14,7 @@ base_icon_state = "spellcard" cast_range = 40 - projectile_type = /obj/projectile/spellcard + projectile_type = /obj/projectile/magic/spellcard projectile_amount = 5 projectiles_per_fire = 7 diff --git a/code/modules/spells/spell_types/self/smoke.dm b/code/modules/spells/spell_types/self/smoke.dm index f9ddf128ebb03..77bdf0caff7a0 100644 --- a/code/modules/spells/spell_types/self/smoke.dm +++ b/code/modules/spells/spell_types/self/smoke.dm @@ -11,7 +11,7 @@ invocation_type = INVOCATION_NONE - smoke_type = /datum/effect_system/smoke_spread + smoke_type = /obj/effect/particle_effect/smoke smoke_amt = 4 /// Chaplain smoke. @@ -23,7 +23,7 @@ cooldown_time = 36 SECONDS spell_requirements = NONE - smoke_type = /datum/effect_system/smoke_spread/bad + smoke_type = /obj/effect/particle_effect/smoke/bad smoke_amt = 2 /// Unused smoke that makes people sleep. Used to be for cult? @@ -34,4 +34,4 @@ cooldown_time = 20 SECONDS - smoke_type = /datum/effect_system/smoke_spread/sleeping + smoke_type = /obj/effect/particle_effect/smoke/sleeping diff --git a/code/modules/spells/spell_types/teleport/blink.dm b/code/modules/spells/spell_types/teleport/blink.dm index b55a773c904a9..45677d6b41178 100644 --- a/code/modules/spells/spell_types/teleport/blink.dm +++ b/code/modules/spells/spell_types/teleport/blink.dm @@ -10,7 +10,7 @@ invocation_type = INVOCATION_NONE - smoke_type = /datum/effect_system/smoke_spread + smoke_type = /obj/effect/particle_effect/smoke smoke_amt = 0 inner_tele_radius = 0 diff --git a/code/modules/spells/spell_types/teleport/teleport.dm b/code/modules/spells/spell_types/teleport/teleport.dm index b35cddd7a9184..67b3fa9c0d32a 100644 --- a/code/modules/spells/spell_types/teleport/teleport.dm +++ b/code/modules/spells/spell_types/teleport/teleport.dm @@ -12,7 +12,7 @@ invocation = "SCYAR NILA" invocation_type = INVOCATION_SHOUT - smoke_type = /datum/effect_system/smoke_spread + smoke_type = /obj/effect/particle_effect/smoke smoke_amt = 2 post_teleport_sound = 'sound/magic/teleport_app.ogg'