From 044f065a68d66f8f061e579f44a8cd7490a7fd48 Mon Sep 17 00:00:00 2001 From: necromanceranne Date: Mon, 24 Feb 2020 12:23:10 +1100 Subject: [PATCH] bullet swatting --- code/datums/martial/sleeping_carp.dm | 23 +++++++++++++++++++++-- code/game/objects/items/granters.dm | 5 +++-- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/code/datums/martial/sleeping_carp.dm b/code/datums/martial/sleeping_carp.dm index 88d5833e062..c280f671f44 100644 --- a/code/datums/martial/sleeping_carp.dm +++ b/code/datums/martial/sleeping_carp.dm @@ -5,6 +5,7 @@ /datum/martial_art/the_sleeping_carp name = "The Sleeping Carp" id = MARTIALART_SLEEPINGCARP + block_chance = 40 allow_temp_override = FALSE help_verb = /mob/living/carbon/human/proc/sleeping_carp_help @@ -93,6 +94,24 @@ return TRUE return ..() +/datum/martial_art/the_sleeping_carp/on_projectile_hit(mob/living/carbon/human/A, obj/projectile/P, def_zone) + . = ..() + if(A.incapacitated(FALSE, TRUE)) //NO STUN + return BULLET_ACT_HIT + if(!(A.mobility_flags & MOBILITY_USE)) //NO UNABLE TO USE + return BULLET_ACT_HIT + if(A.dna && A.dna.check_mutation(HULK)) //NO HULK + return BULLET_ACT_HIT + if(!isturf(A.loc)) //NO MOTHERFLIPPIN MECHS! + return BULLET_ACT_HIT + if(A.in_throw_mode) + A.visible_message("[A] effortlessly swats the projectile aside! They can block bullets with their bare hands!", "You deflect the projectile!") + playsound(get_turf(A), pick('sound/weapons/bulletflyby.ogg', 'sound/weapons/bulletflyby2.ogg', 'sound/weapons/bulletflyby3.ogg'), 75, TRUE) + P.firer = A + P.setAngle(rand(0, 360))//SHING + return BULLET_ACT_FORCE_PIERCE + return BULLET_ACT_HIT + /datum/martial_art/the_sleeping_carp/teach(mob/living/carbon/human/H, make_temporary = FALSE) . = ..() if(!.) @@ -132,10 +151,10 @@ to_chat(usr, "You retreat inward and recall the teachings of the Sleeping Carp...") - to_chat(usr, "Gnashing Teeth: Harm Harm. Deal additional damage ever second punch, with a chance for even more damage!") + to_chat(usr, "Gnashing Teeth: Harm Harm. Deal additional damage every second punch, with a chance for even more damage!") to_chat(usr, "Crashing Wave Kick: Harm Disarm. Launch people brutally across rooms, and away from you.") to_chat(usr, "Keelhaul: Harm Grab. Kick opponents to the floor. Against prone targets, deal additional stamina damage and disarm them.") - to_chat(usr, "In addition, your body has become incredibly resilient to most forms of attack. Weapons cannot readily pierce your hardened skin, and you are highly resistant to stuns and knockdowns, and quickly recover from stamina damage. However, you are not invincible, and sustained damage will take it's toll.") + to_chat(usr, "In addition, your body has become incredibly resilient to most forms of attack. Weapons cannot readily pierce your hardened skin, and you are highly resistant to stuns and knockdowns, and can block melee attacks and all projectiles in Throw Mode. However, you are not invincible, and sustained damage will take it's toll.") /obj/item/twohanded/bostaff name = "bo staff" diff --git a/code/game/objects/items/granters.dm b/code/game/objects/items/granters.dm index 92f9b70a089..439842421f2 100644 --- a/code/game/objects/items/granters.dm +++ b/code/game/objects/items/granters.dm @@ -365,10 +365,11 @@ martialname = "sleeping carp" desc = "A scroll filled with strange markings. It seems to be drawings of some sort of martial art." greet = "You have learned the ancient martial art of the Sleeping Carp! Your hand-to-hand combat has become much more effective, and you are now able to deflect any projectiles \ - directed toward you. However, you are also unable to use any ranged weaponry. You can learn more about your newfound art by using the Recall Teachings verb in the Sleeping Carp tab." + directed toward you and most attacks while in Throw Mode. Your body is also honed to protect you from damage and punctures, and even briefly survive space. \ + However, you are also unable to use any ranged weaponry, and some medical supplies will prove useless to you. You can learn more about your newfound art by using the Recall Teachings verb in the Sleeping Carp tab." icon = 'icons/obj/wizard.dmi' icon_state = "scroll2" - remarks = list("I must prove myself worthy to the masters of the sleeping carp...", "Stance means everything...", "Focus... And you'll be able to incapacitate any foe in seconds...", "I must pierce armor for maximum damage...", "I don't think this would combine with other martial arts...", "Grab them first so they don't retaliate...", "I must prove myself worthy of this power...") + remarks = list("Wait, a high protein diet is really all it takes to become bulletproof...?", "Overwhelming force, immovable object...", "Focus... And you'll be able to incapacitate any foe in seconds...", "I must pierce armor for maximum damage...", "I don't think this would combine with other martial arts...", "Become one with the carp...", "Glub...") /obj/item/book/granter/martial/carp/onlearned(mob/living/carbon/user) ..()