mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-09 16:14:13 +00:00
Running with scissors (#32685)
* Running with scissors. * Fix. * Text stuff. * Change comment. * Fix randomized targeting. * Clumsyness. * . * . * . * Monkey messages. * . * . * Nicer conjugation. * . * More flexible attack messages. * . * . * Butter, butter on a stick, and slippery sliders. * Refactor slipping messages. * . * . * Nicer syringe messages. * You hit the camera with. * Remove debug. * Update items.dm Only when running. * Update items.dm * Update effect_system.dm * Remove unneeded arg.
This commit is contained in:
@@ -110,7 +110,7 @@
|
||||
/proc/stripped_input(var/mob/user, var/message = "", var/title = "", var/default = "", var/max_length=MAX_MESSAGE_LEN)
|
||||
var/name = input(user, message, title, default) as null|text
|
||||
return strip_html_simple(name, max_length)
|
||||
|
||||
|
||||
//As above, but for full-size paragraph textboxes
|
||||
/proc/stripped_message(var/mob/user, var/message = "", var/title = "", var/default = "", var/max_length=MAX_MESSAGE_LEN)
|
||||
var/name = input(user, message, title, default) as null|message
|
||||
@@ -716,3 +716,37 @@ var/quote = ascii2text(34)
|
||||
count++
|
||||
while(last_index)
|
||||
return count
|
||||
|
||||
/proc/get_reflexive_pronoun(var/gender) //For when \himself won't work.
|
||||
switch(gender)
|
||||
if(MALE)
|
||||
return "himself"
|
||||
if(FEMALE)
|
||||
return "herself"
|
||||
if(PLURAL) //Can be used in conjunction with shift_verb_tense(). eg. "The bees cleans themselves." -> "The bees clean themselves."
|
||||
return "themselves"
|
||||
else
|
||||
return "itself"
|
||||
|
||||
/proc/shift_verb_tense(var/input) //Turns "slashes" into "slash" and "hits" into "hit".
|
||||
//Special cases can be added here as they are encountered.
|
||||
switch(input)
|
||||
if("staves in")
|
||||
return "stave in"
|
||||
//Check if input ends in "es" or "s" and chop those off if so.
|
||||
var/inputlength = length(input)
|
||||
if(inputlength > 2)
|
||||
if(copytext(input, inputlength - 1, inputlength + 1) == "es") //If it ends in "es"
|
||||
var/third_to_last = copytext(input, inputlength - 2, inputlength - 1)
|
||||
if(findtext("cdefgklmnprstuvxz", third_to_last)) //If the third-to-last letter is any of the given letters, remove only the "s".
|
||||
return copytext(input, 1, inputlength) //"smiles" becomes "smile"
|
||||
else if(third_to_last == "i")
|
||||
return copytext(input, 1, inputlength - 2) + "y" //"parries" becomes "parry"
|
||||
else
|
||||
return copytext(input, 1, inputlength - 1) //Otherwise remove the "es".
|
||||
else if(copytext(input, inputlength, inputlength + 1) == "s") //If the second-to-last letter isn't "e", and the last letter is "s", remove the "s".
|
||||
return copytext(input, 1, inputlength) //"gets" becomes "get"
|
||||
else
|
||||
return input
|
||||
else
|
||||
return input
|
||||
@@ -93,7 +93,7 @@
|
||||
if(M_HULK in user.mutations)
|
||||
power *= 2
|
||||
|
||||
if(!istype(M, /mob/living/carbon/human))
|
||||
if(!(ishuman(M) || ismonkey(M)))
|
||||
if(istype(M, /mob/living/carbon/slime))
|
||||
var/mob/living/carbon/slime/slime = M
|
||||
if(prob(25))
|
||||
|
||||
@@ -315,16 +315,16 @@ var/list/camera_messages = list()
|
||||
add_fingerprint(user)
|
||||
user.delayNextAttack(8)
|
||||
if(user.a_intent == I_HELP)
|
||||
visible_message("<span class='notice'>[user] gently taps [src] with [W].</span>")
|
||||
user.visible_message("<span class='notice'>[user] gently taps [src] with [W].</span>", "<span class='notice'>You gently tap [src] with [W].</span>")
|
||||
return
|
||||
W.on_attack(src, user)
|
||||
if(W.force < CAMERA_MIN_WEAPON_DAMAGE)
|
||||
to_chat(user, "<span class='danger'>\The [W] does no damage to [src].</span>")
|
||||
visible_message("<span class='warning'>[user] hits [src] with [W]. It's not very effective.</span>")
|
||||
user.visible_message("<span class='warning'>[user] hits [src] with [W]. It's not very effective.</span>", "<span class='warning'>You hit [src] with [W]. It's not very effective.</span>")
|
||||
return
|
||||
if(W.hitsound)
|
||||
playsound(src, W.hitsound, 50, 1)
|
||||
visible_message("<span class='danger'>[user] hits [src] with [W].</span>")
|
||||
user.visible_message("<span class='danger'>[user] [pick(W.attack_verb)] [src] with [W].</span>", "<span class='warning'>You [shift_verb_tense(pick(W.attack_verb))] [src] with [W].</span>")
|
||||
take_damage(W.force)
|
||||
|
||||
/obj/machinery/camera/damaged_updates()
|
||||
|
||||
@@ -220,7 +220,7 @@
|
||||
var/glanced=!take_damage(W.force, skip_break = TRUE)
|
||||
if(W.hitsound)
|
||||
playsound(src, W.hitsound, 50, 1)
|
||||
user.visible_message("<span class='warning'>\The [user] [pick(W.attack_verb)] \the [src] with \the [W][generate_break_text(glanced,TRUE)]</span>","<span class='notice'>You hit \the [src] with \the [W][generate_break_text(glanced)]<span>")
|
||||
user.visible_message("<span class='warning'>\The [user] [pick(W.attack_verb)] \the [src] with \the [W][generate_break_text(glanced,TRUE)]</span>","<span class='notice'>You [shift_verb_tense(pick(W.attack_verb))] \the [src] with \the [W][generate_break_text(glanced)]<span>")
|
||||
try_break()
|
||||
//Break the weapon as well, if applicable, based on its own force.
|
||||
if(W.breakable_flags & BREAKABLE_AS_MELEE)
|
||||
@@ -238,7 +238,7 @@
|
||||
var/glanced=!take_damage(rand(M.melee_damage_lower,M.melee_damage_upper), skip_break = TRUE)
|
||||
if(M.attack_sound)
|
||||
playsound(src, M.attack_sound, 50, 1)
|
||||
M.visible_message("<span class='warning'>\The [M] [M.attacktext] \the [src][generate_break_text(glanced,TRUE)]</span>","<span class='notice'>You hit \the [src][generate_break_text(glanced)]</span>")
|
||||
M.visible_message("<span class='warning'>\The [M] [M.attacktext] \the [src][generate_break_text(glanced,TRUE)]</span>","<span class='notice'>You [shift_verb_tense(M.attacktext)] \the [src][generate_break_text(glanced)]</span>")
|
||||
try_break()
|
||||
else
|
||||
. = ..()
|
||||
|
||||
@@ -839,11 +839,9 @@ steam.start() -- spawns the effect
|
||||
reagents.reaction(M)
|
||||
return
|
||||
|
||||
if (istype(AM, /mob/living/carbon))
|
||||
if(istype(AM, /mob/living/carbon))
|
||||
var/mob/living/carbon/M = AM
|
||||
if (M.Slip(5, 2, 1))
|
||||
to_chat(M, "<span class='notice'>You slipped on the foam!</span>")
|
||||
|
||||
M.Slip(5, 2, 1, onwhat = "the foam")
|
||||
|
||||
/datum/effect/system/foam_spread
|
||||
var/amount = 5 // the size of the foam spread.
|
||||
|
||||
@@ -230,6 +230,59 @@
|
||||
return
|
||||
|
||||
/obj/item/proc/SlipDropped(var/mob/living/user, var/slip_dir, var/slipperiness = TURF_WET_WATER)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
if(sharpness_flags & (SHARP_BLADE | SERRATED_BLADE | SHARP_TIP | HOT_EDGE)) //Running with sharp objects is dangerous!
|
||||
var/severity = 0
|
||||
var/saving_prob = C.lucky_probability(60, luckfactor = 1/50)
|
||||
|
||||
if(M_CLUMSY in C.mutations)
|
||||
severity += 1
|
||||
|
||||
for(var/i in 1 to 3) //Three saving throws. One failed means a near miss. Two failed means a normal attack. Three failed means a critical attack.
|
||||
if(prob(saving_prob))
|
||||
break
|
||||
severity += 1
|
||||
if(severity >= 2)
|
||||
var/list/attackable_zones = list("head")
|
||||
if(C.has_eyes())
|
||||
attackable_zones += "eyes"
|
||||
if(C.hasmouth())
|
||||
attackable_zones += "mouth"
|
||||
var/attackable_zone = pick(attackable_zones)
|
||||
|
||||
//Temporarily switch C to harm intent and make them target their head.
|
||||
var/previntent = C.a_intent
|
||||
var/prevzone
|
||||
if(C.zone_sel)
|
||||
prevzone = C.zone_sel.selecting
|
||||
C.zone_sel.selecting = attackable_zone //For proper afterattack() behavior, otherwise we chould just pass attackable_zone into attacked_by().
|
||||
C.a_intent = I_HURT
|
||||
|
||||
//Do the attack.
|
||||
C.attacked_by(src, C, def_zone = attackable_zone, crit = severity >= 3, flavor = "accidentally")
|
||||
afterattack(C, C)
|
||||
|
||||
//Switch them back to their previous intent and targeting.
|
||||
C.a_intent = previntent
|
||||
if(C.zone_sel)
|
||||
C.zone_sel.selecting = prevzone
|
||||
|
||||
else if(severity >= 1)
|
||||
var/list/possibles = list("face", "neck")
|
||||
if(C.has_eyes())
|
||||
possibles += "eye"
|
||||
if(C.hasmouth())
|
||||
possibles += "throat"
|
||||
var/list/possible_edgepoints = list()
|
||||
if(sharpness_flags & SHARP_BLADE)
|
||||
possible_edgepoints += "sharp edge"
|
||||
if(sharpness_flags & SERRATED_BLADE)
|
||||
possible_edgepoints += "serrated edge"
|
||||
if(sharpness_flags & SHARP_TIP)
|
||||
possible_edgepoints += "sharp point"
|
||||
to_chat(C, "<span class = 'warning'>[possible_edgepoints.len ? "The [pick(possible_edgepoints)] of \the [src]" : "\The [src]"] just misses your [pick(possibles)]... close one!</span>")
|
||||
|
||||
return
|
||||
|
||||
/obj/item/projectile_check()
|
||||
|
||||
@@ -555,12 +555,10 @@ var/global/msg_id = 0
|
||||
return 1
|
||||
if (iscarbon(AM))
|
||||
var/mob/living/carbon/M = AM
|
||||
if (M.Slip(8, 5, 1))
|
||||
to_chat(M, "<span class='notice'>You slipped on the PDA!</span>")
|
||||
|
||||
if (istype(M, /mob/living/carbon/human) && M.real_name != src.owner)
|
||||
if(M.Slip(8, 5, 1, onwhat = "the PDA"))
|
||||
if(istype(M, /mob/living/carbon/human) && M.real_name != src.owner)
|
||||
var/datum/pda_app/cart/virus/honk/HV = locate(/datum/pda_app/cart/virus/honk) in applications
|
||||
if (HV && HV.charges < 5)
|
||||
if(HV && HV.charges < 5)
|
||||
HV.charges++
|
||||
|
||||
/obj/item/device/pda/proc/available_pdas()
|
||||
|
||||
@@ -15,11 +15,9 @@
|
||||
/datum/locking_category/banana_peel
|
||||
|
||||
/obj/item/weapon/bananapeel/proc/handle_slip(atom/movable/AM)
|
||||
if (iscarbon(AM))
|
||||
if(iscarbon(AM))
|
||||
var/mob/living/carbon/M = AM
|
||||
if(slip_n_slide(M))
|
||||
M.simple_message("<span class='notice'>You slipped on the [name]!</span>",
|
||||
"<span class='userdanger'>Something is scratching at your feet! Oh god!</span>")
|
||||
slip_n_slide(M)
|
||||
if(istype(AM, /obj/structure/bed/chair/vehicle/gokart))
|
||||
var/obj/structure/bed/chair/vehicle/gokart/kart = AM
|
||||
var/left_or_right = prob(50) ? turn(kart.dir, 90) : turn(kart.dir, -90)
|
||||
@@ -32,7 +30,7 @@
|
||||
sleep(1)
|
||||
|
||||
/obj/item/weapon/bananapeel/proc/slip_n_slide(var/mob/living/carbon/M)
|
||||
if(!M.Slip(2,2,1))
|
||||
if(!M.Slip(2, 2, 1, slipped_on = src, drugged_message = "<span class='userdanger'>Something is scratching at your feet! Oh god!</span>"))
|
||||
return 0
|
||||
var/tiles_to_slip = rand(round(potency/20, 1),round(potency/10, 1))
|
||||
if(tiles_to_slip && !locked_to) //The banana peel will not be dragged along so stop the ride
|
||||
|
||||
@@ -75,27 +75,29 @@
|
||||
M.simple_message("<span class='danger'>Something burns your back!</span>",\
|
||||
"<span class='userdanger'>They're eating your back!</span>")
|
||||
return
|
||||
|
||||
if(ishuman(M))
|
||||
if(M.CheckSlip() != TRUE)
|
||||
return
|
||||
else
|
||||
if(M.CheckSlip())
|
||||
M.simple_message("<span class='warning'>Your feet feel like they're on fire!</span>",\
|
||||
"<span class='userdanger'>Egads! They bite your feet!</span>")
|
||||
M.take_overall_damage(0, max(0, (burned - 2)))
|
||||
else
|
||||
return
|
||||
|
||||
if(!istype(M, /mob/living/carbon/slime) && !isrobot(M))
|
||||
M.stop_pulling()
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
C.Slip(10, 10, slipped_on = src, drugged_message = "<span class='userdanger'>Please, just end the pain!</span>", spanclass = "notice")
|
||||
else //Includes simple animals
|
||||
M.Slip(10, 10)
|
||||
M.simple_message("<span class='notice'>You slipped on \the [name]!</span>",\
|
||||
"<span class='userdanger'>Please, just end the pain!</span>")
|
||||
step(M, M.dir)
|
||||
spawn(1)
|
||||
for(var/i = 1 to slip_power)
|
||||
step(M, M.dir)
|
||||
sleep(1)
|
||||
M.take_organ_damage(2) // Was 5 -- TLE
|
||||
M.simple_message("<span class='notice'>You slipped on \the [name]!</span>",\
|
||||
"<span class='userdanger'>Please, just end the pain!</span>")
|
||||
playsound(src, 'sound/misc/slip.ogg', 50, 1, -3)
|
||||
M.Knockdown(10)
|
||||
M.Stun(10)
|
||||
M.take_overall_damage(0, burned)
|
||||
|
||||
/obj/item/weapon/bananapeel/traitorpeel/throw_impact(atom/hit_atom)
|
||||
|
||||
@@ -318,11 +318,9 @@
|
||||
/obj/item/weapon/melee/energy/sword/dualsaber/bananabunch/Crossed(AM as mob|obj)
|
||||
if(..())
|
||||
return 1
|
||||
if (iscarbon(AM))
|
||||
if(iscarbon(AM))
|
||||
var/mob/living/carbon/M = AM
|
||||
if (M.Slip(2, 2, 1))
|
||||
M.simple_message("<span class='notice'>You slipped on [src]!</span>",
|
||||
"<span class='userdanger'>Something is scratching at your feet! Oh god!</span>")
|
||||
M.Slip(2, 2, 1, slipped_on = src, drugged_message = "<span class='userdanger'>Something is scratching at your feet! Oh god!</span>")
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/dualsaber/bananabunch/clumsy_check(mob/living/user)
|
||||
return 0
|
||||
|
||||
@@ -49,11 +49,9 @@
|
||||
/obj/item/weapon/soap/Crossed(var/atom/movable/AM)
|
||||
if(..())
|
||||
return 1
|
||||
if (iscarbon(AM))
|
||||
if(iscarbon(AM))
|
||||
var/mob/living/carbon/M = AM
|
||||
if (M.Slip(3, 2, 1))
|
||||
M.simple_message("<span class='notice'>You slipped on the [name]!</span>",
|
||||
"<span class='userdanger'>Something is scratching at your feet! Oh god!</span>")
|
||||
if(M.Slip(3, 2, 1, slipped_on = src, drugged_message = "<span class='userdanger'>Something is scratching at your feet! Oh god!</span>"))
|
||||
on_successful_use()
|
||||
|
||||
/obj/item/weapon/soap/afterattack(var/atom/target, var/mob/user)
|
||||
|
||||
@@ -128,11 +128,9 @@ Frequency:
|
||||
item_state = "bluespacebanana_peel"
|
||||
|
||||
/obj/item/weapon/bananapeel/bluespace/handle_slip(atom/movable/AM)
|
||||
if (iscarbon(AM))
|
||||
if(iscarbon(AM))
|
||||
var/mob/living/carbon/M = AM
|
||||
if (M.Slip(2, 2, 1))
|
||||
M.simple_message("<span class='notice'>You slipped on the [name]!</span>",
|
||||
"<span class='userdanger'>Something is scratching at your feet! Oh god!</span>")
|
||||
if(M.Slip(2, 2, 1, slipped_on = src, drugged_message = "<span class='userdanger'>Something is scratching at your feet! Oh god!</span>"))
|
||||
if(ishuman(AM))
|
||||
var/mob/living/carbon/human/H = AM
|
||||
var/obj/teleported_shoes = H.get_item_by_slot(slot_shoes)
|
||||
|
||||
@@ -492,17 +492,42 @@
|
||||
forceMove(get_turf(A))
|
||||
src.unslippable = last_slip_value
|
||||
|
||||
/mob/living/carbon/Slip(stun_amount, weaken_amount, slip_on_walking = 0, overlay_type, slip_on_magbooties = 0)
|
||||
if ((CheckSlip(slip_on_walking, overlay_type, slip_on_magbooties)) != TRUE)
|
||||
/mob/living/carbon/Slip(stun_amount, weaken_amount, slip_on_walking = 0, overlay_type, slip_on_magbooties = 0, obj/slipped_on, onwhat, otherscansee, message, self_message, drugged_message, self_drugged_message, blind_drugged_message, spanclass = "info")
|
||||
if((CheckSlip(slip_on_walking, overlay_type, slip_on_magbooties)) != TRUE)
|
||||
return 0
|
||||
|
||||
slip_message(slipped_on, onwhat, otherscansee, message, self_message, drugged_message, self_drugged_message, blind_drugged_message, spanclass)
|
||||
|
||||
for(var/obj/item/I in held_items)
|
||||
I.SlipDropped(src,dir,overlay_type) // can be set to trigger specific behaviours when items are dropped by slipping
|
||||
|
||||
if(..())
|
||||
|
||||
playsound(src, 'sound/misc/slip.ogg', 50, 1, -3)
|
||||
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/proc/slip_message(obj/slipped_on, onwhat, otherscansee = FALSE, message, self_message, drugged_message, self_drugged_message, blind_drugged_message, spanclass = "info")
|
||||
var/onwhatmsg
|
||||
if(onwhat)
|
||||
onwhatmsg = " on [onwhat]!"
|
||||
else if(slipped_on)
|
||||
onwhatmsg = " on \the [slipped_on]!"
|
||||
else
|
||||
onwhatmsg = "!"
|
||||
if(otherscansee)
|
||||
visible_message("<span class='[spanclass]'>\The [src] slips[onwhatmsg]</span>",\
|
||||
"<span class='[spanclass]'>You slip[onwhatmsg]</span>",\
|
||||
"<span class='[spanclass]'>You slip on something!</span>",\
|
||||
drugged_message,\
|
||||
self_drugged_message,\
|
||||
blind_drugged_message)
|
||||
else
|
||||
if(blinded)
|
||||
onwhatmsg = "on something!"
|
||||
simple_message("<span class='[spanclass]'>You slip[onwhatmsg]</span>",\
|
||||
drugged_message)
|
||||
|
||||
/mob/living/carbon/proc/transferImplantsTo(mob/living/carbon/newmob)
|
||||
for(var/obj/item/weapon/implant/I in src)
|
||||
if(!I.imp_in)
|
||||
@@ -674,35 +699,35 @@
|
||||
regenerate_icons()
|
||||
|
||||
/mob/living/carbon/ApplySlip(var/obj/effect/overlay/puddle/P)
|
||||
if (!..())
|
||||
if(!..())
|
||||
return FALSE
|
||||
|
||||
if (unslippable) //if unslippable, don't even bother making checks
|
||||
if(unslippable) //if unslippable, don't even bother making checks
|
||||
return FALSE
|
||||
|
||||
switch(P.wet)
|
||||
if(TURF_WET_WATER)
|
||||
if (!Slip(stun_amount = 5, weaken_amount = 3, slip_on_walking = FALSE, overlay_type = TURF_WET_WATER))
|
||||
if(Slip(stun_amount = 5, weaken_amount = 3, slip_on_walking = FALSE, overlay_type = TURF_WET_WATER, onwhat = "the wet floor", otherscansee = TRUE, spanclass = "warning"))
|
||||
step(src, dir)
|
||||
else
|
||||
return FALSE
|
||||
step(src, dir)
|
||||
visible_message("<span class='warning'>[src] slips on the wet floor!</span>", \
|
||||
"<span class='warning'>You slip on the wet floor!</span>")
|
||||
|
||||
if(TURF_WET_LUBE)
|
||||
step(src, dir)
|
||||
if (!Slip(stun_amount = 5, weaken_amount = 3, slip_on_walking = TRUE, overlay_type = TURF_WET_LUBE, slip_on_magbooties = TRUE))
|
||||
if(Slip(stun_amount = 5, weaken_amount = 3, slip_on_walking = TRUE, overlay_type = TURF_WET_LUBE, slip_on_magbooties = TRUE, onwhat = "the floor", otherscansee = TRUE, spanclass = "warning"))
|
||||
for(var/i = 1 to 4)
|
||||
spawn(i)
|
||||
if(!locked_to)
|
||||
step(src, dir)
|
||||
take_organ_damage(2) // Was 5 -- TLE
|
||||
else
|
||||
return FALSE
|
||||
for (var/i = 1 to 4)
|
||||
spawn(i)
|
||||
if(!locked_to)
|
||||
step(src, dir)
|
||||
take_organ_damage(2) // Was 5 -- TLE
|
||||
visible_message("<span class='warning'>[src] slips on the floor!</span>", \
|
||||
"<span class='warning'>You slip on the floor!</span>")
|
||||
|
||||
|
||||
if(TURF_WET_ICE)
|
||||
if(prob(30) && Slip(stun_amount = 4, weaken_amount = 3, overlay_type = TURF_WET_ICE))
|
||||
if(prob(30) && Slip(stun_amount = 4, weaken_amount = 3, overlay_type = TURF_WET_ICE, onwhat = "the icy floor", otherscansee = TRUE, spanclass = "warning"))
|
||||
step(src, dir)
|
||||
visible_message("<span class='warning'>[src] slips on the icy floor!</span>", \
|
||||
"<span class='warning'>You slip on the icy floor!</span>")
|
||||
return TRUE
|
||||
else
|
||||
return FALSE
|
||||
|
||||
return TRUE
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
|
||||
//Checks armor, special attackby of object instances, and miss chance
|
||||
/mob/living/carbon/proc/attacked_by(var/obj/item/I, var/mob/living/user, var/def_zone, var/originator = null, var/crit = FALSE)
|
||||
/mob/living/carbon/proc/attacked_by(var/obj/item/I, var/mob/living/user, var/def_zone, var/originator = null, var/crit = FALSE, var/flavor)
|
||||
if(!I || !user)
|
||||
return FALSE
|
||||
target_zone = null
|
||||
@@ -42,7 +42,11 @@
|
||||
target_zone = get_zone_with_miss_chance(user.zone_sel.selecting, src)
|
||||
|
||||
if(user == src) // Attacking yourself can't miss
|
||||
target_zone = user.zone_sel.selecting
|
||||
if(isnull(user.zone_sel)) //If the mob attacks itself without a client controlling it and therefore has no zone select active. This could happen if a catatonic person wielding a sword slips.
|
||||
target_zone = pick("head", "eyes", "mouth")
|
||||
else
|
||||
target_zone = user.zone_sel.selecting
|
||||
|
||||
if(!target_zone && !src.stat)
|
||||
visible_message("<span class='borange'>[user] misses [src] with \the [I]!</span>")
|
||||
add_logs(user, src, "missed", admin=1, object=I, addition="intended damage: [power]")
|
||||
|
||||
@@ -205,15 +205,18 @@ emp_act
|
||||
..()
|
||||
|
||||
|
||||
/mob/living/carbon/human/attacked_by(var/obj/item/I, var/mob/living/user, var/def_zone, var/originator = null, var/crit = FALSE)
|
||||
/mob/living/carbon/human/attacked_by(var/obj/item/I, var/mob/living/user, var/def_zone, var/originator = null, var/crit = FALSE, var/flavor)
|
||||
if(!..())
|
||||
return
|
||||
|
||||
var/power = I.force
|
||||
if (crit)
|
||||
power *= CRIT_MULTIPLIER
|
||||
|
||||
if(def_zone)
|
||||
target_zone = def_zone
|
||||
|
||||
var/datum/organ/external/affecting = get_organ(target_zone)
|
||||
|
||||
if (!affecting)
|
||||
return FALSE
|
||||
if(affecting.status & ORGAN_DESTROYED)
|
||||
@@ -225,11 +228,11 @@ emp_act
|
||||
var/hit_area = affecting.display_name
|
||||
|
||||
if(istype(I.attack_verb, /list) && I.attack_verb.len && !(I.flags & NO_ATTACK_MSG))
|
||||
visible_message("<span class='danger'>\The [user] [pick(I.attack_verb)] \the [src] in \the [hit_area] with \the [I]!</span>", \
|
||||
"<span class='userdanger'>\The [user] [pick(I.attack_verb)] you in \the [hit_area] with \the [I]!</span>")
|
||||
visible_message("<span class='danger'>\The [user] [flavor ? "[flavor] " : ""][pick(I.attack_verb)] [user == src ? "[get_reflexive_pronoun(user.gender)]" : "\the [src]"] in \the [hit_area] with \the [I]!</span>", \
|
||||
"<span class='userdanger'>[user == src ? "You" : "\The [user]"] [flavor ? "[flavor] " : ""][user == src ? "[shift_verb_tense(pick(I.attack_verb))] yourself": "[pick(I.attack_verb)] you"] in \the [hit_area] with \the [I]!</span>")
|
||||
else if(!(I.flags & NO_ATTACK_MSG))
|
||||
visible_message("<span class='danger'>\The [user] attacks \the [src] in \the [hit_area] with \the [I.name]!</span>", \
|
||||
"<span class='userdanger'>\The [user] attacks you in \the [hit_area] with \the [I.name]!</span>")
|
||||
visible_message("<span class='danger'>\The [user] [flavor ? "[flavor] " : ""]attacks [user == src ? "[get_reflexive_pronoun(user.gender)]" : "\the [src]"] in \the [hit_area] with \the [I.name]!</span>", \
|
||||
"<span class='userdanger'>[user == src ? "You" : "\The [user]"] [flavor ? "[flavor] " : ""]attack[user == src ? " yourself" : "s you"] in \the [hit_area] with \the [I.name]!</span>")
|
||||
|
||||
//Contact diseases on the weapon?
|
||||
I.disease_contact(src,get_part_from_limb(target_zone))
|
||||
|
||||
@@ -322,10 +322,17 @@
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/attacked_by(var/obj/item/I, var/mob/living/user, var/def_zone, var/originator = null, var/crit = FALSE)
|
||||
/mob/living/carbon/monkey/attacked_by(var/obj/item/I, var/mob/living/user, var/def_zone, var/originator = null, var/crit = FALSE, var/flavor)
|
||||
if(!..())
|
||||
return
|
||||
|
||||
if(istype(I.attack_verb, /list) && I.attack_verb.len && !(I.flags & NO_ATTACK_MSG))
|
||||
visible_message("<span class='danger'>\The [user] [flavor ? "[flavor] " : ""][pick(I.attack_verb)] [user == src ? "[get_reflexive_pronoun(user.gender)]" : "\the [src]"] with \the [I]!</span>", \
|
||||
"<span class='userdanger'>[user == src ? "You" : "\The [user]"] [flavor ? "[flavor] " : ""][user == src ? "[shift_verb_tense(pick(I.attack_verb))] yourself": "[pick(I.attack_verb)] you"] with \the [I]!</span>")
|
||||
else if(!(I.flags & NO_ATTACK_MSG))
|
||||
visible_message("<span class='danger'>\The [user] [flavor ? "[flavor] " : ""]attacks [user == src ? "[get_reflexive_pronoun(user.gender)]" : "\the [src]"] with \the [I.name]!</span>", \
|
||||
"<span class='userdanger'>[user == src ? "You" : "\The [user]"] [flavor ? "[flavor] " : ""]attack[user == src ? " yourself" : "s you"] with \the [I.name]!</span>")
|
||||
|
||||
I.disease_contact(src,get_part_from_limb(def_zone))
|
||||
|
||||
/mob/living/carbon/monkey/Stat()
|
||||
|
||||
@@ -45,12 +45,13 @@
|
||||
size = "huge"
|
||||
|
||||
var/pronoun = "it is"
|
||||
if(src.gender == FEMALE)
|
||||
pronoun = "she is"
|
||||
else if(src.gender == MALE)
|
||||
pronoun = "he is"
|
||||
else if(src.gender == PLURAL)
|
||||
pronoun = "they are"
|
||||
switch(gender)
|
||||
if(FEMALE)
|
||||
pronoun = "she is"
|
||||
if(MALE)
|
||||
pronoun = "he is"
|
||||
if(PLURAL)
|
||||
pronoun = "they are"
|
||||
|
||||
..(user, " [capitalize(pronoun)] [size].", show_name, FALSE)
|
||||
if(meat_taken > 0)
|
||||
|
||||
@@ -2065,18 +2065,11 @@
|
||||
/obj/item/weapon/reagent_containers/food/snacks/butter/Crossed(atom/movable/O)
|
||||
if(..())
|
||||
return 1
|
||||
if (ishuman(O))
|
||||
var/mob/living/carbon/human/H = O
|
||||
if (H.CheckSlip() != TRUE)
|
||||
return
|
||||
|
||||
H.stop_pulling()
|
||||
to_chat(H, "<SPAN CLASS='notice'>You slipped on the [name]!</SPAN>")
|
||||
playsound((src), 'sound/misc/slip.ogg', 50, 1, -3)
|
||||
H.Stun(4)
|
||||
H.Knockdown(3)
|
||||
new/obj/effect/decal/cleanable/smashed_butter(src.loc)
|
||||
qdel(src)
|
||||
if(iscarbon(O))
|
||||
var/mob/living/carbon/C = O
|
||||
if(C.Slip(4, 3, slipped_on = src))
|
||||
new/obj/effect/decal/cleanable/smashed_butter(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/pancake
|
||||
name = "pancake"
|
||||
@@ -4963,19 +4956,12 @@
|
||||
desc = "It's so slippery!"
|
||||
icon_state = "slider_slippery"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/slider/slippery/Crossed(atom/movable/O) //exactly the same as soap
|
||||
/obj/item/weapon/reagent_containers/food/snacks/slider/slippery/Crossed(atom/movable/O) //similar to soap
|
||||
if(..())
|
||||
return 1
|
||||
if (ishuman(O))
|
||||
var/mob/living/carbon/human/H = O
|
||||
if (H.CheckSlip() != TRUE)
|
||||
return
|
||||
|
||||
H.stop_pulling()
|
||||
to_chat(H, "<SPAN CLASS='notice'>You slipped on the [name]!</SPAN>")
|
||||
playsound(src, 'sound/misc/slip.ogg', 50, 1, -3)
|
||||
H.Stun(3)
|
||||
H.Knockdown(2)
|
||||
if(iscarbon(O))
|
||||
var/mob/living/carbon/C = O
|
||||
C.Slip(3, 2, slipped_on = src)
|
||||
|
||||
////////////////SLIDERS END////////////////
|
||||
|
||||
@@ -6668,18 +6654,11 @@ var/global/list/bomb_like_items = list(/obj/item/device/transfer_valve, /obj/ite
|
||||
/obj/item/weapon/reagent_containers/food/snacks/butterstick/Crossed(atom/movable/O)
|
||||
if(..())
|
||||
return 1
|
||||
if (ishuman(O))
|
||||
var/mob/living/carbon/human/H = O
|
||||
if (H.CheckSlip() != TRUE)
|
||||
return
|
||||
|
||||
H.stop_pulling()
|
||||
to_chat(H, "<SPAN CLASS='notice'>You slipped on the [name]!</SPAN>")
|
||||
playsound((src), 'sound/misc/slip.ogg', 50, 1, -3)
|
||||
H.Stun(4)
|
||||
H.Knockdown(3)
|
||||
new/obj/effect/decal/cleanable/smashed_butter(src.loc)
|
||||
qdel(src)
|
||||
if(iscarbon(O))
|
||||
var/mob/living/carbon/C = O
|
||||
if(C.Slip(4, 3, slipped_on = src))
|
||||
new/obj/effect/decal/cleanable/smashed_butter(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/butterstick/New()
|
||||
..()
|
||||
@@ -6717,6 +6696,13 @@ var/global/list/bomb_like_items = list(/obj/item/device/transfer_valve, /obj/ite
|
||||
..()
|
||||
reagents.add_reagent(NUTRIMENT, 2)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/butterfingers_r/Crossed(atom/movable/O)
|
||||
if(..())
|
||||
return 1
|
||||
if(iscarbon(O))
|
||||
var/mob/living/carbon/C = O
|
||||
C.Slip(4, 3, slipped_on = src)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/butterfingers_l
|
||||
name = "butter fingers"
|
||||
desc = "It's a microwaved hand slathered in butter!"
|
||||
@@ -6729,6 +6715,13 @@ var/global/list/bomb_like_items = list(/obj/item/device/transfer_valve, /obj/ite
|
||||
..()
|
||||
reagents.add_reagent(NUTRIMENT, 2)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/butterfingers_l/Crossed(atom/movable/O)
|
||||
if(..())
|
||||
return 1
|
||||
if(iscarbon(O))
|
||||
var/mob/living/carbon/C = O
|
||||
C.Slip(4, 3, slipped_on = src)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/butteredtoast
|
||||
name = "buttered toast"
|
||||
desc = "Toasted bread with butter on it."
|
||||
|
||||
@@ -144,8 +144,7 @@ var/list/special_fruits = list()
|
||||
to_chat(H, "<span class='danger'>You step on \the [src]'s stingers!</span>")
|
||||
potency -= rand(1,(potency/3)+1)
|
||||
if(seed.juicy == 2)
|
||||
if(M.Slip(3, 2))
|
||||
to_chat(M, "<span class='notice'>You slipped on the [name]!</span>")
|
||||
if(M.Slip(3, 2, slipped_on = src))
|
||||
do_splat_effects(M)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/pickup(mob/user)
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
volume = 15
|
||||
starting_materials = list(MAT_GLASS = 1000)
|
||||
w_type = RECYK_GLASS
|
||||
attack_verb = list("stabs", "sticks", "pokes")
|
||||
|
||||
var/mode = SYRINGE_DRAW
|
||||
var/can_draw_blood = TRUE
|
||||
@@ -272,15 +273,15 @@
|
||||
add_attacklogs(user, target, (deflected ? "attempted to inject" : "injected"), object = src, addition = "Deflected: [deflected ? "YES" : "NO"]; Reagents: [english_list(get_reagent_names())]", admin_warn = !deflected)
|
||||
|
||||
if (deflected)
|
||||
user.visible_message("<span class='danger'>[user] tries to stab [target] in \the [hit_area] with \the [src], but the attack is deflected by armor!</span>", "<span class='danger'>You try to stab [target] in \the [hit_area] with \the [src], but the attack is deflected by armor!</span>")
|
||||
user.visible_message("<span class='danger'>[user] tries to stab [user == target ? get_reflexive_pronoun(user.gender) : target] in \the [hit_area] with \the [src], but the attack is deflected by armor!</span>", "<span class='danger'>You try to stab [user == target ? "yourself" : "\the [target]"] in \the [hit_area] with \the [src], but the attack is deflected by armor!</span>")
|
||||
user.u_equip(src, 1)
|
||||
qdel(src)
|
||||
return // Avoid the transfer since we're using qdel
|
||||
else
|
||||
user.visible_message("<span class='danger'>[user] stabs [target] in \the [hit_area] with \the [src]!</span>", "<span class='danger'>You stab [target] in \the [hit_area] with \the [src]!</span>")
|
||||
user.visible_message("<span class='danger'>[user] stabs [user == target ? get_reflexive_pronoun(user.gender) : target] in \the [hit_area] with \the [src]!</span>", "<span class='danger'>You stab [user == target ? "yourself" : "\the [target]"] in \the [hit_area] with \the [src]!</span>")
|
||||
affecting.take_damage(3)
|
||||
else
|
||||
user.visible_message("<span class='danger'>[user] stabs [target] with \the [src]!</span>", "<span class='danger'>You stab [target] with \the [src]!</span>")
|
||||
user.visible_message("<span class='danger'>[user] stabs [user == target ? get_reflexive_pronoun(user.gender) : target] with \the [src]!</span>", "<span class='danger'>You stab [user == target ? "yourself" : "\the [target]"] with \the [src]!</span>")
|
||||
target.take_organ_damage(3)// 7 is the same as crowbar punch
|
||||
|
||||
// Break the syringe and transfer some of the reagents to the target
|
||||
|
||||
Reference in New Issue
Block a user