diff --git a/code/__DEFINES/combat.dm b/code/__DEFINES/combat.dm
index 95e8b12aede..f1754a9d111 100644
--- a/code/__DEFINES/combat.dm
+++ b/code/__DEFINES/combat.dm
@@ -82,11 +82,12 @@
//Attack types for checking shields/hit reactions
-#define MELEE_ATTACK 1
-#define UNARMED_ATTACK 2
-#define PROJECTILE_ATTACK 3
-#define THROWN_PROJECTILE_ATTACK 4
-#define LEAP_ATTACK 5
+#define ITEM_ATTACK (1 << 0)
+#define UNARMED_ATTACK (1 << 1)
+#define PROJECTILE_ATTACK (1 << 2)
+#define THROWN_PROJECTILE_ATTACK (1 << 3)
+#define LEAP_ATTACK (1 << 4)
+#define MELEE_ATTACKS (ITEM_ATTACK | THROWN_PROJECTILE_ATTACK | UNARMED_ATTACK | LEAP_ATTACK)
//attack visual effects
#define ATTACK_EFFECT_PUNCH "punch"
diff --git a/code/__DEFINES/dcs/signals.dm b/code/__DEFINES/dcs/signals.dm
index f6888aabfba..a532dcf669d 100644
--- a/code/__DEFINES/dcs/signals.dm
+++ b/code/__DEFINES/dcs/signals.dm
@@ -1167,6 +1167,11 @@
/// Return COMPONENT_NO_DEFAULT_MESSAGE to prevent the transforming component from displaying the default transform message / sound.
#define COMPONENT_NO_DEFAULT_MESSAGE (1<<0)
+///from base of /datum/element/after_attack/Attach(): (datum/sender, proc_ref)
+#define COMSIG_ITEM_REGISTER_AFTERATTACK "register_item_afterattack"
+///from base of /datum/element/after_attack/Detach(): (proc_ref)
+#define COMSIG_ITEM_UNREGISTER_AFTERATTACK "unregister_item_afterattack"
+
///From base of datum/controller/subsystem/Initialize
#define COMSIG_SUBSYSTEM_POST_INITIALIZE "subsystem_post_initialize"
diff --git a/code/__DEFINES/traits/sources.dm b/code/__DEFINES/traits/sources.dm
index 2ea56756bda..ead9c4fb389 100644
--- a/code/__DEFINES/traits/sources.dm
+++ b/code/__DEFINES/traits/sources.dm
@@ -48,6 +48,7 @@
#define MECHA_EQUIPMENT_TRAIT "mecha-equip"
#define HIS_GRACE_TRAIT "his-grace"
#define CHAINSAW_TRAIT "chainsaw-wield"
+#define CENTCOMM_RAPIER_TRAIT "centcomm_rapier"
#define PYRO_CLAWS_TRAIT "pyro-claws"
#define CONTRACTOR_BATON_TRAIT "contractor-baton"
#define MUZZLE_TRAIT "muzzle"
diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm
index 614df68f232..9685413c685 100644
--- a/code/_onclick/item_attack.dm
+++ b/code/_onclick/item_attack.dm
@@ -54,7 +54,7 @@
mark_target(target)
return .
- afterattack(target, user, TRUE, params)
+ afterattack(target, user, TRUE, params, .)
mark_target(target)
/// Used to mark a target for the demo system during a melee attack chain, call this before return
diff --git a/code/datums/action.dm b/code/datums/action.dm
index ed788259e25..415da08fa9f 100644
--- a/code/datums/action.dm
+++ b/code/datums/action.dm
@@ -566,6 +566,10 @@
var/obj/item/clothing/shoes/magboots/gravity/G = target
G.dash(usr)
+/datum/action/item_action/toggle_rapier_nodrop
+ name = "Toggle Anti-Drop"
+ desc = "Activates/deactivates CentComm rapier Anti-Drop."
+
///prset for organ actions
/datum/action/item_action/organ_action
check_flags = AB_CHECK_CONSCIOUS
diff --git a/code/datums/components/after_attacks_hub.dm b/code/datums/components/after_attacks_hub.dm
new file mode 100644
index 00000000000..3c0f8b6c91a
--- /dev/null
+++ b/code/datums/components/after_attacks_hub.dm
@@ -0,0 +1,43 @@
+/datum/component/after_attacks_hub
+ dupe_mode = COMPONENT_DUPE_UNIQUE
+ /// List of after-attack effects for various items
+ var/list/after_attacks
+
+/datum/component/after_attacks_hub/Initialize(...)
+ . = ..()
+ if(!isitem(parent))
+ return COMPONENT_INCOMPATIBLE
+
+
+/datum/component/after_attacks_hub/RegisterWithParent()
+ . = ..()
+ RegisterSignal(parent, COMSIG_ITEM_AFTERATTACK, PROC_REF(on_after_attack))
+ RegisterSignal(parent, COMSIG_ITEM_REGISTER_AFTERATTACK, PROC_REF(on_register_after_attack))
+ RegisterSignal(parent, COMSIG_ITEM_UNREGISTER_AFTERATTACK, PROC_REF(on_unregister_after_attack))
+
+
+/datum/component/after_attacks_hub/UnregisterFromParent()
+ . = ..()
+ UnregisterSignal(parent, list(
+ COMSIG_ITEM_AFTERATTACK,
+ COMSIG_ITEM_REGISTER_AFTERATTACK,
+ COMSIG_ITEM_UNREGISTER_AFTERATTACK
+ ))
+
+
+/datum/component/after_attacks_hub/proc/on_after_attack(datum/source, mob/living/target, mob/living/user, proximity, params, status)
+ SIGNAL_HANDLER
+ for(var/after_attack in after_attacks)
+ INVOKE_ASYNC(after_attack, TYPE_PROC_REF(/datum/element/after_attack, on_attack), source, target, user, proximity, params, status)
+
+
+/datum/component/after_attacks_hub/proc/on_register_after_attack(datum/source, datum/sender)
+ SIGNAL_HANDLER
+ LAZYADD(after_attacks, sender)
+
+
+/datum/component/after_attacks_hub/proc/on_unregister_after_attack(datum/source, datum/sender)
+ SIGNAL_HANDLER
+ LAZYREMOVE(after_attacks, sender)
+ if(!after_attacks)
+ qdel(src)
diff --git a/code/datums/elements/after_attack/_after_attack.dm b/code/datums/elements/after_attack/_after_attack.dm
new file mode 100644
index 00000000000..5255c1f1e72
--- /dev/null
+++ b/code/datums/elements/after_attack/_after_attack.dm
@@ -0,0 +1,39 @@
+/**
+ * Ancestor class for various post-attack effects. Requires /datum/component/after_attacks_hub for on_attack proc work
+ */
+
+/datum/element/after_attack
+ element_flags = ELEMENT_DETACH_ON_HOST_DESTROY|ELEMENT_BESPOKE
+ id_arg_index = 2
+ /// Does the effect differ between a block and a successful attack
+ var/has_block_different_effect = TRUE
+
+
+/datum/element/after_attack/Attach(datum/target)
+ . = ..()
+ target.AddComponent(/datum/component/after_attacks_hub)
+ SEND_SIGNAL(target, COMSIG_ITEM_REGISTER_AFTERATTACK, src)
+
+/datum/element/after_attack/Detach(datum/source, force)
+ SEND_SIGNAL(source, COMSIG_ITEM_UNREGISTER_AFTERATTACK, src)
+ . = ..()
+
+/datum/element/after_attack/proc/on_attack(datum/source, mob/living/target, mob/living/user, proximity, params, status)
+ SIGNAL_HANDLER
+
+ if(!status)
+ return
+
+ if(!has_block_different_effect || ATTACK_CHAIN_SUCCESS_CHECK(status))
+ on_success(source, target, user, proximity, params)
+ return
+
+ on_block(source, target, user, proximity, params)
+
+
+/datum/element/after_attack/proc/on_success(datum/source, mob/living/target, mob/living/user, proximity, params)
+ return
+
+
+/datum/element/after_attack/proc/on_block(datum/source, mob/living/target, mob/living/user, proximity, params)
+ return
diff --git a/code/datums/elements/after_attack/attack_effect_sleep.dm b/code/datums/elements/after_attack/attack_effect_sleep.dm
new file mode 100644
index 00000000000..f1fddb12a45
--- /dev/null
+++ b/code/datums/elements/after_attack/attack_effect_sleep.dm
@@ -0,0 +1,28 @@
+/datum/element/after_attack/attack_effect_sleep
+ /// How much stamina damage we deal on a successful hit against a living, non-cyborg mob.
+ var/stamina_damage
+ /// How long will the victim sleep.
+ var/sleep_time
+
+
+/datum/element/after_attack/attack_effect_sleep/Attach(datum/target, stamina_damage, sleep_time)
+ . = ..()
+ src.stamina_damage = stamina_damage
+ src.sleep_time = sleep_time
+
+
+
+/datum/element/after_attack/attack_effect_sleep/on_success(datum/source, mob/living/target, mob/living/user, proximity, params)
+ ..()
+
+ if(!target || !user || !istype(target))
+ return
+
+ if(target.incapacitated(INC_IGNORE_RESTRAINED|INC_IGNORE_GRABBED))
+ target.visible_message(
+ span_danger("[user] puts [target] to sleep with [source]!"),
+ span_userdanger("You suddenly feel very drowsy!"),
+ )
+ target.Sleeping(sleep_time)
+ add_attack_logs(user, target, "put to sleep with [source]")
+ target.apply_damage(stamina_damage, STAMINA)
diff --git a/code/datums/outfits/outfit_admin.dm b/code/datums/outfits/outfit_admin.dm
index e1cc9345db1..6d88b312dc1 100644
--- a/code/datums/outfits/outfit_admin.dm
+++ b/code/datums/outfits/outfit_admin.dm
@@ -271,7 +271,7 @@
uniform = /obj/item/clothing/under/rank/centcom/captain
back = /obj/item/storage/backpack/satchel
- belt = /obj/item/gun/energy/pulse/pistol
+ belt = /obj/item/storage/belt/rapier/centcomm
gloves = /obj/item/clothing/gloves/color/white
shoes = /obj/item/clothing/shoes/centcom
head = /obj/item/clothing/head/beret/centcom/captain
@@ -281,6 +281,7 @@
pda = /obj/item/pda/centcom
backpack_contents = list(
/obj/item/storage/box/centcomofficer = 1,
+ /obj/item/gun/energy/pulse/pistol = 1,
/obj/item/implanter/death_alarm = 1
)
implants = list(
diff --git a/code/game/gamemodes/cult/cult_items.dm b/code/game/gamemodes/cult/cult_items.dm
index ac612935898..5b816cdee38 100644
--- a/code/game/gamemodes/cult/cult_items.dm
+++ b/code/game/gamemodes/cult/cult_items.dm
@@ -539,7 +539,7 @@
* If they are blocked, and the shield has an illusion charge, an illusion will be spawned at src.
* The illusion has a 60% chance to be hostile and attack non-cultists, and a 40% chance to just run away from the user.
*/
-/obj/item/shield/mirror/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
+/obj/item/shield/mirror/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = ITEM_ATTACK)
if(iscultist(owner)) // Cultist holding the shield
// Hit by a projectile
@@ -673,7 +673,7 @@
playsound(T, 'sound/effects/glassbr3.ogg', 100)
qdel(src)
-/obj/item/twohanded/cult_spear/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
+/obj/item/twohanded/cult_spear/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = ITEM_ATTACK)
if(wielded)
final_block_chance *= 2
if(prob(final_block_chance))
diff --git a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm
index 9c5a4e62bfe..6ae4169dcaf 100644
--- a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm
+++ b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm
@@ -97,7 +97,7 @@
M.name_override = null
M.regenerate_icons()
-/obj/item/clothing/suit/armor/abductor/vest/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
+/obj/item/clothing/suit/armor/abductor/vest/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = ITEM_ATTACK)
DeactivateStealth()
/obj/item/clothing/suit/armor/abductor/vest/IsReflect()
diff --git a/code/game/gamemodes/steal_items.dm b/code/game/gamemodes/steal_items.dm
index 6ba72ae6e2d..1a3c1fd8fe7 100644
--- a/code/game/gamemodes/steal_items.dm
+++ b/code/game/gamemodes/steal_items.dm
@@ -135,7 +135,7 @@ GLOBAL_LIST_INIT(ungibbable_items_types, get_ungibbable_items_types())
/datum/theft_objective/highrisk/captains_rapier
id = "cap_rapier"
name = "the captain's rapier"
- typepath = /obj/item/melee/rapier
+ typepath = /obj/item/melee/rapier/captain
protected_jobs = list(JOB_TITLE_CAPTAIN)
/datum/theft_objective/highrisk/hoslaser
diff --git a/code/game/jobs/job/central.dm b/code/game/jobs/job/central.dm
index 6bb152419de..ba29114705e 100644
--- a/code/game/jobs/job/central.dm
+++ b/code/game/jobs/job/central.dm
@@ -130,6 +130,7 @@
jobtype = /datum/job/ntspecops/supreme
suit = /obj/item/clothing/suit/space/deathsquad/officer/supreme
+ belt = /obj/item/storage/belt/rapier/centcomm
head = /obj/item/clothing/head/helmet/space/deathsquad/beret/supreme
shoes = /obj/item/clothing/shoes/cowboy/white
gloves = /obj/item/clothing/gloves/color/white
diff --git a/code/game/machinery/computer/HolodeckControl.dm b/code/game/machinery/computer/HolodeckControl.dm
index 877a70eefbd..49218e2674f 100644
--- a/code/game/machinery/computer/HolodeckControl.dm
+++ b/code/game/machinery/computer/HolodeckControl.dm
@@ -457,7 +457,7 @@
..()
item_color = "red"
-/obj/item/holo/esword/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
+/obj/item/holo/esword/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = ITEM_ATTACK)
if(active)
return ..()
return 0
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index fa6fcfcf307..32e0d6d9e49 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -115,6 +115,7 @@ GLOBAL_DATUM_INIT(fire_overlay, /mutable_appearance, mutable_appearance('icons/g
var/breakouttime = 0
var/block_chance = 0
+ var/block_type = ALL
var/hit_reaction_chance = 0 //If you want to have something unrelated to blocking/armour piercing etc. Maybe not needed, but trying to think ahead/allow more freedom
// Needs to be in /obj/item because corgis can wear a lot of
@@ -339,8 +340,8 @@ GLOBAL_DATUM_INIT(fire_overlay, /mutable_appearance, mutable_appearance('icons/g
..()
-/obj/item/proc/afterattack(atom/target, mob/user, proximity, params)
- SEND_SIGNAL(src, COMSIG_ITEM_AFTERATTACK, target, user, proximity, params)
+/obj/item/proc/afterattack(atom/target, mob/user, proximity, params, status)
+ SEND_SIGNAL(src, COMSIG_ITEM_AFTERATTACK, target, user, proximity, params, status)
/obj/item/attack_hand(mob/user, pickupfireoverride = FALSE)
@@ -504,7 +505,9 @@ GLOBAL_DATUM_INIT(fire_overlay, /mutable_appearance, mutable_appearance('icons/g
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)
+/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 = ITEM_ATTACK)
+ if (!block_type || !(block_type & attack_type))
+ final_block_chance = 0
var/signal_result = (SEND_SIGNAL(src, COMSIG_ITEM_HIT_REACT, owner, hitby, damage, attack_type) & COMPONENT_BLOCK_SUCCESSFUL) + prob(final_block_chance)
if(signal_result != 0)
owner.visible_message(span_danger("[owner] blocks [attack_text] with [src]!"))
diff --git a/code/game/objects/items/devices/handheld_defib.dm b/code/game/objects/items/devices/handheld_defib.dm
index 58185d80dda..100623c8900 100644
--- a/code/game/objects/items/devices/handheld_defib.dm
+++ b/code/game/objects/items/devices/handheld_defib.dm
@@ -58,7 +58,7 @@
if(istype(I, /obj/item/clothing/suit/space) && !shield_ignore)
if(istype(I, /obj/item/clothing/suit/space/hardsuit))
var/obj/item/clothing/suit/space/hardsuit/hardsuit = I
- blocked = hardsuit.hit_reaction(user, src, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
+ blocked = hardsuit.hit_reaction(user, src, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = ITEM_ATTACK)
if(cooldown)
to_chat(user, span_warning("[src] is still charging!"))
return .
diff --git a/code/game/objects/items/misc.dm b/code/game/objects/items/misc.dm
index 0dde70ba48f..4e66a737e79 100644
--- a/code/game/objects/items/misc.dm
+++ b/code/game/objects/items/misc.dm
@@ -59,7 +59,7 @@
if(used)
. += span_warning("Something sinister is strapped to this card. It looks like it was once masked with some sort of cloaking field, which is now nonfunctional.")
-/obj/item/syndicate_reverse_card/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
+/obj/item/syndicate_reverse_card/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = ITEM_ATTACK)
if(attack_type != PROJECTILE_ATTACK)
return FALSE //this means the attack goes through
if(istype(hitby, /obj/item/projectile))
diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm
index 53fc83c9673..09caf9813b9 100644
--- a/code/game/objects/items/robot/robot_items.dm
+++ b/code/game/objects/items/robot/robot_items.dm
@@ -12,7 +12,7 @@
/obj/item/borg/stun/attack(mob/living/carbon/human/target, mob/living/silicon/robot/user, params, def_zone, skip_attack_anim = FALSE)
. = ATTACK_CHAIN_PROCEED
- if(ishuman(target) && target.check_shields(src, 0, "[target]'s [name]", MELEE_ATTACK))
+ if(ishuman(target) && target.check_shields(src, 0, "[target]'s [name]", ITEM_ATTACK))
playsound(target, 'sound/weapons/genhit.ogg', 50, TRUE)
return .
diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm
index bc7fa32481f..cab66d86a78 100644
--- a/code/game/objects/items/toys.dm
+++ b/code/game/objects/items/toys.dm
@@ -252,7 +252,7 @@
sharp_when_wielded = FALSE // It's a toy
needs_permit = FALSE
-/obj/item/twohanded/dualsaber/toy/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
+/obj/item/twohanded/dualsaber/toy/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = ITEM_ATTACK)
return 0
/obj/item/twohanded/dualsaber/toy/IsReflect()
diff --git a/code/game/objects/items/weapons/batons.dm b/code/game/objects/items/weapons/batons.dm
index 5461694c555..3c63c05d746 100644
--- a/code/game/objects/items/weapons/batons.dm
+++ b/code/game/objects/items/weapons/batons.dm
@@ -103,7 +103,7 @@
if(ishuman(target))
var/mob/living/carbon/human/human_target = target
- if(human_target.check_shields(src, 0, "[user]'s [name]", MELEE_ATTACK))
+ if(human_target.check_shields(src, 0, "[user]'s [name]", ITEM_ATTACK))
return BATON_ATTACK_DONE
if(check_martial_counter(target, user))
return BATON_ATTACK_DONE
diff --git a/code/game/objects/items/weapons/flamethrower.dm b/code/game/objects/items/weapons/flamethrower.dm
index 2317e7e0a66..ae8b3524b8c 100644
--- a/code/game/objects/items/weapons/flamethrower.dm
+++ b/code/game/objects/items/weapons/flamethrower.dm
@@ -261,7 +261,7 @@
create_with_tank = TRUE
-/obj/item/flamethrower/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
+/obj/item/flamethrower/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = ITEM_ATTACK)
var/obj/item/projectile/P = hitby
if(ptank && damage && attack_type == PROJECTILE_ATTACK && P.damage_type != STAMINA && prob(15))
owner.visible_message("[attack_text] hits the fueltank on [owner]'s [src], rupturing it! What a shot!")
diff --git a/code/game/objects/items/weapons/grenades/chem_grenade.dm b/code/game/objects/items/weapons/grenades/chem_grenade.dm
index 2a11feb5d67..550f4fe8e7f 100644
--- a/code/game/objects/items/weapons/grenades/chem_grenade.dm
+++ b/code/game/objects/items/weapons/grenades/chem_grenade.dm
@@ -136,7 +136,7 @@
addtimer(CALLBACK(src, PROC_REF(prime), user), det_time)
-/obj/item/grenade/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
+/obj/item/grenade/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = ITEM_ATTACK)
var/obj/item/projectile/P = hitby
if(damage && attack_type == PROJECTILE_ATTACK && P.damage_type != STAMINA && prob(15))
owner.visible_message("[attack_text] hits [owner]'s [src], setting it off! What a shot!")
diff --git a/code/game/objects/items/weapons/holy_weapons.dm b/code/game/objects/items/weapons/holy_weapons.dm
index 7174ca0b6e2..b72d118bb2b 100644
--- a/code/game/objects/items/weapons/holy_weapons.dm
+++ b/code/game/objects/items/weapons/holy_weapons.dm
@@ -183,17 +183,13 @@
w_class = WEIGHT_CLASS_BULKY
slot_flags = ITEM_SLOT_BELT|ITEM_SLOT_BACK
block_chance = 30
+ block_type = MELEE_ATTACKS
sharp = TRUE
embed_chance = 20
embedded_ignore_throwspeed_threshold = TRUE
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
-/obj/item/nullrod/claymore/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
- if(attack_type == PROJECTILE_ATTACK)
- final_block_chance = 0 //Don't bring a sword to a gunfight
- return ..()
-
/obj/item/nullrod/claymore/darkblade
name = "dark blade"
icon_state = "cultblade"
diff --git a/code/game/objects/items/weapons/melee/energy.dm b/code/game/objects/items/weapons/melee/energy.dm
index 0fd12ef7f8d..619ac098e63 100644
--- a/code/game/objects/items/weapons/melee/energy.dm
+++ b/code/game/objects/items/weapons/melee/energy.dm
@@ -134,7 +134,7 @@
if(item_color == null)
item_color = pick("red", "blue", "green", "purple", "yellow", "pink", "darkblue", "orange")
-/obj/item/melee/energy/sword/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
+/obj/item/melee/energy/sword/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = ITEM_ATTACK)
if(active)
return ..()
return 0
@@ -173,7 +173,7 @@
..()
item_color = null
-/obj/item/melee/energy/sword/cyborg/saw/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
+/obj/item/melee/energy/sword/cyborg/saw/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = ITEM_ATTACK)
return 0
/obj/item/melee/energy/sword/saber
@@ -241,7 +241,7 @@
update_icon(UPDATE_ICON_STATE)
-/obj/item/melee/energy/sword/saber/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
+/obj/item/melee/energy/sword/saber/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = ITEM_ATTACK)
if(!active)
return FALSE
. = ..()
diff --git a/code/game/objects/items/weapons/melee/misc.dm b/code/game/objects/items/weapons/melee/misc.dm
index 2f1a63e1f9d..7738eeb1277 100644
--- a/code/game/objects/items/weapons/melee/misc.dm
+++ b/code/game/objects/items/weapons/melee/misc.dm
@@ -28,10 +28,10 @@
return OXYLOSS
/obj/item/melee/rapier
- name = "captain's rapier"
- desc = "An elegant weapon, for a more civilized age."
- icon_state = "rapier"
- item_state = "rapier"
+ name = "rapier"
+ desc = "If you see this, it means there's a bug."
+ icon_state = "rods-1"
+ item_state = "rods"
flags = CONDUCT
force = 15
throwforce = 10
@@ -47,49 +47,56 @@
materials = list(MAT_METAL = 1000)
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF // Theft targets should be hard to destroy
-/obj/item/melee/rapier/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
- if(attack_type == PROJECTILE_ATTACK)
- final_block_chance = 0 //Don't bring a sword to a gunfight
- return ..()
+/obj/item/melee/rapier/captain
+ name = "captain's rapier"
+ desc = "An elegant weapon, for a more civilized age."
+ icon_state = "rapier"
+ item_state = "rapier"
+ block_type = MELEE_ATTACKS
-/obj/item/melee/syndie_rapier
+/obj/item/melee/rapier/syndie
name = "plastitanium rapier"
desc = "A thin blade made of plastitanium with a diamond tip. It appears to be coated in a persistent layer of an unknown substance."
icon_state = "syndie_rapier"
item_state = "syndie_rapier"
- flags = CONDUCT
- force = 15
- throwforce = 10
- w_class = WEIGHT_CLASS_BULKY
- block_chance = 50
- armour_penetration = 75
- sharp = TRUE
origin_tech = "combat=5;biotech=5;syndicate=4"
- attack_verb = list("lunged at", "stabbed")
- pickup_sound = 'sound/items/handling/knife_pickup.ogg'
- drop_sound = 'sound/items/handling/knife_drop.ogg'
- hitsound = 'sound/weapons/rapierhit.ogg'
+ materials = null
resistance_flags = FIRE_PROOF | ACID_PROOF
- /// How much stamina damage we deal on a successful hit against a living, non-cyborg mob.
- var/stamina_damage = 30
-/obj/item/melee/syndie_rapier/attack(mob/living/target, mob/living/user, params, def_zone, skip_attack_anim = FALSE)
+/obj/item/melee/rapier/syndie/ComponentInitialize()
+ AddElement(/datum/element/after_attack/attack_effect_sleep, 30, 10 SECONDS)
+
+
+/obj/item/melee/rapier/centcomm
+ name = "centcomm plastitanium rapier"
+ desc = "Симбиоз непозволительной роскоши и статуса с титановым лезвием на вашем поясе, обладатель этого шедевра оружейного дела может похвастаться тем, что постиг корпоративную вершину."
+ icon_state = "centcomm_rapier"
+ item_state = "centcomm_rapier"
+ origin_tech = "combat=5;biotech=5;syndicate=4"
+ materials = null
+ force = 25
+ throwforce = 20
+ block_chance = 95
+ armour_penetration = 100
+ actions_types = list(/datum/action/item_action/toggle_rapier_nodrop)
+
+/obj/item/melee/rapier/centcomm/ComponentInitialize()
+ AddElement(/datum/element/after_attack/attack_effect_sleep, 100, 10 SECONDS)
+
+
+/obj/item/melee/rapier/centcomm/attack_self(mob/user)
. = ..()
- if(!ATTACK_CHAIN_SUCCESS_CHECK(.))
- return .
- syndie_rapier_effect(target, user)
+ if(!usr.is_in_hands(src))
+ return .
-/obj/item/melee/syndie_rapier/proc/syndie_rapier_effect(mob/living/target, mob/living/user)
- if(target.incapacitated(INC_IGNORE_RESTRAINED|INC_IGNORE_GRABBED))
- target.visible_message(
- span_danger("[user] puts [target] to sleep with [src]!"),
- span_userdanger("You suddenly feel very drowsy!"),
- )
- target.Sleeping(10 SECONDS)
- add_attack_logs(user, target, "put to sleep with [src]")
- target.apply_damage(stamina_damage, STAMINA)
+ if(HAS_TRAIT_FROM(src, TRAIT_NODROP, CENTCOMM_RAPIER_TRAIT))
+ REMOVE_TRAIT(src, TRAIT_NODROP, CENTCOMM_RAPIER_TRAIT)
+ to_chat(usr, span_warning("Вы расслабляете руку и отпускаете рукоятку [src]."))
+ else
+ ADD_TRAIT(src, TRAIT_NODROP, CENTCOMM_RAPIER_TRAIT)
+ to_chat(usr, span_warning("Вы сжимаете рукоятку [src] со всей силы. Теперь ничто не может выбить у вас оружие из рук!"))
/obj/item/melee/mantisblade
@@ -168,14 +175,10 @@
force = 15
armour_penetration = 20
block_chance = 20
+ block_type = MELEE_ATTACKS
icon_state = "mantis"
item_state = "mantis"
-/obj/item/melee/mantisblade/shellguard/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
- if(attack_type == PROJECTILE_ATTACK)
- final_block_chance = 0 //Don't bring a sword to a gunfight
- return ..()
-
/obj/item/melee/icepick
name = "ice pick"
desc = "Used for chopping ice. Also excellent for mafia esque murders."
diff --git a/code/game/objects/items/weapons/shields.dm b/code/game/objects/items/weapons/shields.dm
index 3da5e81ced1..9451a19cd47 100644
--- a/code/game/objects/items/weapons/shields.dm
+++ b/code/game/objects/items/weapons/shields.dm
@@ -5,7 +5,7 @@
obj_integrity = 380
max_integrity = 380
-/obj/item/shield/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
+/obj/item/shield/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = ITEM_ATTACK)
if(attack_type == THROWN_PROJECTILE_ATTACK)
final_block_chance += 30
. = ..()
@@ -106,7 +106,7 @@
attack_verb = list("shoved", "bashed")
var/active = 0
-/obj/item/shield/energy/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
+/obj/item/shield/energy/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = ITEM_ATTACK)
if(istype(hitby, /obj/item/projectile))
var/obj/item/projectile/P = hitby
if(P.shield_buster && active)
@@ -174,7 +174,7 @@
max_integrity = 360
var/active = 0
-/obj/item/shield/riot/tele/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
+/obj/item/shield/riot/tele/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = ITEM_ATTACK)
if(active)
return ..()
return FALSE
diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm
index 5ba4e787901..5d168990141 100644
--- a/code/game/objects/items/weapons/storage/belt.dm
+++ b/code/game/objects/items/weapons/storage/belt.dm
@@ -687,11 +687,11 @@
storage_slots = 1
w_class = WEIGHT_CLASS_BULKY
max_w_class = WEIGHT_CLASS_BULKY
- can_hold = list(/obj/item/melee/rapier)
+ can_hold = list(/obj/item/melee/rapier/captain)
/obj/item/storage/belt/rapier/populate_contents()
- new /obj/item/melee/rapier(src)
- update_icon()
+ new /obj/item/melee/rapier/captain(src)
+ update_appearance(UPDATE_ICON_STATE)
/obj/item/storage/belt/rapier/attack_hand(mob/user)
if(loc != user)
@@ -734,12 +734,22 @@
desc = "A sinister, thin sheath, suitable for a rapier."
icon_state = "syndie_sheath"
item_state = "syndie_sheath"
- can_hold = list(/obj/item/melee/syndie_rapier)
+ can_hold = list(/obj/item/melee/rapier/syndie)
/obj/item/storage/belt/rapier/syndie/populate_contents()
- new /obj/item/melee/syndie_rapier(src)
- update_icon()
-
+ new /obj/item/melee/rapier/syndie(src)
+ update_appearance(UPDATE_ICON_STATE)
+
+/obj/item/storage/belt/rapier/centcomm
+ name = "centcomm rapier sheath"
+ desc = "Украшенные ножны, корпоративный кич в комплекте."
+ icon_state = "centcomm_sheath"
+ item_state = "centcomm_sheath"
+ can_hold = list(/obj/item/melee/rapier/centcomm)
+
+/obj/item/storage/belt/rapier/centcomm/populate_contents()
+ new /obj/item/melee/rapier/centcomm(src)
+ update_appearance(UPDATE_ICON_STATE)
// -------------------------------------
// Bluespace Belt
diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm
index aba610b78c4..9c6eb1c2b7b 100644
--- a/code/game/objects/items/weapons/twohanded.dm
+++ b/code/game/objects/items/weapons/twohanded.dm
@@ -282,7 +282,7 @@
sleep(1)
-/obj/item/twohanded/dualsaber/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
+/obj/item/twohanded/dualsaber/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = ITEM_ATTACK)
if(HAS_TRAIT(src, TRAIT_WIELDED))
return ..()
return FALSE
@@ -571,7 +571,7 @@
armour_penetration = 100
force_on = 30
-/obj/item/twohanded/required/chainsaw/doomslayer/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
+/obj/item/twohanded/required/chainsaw/doomslayer/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = ITEM_ATTACK)
if(attack_type == PROJECTILE_ATTACK)
owner.visible_message("Ranged attacks just make [owner] angrier!")
playsound(src, pick('sound/weapons/bulletflyby.ogg','sound/weapons/bulletflyby2.ogg','sound/weapons/bulletflyby3.ogg'), 75, 1)
diff --git a/code/game/objects/items/weapons/weaponry.dm b/code/game/objects/items/weapons/weaponry.dm
index 4fc3850c869..2d9b7ef9f96 100644
--- a/code/game/objects/items/weapons/weaponry.dm
+++ b/code/game/objects/items/weapons/weaponry.dm
@@ -240,7 +240,7 @@
desc = "This thing looks dangerous... Dangerously good at baseball, that is."
homerun_able = 1
-/obj/item/melee/baseball_bat/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
+/obj/item/melee/baseball_bat/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = ITEM_ATTACK)
. = ..()
if(!isitem(hitby) || attack_type != THROWN_PROJECTILE_ATTACK)
return FALSE
diff --git a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm
index c42d962ce5a..ea305843f97 100644
--- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm
+++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm
@@ -455,7 +455,7 @@
new stack_type(get_turf(loc))
qdel(src)
-/obj/item/chair/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
+/obj/item/chair/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = ITEM_ATTACK)
if(attack_type == UNARMED_ATTACK && prob(hit_reaction_chance))
owner.visible_message(span_danger("[owner] fends off [attack_text] with [src]!"))
return TRUE
diff --git a/code/modules/antagonists/changeling/powers/mutations.dm b/code/modules/antagonists/changeling/powers/mutations.dm
index dccd19ec70b..b3c07167e2b 100644
--- a/code/modules/antagonists/changeling/powers/mutations.dm
+++ b/code/modules/antagonists/changeling/powers/mutations.dm
@@ -160,6 +160,7 @@
force = 45
armour_penetration = -30
block_chance = 50
+ block_type = MELEE_ATTACKS
hitsound = 'sound/weapons/bladeslice.ogg'
throwforce = 0 //Just to be on the safe side
throw_range = 0
@@ -181,13 +182,7 @@
parent_action.UnregisterSignal(parent_action.owner, COMSIG_MOB_WEAPON_APPEARS)
parent_action = null
return ..()
-
-
-/obj/item/melee/arm_blade/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
- if(attack_type == PROJECTILE_ATTACK)
- final_block_chance = 0 //only blocks melee
- return ..()
-
+
/obj/item/melee/arm_blade/afterattack(atom/target, mob/user, proximity, params)
if(!proximity)
@@ -602,7 +597,7 @@
span_italics("You hear organic matter ripping and tearing!"))
-/obj/item/shield/changeling/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
+/obj/item/shield/changeling/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = ITEM_ATTACK)
if(remaining_uses < 1)
if(ishuman(loc))
var/mob/living/carbon/human/user = loc
diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm
index 17f35f85b3d..0ff06e93599 100644
--- a/code/modules/clothing/clothing.dm
+++ b/code/modules/clothing/clothing.dm
@@ -1231,7 +1231,7 @@ BLIND // can't see anything
SPECIES_PLASMAMAN = 'icons/mob/clothing/species/plasmaman/neck.dmi'
)
-/obj/item/clothing/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
+/obj/item/clothing/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = ITEM_ATTACK)
if(!teleportation)
return ..()
if(prob(5))
diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm
index ea9c153d168..90ba49e6345 100644
--- a/code/modules/clothing/suits/armor.dm
+++ b/code/modules/clothing/suits/armor.dm
@@ -396,7 +396,7 @@
desc = "Someone seperated our Research Director from his own head!"
var/tele_range = 2
-/obj/item/clothing/suit/armor/reactive/teleport/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
+/obj/item/clothing/suit/armor/reactive/teleport/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = ITEM_ATTACK)
if(!active)
return 0
if(prob(hit_reaction_chance))
@@ -425,7 +425,7 @@
/obj/item/clothing/suit/armor/reactive/fire
name = "reactive incendiary armor"
-/obj/item/clothing/suit/armor/reactive/fire/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
+/obj/item/clothing/suit/armor/reactive/fire/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = ITEM_ATTACK)
if(!active)
return 0
if(prob(hit_reaction_chance))
@@ -441,7 +441,7 @@
/obj/item/clothing/suit/armor/reactive/stealth
name = "reactive stealth armor"
-/obj/item/clothing/suit/armor/reactive/stealth/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
+/obj/item/clothing/suit/armor/reactive/stealth/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = ITEM_ATTACK)
if(!active)
return 0
if(prob(hit_reaction_chance))
@@ -458,7 +458,7 @@
/obj/item/clothing/suit/armor/reactive/tesla
name = "reactive tesla armor"
-/obj/item/clothing/suit/armor/reactive/tesla/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
+/obj/item/clothing/suit/armor/reactive/tesla/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = ITEM_ATTACK)
if(!active)
return 0
if(prob(hit_reaction_chance))
diff --git a/code/modules/clothing/under/color.dm b/code/modules/clothing/under/color.dm
index a642377da36..3f29aa2cf86 100644
--- a/code/modules/clothing/under/color.dm
+++ b/code/modules/clothing/under/color.dm
@@ -77,7 +77,7 @@
name = "ancient jumpsuit"
desc = "A terribly ragged and frayed grey jumpsuit. It looks like it hasn't been washed in over a decade."
-/obj/item/clothing/under/color/grey/glorf/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
+/obj/item/clothing/under/color/grey/glorf/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = ITEM_ATTACK)
owner.forcesay(GLOB.hit_appends)
return 0
diff --git a/code/modules/clothing/under/jobs/civilian.dm b/code/modules/clothing/under/jobs/civilian.dm
index 61390798f23..12cc402ee60 100644
--- a/code/modules/clothing/under/jobs/civilian.dm
+++ b/code/modules/clothing/under/jobs/civilian.dm
@@ -106,7 +106,7 @@
. = ..()
AddComponent(/datum/component/squeak, list('sound/items/bikehorn.ogg'), 50, falloff_exponent = 20) //die off quick please
-/obj/item/clothing/under/rank/clown/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
+/obj/item/clothing/under/rank/clown/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = ITEM_ATTACK)
if(ishuman(loc))
var/mob/living/carbon/human/H = loc
if(H.mind && H.mind.assigned_role == JOB_TITLE_CLOWN)
diff --git a/code/modules/clothing/upgrade_modules/hardsuit_taser_proof_module/hardsuit.dm b/code/modules/clothing/upgrade_modules/hardsuit_taser_proof_module/hardsuit.dm
index b77850202fb..b82604c92f8 100644
--- a/code/modules/clothing/upgrade_modules/hardsuit_taser_proof_module/hardsuit.dm
+++ b/code/modules/clothing/upgrade_modules/hardsuit_taser_proof_module/hardsuit.dm
@@ -8,7 +8,7 @@
taser_proof.hardsuit = src
-/obj/item/clothing/suit/space/hardsuit/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
+/obj/item/clothing/suit/space/hardsuit/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = ITEM_ATTACK)
if(taser_proof)
var/blocked = taser_proof.hit_reaction(owner, hitby, attack_text, final_block_chance, damage, attack_type)
if(blocked)
diff --git a/code/modules/clothing/upgrade_modules/hardsuit_taser_proof_module/hardsuit_taser_proof.dm b/code/modules/clothing/upgrade_modules/hardsuit_taser_proof_module/hardsuit_taser_proof.dm
index 51a7d99be6c..7d202270690 100644
--- a/code/modules/clothing/upgrade_modules/hardsuit_taser_proof_module/hardsuit_taser_proof.dm
+++ b/code/modules/clothing/upgrade_modules/hardsuit_taser_proof_module/hardsuit_taser_proof.dm
@@ -31,7 +31,7 @@
for(var/I in 1 to 7)
new /obj/item/hardsuit_taser_proof/ert_locked(src)
-/obj/item/hardsuit_taser_proof/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
+/obj/item/hardsuit_taser_proof/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = ITEM_ATTACK)
if(!hardsuit)
return FALSE
if(!hardsuit.suit_adjusted)
diff --git a/code/modules/customitems/item_defines.dm b/code/modules/customitems/item_defines.dm
index 1155be7aee1..cb5b6bf4768 100644
--- a/code/modules/customitems/item_defines.dm
+++ b/code/modules/customitems/item_defines.dm
@@ -144,7 +144,7 @@
force = 5
sharp = 0
-/obj/item/claymore/fluff/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
+/obj/item/claymore/fluff/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = ITEM_ATTACK)
return 0
/obj/item/fluff/rsik_katana //Xydonus: Rsik Ugsharki Atan
diff --git a/code/modules/martial_arts/martial.dm b/code/modules/martial_arts/martial.dm
index 33f65f06d6a..1391ac128b3 100644
--- a/code/modules/martial_arts/martial.dm
+++ b/code/modules/martial_arts/martial.dm
@@ -588,7 +588,7 @@
target.apply_damage(25, BRAIN)
-/obj/item/twohanded/bostaff/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
+/obj/item/twohanded/bostaff/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = ITEM_ATTACK)
if(HAS_TRAIT(src, TRAIT_WIELDED))
return ..()
return FALSE
diff --git a/code/modules/mini_games/thunderdome/gamemodes/gamemode.dm b/code/modules/mini_games/thunderdome/gamemodes/gamemode.dm
index 09c7ccb5f9c..e8a3c3e15a9 100644
--- a/code/modules/mini_games/thunderdome/gamemodes/gamemode.dm
+++ b/code/modules/mini_games/thunderdome/gamemodes/gamemode.dm
@@ -21,7 +21,7 @@
brawler_type = /obj/effect/mob_spawn/human/thunderdome/cqc
random_items_count = 2
item_pool = list(
- /obj/item/melee/rapier = 1,
+ /obj/item/melee/rapier/captain = 1,
/obj/item/melee/energy/axe = 1,
/obj/item/melee/energy/sword/saber/red = 1,
/obj/item/melee/energy/cleaving_saw = 1,
@@ -137,7 +137,7 @@
/obj/item/storage/box/thunderdome/crossbow/energy = 1,
/obj/item/storage/box/thunderdome/laser_eyes = 1,
/obj/item/implanter/adrenalin = 1,
- /obj/item/melee/rapier = 1,
+ /obj/item/melee/rapier/captain = 1,
/obj/item/melee/energy/axe = 1,
/obj/item/melee/energy/sword/saber/red = 1,
/obj/item/melee/energy/cleaving_saw = 1,
diff --git a/code/modules/mining/lavaland/loot/ashdragon_loot.dm b/code/modules/mining/lavaland/loot/ashdragon_loot.dm
index 512256ec66e..0de7bbb7c58 100644
--- a/code/modules/mining/lavaland/loot/ashdragon_loot.dm
+++ b/code/modules/mining/lavaland/loot/ashdragon_loot.dm
@@ -109,7 +109,7 @@
return ..()
-/obj/item/melee/ghost_sword/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
+/obj/item/melee/ghost_sword/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = ITEM_ATTACK)
var/ghost_counter = ghost_check()
final_block_chance += clamp((ghost_counter * 5), 0, 75)
owner.visible_message("[owner] is protected by a ring of [ghost_counter] ghosts!")
diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm
index b968957242a..fc39e9d2714 100644
--- a/code/modules/mining/lavaland/necropolis_chests.dm
+++ b/code/modules/mining/lavaland/necropolis_chests.dm
@@ -416,6 +416,7 @@
force = 15
armour_penetration = 15
block_chance = 50
+ block_type = MELEE_ATTACKS
sharp = TRUE
w_class = WEIGHT_CLASS_HUGE
attack_verb = list("attack", "slash", "stab", "slice", "tear", "lacerate", "rip", "dice", "cut")
@@ -454,12 +455,6 @@
user.changeNext_move(CLICK_CD_RAPID)
return ..()
-
-/obj/item/cursed_katana/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
- if(attack_type == PROJECTILE_ATTACK)
- final_block_chance = 0 //Don't bring a sword to a gunfight
- return ..()
-
/obj/item/cursed_katana/proc/can_combo_attack(mob/user, mob/living/target)
return target.stat != DEAD && target != user
diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm
index e64d6a958a6..280575f747b 100644
--- a/code/modules/mob/living/carbon/human/human_defense.dm
+++ b/code/modules/mob/living/carbon/human/human_defense.dm
@@ -226,7 +226,7 @@ emp_act
//End Here
-/mob/living/carbon/human/proc/check_shields(atom/AM, damage, attack_text = "the attack", attack_type = MELEE_ATTACK, armour_penetration = 0, shields_penetration = 0)
+/mob/living/carbon/human/proc/check_shields(atom/AM, damage, attack_text = "the attack", attack_type = ITEM_ATTACK, armour_penetration = 0, shields_penetration = 0)
var/block_chance_modifier = round(damage / -3) - shields_penetration
var/is_crawling = (body_position == LYING_DOWN)
if(l_hand && !isclothing(l_hand))
@@ -472,7 +472,7 @@ emp_act
stack_trace("Human somehow has no chest bodypart.")
return ATTACK_CHAIN_BLOCKED_ALL
- if(user != src && check_shields(I, I.force, "the [I.name]", MELEE_ATTACK, I.armour_penetration))
+ if(user != src && check_shields(I, I.force, "the [I.name]", ITEM_ATTACK, I.armour_penetration))
return ATTACK_CHAIN_BLOCKED
if(check_martial_art_defense(src, user, I, span_warning("[src] blocks [I]!")))
@@ -724,7 +724,7 @@ emp_act
. = ..()
if(.)
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
- if(check_shields(M, damage, "the [M.name]", MELEE_ATTACK, M.armour_penetration))
+ if(check_shields(M, damage, "the [M.name]", ITEM_ATTACK, M.armour_penetration))
return FALSE
var/dam_zone = pick(
BODY_ZONE_CHEST,
diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/prince.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/prince.dm
index 6cf941f78d2..3ba28037902 100644
--- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/prince.dm
+++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/prince.dm
@@ -51,7 +51,7 @@
if(prob(delimb_chance))
if(L.stat != DEAD) //no dismemberment for dead carbons, less griefy
do_attack_animation(L)
- if(L.check_shields(src, 25, "[name]", MELEE_ATTACK, armour_penetration))
+ if(L.check_shields(src, 25, "[name]", ITEM_ATTACK, armour_penetration))
return FALSE
L.adjustBruteLoss(25)
L.Weaken(2 SECONDS)
diff --git a/code/modules/projectiles/guns/magic/staff.dm b/code/modules/projectiles/guns/magic/staff.dm
index b3deb196027..8b6744f62ec 100644
--- a/code/modules/projectiles/guns/magic/staff.dm
+++ b/code/modules/projectiles/guns/magic/staff.dm
@@ -85,10 +85,6 @@
force = 25
armour_penetration = 75
block_chance = 50
+ block_type = MELEE_ATTACKS
sharp = 1
max_charges = 4
-
-/obj/item/gun/magic/staff/spellblade/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
- if(attack_type == PROJECTILE_ATTACK)
- final_block_chance = 0
- return ..()
diff --git a/icons/mob/clothing/belt.dmi b/icons/mob/clothing/belt.dmi
index 97ce3b7021c..6820c77b78d 100644
Binary files a/icons/mob/clothing/belt.dmi and b/icons/mob/clothing/belt.dmi differ
diff --git a/icons/mob/inhands/equipment/belt_lefthand.dmi b/icons/mob/inhands/equipment/belt_lefthand.dmi
index 82236de0892..50a169099a2 100644
Binary files a/icons/mob/inhands/equipment/belt_lefthand.dmi and b/icons/mob/inhands/equipment/belt_lefthand.dmi differ
diff --git a/icons/mob/inhands/equipment/belt_righthand.dmi b/icons/mob/inhands/equipment/belt_righthand.dmi
index b33914100a4..6dda06c470a 100644
Binary files a/icons/mob/inhands/equipment/belt_righthand.dmi and b/icons/mob/inhands/equipment/belt_righthand.dmi differ
diff --git a/icons/mob/inhands/items_lefthand.dmi b/icons/mob/inhands/items_lefthand.dmi
index 5791d81ba5e..67176d21153 100755
Binary files a/icons/mob/inhands/items_lefthand.dmi and b/icons/mob/inhands/items_lefthand.dmi differ
diff --git a/icons/mob/inhands/items_righthand.dmi b/icons/mob/inhands/items_righthand.dmi
index e53c0a54891..f88f6125abb 100755
Binary files a/icons/mob/inhands/items_righthand.dmi and b/icons/mob/inhands/items_righthand.dmi differ
diff --git a/icons/obj/clothing/belts.dmi b/icons/obj/clothing/belts.dmi
index 6d52d2f74dc..a35a3952dbc 100644
Binary files a/icons/obj/clothing/belts.dmi and b/icons/obj/clothing/belts.dmi differ
diff --git a/icons/obj/items.dmi b/icons/obj/items.dmi
index 12b434271ad..886b6f3fd37 100644
Binary files a/icons/obj/items.dmi and b/icons/obj/items.dmi differ
diff --git a/paradise.dme b/paradise.dme
index 4685bd29f11..0bebe8fb46a 100644
--- a/paradise.dme
+++ b/paradise.dme
@@ -420,6 +420,7 @@
#include "code\datums\cinematics\narsie_summon.dm"
#include "code\datums\cinematics\nuke_cinematics.dm"
#include "code\datums\components\_component.dm"
+#include "code\datums\components\after_attacks_hub.dm"
#include "code\datums\components\aura_healing.dm"
#include "code\datums\components\boomerang.dm"
#include "code\datums\components\boss_music.dm"
@@ -543,6 +544,8 @@
#include "code\datums\elements\strippable.dm"
#include "code\datums\elements\turf_transparency.dm"
#include "code\datums\elements\waddling.dm"
+#include "code\datums\elements\after_attack\_after_attack.dm"
+#include "code\datums\elements\after_attack\attack_effect_sleep.dm"
#include "code\datums\emote\emote.dm"
#include "code\datums\emote\emote_verbs.dm"
#include "code\datums\helper_datums\construction_datum.dm"