Skip to content

Commit

Permalink
A Great Return of The Transmutation Wand (#13182)
Browse files Browse the repository at this point in the history
* a_great_return

* remains

* line

* Return

* 3_minutes

* -_diona

* 1

* +Paralyse

* del_comment

Окей

Co-authored-by: Alexander V. <[email protected]>

* Fix

* Done

* forceMove

* Done

* 2 minutes

---------

Co-authored-by: Alexander V. <[email protected]>
  • Loading branch information
Slavik2001 and volas authored Aug 7, 2024
1 parent 7877f81 commit bf72d4a
Show file tree
Hide file tree
Showing 7 changed files with 140 additions and 24 deletions.
2 changes: 0 additions & 2 deletions code/game/gamemodes/modes_gameplays/wizard/spellbook.dm
Original file line number Diff line number Diff line change
Expand Up @@ -320,14 +320,12 @@
dat += "[surplus] осталось.<br>"
return dat

/* Commented because admins ban everyone who uses this staff... Somebody should rebalance this thing
/datum/spellbook_entry/item/staffchange
name = "Staff of Change"
desc = "An artefact that spits bolts of coruscating energy which cause the target's very form to reshape itself."
item_path = /obj/item/weapon/gun/magic/change
log_name = "ST"
cost = 4
*/

/datum/spellbook_entry/item/staffanimation
name = "Посох анимации"
Expand Down
1 change: 0 additions & 1 deletion code/modules/mob/death.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
/mob/proc/dust()
new /obj/effect/decal/cleanable/ash(loc)
dust_process()


/mob/proc/death(gibbed)
SEND_SIGNAL(src, COMSIG_MOB_DIED, gibbed)
Expand Down
2 changes: 2 additions & 0 deletions code/modules/mob/living/living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1421,6 +1421,8 @@
/mob/living/death(gibbed)
beauty.AddModifier("stat", additive=beauty_dead)
update_health_hud()
if(wabbajacked)
unwabbajack()
return ..()

/mob/living/proc/update_beauty(datum/source, old_value)
Expand Down
6 changes: 3 additions & 3 deletions code/modules/mob/living/simple_animal/hulk.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
max_n2 = 0
minbodytemp = 0
var/hulk_powers = list()
var/mob/living/original_body
var/mob/living/origin
var/health_regen = 1.5

animalistic = FALSE
Expand Down Expand Up @@ -186,8 +186,8 @@

if(mind && original_body)
mind.transfer_to(original_body)
original_body.attack_log = attack_log
original_body.attack_log += "\[[time_stamp()]\]<font color='blue'> ======HUMAN LIFE======</font>"
origin.attack_log = attack_log
origin.attack_log += "\[[time_stamp()]\]<font color='blue'> ======HUMAN LIFE======</font>"
qdel(src)

/mob/living/simple_animal/hulk/MobBump(mob/M)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/projectiles/guns/magic/staff.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
ammo_type = /obj/item/ammo_casing/magic/change
icon_state = "staffofchange"
item_state = "staffofchange"
fire_delay = 30
fire_delay = 120
max_charges = 1

/obj/item/weapon/gun/magic/animate
Expand Down
148 changes: 131 additions & 17 deletions code/modules/projectiles/projectile/magic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,49 +22,119 @@
wabbajack(target)

/obj/item/projectile/magic/proc/wabbajack(mob/living/M)
if(!istype(M) || M.stat == DEAD || M.notransform || (GODMODE & M.status_flags) || !M.client || isxenoqueen(M))
if(!istype(M) || isAI(M) || isdrone(M) || isconstruct(M) || M.stat == DEAD || M.notransform || (GODMODE & M.status_flags) || isxenoqueen(M))
return

M.notransform = TRUE
M.canmove = 0
M.icon = null
M.cut_overlays()
M.invisibility = 101
if(!issilicon(M))
for(var/obj/item/W in M)
M.drop_from_inventory(W)

var/mob/living/new_mob

var/randomizer = pick("animal", "cyborg", "xeno")
if(isxeno(M))
randomizer = "xeno"
var/randomizer = pick("animal", "cyborg", "carbon")
switch(randomizer)
if("animal")
var/beast = pick(/mob/living/simple_animal/hostile/carp, /mob/living/simple_animal/hostile/tomato/angry_tomato, /mob/living/simple_animal/hostile/retaliate/goat, /mob/living/simple_animal/pig/shadowpig)
var/beast = pick(
/mob/living/simple_animal/mouse,
/mob/living/simple_animal/cow,
/mob/living/simple_animal/chicken,
/mob/living/simple_animal/chick,
/mob/living/simple_animal/cat,
/mob/living/simple_animal/corgi,
/mob/living/simple_animal/corgi/Lisa,
/mob/living/simple_animal/corgi/borgi,
/mob/living/simple_animal/corgi/puppy,
/mob/living/simple_animal/parrot,
/mob/living/simple_animal/crab,
/mob/living/simple_animal/hostile/retaliate/goat,
/mob/living/simple_animal/pig/shadowpig,
/mob/living/simple_animal/pig,
/mob/living/simple_animal/turkey,
/mob/living/simple_animal/goose,
/mob/living/simple_animal/seal,
/mob/living/simple_animal/walrus,
/mob/living/simple_animal/fox,
/mob/living/simple_animal/lizard,
/mob/living/simple_animal/pug,
/mob/living/simple_animal/shiba,
/mob/living/simple_animal/mushroom,
/mob/living/simple_animal/yithian,
/mob/living/simple_animal/spiderbot)
new_mob = new beast(M.loc)
new_mob.universal_speak = TRUE
if("cyborg")
new_mob = new /mob/living/silicon/robot(M.loc, "Default", /datum/ai_laws/asimov_xenophile, FALSE, global.chaplain_religion)
new_mob.gender = M.gender
new_mob.invisibility = 0
new_mob.job = "Cyborg"
if("xeno")
new_mob = new /mob/living/carbon/xenomorph/humanoid/maid(M.loc)
new_mob.universal_speak = TRUE
if("carbon")
var/carbon = pick(
/mob/living/carbon/human,
/mob/living/carbon/monkey,
/mob/living/carbon/monkey/tajara,
/mob/living/carbon/monkey/skrell,
/mob/living/carbon/monkey/unathi,
/mob/living/carbon/monkey/diona/podman,
/mob/living/carbon/human/tajaran,
/mob/living/carbon/human/skrell,
/mob/living/carbon/human/unathi,
/mob/living/carbon/human/podman,
/mob/living/carbon/human/abductor,
/mob/living/carbon/human/golem,
/mob/living/carbon/human/vox)
new_mob = new carbon(M.loc)
new_mob.gender = M.gender
new_mob.languages = M.languages
if(!new_mob)
return

new_mob.attack_log = M.attack_log
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>[M.real_name] ([M.ckey]) became [new_mob.real_name].</font>")

new_mob.set_a_intent(INTENT_HARM)
if(M.mind)
M.mind.transfer_to(new_mob)
else
new_mob.key = M.key

if(!M.original_body)
new_mob.original_body = M
M.original_body = M

M.forceMove(new_mob)
new_mob.original_body = M.original_body

for(var/mob/living/H in M.contents)
H.forceMove(new_mob)
qdel(M)

new_mob.wabbajacked = 1

to_chat(new_mob, "<B>Your body forms to something else!</B>")

qdel(M)
return new_mob
/mob/living/proc/unwabbajack(mob/living/M)
if(!issilicon(M))
for(var/obj/item/W in M)
M.drop_from_inventory(W)

var/datum/effect/effect/system/smoke_spread/bad/smoke = new /datum/effect/effect/system/smoke_spread/bad()
smoke.set_up(10, 0, src.loc)
smoke.start()
playsound(src, 'sound/effects/bamf.ogg', VOL_EFFECTS_MASTER)

var/obj/effect/decal/remains/human/RH = new /obj/effect/decal/remains/human(src.loc)
var/matrix/Mx = matrix()
RH.transform = Mx

for(M in contents)
M.loc = src.loc
if(isliving(M))
var/mob/living/L = M
L.Paralyse(15)
L.update_canmove()
if(mind && original_body)
mind.transfer_to(original_body)

qdel(src)

/obj/item/projectile/magic/animate
name = "bolt of animation"
Expand All @@ -82,7 +152,7 @@
C.ChangeOwner(firer)
create_spawner(/datum/spawner/living/mimic, C)
else if(isshade(change) || isxeno(change))
var/mob/living/M = wabbajack(change)
var/mob/living/M = animate_atom_living(change)
if(!M)
return
if(firer && iswizard(firer))
Expand All @@ -97,6 +167,50 @@
if(R)
R.Deconvert()

/obj/item/projectile/magic/animate/proc/animate_atom_living(mob/living/M)
if(!istype(M) || M.stat == DEAD || M.notransform || (GODMODE & M.status_flags) || !M.client || isxenoqueen(M))
return

M.notransform = TRUE
M.canmove = 0
M.icon = null
M.cut_overlays()
M.invisibility = 101

var/mob/living/new_mob

var/randomizer = pick("animal", "cyborg", "xeno")
if(isxeno(M))
randomizer = "xeno"
switch(randomizer)
if("animal")
var/beast = pick(/mob/living/simple_animal/hostile/carp, /mob/living/simple_animal/hostile/tomato/angry_tomato, /mob/living/simple_animal/hostile/retaliate/goat, /mob/living/simple_animal/pig/shadowpig)
new_mob = new beast(M.loc)
new_mob.universal_speak = TRUE
if("cyborg")
new_mob = new /mob/living/silicon/robot(M.loc, "Default", /datum/ai_laws/asimov_xenophile, FALSE, global.chaplain_religion)
new_mob.gender = M.gender
new_mob.invisibility = 0
new_mob.job = "Cyborg"
if("xeno")
new_mob = new /mob/living/carbon/xenomorph/humanoid/maid(M.loc)
new_mob.universal_speak = TRUE
if(!new_mob)
return

new_mob.attack_log = M.attack_log
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>[M.real_name] ([M.ckey]) became [new_mob.real_name].</font>")

new_mob.set_a_intent(INTENT_HARM)
if(M.mind)
M.mind.transfer_to(new_mob)
else
new_mob.key = M.key

to_chat(new_mob, "<B>Your body forms to something else!</B>")

qdel(M)
return new_mob

/obj/item/projectile/magic/resurrection
name = "bolt of resurrection"
Expand Down
3 changes: 3 additions & 0 deletions code/modules/unarmed_combat/living_procs_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
var/attack_push_vis_effect
var/attack_disarm_vis_effect

var/original_body
var/wabbajacked = 0

/mob/living/proc/read_possible_combos()
set name = "Combos Cheat Sheet"
set desc = "A list of all possible combos with rough descriptions."
Expand Down

0 comments on commit bf72d4a

Please sign in to comment.