diff --git a/code/__DEFINES/combat.dm b/code/__DEFINES/combat.dm
index 5fe0f40bd1..c88e181a27 100644
--- a/code/__DEFINES/combat.dm
+++ b/code/__DEFINES/combat.dm
@@ -227,8 +227,8 @@ GLOBAL_LIST_INIT(shove_disarming_types, typecacheof(list(
#define BLOCK_PHYSICAL_INTERNAL (1<<5)
/// Attack outright missed because the target dodged. Should usually be combined with redirection passthrough or something (see martial arts)
#define BLOCK_TARGET_DODGED (1<<7)
-/// Meta-flag for run_block/do_run_block : Whatever triggered this has completely blocked the attack (or failed so miserably hard it wants us to stop for when that's implemented), do not keep checking. Most methods of block should probably use this.
-#define BLOCK_INTERRUPT_CHAIN (1<<8)
+/// Meta-flag for run_block/do_run_block : By default, BLOCK_SUCCESS tells do_run_block() to assume the attack is completely blocked and not continue the block chain. If this is present, it will continue to check other items in the chain rather than stopping.
+#define BLOCK_cONTINUE_CHAIN (1<<8)
/// For keys in associative list/block_return as we don't want to saturate our (somewhat) limited flags.
#define BLOCK_RETURN_REDIRECT_METHOD "REDIRECT_METHOD"
diff --git a/code/game/objects/items/twohanded.dm b/code/game/objects/items/twohanded.dm
index 1400339a35..3d8accd02a 100644
--- a/code/game/objects/items/twohanded.dm
+++ b/code/game/objects/items/twohanded.dm
@@ -289,6 +289,8 @@
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 70)
resistance_flags = FIRE_PROOF
var/hacked = FALSE
+ /// Can this reflect all energy projectiles?
+ var/can_reflect = TRUE
var/brightness_on = 6 //TWICE AS BRIGHT AS A REGULAR ESWORD
var/list/possible_colors = list("red", "blue", "green", "purple")
var/list/rainbow_colors = list(LIGHT_COLOR_RED, LIGHT_COLOR_GREEN, LIGHT_COLOR_LIGHT_CYAN, LIGHT_COLOR_LAVENDER)
@@ -376,7 +378,7 @@
/obj/item/twohanded/dualsaber/run_block(mob/living/owner, real_attack, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
if(!wielded)
return NONE
- if(is_energy_reflectable_projectile(object) && (attack_type == ATTACK_TYPE_PROJECTILE))
+ if(can_reflect && is_energy_reflectable_projectile(object) && (attack_type == ATTACK_TYPE_PROJECTILE))
block_return[BLOCK_RETURN_REDIRECT_METHOD] = REDIRECT_METHOD_RETURN_TO_SENDER //no you
return BLOCK_SHOULD_REDIRECT | BLOCK_SUCCESS | BLOCK_REDIRECTED
return ..()
@@ -559,15 +561,13 @@
block_chance = 50
armour_penetration = 0
var/chaplain_spawnable = TRUE
+ can_reflect = FALSE
obj_flags = UNIQUE_RENAME
/obj/item/twohanded/dualsaber/hypereutactic/chaplain/ComponentInitialize()
. = ..()
AddComponent(/datum/component/anti_magic, TRUE, TRUE, FALSE, null, null, FALSE)
-/obj/item/twohanded/dualsaber/hypereutactic/chaplain/IsReflect()
- return FALSE
-
//spears
/obj/item/twohanded/spear
icon_state = "spearglass0"
@@ -905,7 +905,7 @@
owner.visible_message("[owner] deflects [attack_text] with [src]!")
playsound(src, pick('sound/weapons/bulletflyby.ogg', 'sound/weapons/bulletflyby2.ogg', 'sound/weapons/bulletflyby3.ogg'), 75, 1)
block_return[BLOCK_RETURN_REDIRECT_METHOD] = REDIRECT_METHOD_DEFLECT
- return BLOCK_SUCCESS | BLOCK_REDIRECT | BLOCK_SHOULD_REDIRECT | BLOCK_PHYSICAL_EXTERNAL
+ return BLOCK_SUCCESS | BLOCK_REDIRECTED | BLOCK_SHOULD_REDIRECT | BLOCK_PHYSICAL_EXTERNAL
else
owner.visible_message("[owner] parries [attack_text] with [src]!")
return BLOCK_SUCCESS | BLOCK_PARRY
diff --git a/code/modules/clothing/suits/reactive_armour.dm b/code/modules/clothing/suits/reactive_armour.dm
index c986ab617d..fb8d62e350 100644
--- a/code/modules/clothing/suits/reactive_armour.dm
+++ b/code/modules/clothing/suits/reactive_armour.dm
@@ -68,7 +68,7 @@
return BLOCK_NONE
return block_action(owner, real_attack, object, damage, attack_text, attack_type, armour_penetration, attacker, def_zone, final_block_chance, block_return)
-/obj/item/clothing/suit/armor/reactive/block_action(mob/living/owner, real_attack, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
+/obj/item/clothing/suit/armor/reactive/proc/block_action(mob/living/owner, real_attack, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
return BLOCK_NONE
//When the wearer gets hit, this armor will teleport the user a short distance away (to safety or to more danger, no one knows. That's the fun of it!)
diff --git a/code/modules/mob/living/carbon/carbon_block.dm b/code/modules/mob/living/carbon/carbon_block.dm
deleted file mode 100644
index 14d68f6ea7..0000000000
--- a/code/modules/mob/living/carbon/carbon_block.dm
+++ /dev/null
@@ -1,4 +0,0 @@
-/mob/living/carbon/get_blocking_items()
- . = ..()
- if(wear_suit)
- . += wear_suit
diff --git a/code/modules/mob/living/carbon/human/human_block.dm b/code/modules/mob/living/carbon/human/human_block.dm
index 946f21df07..c99942bf57 100644
--- a/code/modules/mob/living/carbon/human/human_block.dm
+++ b/code/modules/mob/living/carbon/human/human_block.dm
@@ -1,5 +1,7 @@
/mob/living/carbon/human/get_blocking_items()
. = ..()
+ if(wear_suit)
+ . += wear_suit)
if(w_uniform)
. += w_uniform
if(wear_neck)
diff --git a/code/modules/mob/living/living_block.dm b/code/modules/mob/living/living_block.dm
index ed9df96f4d..c5add29b86 100644
--- a/code/modules/mob/living/living_block.dm
+++ b/code/modules/mob/living/living_block.dm
@@ -47,7 +47,7 @@
/mob/living/proc/do_run_block(real_attack = TRUE, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, list/return_list = list())
// Component signal block runs have highest priority.. for now.
. = SEND_SIGNAL(src, COMSIG_LIVING_RUN_BLOCK, real_attack, object, damage, attack_text, attack_type, armour_penetration, attacker, def_zone, return_list)
- if(. & BLOCK_INTERRUPT_CHAIN)
+ if((. & BLOCK_SUCCESS) && !(. & BLOCK_CONTINUE_CHAIN))
return
var/list/obj/item/tocheck = get_blocking_items()
// i don't like this
@@ -57,7 +57,7 @@
var/final_block_chance = I.block_chance - (CLAMP((armour_penetration-I.armour_penetration)/2,0,100)) + block_chance_modifier //So armour piercing blades can still be parried by other blades, for example
var/results = I.run_block(src, real_attack, object, damage, attack_text, attack_type, armour_penetration, attacker, def_zone, final_block_chance, return_list)
. |= results
- if(results & BLOCK_INTERRUPT_CHAIN)
+ if((results & BLOCK_SUCCESS) && !(results & BLOCK_CONTINUE_CHAIN))
break
/// Gets an unsortedlist of objects to run block checks on.
@@ -74,10 +74,8 @@
var/block_chance = 0
/obj/item/proc/run_block(mob/living/owner, real_attack, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
-
-/obj/item/proc/_hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
- SEND_SIGNAL(src, COMSIG_ITEM_HIT_REACT, args)
+ SEND_SIGNAL(src, COMSIG_ITEM_RUN_BLOCK, args)
if(prob(final_block_chance))
owner.visible_message("[owner] blocks [attack_text] with [src]!")
- return 1
- return 0
+ return BLOCK_SUCCESS | BLOCK_PHYSICAL_EXTERNAL
+ return BLOCK_NONE
diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/legionnaire.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/legionnaire.dm
index 1bc9ea1e4e..1f5964b03d 100644
--- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/legionnaire.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/legionnaire.dm
@@ -12,7 +12,7 @@
* - Charges at the target after a telegraph, throwing them across the arena should it connect.
* - Legionnaire's head detaches, attacking as it's own entity. Has abilities of it's own later into the fight. Once dead, regenerates after a brief period. If the skill is used while the head is off, it will be killed.
* - Leaves a pile of bones at your location. Upon using this skill again, you'll swap locations with the bone pile.
- * - Spews a cloud of smoke from it's maw, wherever said maw is.
+ * - Spews a cloud of smoke from it's maw, wherever said maw is.
* A unique fight incorporating the head mechanic of legion into a whole new beast. Combatants will need to make sure the tag-team of head and body don't lure them into a deadly trap.
*/
@@ -44,35 +44,35 @@
/datum/action/innate/elite_attack/head_detach,
/datum/action/innate/elite_attack/bonfire_teleport,
/datum/action/innate/elite_attack/spew_smoke)
-
+
var/mob/living/simple_animal/hostile/asteroid/elite/legionnairehead/myhead = null
var/obj/structure/legionnaire_bonfire/mypile = null
var/has_head = TRUE
-
+
/datum/action/innate/elite_attack/legionnaire_charge
name = "Legionnaire Charge"
button_icon_state = "legionnaire_charge"
chosen_message = "You will attempt to grab your opponent and throw them."
chosen_attack_num = LEGIONNAIRE_CHARGE
-
+
/datum/action/innate/elite_attack/head_detach
name = "Release Head"
button_icon_state = "head_detach"
chosen_message = "You will now detach your head or kill it if it is already released."
chosen_attack_num = HEAD_DETACH
-
+
/datum/action/innate/elite_attack/bonfire_teleport
name = "Bonfire Teleport"
button_icon_state = "bonfire_teleport"
chosen_message = "You will leave a bonfire. Second use will let you swap positions with it indefintiely. Using this move on the same tile as your active bonfire removes it."
chosen_attack_num = BONFIRE_TELEPORT
-
+
/datum/action/innate/elite_attack/spew_smoke
name = "Spew Smoke"
button_icon_state = "spew_smoke"
chosen_message = "Your head will spew smoke in an area, wherever it may be."
chosen_attack_num = SPEW_SMOKE
-
+
/mob/living/simple_animal/hostile/asteroid/elite/legionnaire/OpenFire()
if(client)
switch(chosen_attack)
@@ -95,7 +95,7 @@
bonfire_teleport()
if(SPEW_SMOKE)
spew_smoke()
-
+
/mob/living/simple_animal/hostile/asteroid/elite/legionnaire/proc/legionnaire_charge(target)
ranged_cooldown = world.time + 50
var/dir_to_target = get_dir(get_turf(src), get_turf(target))
@@ -106,7 +106,7 @@
playsound(src,'sound/magic/demon_attack1.ogg', 200, 1)
visible_message("[src] prepares to charge!")
addtimer(CALLBACK(src, .proc/legionnaire_charge_2, dir_to_target, 0), 5)
-
+
/mob/living/simple_animal/hostile/asteroid/elite/legionnaire/proc/legionnaire_charge_2(var/move_dir, var/times_ran)
if(times_ran >= 4)
return
@@ -135,7 +135,7 @@
L.Stun(20) //substituting this for the Paralyze from the line above, because we don't have tg paralysis stuff
L.adjustBruteLoss(50)
addtimer(CALLBACK(src, .proc/legionnaire_charge_2, move_dir, (times_ran + 1)), 2)
-
+
/mob/living/simple_animal/hostile/asteroid/elite/legionnaire/proc/head_detach(target)
ranged_cooldown = world.time + 10
if(myhead != null)
@@ -159,11 +159,11 @@
else if(health < maxHealth * 0.5)
myhead.melee_damage_lower = 20
myhead.melee_damage_upper = 20
-
+
/mob/living/simple_animal/hostile/asteroid/elite/legionnaire/proc/onHeadDeath()
myhead = null
addtimer(CALLBACK(src, .proc/regain_head), 50)
-
+
/mob/living/simple_animal/hostile/asteroid/elite/legionnaire/proc/regain_head()
has_head = TRUE
if(stat == DEAD)
@@ -195,7 +195,7 @@
forceMove(pileturf)
visible_message("[src] forms from the bonfire!")
mypile.forceMove(legionturf)
-
+
/mob/living/simple_animal/hostile/asteroid/elite/legionnaire/proc/spew_smoke()
ranged_cooldown = world.time + 60
var/turf/T = null
@@ -212,7 +212,7 @@
var/datum/effect_system/smoke_spread/smoke = new
smoke.set_up(2, T)
smoke.start()
-
+
//The legionnaire's head. Basically the same as any legion head, but we have to tell our creator when we die so they can generate another head.
/mob/living/simple_animal/hostile/asteroid/elite/legionnairehead
name = "legionnaire head"
@@ -238,12 +238,12 @@
faction = list()
ranged = FALSE
var/mob/living/simple_animal/hostile/asteroid/elite/legionnaire/body = null
-
+
/mob/living/simple_animal/hostile/asteroid/elite/legionnairehead/death()
. = ..()
if(body)
body.onHeadDeath()
-
+
//The legionnaire's bonfire, which can be swapped positions with. Also sets flammable living beings on fire when they walk over it.
/obj/structure/legionnaire_bonfire
name = "bone pile"
@@ -257,20 +257,20 @@
light_range = 4
light_color = LIGHT_COLOR_RED
var/mob/living/simple_animal/hostile/asteroid/elite/legionnaire/myowner = null
-
-
+
+
/obj/structure/legionnaire_bonfire/Entered(atom/movable/mover, turf/target)
if(isliving(mover))
var/mob/living/L = mover
L.adjust_fire_stacks(3)
L.IgniteMob()
. = ..()
-
+
/obj/structure/legionnaire_bonfire/Destroy()
if(myowner != null)
myowner.mypile = null
. = ..()
-
+
//The visual effect which appears in front of legionnaire when he goes to charge.
/obj/effect/temp_visual/dragon_swoop/legionnaire
duration = 10
@@ -279,7 +279,7 @@
/obj/effect/temp_visual/dragon_swoop/legionnaire/Initialize()
. = ..()
transform *= 0.33
-
+
// Legionnaire's loot: Legionnaire Spine
/obj/item/crusher_trophy/legionnaire_spine
diff --git a/tgstation.dme b/tgstation.dme
index 246c27e6be..6c402f99aa 100755
--- a/tgstation.dme
+++ b/tgstation.dme
@@ -2208,7 +2208,6 @@
#include "code\modules\mob\living\brain\say.dm"
#include "code\modules\mob\living\brain\status_procs.dm"
#include "code\modules\mob\living\carbon\carbon.dm"
-#include "code\modules\mob\living\carbon\carbon_block.dm"
#include "code\modules\mob\living\carbon\carbon_defense.dm"
#include "code\modules\mob\living\carbon\carbon_defines.dm"
#include "code\modules\mob\living\carbon\carbon_movement.dm"