Ratvarian spears can now be used to impale humans

This commit is contained in:
Joan Lung
2016-06-10 18:20:04 -04:00
parent fd20fa8b10
commit aed28cafb8
7 changed files with 142 additions and 42 deletions
+2 -1
View File
@@ -120,7 +120,8 @@ This file's folder contains:
all_clockwork_mobs -= M
M.mind.memory = "" //Not sure if there's a better way to do this
M.mind.special_role = null
M.verbs -= /mob/living/carbon/human/proc/function_call //Removes any bound Ratvarian spears
for(var/datum/action/innate/function_call/F in M.actions) //Removes any bound Ratvarian spears
qdel(F)
if(issilicon(M))
var/mob/living/silicon/S = M
if(isrobot(S))
+75 -25
View File
@@ -754,43 +754,85 @@
item_state = "ratvarian_spear"
force = 17 //Extra damage is dealt to silicons in afterattack()
throwforce = 40
attack_verb = list("stabbed", "poked", "slashed", "impaled")
attack_verb = list("stabbed", "poked", "slashed")
hitsound = 'sound/weapons/bladeslice.ogg'
w_class = 4
var/impale_cooldown = 30 //brief delay, in deciseconds, where you can't impale again if you're really fast
/obj/item/clockwork/ratvarian_spear/New()
..()
impale_cooldown = 0
SSobj.processing += src
spawn(1)
if(ratvar_awakens) //If Ratvar is alive, the spear is extremely powerful
force = 30
throwforce = 50
if(isliving(loc))
var/mob/living/L = loc
L << "<span class='warning'>Your spear begins to break down in this plane of existence. You can't use it for long!</span>"
spawn(3000) //5 minutes
if(src)
var/turf/T = get_turf(src)
T.visible_message("<span class='warning'>[src] cracks in two and fades away!</span>")
PoolOrNew(/obj/effect/overlay/temp/ratvar/spearbreak, T)
qdel(src)
addtimer(src, "break_spear", 3000, FALSE) //5 minutes
/obj/item/clockwork/ratvarian_spear/afterattack(atom/target, mob/living/user, flag, params)
if(!target || !user)
return 0
if(!ismob(target))
return ..()
var/mob/living/L = target
if(issilicon(L))
var/mob/living/silicon/S = L
/obj/item/clockwork/ratvarian_spear/Destroy()
SSobj.processing -= src
return ..()
/obj/item/clockwork/ratvarian_spear/process()
if(ratvar_awakens) //If Ratvar is alive, the spear is extremely powerful
force = 30
throwforce = 50
else
force = initial(force)
throwforce = initial(throwforce)
/obj/item/clockwork/ratvarian_spear/examine(mob/user)
..()
if(is_servant_of_ratvar(user) || isobserver(user))
user << "<span class='brass'>Stabbing a human you are pulling or have grabbed with the spear will impale them, doing massive damage and breaking the spear if they remain conscious.</span>"
user << "<span class='brass'>Throwing the spear will do massive damage, break the spear, and stun the target if it's an enemy cultist or silicon.</span>"
/obj/item/clockwork/ratvarian_spear/attack(mob/living/target, mob/living/carbon/human/user)
var/impaling = FALSE
if(user.pulling && ishuman(user.pulling) && user.pulling == target)
if(impale_cooldown > world.time)
user << "<span class='warning'>You can't impale [target] yet, wait [max(round((impale_cooldown - world.time)*0.1, 0.1), 0)] seconds!</span>"
return
impaling = TRUE
attack_verb = list("impaled")
force += 23 //40 damage if ratvar isn't alive, 53 if he is
user.stop_pulling()
target.Stun(2)
PoolOrNew(/obj/effect/overlay/temp/bloodsplatter, list(get_turf(target), get_dir(user, target)))
impale_cooldown = world.time + initial(impale_cooldown)
..()
if(issilicon(target))
var/mob/living/silicon/S = target
if(S.stat != DEAD)
S.visible_message("<span class='warning'>[S] shudders violently at [src]'s touch!</span>", "<span class='userdanger'>ERROR: Temperature rising!</span>")
S.adjustFireLoss(25)
else if(iscultist(L)) //Cultists take extra fire damage
var/mob/living/M = L
else if(iscultist(target) || isconstruct(target)) //Cultists take extra fire damage
var/mob/living/M = target
M << "<span class='userdanger'>Your body flares with agony at [src]'s touch!</span>"
M.adjustFireLoss(10)
else
..()
if(impaling)
attack_verb = list("stabbed", "poked", "slashed")
if(target)
user << "<span class='notice'>You prepare to remove your ratvarian spear from [target]...</span>"
if(do_after(user, 5, 1, target))
var/turf/T = get_turf(target)
var/obj/effect/overlay/temp/bloodsplatter/B = PoolOrNew(/obj/effect/overlay/temp/bloodsplatter, list(T, get_dir(target, user)))
playsound(T, 'sound/misc/splort.ogg', 200, 1)
if(target.stat != CONSCIOUS)
var/remove_verb = pick("pull", "yank", "drag")
user.visible_message("<span class='warning'>[user] [remove_verb]s [src] out of [target]!</span>", "<span class='warning'>You [remove_verb] your spear out of [target]!</span>")
else
user.visible_message("<span class='warning'>[user] kicks [target] off of [src], breaking it!</span>", "<span class='warning'>You kick [target] off of [src], breaking it!</span>")
target << "<span class='userdanger'>[user] kicks you off of their ratvarian spear!</span>"
break_spear(get_turf(T))
step(target, get_dir(user, target))
T = get_turf(target)
B.forceMove(T)
target.Weaken(2)
playsound(T, 'sound/weapons/thudswoosh.ogg', 50, 1)
else if(target) //it's a do_after, we gotta check again to make sure they didn't get deleted
user << "<span class='warning'>Your ratvarian spear breaks!</span>"
break_spear(get_turf(target))
/obj/item/clockwork/ratvarian_spear/throw_impact(atom/target)
var/turf/T = get_turf(target)
@@ -800,9 +842,17 @@
if(issilicon(L) || iscultist(L))
L.Stun(3)
L.Weaken(3)
T.visible_message("<span class='warning'>[src] snaps in two and dematerializes!</span>")
PoolOrNew(/obj/effect/overlay/temp/ratvar/spearbreak, get_turf(T))
qdel(src)
break_spear(T)
/obj/item/clockwork/ratvarian_spear/proc/break_spear(turf/T)
if(src)
if(!T)
T = get_turf(src)
if(T) //make sure we're not in null or something
T.visible_message("[pick("<span class='warning'>[src] cracks in two and fades away!</span>", "<span class='warning'>[src] snaps in two and dematerializes!</span>")]")
PoolOrNew(/obj/effect/overlay/temp/ratvar/spearbreak, T)
qdel(src)
/obj/item/device/mmi/posibrain/soul_vessel //Soul vessel: An ancient positronic brain with a lawset catered to serving Ratvar.
name = "soul vessel"
@@ -545,23 +545,23 @@ Judgement: 10 servants, 100 CV, and any existing AIs are converted or destroyed
required_components = list("vanguard_cogwheel" = 1, "replicant_alloy" = 1)
consumed_components = list("vanguard_cogwheel" = 1, "replicant_alloy" = 1)
whispered = TRUE
usage_tip = "The spear will snap in two when thrown but do massive damage."
usage_tip = "You can impale human targets with the spear by pulling them, then attacking. Throwing the spear at a mob will do massive damage. Both of these will break the spear, however."
tier = SCRIPTURE_SCRIPT
/datum/clockwork_scripture/function_call/check_special_requirements()
if(invoker.verbs.Find(/mob/living/carbon/human/proc/function_call))
for(var/datum/action/innate/function_call/F in invoker.actions)
invoker << "<span class='warning'>You have already bound a Ratvarian spear to yourself!</span>"
return 0
return ishuman(invoker)
/datum/clockwork_scripture/function_call/scripture_effects()
invoker.visible_message("<span class='warning'>A shimmer of yellow light infuses [invoker]!</span>", \
"<span class='brass'>You bind a Ratvarian spear to yourself. Use the \"Function Call\" verb in your Clockwork tab to call it forth.</span>")
invoker.verbs += /mob/living/carbon/human/proc/function_call
"<span class='brass'>You bind a Ratvarian spear to yourself. Use the \"Function Call\" action button to call it forth.</span>")
var/datum/action/innate/function_call/F = new()
F.Grant(invoker)
return 1
/datum/clockwork_scripture/spatial_gateway
name = "Spatial Gateway"
desc = "Tears open a miniaturized gateway in spacetime to any conscious servant that can transport objects or creatures to its destination. \
@@ -1,16 +1,23 @@
//Function Call verb: Calls forth a Ratvarian spear.
/mob/living/carbon/human/proc/function_call()
set name = "Function Call"
set desc = "Calls forth your Ratvarian spear."
set category = "Clockwork"
//Function Call action: Calls forth a Ratvarian spear.
/datum/action/innate/function_call
name = "Function Call"
button_icon_state = "ratvarian_spear"
check_flags = AB_CHECK_RESTRAINED|AB_CHECK_STUNNED|AB_CHECK_CONSCIOUS
if(usr.l_hand && usr.r_hand)
/datum/action/innate/function_call/IsAvailable()
if(!is_servant_of_ratvar(owner))
return 0
return ..()
/datum/action/innate/function_call/Activate()
if(owner.l_hand && owner.r_hand)
usr << "<span class='warning'>You need an empty to hand to call forth your spear!</span>"
return 0
usr.visible_message("<span class='warning'>A strange spear materializes in [usr]'s hands!</span>", "<span class='brass'>You call forth your spear!</span>")
owner.visible_message("<span class='warning'>A strange spear materializes in [usr]'s hands!</span>", "<span class='brass'>You call forth your spear!</span>")
var/obj/item/clockwork/ratvarian_spear/R = new(get_turf(usr))
usr.put_in_hands(R)
usr.verbs -= /mob/living/carbon/human/proc/function_call
owner.put_in_hands(R)
for(var/datum/action/innate/function_call/F in owner.actions) //Removes any bound Ratvarian spears
qdel(F)
return 1
//allows a mob to select a target to gate to
+44 -2
View File
@@ -24,8 +24,8 @@
anchored = 1
layer = ABOVE_MOB_LAYER
mouse_opacity = 0
var/duration = 10
var/randomdir = 1
var/duration = 10 //in deciseconds
var/randomdir = TRUE
/obj/effect/overlay/temp/Destroy()
..()
@@ -38,6 +38,48 @@
spawn(duration)
qdel(src)
/obj/effect/overlay/temp/bloodsplatter
icon = 'icons/effects/blood.dmi'
duration = 5
randomdir = FALSE
layer = BELOW_MOB_LAYER
/obj/effect/overlay/temp/bloodsplatter/New(loc, set_dir)
if(set_dir in diagonals)
icon_state = "splatter[pick(1, 2, 6)]"
else
icon_state = "splatter[pick(3, 4, 5)]"
..()
var/target_pixel_x = 0
var/target_pixel_y = 0
switch(set_dir)
if(NORTH)
target_pixel_y = 16
if(SOUTH)
target_pixel_y = -16
layer = ABOVE_MOB_LAYER
if(EAST)
target_pixel_x = 16
if(WEST)
target_pixel_x = -16
if(NORTHEAST)
target_pixel_x = 16
target_pixel_y = 16
if(NORTHWEST)
target_pixel_x = -16
target_pixel_y = 16
if(SOUTHEAST)
target_pixel_x = 16
target_pixel_y = -16
layer = ABOVE_MOB_LAYER
if(SOUTHWEST)
target_pixel_x = -16
target_pixel_y = -16
layer = ABOVE_MOB_LAYER
dir = set_dir
animate(src, pixel_x = target_pixel_x, pixel_y = target_pixel_y, alpha = 0, time = duration)
/obj/effect/overlay/temp/heal //color is white by default, set to whatever is needed
name = "healing glow"
icon_state = "heal"
Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 83 KiB