mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-09 16:05:07 +00:00
The chain of command boosts action speed and not just move speed. (#92964)
## About The Pull Request Most contributors do not know or forget that we also have action speed modifiers (which are a tremendous copypasta tbh) and not just move speed modifiers. This is probably just another example of this. Also the item had an unused variable, no context tips and didn't have an attack animation, a balloon alert or a chat message when performing the action, only a whip sound. Also gave the chain of command its own file. ## Why It's Good For The Game I think it makes sense for the chain of command to hasten someone in ways other than just running one's legs. Also it's kinda more effective at boosting action speed because `do_after` actions are not as frequent as moving the mob in any direction at all. ## Changelog 🆑 balance: The secondary action of the chain of command (the chained whip) also boosts action speed and not just move speed. qol: The chain of command now has contextual tip for its secondary action, and plays the whip attack animation when it's done. /🆑
This commit is contained in:
@@ -476,6 +476,7 @@
|
||||
alert_type = null
|
||||
///What speed datum do we apply?
|
||||
var/move_datum = /datum/movespeed_modifier/status_speed_boost
|
||||
var/action_datum = null
|
||||
|
||||
/datum/status_effect/speed_boost/on_creation(mob/living/new_owner, set_duration)
|
||||
if(isnum(set_duration))
|
||||
@@ -485,11 +486,17 @@
|
||||
. = ..()
|
||||
|
||||
/datum/status_effect/speed_boost/on_apply()
|
||||
owner.add_movespeed_modifier(move_datum, update = TRUE)
|
||||
if(move_datum)
|
||||
owner.add_movespeed_modifier(move_datum, update = TRUE)
|
||||
if(action_datum)
|
||||
owner.add_actionspeed_modifier(action_datum, update = TRUE)
|
||||
return ..()
|
||||
|
||||
/datum/status_effect/speed_boost/on_remove()
|
||||
owner.remove_movespeed_modifier(move_datum, update = TRUE)
|
||||
if(move_datum)
|
||||
owner.remove_movespeed_modifier(move_datum, update = TRUE)
|
||||
if(action_datum)
|
||||
owner.remove_actionspeed_modifier(action_datum, update = TRUE)
|
||||
|
||||
/datum/movespeed_modifier/status_speed_boost
|
||||
multiplicative_slowdown = -1
|
||||
|
||||
82
code/game/objects/items/melee/chainofcommand.dm
Normal file
82
code/game/objects/items/melee/chainofcommand.dm
Normal file
@@ -0,0 +1,82 @@
|
||||
/obj/item/melee/chainofcommand
|
||||
name = "chain of command"
|
||||
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"
|
||||
worn_icon_state = "whip"
|
||||
icon_angle = -90
|
||||
lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi'
|
||||
obj_flags = CONDUCTS_ELECTRICITY
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
force = 10
|
||||
throwforce = 7
|
||||
demolition_mod = 0.25
|
||||
wound_bonus = 15
|
||||
exposed_wound_bonus = 10
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
attack_verb_continuous = list("flogs", "whips", "lashes", "disciplines")
|
||||
attack_verb_simple = list("flog", "whip", "lash", "discipline")
|
||||
hitsound = 'sound/items/weapons/chainhit.ogg'
|
||||
custom_materials = list(/datum/material/iron = HALF_SHEET_MATERIAL_AMOUNT)
|
||||
|
||||
/obj/item/melee/chainofcommand/Initialize(mapload)
|
||||
. = ..()
|
||||
register_item_context()
|
||||
|
||||
/obj/item/melee/chainofcommand/add_item_context(obj/item/source, list/context, atom/target, mob/living/user)
|
||||
. = NONE
|
||||
if(isliving(target))
|
||||
context[SCREENTIP_CONTEXT_RMB] = "Hasten"
|
||||
return CONTEXTUAL_SCREENTIP_SET
|
||||
|
||||
/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
|
||||
|
||||
user.do_attack_animation(victim)
|
||||
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/commanded
|
||||
duration = 7 SECONDS
|
||||
|
||||
/datum/movespeed_modifier/status_speed_boost/commanded
|
||||
multiplicative_slowdown = -0.20
|
||||
|
||||
/datum/actionspeed_modifier/commanded
|
||||
multiplicative_slowdown = -0.65
|
||||
|
||||
/atom/movable/screen/alert/status_effect/commanded
|
||||
name = "Commanded"
|
||||
desc = "You are inspired to do things faster!"
|
||||
icon_state = "commanded"
|
||||
|
||||
/obj/item/melee/chainofcommand/tailwhip
|
||||
name = "liz o' nine tails"
|
||||
desc = "A whip fashioned from the severed tails of lizards."
|
||||
icon_state = "tailwhip"
|
||||
inhand_icon_state = "tailwhip"
|
||||
item_flags = NONE
|
||||
|
||||
/obj/item/melee/chainofcommand/tailwhip/kitty
|
||||
name = "cat o' nine tails"
|
||||
desc = "A whip fashioned from the severed tails of cats."
|
||||
icon_state = "catwhip"
|
||||
inhand_icon_state = "catwhip"
|
||||
@@ -3,64 +3,6 @@
|
||||
abstract_type = /obj/item/melee
|
||||
item_flags = NEEDS_PERMIT
|
||||
|
||||
/obj/item/melee/chainofcommand
|
||||
name = "chain of command"
|
||||
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"
|
||||
worn_icon_state = "whip"
|
||||
icon_angle = -90
|
||||
lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi'
|
||||
obj_flags = CONDUCTS_ELECTRICITY
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
force = 10
|
||||
throwforce = 7
|
||||
demolition_mod = 0.25
|
||||
wound_bonus = 15
|
||||
exposed_wound_bonus = 10
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
attack_verb_continuous = list("flogs", "whips", "lashes", "disciplines")
|
||||
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."
|
||||
|
||||
@@ -834,20 +834,6 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
|
||||
attack_verb_continuous = list("clubs", "bludgeons")
|
||||
attack_verb_simple = list("club", "bludgeon")
|
||||
|
||||
/obj/item/melee/chainofcommand/tailwhip
|
||||
name = "liz o' nine tails"
|
||||
desc = "A whip fashioned from the severed tails of lizards."
|
||||
icon_state = "tailwhip"
|
||||
inhand_icon_state = "tailwhip"
|
||||
item_flags = NONE
|
||||
can_hasten = FALSE
|
||||
|
||||
/obj/item/melee/chainofcommand/tailwhip/kitty
|
||||
name = "cat o' nine tails"
|
||||
desc = "A whip fashioned from the severed tails of cats."
|
||||
icon_state = "catwhip"
|
||||
inhand_icon_state = "catwhip"
|
||||
|
||||
/obj/item/melee/skateboard
|
||||
name = "skateboard"
|
||||
desc = "A skateboard. It can be placed on its wheels and ridden, or used as a radical weapon."
|
||||
|
||||
@@ -2730,6 +2730,7 @@
|
||||
#include "code\game\objects\items\kirby_plants\organic_plants.dm"
|
||||
#include "code\game\objects\items\kirby_plants\synthetic_plants.dm"
|
||||
#include "code\game\objects\items\melee\baton.dm"
|
||||
#include "code\game\objects\items\melee\chainofcommand.dm"
|
||||
#include "code\game\objects\items\melee\energy.dm"
|
||||
#include "code\game\objects\items\melee\misc.dm"
|
||||
#include "code\game\objects\items\rcd\RCD.dm"
|
||||
|
||||
Reference in New Issue
Block a user