Merge pull request #11861 from Baystation12/master

Dev-freeze
This commit is contained in:
PsiOmegaDelta
2016-01-01 13:14:21 +01:00
2 changed files with 165 additions and 161 deletions

View File

@@ -14,7 +14,7 @@
//////////////////////////////Capturing//////////////////////////////////////////////////////// //////////////////////////////Capturing////////////////////////////////////////////////////////
attack(mob/living/carbon/human/M as mob, mob/user as mob) /obj/item/device/soulstone/attack(mob/living/carbon/human/M as mob, mob/user as mob)
if(!istype(M, /mob/living/carbon/human))//If target is not a human. if(!istype(M, /mob/living/carbon/human))//If target is not a human.
return ..() return ..()
if(istype(M, /mob/living/carbon/human/dummy)) if(istype(M, /mob/living/carbon/human/dummy))
@@ -31,16 +31,10 @@
transfer_soul("VICTIM", M, user) transfer_soul("VICTIM", M, user)
return return
/*attack(mob/living/simple_animal/shade/M as mob, mob/user as mob)//APPARENTLY THEY NEED THEIR OWN SPECIAL SNOWFLAKE CODE IN THE LIVING ANIMAL DEFINES
if(!istype(M, /mob/living/simple_animal/shade))//If target is not a shade
return ..()
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to capture the soul of [M.name] ([M.ckey])</font>")
transfer_soul("SHADE", M, user)
return*/
///////////////////Options for using captured souls/////////////////////////////////////// ///////////////////Options for using captured souls///////////////////////////////////////
attack_self(mob/user) /obj/item/device/soulstone/attack_self(mob/user)
if (!in_range(src, user)) if (!in_range(src, user))
return return
user.set_machine(src) user.set_machine(src)
@@ -57,7 +51,7 @@
Topic(href, href_list) /obj/item/device/soulstone/Topic(href, href_list)
var/mob/U = usr var/mob/U = usr
if (!in_range(src, U)||U.machine!=src) if (!in_range(src, U)||U.machine!=src)
U << browse(null, "window=aicard") U << browse(null, "window=aicard")
@@ -78,7 +72,7 @@
A.status_flags &= ~GODMODE A.status_flags &= ~GODMODE
A.canmove = 1 A.canmove = 1
A << "<b>You have been released from your prison, but you are still bound to [U.name]'s will. Help them suceed in their goals at all costs.</b>" A << "<b>You have been released from your prison, but you are still bound to [U.name]'s will. Help them suceed in their goals at all costs.</b>"
A.loc = U.loc A.forceMove(U.loc)
A.cancel_camera() A.cancel_camera()
src.icon_state = "soulstone" src.icon_state = "soulstone"
attack_self(U) attack_self(U)
@@ -99,41 +93,42 @@
/obj/structure/constructshell/attackby(obj/item/O as obj, mob/user as mob) /obj/structure/constructshell/attackby(obj/item/O as obj, mob/user as mob)
if(istype(O, /obj/item/device/soulstone)) if(istype(O, /obj/item/device/soulstone))
O.transfer_soul("CONSTRUCT",src,user) var/obj/item/device/soulstone/S = O;
S.transfer_soul("CONSTRUCT",src,user)
////////////////////////////Proc for moving soul in and out off stone////////////////////////////////////// ////////////////////////////Proc for moving soul in and out off stone//////////////////////////////////////
/obj/item/device/soulstone/proc/transfer_human(var/mob/living/carbon/human/T,var/mob/U)
if(!istype(T))
/obj/item/proc/transfer_soul(var/choice as text, var/target, var/mob/U as mob). return;
switch(choice) if(src.imprinted != "empty")
if("VICTIM") U << "<span class='danger'>Capture failed!</span>: The soul stone has already been imprinted with [src.imprinted]'s mind!"
var/mob/living/carbon/human/T = target return
var/obj/item/device/soulstone/C = src if ((T.health + T.halloss) > config.health_threshold_crit && T.stat != DEAD)
if(C.imprinted != "empty") U << "<span class='danger'>Capture failed!</span>: Kill or maim the victim first!"
U << "\red <b>Capture failed!</b>: \black The soul stone has already been imprinted with [C.imprinted]'s mind!" return
else
if ((T.health + T.halloss) > config.health_threshold_crit)
U << "\red <b>Capture failed!</b>: \black Kill or maim the victim first!"
else
if(T.client == null) if(T.client == null)
U << "\red <b>Capture failed!</b>: \black The soul has already fled it's mortal frame." U << "<span class='danger'>Capture failed!</span>: The soul has already fled it's mortal frame."
else return
if(C.contents.len) if(src.contents.len)
U << "\red <b>Capture failed!</b>: \black The soul stone is full! Use or free an existing soul to make room." U << "<span class='danger'>Capture failed!</span>: The soul stone is full! Use or free an existing soul to make room."
else return
for(var/obj/item/W in T) for(var/obj/item/W in T)
T.drop_from_inventory(W) T.drop_from_inventory(W)
new /obj/effect/decal/remains/human(T.loc) //Spawns a skeleton new /obj/effect/decal/remains/human(T.loc) //Spawns a skeleton
T.invisibility = 101 T.invisibility = 101
var/atom/movable/overlay/animation = new /atom/movable/overlay( T.loc ) var/atom/movable/overlay/animation = new /atom/movable/overlay( T.loc )
animation.icon_state = "blank" animation.icon_state = "blank"
animation.icon = 'icons/mob/mob.dmi' animation.icon = 'icons/mob/mob.dmi'
animation.master = T animation.master = T
flick("dust-h", animation) flick("dust-h", animation)
qdel(animation) qdel(animation)
var/mob/living/simple_animal/shade/S = new /mob/living/simple_animal/shade( T.loc ) var/mob/living/simple_animal/shade/S = new /mob/living/simple_animal/shade( T.loc )
S.loc = C //put shade in stone S.loc = src //put shade in stone
S.status_flags |= GODMODE //So they won't die inside the stone somehow S.status_flags |= GODMODE //So they won't die inside the stone somehow
S.canmove = 0//Can't move out of the soul stone S.canmove = 0//Can't move out of the soul stone
S.name = "Shade of [T.real_name]" S.name = "Shade of [T.real_name]"
@@ -146,37 +141,42 @@
if (T.client) if (T.client)
T.client.mob = S T.client.mob = S
S.cancel_camera() S.cancel_camera()
C.icon_state = "soulstone2"
C.name = "Soul Stone: [S.real_name]"
src.icon_state = "soulstone2"
src.name = "Soul Stone: [S.real_name]"
S << "Your soul has been captured! You are now bound to [U.name]'s will, help them suceed in their goals at all costs." S << "Your soul has been captured! You are now bound to [U.name]'s will, help them suceed in their goals at all costs."
U << "\blue <b>Capture successful!</b>: \black [T.real_name]'s soul has been ripped from their body and stored within the soul stone." U << "<span class='notice'>Capture successful!</span> : [T.real_name]'s soul has been ripped from their body and stored within the soul stone."
U << "The soulstone has been imprinted with [S.real_name]'s mind, it will no longer react to other souls." U << "The soulstone has been imprinted with [S.real_name]'s mind, it will no longer react to other souls."
C.imprinted = "[S.name]" src.imprinted = "[S.name]"
qdel(T) qdel(T)
if("SHADE")
var/mob/living/simple_animal/shade/T = target /obj/item/device/soulstone/proc/transfer_shade(var/mob/living/simple_animal/shade/T,var/mob/U)
var/obj/item/device/soulstone/C = src if(!istype(T))
return;
if (T.stat == DEAD) if (T.stat == DEAD)
U << "\red <b>Capture failed!</b>: \black The shade has already been banished!" U << "<span class='danger'>Capture failed!</span>: The shade has already been banished!"
else return
if(C.contents.len) if(src.contents.len)
U << "\red <b>Capture failed!</b>: \black The soul stone is full! Use or free an existing soul to make room." U << "<span class='danger'>Capture failed!</span>: The soul stone is full! Use or free an existing soul to make room."
else return
if(T.name != C.imprinted) if(T.name != src.imprinted)
U << "\red <b>Capture failed!</b>: \black The soul stone has already been imprinted with [C.imprinted]'s mind!" U << "<span class='danger'>Capture failed!</span>: The soul stone has already been imprinted with [src.imprinted]'s mind!"
else return
T.loc = C //put shade in stone
T.loc = src //put shade in stone
T.status_flags |= GODMODE T.status_flags |= GODMODE
T.canmove = 0 T.canmove = 0
T.health = T.maxHealth T.health = T.maxHealth
C.icon_state = "soulstone2" src.icon_state = "soulstone2"
T << "Your soul has been recaptured by the soul stone, its arcane energies are reknitting your ethereal form" T << "Your soul has been recaptured by the soul stone, its arcane energies are reknitting your ethereal form"
U << "\blue <b>Capture successful!</b>: \black [T.name]'s has been recaptured and stored within the soul stone." U << "<span class='notice'>Capture successful!</span> : [T.name]'s has been recaptured and stored within the soul stone."
if("CONSTRUCT") /obj/item/device/soulstone/proc/transfer_construct(var/obj/structure/constructshell/T,var/mob/U)
var/obj/structure/constructshell/T = target var/mob/living/simple_animal/shade/A = locate() in src
var/obj/item/device/soulstone/C = src if(!A)
var/mob/living/simple_animal/shade/A = locate() in C U << "<span class='danger'>Capture failed!</span>: The soul stone is empty! Go kill someone!"
if(A) return;
var/construct_class = alert(U, "Please choose which type of construct you wish to create.",,"Juggernaut","Wraith","Artificer") var/construct_class = alert(U, "Please choose which type of construct you wish to create.",,"Juggernaut","Wraith","Artificer")
switch(construct_class) switch(construct_class)
if("Juggernaut") if("Juggernaut")
@@ -188,8 +188,7 @@
Z << "<B>You are playing a Juggernaut. Though slow, you can withstand extreme punishment, and rip apart enemies and walls alike.</B>" Z << "<B>You are playing a Juggernaut. Though slow, you can withstand extreme punishment, and rip apart enemies and walls alike.</B>"
Z << "<B>You are still bound to serve your creator, follow their orders and help them complete their goals at all costs.</B>" Z << "<B>You are still bound to serve your creator, follow their orders and help them complete their goals at all costs.</B>"
Z.cancel_camera() Z.cancel_camera()
qdel(C) qdel(src)
if("Wraith") if("Wraith")
var/mob/living/simple_animal/construct/wraith/Z = new /mob/living/simple_animal/construct/wraith (get_turf(T.loc)) var/mob/living/simple_animal/construct/wraith/Z = new /mob/living/simple_animal/construct/wraith (get_turf(T.loc))
Z.key = A.key Z.key = A.key
@@ -199,8 +198,7 @@
Z << "<B>You are playing a Wraith. Though relatively fragile, you are fast, deadly, and even able to phase through walls.</B>" Z << "<B>You are playing a Wraith. Though relatively fragile, you are fast, deadly, and even able to phase through walls.</B>"
Z << "<B>You are still bound to serve your creator, follow their orders and help them complete their goals at all costs.</B>" Z << "<B>You are still bound to serve your creator, follow their orders and help them complete their goals at all costs.</B>"
Z.cancel_camera() Z.cancel_camera()
qdel(C) qdel(src)
if("Artificer") if("Artificer")
var/mob/living/simple_animal/construct/builder/Z = new /mob/living/simple_animal/construct/builder (get_turf(T.loc)) var/mob/living/simple_animal/construct/builder/Z = new /mob/living/simple_animal/construct/builder (get_turf(T.loc))
Z.key = A.key Z.key = A.key
@@ -210,7 +208,12 @@
Z << "<B>You are playing an Artificer. You are incredibly weak and fragile, but you are able to construct fortifications, repair allied constructs (by clicking on them), and even create new constructs</B>" Z << "<B>You are playing an Artificer. You are incredibly weak and fragile, but you are able to construct fortifications, repair allied constructs (by clicking on them), and even create new constructs</B>"
Z << "<B>You are still bound to serve your creator, follow their orders and help them complete their goals at all costs.</B>" Z << "<B>You are still bound to serve your creator, follow their orders and help them complete their goals at all costs.</B>"
Z.cancel_camera() Z.cancel_camera()
qdel(C) qdel(src)
else /obj/item/device/soulstone/proc/transfer_soul(var/choice as text, var/target, var/mob/U as mob).
U << "\red <b>Creation failed!</b>: \black The soul stone is empty! Go kill someone!" switch(choice)
return if("VICTIM")
transfer_human(target,U)
if("SHADE")
transfer_shade(target,U)
if("CONSTRUCT")
transfer_construct(target,U)

View File

@@ -37,7 +37,8 @@
/mob/living/simple_animal/shade/attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri /mob/living/simple_animal/shade/attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
if(istype(O, /obj/item/device/soulstone)) if(istype(O, /obj/item/device/soulstone))
O.transfer_soul("SHADE", src, user) var/obj/item/device/soulstone/S = O;
S.transfer_soul("SHADE", src, user)
return return
/mob/living/simple_animal/shade/proc/OnDeathInLife() /mob/living/simple_animal/shade/proc/OnDeathInLife()