Files
Bubberstation/code/modules/admin/smites/ghost_control.dm
SkyratBot 40429f0bb4 [MIRROR] new smite: deadchat control [MDB IGNORE] (#19656)
* new smite: deadchat control (#73725)

## About The Pull Request

I played around with the deadchat control component for some stuff
downstream and then decided to turn it into a smite, something that is
harsh but really funny especially with all of the inputs that ghosts
have.

The emotes are ones that have the character do something, coordinated
spins and flips have their usual consequences probably, drop causes them
to drop their held items, fall causes them to fall over (and drop their
held items), throw makes them throw whatever item they are holding in
their active hand in a random direction, shove causes them to shove a
random person or mob around them, sit and stand make them buckle and
unbuckle themselves from a chair, and run and walk change their speed
intent. Seven second cooldown and on anarchy ruleset because it _is_ a
smite.

There is a large range of smites from the small pay docking to the
instant and absolute gib but it doesn't feel like there's a lot in for a
nuisance. This would give an option that lets all of the ghosts annoy
one person in particular as they struggle to play while ghosts interfere
with them and constantly make them drop their items and interfere with
their movements, which is obviously fun for the ghosts.

Also I personally think that it is very funny.

* new smite: deadchat control

---------

Co-authored-by: Sol N <116288367+flowercuco@users.noreply.github.com>
2023-03-04 19:44:05 +00:00

52 lines
2.2 KiB
Plaintext

/datum/smite/ghost_control
name = "Ghost Control"
/datum/smite/ghost_control/effect(client/user, mob/living/target)
target.AddComponent(/datum/component/deadchat_control/cardinal_movement, ANARCHY_MODE, list(
"clap" = CALLBACK(target, TYPE_PROC_REF(/mob, emote), "clap"),
"cry" = CALLBACK(target, TYPE_PROC_REF(/mob, emote), "cry"),
"flip" = CALLBACK(target, TYPE_PROC_REF(/mob, emote), "flip"),
"laugh" = CALLBACK(target, TYPE_PROC_REF(/mob, emote), "laugh"),
"scream" = CALLBACK(target, TYPE_PROC_REF(/mob, emote), "scream"),
"spin" = CALLBACK(target, TYPE_PROC_REF(/mob, emote), "spin"),
"swear" = CALLBACK(target, TYPE_PROC_REF(/mob, emote), "swear"),
"drop" = CALLBACK(target, TYPE_PROC_REF(/mob, drop_all_held_items)),
"fall" = CALLBACK(target, TYPE_PROC_REF(/mob/living, Knockdown), 1 SECONDS),
"stand" = CALLBACK(target, TYPE_PROC_REF(/mob/living, resist_buckle)),
"throw" = CALLBACK(target, TYPE_PROC_REF(/mob, throw_item), get_edge_target_turf(target, pick(GLOB.alldirs))),
"shove" = CALLBACK(src, PROC_REF(ghost_shove), target),
"sit" = CALLBACK(src, PROC_REF(ghost_sit), target),
"run" = CALLBACK(src, PROC_REF(ghost_speed), target, MOVE_INTENT_RUN),
"walk" = CALLBACK(src, PROC_REF(ghost_speed), target, MOVE_INTENT_WALK),
), 7 SECONDS)
to_chat(target, span_revenwarning("You feel a ghastly presence!!!"))
/datum/smite/ghost_control/proc/ghost_shove(mob/living/carbon/target)
if(!istype(target) || target.get_active_held_item())
return
var/list/shoveables = list()
for(var/mob/living/victim in orange(1, target))
shoveables += victim
if(!length(shoveables))
return
var/mob/living/shove_me = pick(shoveables)
target.UnarmedAttack(shove_me, proximity_flag = TRUE, modifiers = list("right" = TRUE))
/datum/smite/ghost_control/proc/ghost_sit(mob/living/target)
if(HAS_TRAIT(target, TRAIT_IMMOBILIZED))
return
var/list/chairs = list()
for(var/obj/structure/chair/possible_chair in range(1, target))
chairs += possible_chair
if(!length(chairs))
return
var/obj/structure/chair/sitting_chair = pick(chairs)
sitting_chair.buckle_mob(target, check_loc = FALSE)
/datum/smite/ghost_control/proc/ghost_speed(mob/living/target, new_speed)
if(target.m_intent == new_speed)
return
target.toggle_move_intent()