Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extra Plushies + Plushify Spell #27384

Merged
merged 16 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions code/datums/spells/alien_spells/build_resin_structure.dm
Original file line number Diff line number Diff line change
Expand Up @@ -58,33 +58,33 @@
desc = "The hunger..."
icon_state = "alien_acid"

/obj/item/melee/touch_attack/alien/consume_resin/afterattack__legacy__attackchain(atom/target, mob/living/carbon/user, proximity)
/obj/item/melee/touch_attack/alien/consume_resin/after_attack(atom/target, mob/user, proximity_flag, click_parameters)
. = ..()
if(target == user)
to_chat(user, "<span class='noticealien'>You stop trying to consume resin.</span>")
..()
return
if(!proximity || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
if(!proximity_flag || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
return
var/mob/living/carbon/C = user
if(istype(target, /obj/structure/alien/weeds))
qdel(target)
if(istype(target, /obj/structure/alien/weeds/node))
user.add_plasma(50)
user.visible_message("<span class='alertalien'>[user] rips and tears into [target] with their teeth!</span>", "<span class='alertalien'>You viciously rip apart and consume [target]!</span>")
C.add_plasma(50)
C.visible_message("<span class='alertalien'>[C] rips and tears into [target] with their teeth!</span>", "<span class='alertalien'>You viciously rip apart and consume [target]!</span>")
return
if(!plasma_check(10, user))
to_chat(user, "<span class='noticealien'>You don't have enough plasma to perform this action!</span>")
if(!plasma_check(10, C))
to_chat(C, "<span class='noticealien'>You don't have enough plasma to perform this action!</span>")
return
var/static/list/resin_objects = list(/obj/structure/alien/resin, /obj/structure/alien/egg, /obj/structure/bed/nest, /obj/structure/bed/revival_nest)
for(var/resin_type in resin_objects)
if(!istype(target, resin_type))
continue
user.visible_message("<span class='alertalien'>[user] rips and tears into [target] with their teeth!</span>")
if(!do_after(user, 3 SECONDS, target = target))
C.visible_message("<span class='alertalien'>[C] rips and tears into [target] with their teeth!</span>")
if(!do_after(C, 3 SECONDS, target = target))
return
to_chat(user, "<span class='alertalien'>You viciously rip apart and consume [target]!</span>")
user.add_plasma(-10)
to_chat(C, "<span class='alertalien'>You viciously rip apart and consume [target]!</span>")
C.add_plasma(-10)
qdel(target)
..()

#undef RESIN_WALL
#undef RESIN_NEST
Expand Down
43 changes: 21 additions & 22 deletions code/datums/spells/alien_spells/corrosive_acid_spit.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,26 @@
desc = "A fistfull of death."
icon_state = "alien_acid"

/obj/item/melee/touch_attack/alien/corrosive_acid/afterattack__legacy__attackchain(atom/target, mob/living/carbon/user, proximity)
/obj/item/melee/touch_attack/alien/corrosive_acid/after_attack(atom/target, mob/user, proximity_flag, click_parameters)
. = ..()
if(target == user)
to_chat(user, "<span class='noticealien'>You withdraw your readied acid.</span>")
..()
return
if(!proximity || isalien(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) // Don't want xenos ditching out of cuffs
if(!proximity_flag || isalien(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) // Don't want xenos ditching out of cuffs
return
if(!plasma_check(200, user))
to_chat(user, "<span class='noticealien'>You don't have enough plasma to perform this action!</span>")
var/mob/living/carbon/C = user
if(!plasma_check(200, C))
to_chat(C, "<span class='noticealien'>You don't have enough plasma to perform this action!</span>")
return
var/acid_damage_modifier = 100
if(isliving(target))
acid_damage_modifier = 50
if(target.acid_act(2 * acid_damage_modifier, acid_damage_modifier))
visible_message("<span class='alertalien'>[user] vomits globs of vile stuff all over [target]. It begins to sizzle and melt under the bubbling mess of acid!</span>")
add_attack_logs(user, target, "Applied corrosive acid") // Want this logged
user.add_plasma(-200)
visible_message("<span class='alertalien'>[C] vomits globs of vile stuff all over [target]. It begins to sizzle and melt under the bubbling mess of acid!</span>")
add_attack_logs(C, target, "Applied corrosive acid") // Want this logged
C.add_plasma(-200)
else
to_chat(user, "<span class='noticealien'>You cannot dissolve this object.</span>")
..()
to_chat(C, "<span class='noticealien'>You cannot dissolve this object.</span>")

/datum/spell/touch/alien_spell/burning_touch
name = "Blazing touch"
Expand All @@ -45,31 +45,30 @@
desc = "The air warps around your hand, somehow the heat doesn't hurt."
icon_state = "alien_acid"

/obj/item/melee/touch_attack/alien/burning_touch/afterattack__legacy__attackchain(atom/target, mob/living/carbon/user, proximity)
/obj/item/melee/touch_attack/alien/burning_touch/after_attack(atom/target, mob/user, proximity_flag, click_parameters)
. = ..()
if(target == user)
to_chat(user, "<span class='noticealien'>You cool down your boiled aid.</span>")
..()
return
if(!proximity || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
if(!proximity_flag || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
return
if(!plasma_check(100, user))
to_chat(user, "<span class='noticealien'>You don't have enough plasma to perform this action!</span>")
var/mob/living/carbon/C = user
if(!plasma_check(100, C))
to_chat(C, "<span class='noticealien'>You don't have enough plasma to perform this action!</span>")
return
if(isliving(target))
var/mob/living/guy_to_burn = target
add_attack_logs(user, target, "Applied blazing touch") // Want this logged
add_attack_logs(C, target, "Applied blazing touch") // Want this logged
guy_to_burn.adjustFireLoss(60)
guy_to_burn.adjust_fire_stacks(3)
guy_to_burn.IgniteMob()
user.visible_message("<span class='alertalien'>[user] touches [target] and a fireball erupts on contact!</span>")
user.add_plasma(-100)
..()
C.visible_message("<span class='alertalien'>[C] touches [target] and a fireball erupts on contact!</span>")
C.add_plasma(-100)
else
var/static/list/resin_objects = list(/obj/structure/alien/resin, /obj/structure/alien/egg, /obj/structure/bed/nest, /obj/structure/bed/revival_nest)
for(var/resin_type in resin_objects)
if(!istype(target, resin_type))
continue
user.visible_message("<span class='alertalien'>[user] touches [target] and burns right through it!</span>")
user.add_plasma(-100)
C.visible_message("<span class='alertalien'>[C] touches [target] and burns right through it!</span>")
C.add_plasma(-100)
qdel(target)
..()
10 changes: 5 additions & 5 deletions code/datums/spells/banana_touch.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@

/obj/item/melee/touch_attack/banana/apprentice

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

/obj/item/melee/touch_attack/banana/afterattack__legacy__attackchain(atom/target, mob/living/carbon/user, proximity)
if(!proximity || target == user || !ishuman(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
/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

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

/mob/living/carbon/human/proc/bananatouched()
to_chat(src, "<font color='red' size='6'>HONK</font>")
Expand Down
6 changes: 3 additions & 3 deletions code/datums/spells/mime_malaise.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@
icon_state = "fleshtostone"
item_state = "fleshtostone"

/obj/item/melee/touch_attack/mime_malaise/afterattack__legacy__attackchain(atom/target, mob/living/carbon/user, proximity)
if(!proximity || target == user || !ishuman(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
/obj/item/melee/touch_attack/mime_malaise/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

var/datum/effect_system/smoke_spread/s = new
Expand All @@ -29,7 +30,6 @@

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

/mob/living/carbon/human/proc/mimetouched()
Weaken(14 SECONDS)
Expand Down
12 changes: 12 additions & 0 deletions code/datums/spells/touch_attacks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,15 @@
cooldown_min = 200 //100 deciseconds reduction per rank

action_icon_state = "statue"

/datum/spell/touch/plushify
name = "Plushify"
desc = "This spell charges your hand with the power to turn your victims into marketable plushies!"
hand_path = /obj/item/melee/touch_attack/plushify

school = "transmutation"
base_cooldown = 600
clothes_req = TRUE
cooldown_min = 200 //100 deciseconds reduction per rank

action_icon_state = "plush"
53 changes: 35 additions & 18 deletions code/game/gamemodes/wizard/godhand.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
throwforce = 0
throw_range = 0
throw_speed = 0
new_attack_chain = TRUE

/obj/item/melee/touch_attack/New(spell)
attached_spell = spell
Expand All @@ -29,15 +30,15 @@
/obj/item/melee/touch_attack/customised_abstract_text(mob/living/carbon/owner)
return "<span class='warning'>[owner.p_their(TRUE)] [owner.l_hand == src ? "left hand" : "right hand"] is burning in magic fire.</span>"

/obj/item/melee/touch_attack/attack__legacy__attackchain(mob/target, mob/living/carbon/user)
if(!iscarbon(user)) //Look ma, no hands
return
/obj/item/melee/touch_attack/attack(mob/living/target, mob/living/carbon/human/user)
if(..() || !iscarbon(user)) //Look ma, no hands
return FINISH_ATTACK
if(HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
to_chat(user, "<span class='warning'>You can't reach out!</span>")
return
..()
return FINISH_ATTACK

/obj/item/melee/touch_attack/afterattack__legacy__attackchain(atom/target, mob/user, proximity)
/obj/item/melee/touch_attack/after_attack(atom/target, mob/user, proximity_flag, click_parameters)
. = ..()
if(catchphrase)
user.say(catchphrase)
playsound(get_turf(user), on_use_sound, 50, 1)
Expand All @@ -53,13 +54,13 @@
icon_state = "disintegrate"
item_state = "disintegrate"

/obj/item/melee/touch_attack/disintegrate/afterattack__legacy__attackchain(atom/target, mob/living/carbon/user, proximity)
if(!proximity || target == user || !ismob(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) //exploding after touching yourself would be bad
/obj/item/melee/touch_attack/disintegrate/after_attack(atom/target, mob/user, proximity_flag, click_parameters)
. = ..()
if(!proximity_flag || target == user || !ismob(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) //exploding after touching yourself would be bad
return
var/mob/M = target
do_sparks(4, 0, M.loc) //no idea what the 0 is
M.gib()
..()

/obj/item/melee/touch_attack/fleshtostone
name = "petrifying touch"
Expand All @@ -69,13 +70,29 @@
icon_state = "fleshtostone"
item_state = "fleshtostone"

/obj/item/melee/touch_attack/fleshtostone/afterattack__legacy__attackchain(atom/target, mob/living/carbon/user, proximity)
if(!proximity || target == user || !isliving(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) //getting hard after touching yourself would also be bad
/obj/item/melee/touch_attack/fleshtostone/after_attack(atom/target, mob/user, proximity_flag, click_parameters)
. = ..()
if(!proximity_flag || target == user || !isliving(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) //getting hard after touching yourself would also be bad
return
var/mob/living/L = target
L.Stun(4 SECONDS)
new /obj/structure/closet/statue(L.loc, L)
..()

/obj/item/melee/touch_attack/plushify
name = "fabric touch"
desc = "The power to sew your foes into a doom cut from the fabric of fate."
catchphrase = "MAHR-XET 'ABL"
on_use_sound = 'sound/magic/smoke.ogg'
icon_state = "disintegrate"
item_state = "disintegrate"
color = COLOR_PURPLE

/obj/item/melee/touch_attack/plushify/after_attack(atom/target, mob/user, proximity_flag, click_parameters)
. = ..()
if(!proximity_flag || target == user || !isliving(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) //There are better ways to get a good nights sleep in a bed.
return
var/mob/living/L = target
L.plushify()

/obj/item/melee/touch_attack/fake_disintegrate
name = "toy plastic hand"
Expand All @@ -86,12 +103,12 @@
item_state = "disintegrate"
needs_permit = FALSE

/obj/item/melee/touch_attack/fake_disintegrate/afterattack__legacy__attackchain(atom/target, mob/living/carbon/user, proximity)
if(!proximity || target == user || !ismob(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) //not exploding after touching yourself would be bad
/obj/item/melee/touch_attack/fake_disintegrate/after_attack(atom/target, mob/user, proximity_flag, click_parameters)
. = ..()
if(!proximity_flag || target == user || !ismob(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) //not exploding after touching yourself would be bad
return
do_sparks(4, 0, target.loc)
playsound(target.loc, 'sound/goonstation/effects/gib.ogg', 50, 1)
..()

/obj/item/melee/touch_attack/cluwne
name = "cluwne touch"
Expand All @@ -101,8 +118,9 @@
icon_state = "cluwnecurse"
item_state = "cluwnecurse"

/obj/item/melee/touch_attack/cluwne/afterattack__legacy__attackchain(atom/target, mob/living/carbon/user, proximity)
if(!proximity || target == user || !ishuman(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) //clowning around after touching yourself would unsurprisingly, be bad
/obj/item/melee/touch_attack/cluwne/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)) //clowning around after touching yourself would unsurprisingly, be bad
return

if(iswizard(target))
Expand All @@ -119,4 +137,3 @@
H.makeCluwne()
else
H.makeAntiCluwne()
..()
5 changes: 5 additions & 0 deletions code/game/gamemodes/wizard/spellbook.dm
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,11 @@
spell_type = /datum/spell/touch/flesh_to_stone
category = "Offensive"

/datum/spellbook_entry/plushify
name = "Plushify"
spell_type = /datum/spell/touch/plushify
category = "Offensive"

/datum/spellbook_entry/mutate
name = "Mutate"
spell_type = /datum/spell/genetic/mutate
Expand Down
Loading
Loading