From eb8133cf3bf9fa3aed17e91c80e3510b5eb96040 Mon Sep 17 00:00:00 2001 From: Arturlang Date: Fri, 28 Jun 2019 11:35:00 +0300 Subject: [PATCH 1/3] Defines var Filthy webedits, i know. --- code/datums/martial.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/datums/martial.dm b/code/datums/martial.dm index 2bc01e0bf6..ae8f92a342 100644 --- a/code/datums/martial.dm +++ b/code/datums/martial.dm @@ -5,6 +5,7 @@ var/current_target var/datum/martial_art/base // The permanent style. This will be null unless the martial art is temporary var/deflection_chance = 0 //Chance to deflect projectiles + var/reroute_deflection = FALSE //Delete the bullet, or actually deflect it in some direction? var/block_chance = 0 //Chance to block melee attacks using items while on throw mode. var/restraining = 0 //used in cqc's disarm_act to check if the disarmed is being restrained and so whether they should be put in a chokehold or not var/help_verb From 69a62314e9907af25593db64e8b61fdc8612ed50 Mon Sep 17 00:00:00 2001 From: Arturlang Date: Fri, 28 Jun 2019 11:37:12 +0300 Subject: [PATCH 2/3] Defines so carp reroutes the deflects --- code/datums/martial/sleeping_carp.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/datums/martial/sleeping_carp.dm b/code/datums/martial/sleeping_carp.dm index 035e5ac833..5f19c37b99 100644 --- a/code/datums/martial/sleeping_carp.dm +++ b/code/datums/martial/sleeping_carp.dm @@ -7,6 +7,7 @@ /datum/martial_art/the_sleeping_carp name = "The Sleeping Carp" deflection_chance = 100 + reroute_deflection = TRUE no_guns = TRUE allow_temp_override = FALSE help_verb = /mob/living/carbon/human/proc/sleeping_carp_help From 442c21fdba9edf1afb6b58cc1f9a79b2d6900281 Mon Sep 17 00:00:00 2001 From: Arturlang Date: Fri, 28 Jun 2019 11:41:01 +0300 Subject: [PATCH 3/3] For the actual deflecting! --- code/modules/mob/living/carbon/human/human_defense.dm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 2a75119841..429357d826 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -54,7 +54,12 @@ else visible_message("[src] deflects the projectile!", "You deflect the projectile!") playsound(src, pick('sound/weapons/bulletflyby.ogg', 'sound/weapons/bulletflyby2.ogg', 'sound/weapons/bulletflyby3.ogg'), 75, 1) - return 0 + if(!mind.martial_art.reroute_deflection) + return BULLET_ACT_BLOCK + else + P.firer = src + P.setAngle(rand(0, 360))//SHING + return BULLET_ACT_FORCE_PIERCE if(!(P.original == src && P.firer == src)) //can't block or reflect when shooting yourself if(P.is_reflectable)