From e23600067aa292ddfc73ca6600e0c8dd13cae020 Mon Sep 17 00:00:00 2001 From: Tigercat2000 Date: Sat, 25 Jul 2015 19:31:50 -0700 Subject: [PATCH] Moved changeling swap form to swap_form.dm instead of absorb.dm, because one would think absorb.dm would contain the absorb power --- .../gamemodes/changeling/powers/absorb.dm | 57 +------------------ .../gamemodes/changeling/powers/swap_form.dm | 53 +++++++++++++++++ paradise.dme | 1 + 3 files changed, 55 insertions(+), 56 deletions(-) create mode 100644 code/game/gamemodes/changeling/powers/swap_form.dm diff --git a/code/game/gamemodes/changeling/powers/absorb.dm b/code/game/gamemodes/changeling/powers/absorb.dm index f5959c1037e..9f932071fca 100644 --- a/code/game/gamemodes/changeling/powers/absorb.dm +++ b/code/game/gamemodes/changeling/powers/absorb.dm @@ -104,59 +104,4 @@ if(E.target_real_name == new_dna.real_name) protected_dna |= new_dna return - absorbed_dna |= new_dna - - -/obj/effect/proc_holder/changeling/swap_form - name = "Swap Forms" - desc = "We force ourselves into the body of another form, pushing their consciousness into the form we left behind." - helptext = "We will bring all our abilities with us, but we will lose our old form DNA in exchange for the new one. The process will seem suspicious to any observers." - chemical_cost = 40 - dna_cost = 1 - req_human = 1 //Monkeys can't grab - -/obj/effect/proc_holder/changeling/swap_form/can_sting(var/mob/living/carbon/user) - if(!..()) - return - var/obj/item/weapon/grab/G = user.get_active_hand() - if(!istype(G) || (G.state < GRAB_AGGRESSIVE)) - user << "We must have an aggressive grab on creature in our active hand to do this!" - return - var/mob/living/carbon/human/target = G.affecting - if((NOCLONE || SKELETON || HUSK) in target.mutations) - user << "DNA of [target] is ruined beyond usability!" - return - if(!istype(target) || issmall(target) || target.species.flags & IS_SYNTHETIC || target.species.flags & NO_SCAN || target.species.flags & NO_BLOOD) - user << "[target] is not compatible with this ability." - return - return 1 - - -/obj/effect/proc_holder/changeling/swap_form/sting_action(var/mob/living/carbon/user) - var/obj/item/weapon/grab/G = user.get_active_hand() - var/mob/living/carbon/human/target = G.affecting - var/datum/changeling/changeling = user.mind.changeling - - user << "We tighen our grip. We must hold still...." - target.do_jitter_animation(500) - user.do_jitter_animation(500) - - if(!do_mob(user,target,20)) - user << "The body swap has been interrupted!" - return - - target << "[user] tightens their grip as a painful sensation invades your body." - - if(!changeling.has_dna(target.dna)) - changeling.absorb_dna(target, user) - changeling.protected_dna -= user.dna - changeling.absorbed_dna -= user.dna - - var/mob/dead/observer/ghost = target.ghostize(0) - user.mind.transfer_to(target) - if(ghost && ghost.mind) - ghost.mind.transfer_to(user) - user.key = ghost.key - - user.Paralyse(2) - target << "Our genes cry out as we swap our [user] form for [target]." \ No newline at end of file + absorbed_dna |= new_dna \ No newline at end of file diff --git a/code/game/gamemodes/changeling/powers/swap_form.dm b/code/game/gamemodes/changeling/powers/swap_form.dm new file mode 100644 index 00000000000..4b5646dc237 --- /dev/null +++ b/code/game/gamemodes/changeling/powers/swap_form.dm @@ -0,0 +1,53 @@ +/obj/effect/proc_holder/changeling/swap_form + name = "Swap Forms" + desc = "We force ourselves into the body of another form, pushing their consciousness into the form we left behind." + helptext = "We will bring all our abilities with us, but we will lose our old form DNA in exchange for the new one. The process will seem suspicious to any observers." + chemical_cost = 40 + dna_cost = 1 + req_human = 1 //Monkeys can't grab + +/obj/effect/proc_holder/changeling/swap_form/can_sting(var/mob/living/carbon/user) + if(!..()) + return + var/obj/item/weapon/grab/G = user.get_active_hand() + if(!istype(G) || (G.state < GRAB_AGGRESSIVE)) + user << "We must have an aggressive grab on creature in our active hand to do this!" + return + var/mob/living/carbon/human/target = G.affecting + if((NOCLONE || SKELETON || HUSK) in target.mutations) + user << "DNA of [target] is ruined beyond usability!" + return + if(!istype(target) || issmall(target) || target.species.flags & IS_SYNTHETIC || target.species.flags & NO_SCAN || target.species.flags & NO_BLOOD) + user << "[target] is not compatible with this ability." + return + return 1 + + +/obj/effect/proc_holder/changeling/swap_form/sting_action(var/mob/living/carbon/user) + var/obj/item/weapon/grab/G = user.get_active_hand() + var/mob/living/carbon/human/target = G.affecting + var/datum/changeling/changeling = user.mind.changeling + + user << "We tighen our grip. We must hold still...." + target.do_jitter_animation(500) + user.do_jitter_animation(500) + + if(!do_mob(user,target,20)) + user << "The body swap has been interrupted!" + return + + target << "[user] tightens their grip as a painful sensation invades your body." + + if(!changeling.has_dna(target.dna)) + changeling.absorb_dna(target, user) + changeling.protected_dna -= user.dna + changeling.absorbed_dna -= user.dna + + var/mob/dead/observer/ghost = target.ghostize(0) + user.mind.transfer_to(target) + if(ghost && ghost.mind) + ghost.mind.transfer_to(user) + user.key = ghost.key + + user.Paralyse(2) + target << "Our genes cry out as we swap our [user] form for [target]." \ No newline at end of file diff --git a/paradise.dme b/paradise.dme index eae7b2ed798..4b9658b90ab 100644 --- a/paradise.dme +++ b/paradise.dme @@ -307,6 +307,7 @@ #include "code\game\gamemodes\changeling\powers\shriek.dm" #include "code\game\gamemodes\changeling\powers\spiders.dm" #include "code\game\gamemodes\changeling\powers\strained_muscles.dm" +#include "code\game\gamemodes\changeling\powers\swap_form.dm" #include "code\game\gamemodes\changeling\powers\tiny_prick.dm" #include "code\game\gamemodes\changeling\powers\transform.dm" #include "code\game\gamemodes\cult\cult.dm"