diff --git a/code/datums/status_effects/buffs.dm b/code/datums/status_effects/buffs.dm index 1273e1642a2..4c7c01d5c29 100644 --- a/code/datums/status_effects/buffs.dm +++ b/code/datums/status_effects/buffs.dm @@ -455,18 +455,22 @@ status_type = STATUS_EFFECT_REPLACE show_duration = TRUE alert_type = null + ///What speed datum do we apply? + var/move_datum = /datum/movespeed_modifier/status_speed_boost /datum/status_effect/speed_boost/on_creation(mob/living/new_owner, set_duration) if(isnum(set_duration)) duration = set_duration + new_owner.do_alert_animation() + playsound(new_owner, 'sound/machines/chime.ogg', 50, FALSE, -5) . = ..() /datum/status_effect/speed_boost/on_apply() - owner.add_movespeed_modifier(/datum/movespeed_modifier/status_speed_boost, update = TRUE) + owner.add_movespeed_modifier(move_datum, update = TRUE) return ..() /datum/status_effect/speed_boost/on_remove() - owner.remove_movespeed_modifier(/datum/movespeed_modifier/status_speed_boost, update = TRUE) + owner.remove_movespeed_modifier(move_datum, update = TRUE) /datum/movespeed_modifier/status_speed_boost multiplicative_slowdown = -1 diff --git a/code/game/objects/items/melee/misc.dm b/code/game/objects/items/melee/misc.dm index cfd1885e07f..b6622384883 100644 --- a/code/game/objects/items/melee/misc.dm +++ b/code/game/objects/items/melee/misc.dm @@ -4,7 +4,7 @@ /obj/item/melee/chainofcommand name = "chain of command" - desc = "A tool used by great men to placate the frothing masses." + desc = "A tool used by great men to placate the frothing masses. Can be used to hasten allies with right-click." icon = 'icons/obj/weapons/whip.dmi' icon_state = "chain" inhand_icon_state = "chain" @@ -24,11 +24,42 @@ attack_verb_simple = list("flog", "whip", "lash", "discipline") hitsound = 'sound/items/weapons/chainhit.ogg' custom_materials = list(/datum/material/iron = HALF_SHEET_MATERIAL_AMOUNT) + ///Does this chain allow you to speed people up with right click? + var/can_hasten = TRUE /obj/item/melee/chainofcommand/suicide_act(mob/living/user) user.visible_message(span_suicide("[user] is strangling [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit suicide!")) return OXYLOSS +/obj/item/melee/chainofcommand/attack_secondary(mob/living/victim, mob/living/user, list/modifiers, list/attack_modifiers) + . = ..() + + if(. == SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN) + return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN + + if(victim == user) + to_chat(user, span_warning("You consider lashing yourself, but hesitate at the thought of how much it would hurt.")) + return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN + + playsound(victim, 'sound/items/weapons/whip.ogg', 50, TRUE, -1) + victim.apply_status_effect(/datum/status_effect/speed_boost/commanded) + return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN + +/datum/status_effect/speed_boost/commanded + id = "commanded" + status_type = STATUS_EFFECT_REFRESH + alert_type = /atom/movable/screen/alert/status_effect/commanded + move_datum = /datum/movespeed_modifier/status_speed_boost/minor + duration = 7 SECONDS + +/datum/movespeed_modifier/status_speed_boost/minor + multiplicative_slowdown = -0.20 + +/atom/movable/screen/alert/status_effect/commanded + name = "Commanded" + desc = "You are inspired to move faster!" + icon_state = "commanded" + /obj/item/melee/synthetic_arm_blade name = "synthetic arm blade" desc = "A grotesque blade that on closer inspection seems to be made out of synthetic flesh, it still feels like it would hurt very badly as a weapon." diff --git a/code/game/objects/items/weaponry.dm b/code/game/objects/items/weaponry.dm index 0c9b1d2cb3b..802ea57f914 100644 --- a/code/game/objects/items/weaponry.dm +++ b/code/game/objects/items/weaponry.dm @@ -840,6 +840,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 icon_state = "tailwhip" inhand_icon_state = "tailwhip" item_flags = NONE + can_hasten = FALSE /obj/item/melee/chainofcommand/tailwhip/kitty name = "cat o' nine tails" diff --git a/icons/hud/screen_alert.dmi b/icons/hud/screen_alert.dmi index d7a288212b6..1d1f3ff79c0 100755 Binary files a/icons/hud/screen_alert.dmi and b/icons/hud/screen_alert.dmi differ