diff --git a/code/game/gamemodes/vampire/vampire_helpers.dm b/code/game/gamemodes/vampire/vampire_helpers.dm index d3e268fac10..bc0d48fe63c 100644 --- a/code/game/gamemodes/vampire/vampire_helpers.dm +++ b/code/game/gamemodes/vampire/vampire_helpers.dm @@ -171,6 +171,8 @@ sight |= SEE_MOBS + verbs += /mob/living/carbon/human/proc/grapple + /mob/proc/vampire_stop_frenzy(var/force_stop = 0) var/datum/vampire/vampire = mind.vampire @@ -187,6 +189,8 @@ visible_message("[src.name]'s eyes no longer glow with violent rage, their form reverting to resemble that of a normal human's.", "The beast within you retreats. You gain control over your body once more.") + verbs -= /mob/living/carbon/human/proc/grapple + // Removes all vampire powers. /mob/proc/remove_vampire_powers() if (!mind || !mind.vampire) diff --git a/code/game/gamemodes/vampire/vampire_powers.dm b/code/game/gamemodes/vampire/vampire_powers.dm index 17a2f5c6dd1..bdfa514a1b4 100644 --- a/code/game/gamemodes/vampire/vampire_powers.dm +++ b/code/game/gamemodes/vampire/vampire_powers.dm @@ -858,3 +858,71 @@ T.vampire_check_frenzy() vampire.status &= ~VAMP_DRAINING + +// Grapple a victim by leaping onto them. +/mob/living/carbon/human/proc/grapple() + set category = "Vampire" + set name = "Grapple" + set desc = "Lunge towards a target like an animal, and grapple them." + + if (status_flags & LEAPING) + return + + if (stat || paralysis || stunned || weakened || lying || restrained() || buckled) + src << "You cannot lean in your current state." + return + + var/list/targets = list() + for (var/mob/living/carbon/human/H in view(4, src)) + targets += H + + targets -= src + + if (!targets.len) + src << "No valid targets visible or in range." + return + + var/mob/living/carbon/human/T = pick(targets) + + visible_message("[src.name] leaps at [T]!") + throw_at(get_step(get_turf(T), get_turf(src)), 4, 1, src) + + status_flags |= LEAPING + + sleep(5) + + if (status_flags & LEAPING) + status_flags &= ~LEAPING + + if (!src.Adjacent(T)) + src << "You miss!" + return + + T.Weaken(3) + + admin_attack_log(src, T, "lept at and grappled [key_name(T)]", "was lept at and grappled by [key_name(src)]", "lept at and grappled") + + var/use_hand = "left" + if (l_hand) + if (r_hand) + src << "You need to have one hand free to grab someone." + return + else + use_hand = "right" + + src.visible_message("\The [src] seizes [T] aggressively!") + + var/obj/item/weapon/grab/G = new(src, T) + if (use_hand == "left") + l_hand = G + else + r_hand = G + + G.state = GRAB_AGGRESSIVE + G.icon_state = "grabbed1" + G.synch() + + verbs -= /mob/living/carbon/human/proc/grapple + spawn(800) + if (mind.vampire && (mind.vampire.status & VAMP_FRENZIED)) + verbs += /mob/living/carbon/human/proc/grapple