Skip to content

Commit

Permalink
Fixes various things I found (mainly smoke!!!)
Browse files Browse the repository at this point in the history
  • Loading branch information
Szyszkrzyneczka committed Dec 13, 2024
1 parent 93e8e83 commit 271d9cf
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 16 deletions.
2 changes: 1 addition & 1 deletion code/datums/components/anti_magic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/antagonists/heretic/heretic_antag.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
1 change: 1 addition & 0 deletions code/modules/antagonists/heretic/magic/ash_ascension.dm
Original file line number Diff line number Diff line change
Expand Up @@ -157,3 +157,4 @@
continue
hit_list += M
M.take_damage(45, BURN, MELEE, 1)
sleep(0.15 SECONDS)
4 changes: 2 additions & 2 deletions code/modules/antagonists/heretic/magic/void_phase.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
5 changes: 3 additions & 2 deletions code/modules/projectiles/projectile/magic/spellcard.dm
Original file line number Diff line number Diff line change
@@ -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

6 changes: 2 additions & 4 deletions code/modules/spells/spell.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions code/modules/spells/spell_types/bee_spells/cluwnecurse.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion code/modules/spells/spell_types/pointed/spell_cards.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions code/modules/spells/spell_types/self/smoke.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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?
Expand All @@ -34,4 +34,4 @@

cooldown_time = 20 SECONDS

smoke_type = /datum/effect_system/smoke_spread/sleeping
smoke_type = /obj/effect/particle_effect/smoke/sleeping
2 changes: 1 addition & 1 deletion code/modules/spells/spell_types/teleport/blink.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion code/modules/spells/spell_types/teleport/teleport.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 271d9cf

Please sign in to comment.