Armalis sprites, simple animal/mob yank-out verb and embedding.

This commit is contained in:
Zuhayr
2013-06-16 00:38:40 -07:00
parent 5ef5a17701
commit 23299809f6
9 changed files with 150 additions and 75 deletions
+40 -67
View File
@@ -1119,8 +1119,8 @@
del(feet_blood_DNA)
return 1
mob/living/carbon/human/verb/yank_out_object()
set category = "IC"
mob/living/carbon/human/yank_out_object()
set category = "Object"
set name = "Yank out object"
set desc = "Remove an embedded item at the cost of bleeding and pain."
set src in view(1)
@@ -1137,89 +1137,62 @@ mob/living/carbon/human/verb/yank_out_object()
usr << "You are restrained and cannot do that!"
return
// /*
var/list/valid_objects = list()
var/datum/organ/external/affected = null
var/mob/living/carbon/human/S = src
var/mob/living/carbon/human/U = usr
var/self = null
if(S == U) // Removing something from yourself.
valid_objects = get_visible_implants(1)
if(S == U)
self = 1 // Removing object from yourself.
if(!valid_objects.len)
valid_objects = get_visible_implants(1)
if(!valid_objects.len)
if(self)
src << "You have nothing stuck in your wounds that is large enough to remove without surgery."
return
var/obj/item/weapon/selection = input("What do you want to yank out?", "Embedded objects") in valid_objects
for(var/datum/organ/external/organ in organs) //Grab the organ holding the implant. Messy as Hell, TBD: fix.
for(var/obj/item/weapon/O in organ.implants)
if(O == selection)
affected = organ
src << "<span class='warning'>You attempt to get a good grip on the [selection] in your [affected] with bloody fingers.</span>"
bloody_hands(S)
if(!do_after(U, 80))
return
if(!selection || !affected || !S || !U)
return
visible_message("<span class='warning'><b>[src] rips [selection] out of their [affected] in a welter of blood.</b></span>","<span class='warning'><b>You rip [selection] out of your [affected] in a welter of blood.</b></span>")
selection.loc = get_turf(src)
affected.implants -= selection
shock_stage+=10
for(var/obj/item/weapon/O in pinned)
if(O == selection)
pinned -= O
anchored = 0
if(prob(10)) //I'M SO ANEMIC I COULD JUST -DIE-.
var/datum/wound/internal_bleeding/I = new (15)
affected.wounds += I
custom_pain("Something tears wetly in your [affected] as [selection] is pulled free!", 1)
return 1
else // Removing something from someone else.
valid_objects = src.get_visible_implants(1)
if(!valid_objects.len)
else
U << "[src] has nothing stuck in their wounds that is large enough to remove without surgery."
return
return
var/obj/item/weapon/selection = input("What do you want to yank out?", "Embedded objects") in valid_objects
for(var/datum/organ/external/organ in src.organs) //Grab the organ holding the implant. Messy as Hell, TBD: fix.
for(var/obj/item/weapon/O in organ.implants)
if(O == selection)
affected = organ
var/obj/item/weapon/selection = input("What do you want to yank out?", "Embedded objects") in valid_objects
for(var/datum/organ/external/organ in organs) //Grab the organ holding the implant.
for(var/obj/item/weapon/O in organ.implants)
if(O == selection)
affected = organ
if(self)
src << "<span class='warning'>You attempt to get a good grip on the [selection] in your [affected] with bloody fingers.</span>"
else
U << "<span class='warning'>You attempt to get a good grip on the [selection] in [S]'s [affected] with bloody fingers.</span>"
U.bloody_hands(S)
if(!do_after(U, 80))
return
if(istype(U,/mob/living/carbon/human/)) U.bloody_hands(S)
if(!do_after(U, 80))
return
if(!selection || !affected || !S || !U)
return
if(self)
visible_message("<span class='warning'><b>[src] rips [selection] out of their [affected] in a welter of blood.</b></span>","<span class='warning'><b>You rip [selection] out of your [affected] in a welter of blood.</b></span>")
else
visible_message("<span class='warning'><b>[usr] rips [selection] out of [src]'s [affected] in a welter of blood.</b></span>","<span class='warning'><b>[src] rips [selection] out of your [affected] in a welter of blood.</b></span>")
selection.loc = get_turf(usr)
affected.implants -= selection
src.shock_stage+=10
for(var/obj/item/weapon/O in S.pinned)
if(O == selection)
S.pinned -= O
S.anchored = 0
selection.loc = get_turf(src)
affected.implants -= selection
shock_stage+=10
if(prob(10)) //I'M SO ANEMIC I COULD JUST -DIE-.
var/datum/wound/internal_bleeding/I = new (15)
affected.wounds += I
custom_pain("Something tears wetly in your [affected] as [selection] is pulled free!", 1)
return 1
for(var/obj/item/weapon/O in pinned)
if(O == selection)
pinned -= O
if(!pinned.len)
anchored = 0
if(prob(10)) //I'M SO ANEMIC I COULD JUST -DIE-.
var/datum/wound/internal_bleeding/I = new (15)
affected.wounds += I
custom_pain("Something tears wetly in your [affected] as [selection] is pulled free!", 1)
return 1
/mob/living/carbon/human/proc/get_visible_implants(var/class = 0)
+10 -2
View File
@@ -77,8 +77,10 @@
if(!O.fingerprintslast)
return
visible_message("Debug: checking client for [O.fingerprintslast]")
var/client/assailant = directory[ckey(O.fingerprintslast)]
if(assailant && assailant.mob && istype(assailant.mob,/mob))
visible_message("Assailant has client: [assailant]")
var/mob/M = assailant.mob
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been hit with [O], last touched by [M.name] ([assailant.ckey])</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Hit [src.name] ([src.ckey]) with [O]</font>")
@@ -96,8 +98,14 @@
if(near_wall(dir,2) && W.w_class >= 3 && W.sharp) //If they're close to a wall and the projectile is suitable.
visible_message("<span class='warning'>[src] is pinned to the wall by [O]!</span>","<span class='warning'>You are pinned to the wall by [O]!</span>")
src.anchored = 1
src.pinned += O
if(!istype(src,/mob/living/carbon/human))
O.loc = src
src.embedded += O
src.anchored = 1
src.pinned += O
else
src.anchored = 1
src.pinned += O
/mob/living/proc/near_wall(var/direction,var/distance=1)
@@ -96,7 +96,7 @@
AdjustParalysis(-1)
//Movement
if(!client && !stop_automated_movement && wander)
if(!client && !stop_automated_movement && wander && !anchored)
if(isturf(src.loc) && !resting && !buckled && canmove) //This is so it only moves if it's not inside a closet, gentics machine, etc.
turns_since_move++
if(turns_since_move >= turns_per_move)
+33 -3
View File
@@ -8,7 +8,7 @@
icon_living = "armalis"
maxHealth = 500
health = 500
response_harm = "flails ineffectually at the"
response_harm = "flails ineffectually at the"
harm_intent_damage = 0
melee_damage_lower = 30
melee_damage_upper = 40
@@ -50,5 +50,35 @@
O << "\red [src] launches a razor-sharp quill at [target]!"
var/obj/item/weapon/arrow/quill/Q = new(loc)
Q.fingerprintslast = src
Q.throw_at(target,10,15)
Q.fingerprintslast = src.ckey
Q.throw_at(target,10,15)
/mob/living/simple_animal/vox/armalis/verb/message_mob()
set category = "Alien"
set name = "Commune with creature"
set desc = "Send a telepathic message to an unlucky recipient."
var/list/targets = list()
var/target = null
var/text = null
targets += getmobs() //Fill list, prompt user with list
target = input("Select a creature!", "Speak to creature", null, null) as null|anything in targets
text = input("What would you like to say?", "Speak to creature", null, null)
if (!target || !text)
return
var/mob/M = targets[target]
if(istype(M, /mob/dead/observer) || M.stat == DEAD)
src << "Not even the armalis can speak to the dead."
return
M << "\blue Like lead slabs crashing into the ocean, alien thoughts drop into your mind: [text]"
if(istype(M,/mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if(H.dna.mutantrace == "vox")
return
H << "\red Your nose begins to bleed..."
H.drip(1)
+63
View File
@@ -895,3 +895,66 @@ note dizziness decrements automatically in the mob's Life() proc.
/mob/proc/flash_weak_pain()
flick("weak_pain",pain)
mob/verb/yank_out_object()
set category = "Object"
set name = "Yank out object"
set desc = "Remove an embedded item at the cost of bleeding and pain."
set src in view(1)
if(!isliving(usr) || usr.next_move > world.time)
return
usr.next_move = world.time + 20
if(usr.stat == 1)
usr << "You are unconcious and cannot do that!"
return
if(usr.restrained())
usr << "You are restrained and cannot do that!"
return
var/mob/S = src
var/mob/U = usr
var/list/valid_objects = list()
var/self = null
if(S == U)
self = 1 // Removing object from yourself.
for(var/obj/item/weapon/W in embedded)
if(W.w_class >= 2)
valid_objects += W
if(!valid_objects.len)
if(self)
src << "You have nothing stuck in your body that is large enough to remove."
else
U << "[src] has nothing stuck in their wounds that is large enough to remove."
return
var/obj/item/weapon/selection = input("What do you want to yank out?", "Embedded objects") in valid_objects
if(self)
src << "<span class='warning'>You attempt to get a good grip on the [selection] in your body.</span>"
else
U << "<span class='warning'>You attempt to get a good grip on the [selection] in [S]'s body.</span>"
if(!do_after(U, 80))
return
if(!selection || !S || !U)
return
if(self)
visible_message("<span class='warning'><b>[src] rips [selection] out of their body.</b></span>","<span class='warning'><b>You rip [selection] out of your body.</b></span>")
else
visible_message("<span class='warning'><b>[usr] rips [selection] out of [src]'s body.</b></span>","<span class='warning'><b>[src] rips [selection] out of your body.</b></span>")
selection.loc = get_turf(src)
for(var/obj/item/weapon/O in pinned)
if(O == selection)
pinned -= O
if(!pinned.len)
anchored = 0
return 1
+1
View File
@@ -86,6 +86,7 @@
var/unacidable = 0
var/small = 0
var/list/pinned = list() //List of things pinning this creature to walls (see living_defense.dm)
var/list/embedded = list() //Embedded items, since simple mobs don't have organs.
var/name_archive //For admin things like possession
@@ -10,14 +10,14 @@
w_class = 3.0
sharp = 1
/obj/item/weapon/arrow/proc/removed() //Helper for metal rods falling apart..
/obj/item/weapon/arrow/proc/removed() //Helper for metal rods falling apart.
return
/obj/item/weapon/arrow/quill
name = "vox quill"
desc = "A wickedly barbed quill from some bizarre animal."
icon = 'icons/mob/vox.dmi'
icon = 'icons/obj/weapons.dmi'
icon_state = "quill"
item_state = "quill"
throwforce = 15