Skip to content

Commit

Permalink
fix magic touch spells false deleting, fix spelling, allow escape
Browse files Browse the repository at this point in the history
  • Loading branch information
Qwertytoforty committed Dec 24, 2024
1 parent 6825da4 commit e88d41a
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 10 deletions.
1 change: 1 addition & 0 deletions code/datums/spells/alien_spells/build_resin_structure.dm
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
to_chat(C, "<span class='alertalien'>You viciously rip apart and consume [target]!</span>")
C.add_plasma(-10)
qdel(target)
handle_delete(user)

#undef RESIN_WALL
#undef RESIN_NEST
Expand Down
2 changes: 2 additions & 0 deletions code/datums/spells/alien_spells/corrosive_acid_spit.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
C.add_plasma(-200)
else
to_chat(C, "<span class='noticealien'>You cannot dissolve this object.</span>")
handle_delete(user)

/datum/spell/touch/alien_spell/burning_touch
name = "Blazing touch"
Expand Down Expand Up @@ -72,3 +73,4 @@
C.visible_message("<span class='alertalien'>[C] touches [target] and burns right through it!</span>")
C.add_plasma(-100)
qdel(target)
handle_delete(user)
10 changes: 5 additions & 5 deletions code/datums/spells/banana_touch.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,19 @@
on_use_sound = 'sound/items/AirHorn.ogg'
icon_state = "banana_touch"
item_state = "banana_touch"
var/is_apprentice_spell = FALSE

/datum/spell/touch/banana/apprentice
hand_path = /obj/item/melee/touch_attack/banana/apprentice

/obj/item/melee/touch_attack/banana/apprentice
is_apprentice_spell = TRUE

/obj/item/melee/touch_attack/banana/apprentice/after_attack(atom/target, mob/user, proximity_flag, click_parameters)
/obj/item/melee/touch_attack/banana/after_attack(atom/target, mob/user, proximity_flag, click_parameters)
. = ..()
if(iswizard(target) && target != user)
if(is_apprentice_spell && iswizard(target) && target != user)
to_chat(user, "<span class='danger'>Seriously?! Honk THEM, not me!</span>")
return

/obj/item/melee/touch_attack/banana/after_attack(atom/target, mob/user, proximity_flag, click_parameters)
. = ..()
if(!proximity_flag || target == user || !ishuman(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
return

Expand All @@ -42,6 +41,7 @@
to_chat(user, "<font color='red' size='6'>HONK</font>")
var/mob/living/carbon/human/H = target
H.bananatouched()
handle_delete(user)

/mob/living/carbon/human/proc/bananatouched()
to_chat(src, "<font color='red' size='6'>HONK</font>")
Expand Down
1 change: 1 addition & 0 deletions code/datums/spells/mime_malaise.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

var/mob/living/carbon/human/H = target
H.mimetouched()
handle_delete(user)

/mob/living/carbon/human/proc/mimetouched()
Weaken(14 SECONDS)
Expand Down
11 changes: 9 additions & 2 deletions code/datums/spells/sentient_sword_lunge.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@
to_chat(user, "<span class='warning'>You cannot use this ability if you're outside a blade!</span>")
return
var/obj/item/nullrod/scythe/talking/user_sword = user.loc
var/mob/living/carbon/holder = user_sword.loc
if(istype(holder))
if(ishuman(user_sword.loc))
var/mob/living/carbon/holder = user_sword.loc
holder.unEquip(user_sword)
else if(isstorage(user_sword.loc))
if(prob(50))
to_chat(user, "<span class='warning'>You fail to break out of [user_sword.loc]!</span>")
return
var/turf/our_turf = get_turf(user_sword.loc)
our_turf.visible_message("<span class='danger'>[user_sword] magically teleports out of [user_sword.loc]!</span>")
user_sword.forceMove(our_turf)
user_sword.throw_at(targets[1], 10, 3, user)
8 changes: 6 additions & 2 deletions code/game/gamemodes/wizard/godhand.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@
to_chat(user, "<span class='warning'>You can't reach out!</span>")
return FINISH_ATTACK

/obj/item/melee/touch_attack/after_attack(atom/target, mob/user, proximity_flag, click_parameters)
. = ..()
/obj/item/melee/touch_attack/proc/handle_delete(mob/user)
if(catchphrase)
user.say(catchphrase)
playsound(get_turf(user), on_use_sound, 50, 1)
Expand All @@ -61,6 +60,7 @@
var/mob/M = target
do_sparks(4, 0, M.loc) //no idea what the 0 is
M.gib()
handle_delete(user)

/obj/item/melee/touch_attack/fleshtostone
name = "petrifying touch"
Expand All @@ -77,6 +77,7 @@
var/mob/living/L = target
L.Stun(4 SECONDS)
new /obj/structure/closet/statue(L.loc, L)
handle_delete(user)

/obj/item/melee/touch_attack/plushify
name = "fabric touch"
Expand All @@ -93,6 +94,7 @@
return
var/mob/living/L = target
L.plushify()
handle_delete(user)

/obj/item/melee/touch_attack/fake_disintegrate
name = "toy plastic hand"
Expand All @@ -109,6 +111,7 @@
return
do_sparks(4, 0, target.loc)
playsound(target.loc, 'sound/goonstation/effects/gib.ogg', 50, 1)
handle_delete(user)

/obj/item/melee/touch_attack/cluwne
name = "cluwne touch"
Expand Down Expand Up @@ -137,3 +140,4 @@
H.makeCluwne()
else
H.makeAntiCluwne()
handle_delete(user)
2 changes: 1 addition & 1 deletion code/game/objects/items/toys.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1181,7 +1181,7 @@

/obj/item/toy/plushie/plasmamanplushie
name = "plasmaman plushie"
desc = "A freindly plasma-being in plush form. WARNING: KEEP AWAY FROM OPEN FLAME!"
desc = "A friendly plasma-being in plush form. WARNING: KEEP AWAY FROM OPEN FLAME!"
icon_state = "plushie_plasma"
rare_hug_sound = 'sound/voice/plas_rattle.ogg'
rare_hug_word = "Rattle!"
Expand Down

0 comments on commit e88d41a

Please sign in to comment.