diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm index fc7b19d5d3f..4febea0344a 100644 --- a/code/__DEFINES/mobs.dm +++ b/code/__DEFINES/mobs.dm @@ -896,3 +896,12 @@ GLOBAL_LIST_INIT(human_body_parts, list(BODY_ZONE_HEAD, ///Filter name for illusion impacts #define ILLUSION_HIT_FILTER "illusion_hit_filter" + +#define WARRIOR_PUNCH_SLOWDOWN 3 +#define WARRIOR_PUNCH_STAGGER 3 +#define WARRIOR_PUNCH_EMPOWER_MULTIPLIER 1.8 +#define WARRIOR_PUNCH_GRAPPLED_DAMAGE_MULTIPLIER 1.8 +#define WARRIOR_PUNCH_GRAPPLED_DEBUFF_MULTIPLIER 1.5 +#define WARRIOR_PUNCH_GRAPPLED_PARALYZE 0.5 SECONDS +#define WARRIOR_PUNCH_KNOCKBACK_DISTANCE 1 +#define WARRIOR_PUNCH_KNOCKBACK_SPEED 1 diff --git a/code/game/atoms/_atom.dm b/code/game/atoms/_atom.dm index 0a1644d8792..c922cc32c54 100644 --- a/code/game/atoms/_atom.dm +++ b/code/game/atoms/_atom.dm @@ -978,3 +978,7 @@ directive is properly returned. ///By default, if this happens then movement stops. But not necessarily. /atom/proc/post_crush_act(mob/living/carbon/xenomorph/charger, datum/action/ability/xeno_action/ready_charge/charge_datum) return PRECRUSH_STOPPED + +/// Handles anything that should happen when the Warrior's punch hits any atom. +/atom/proc/punch_act(mob/living/carbon/xenomorph/xeno, punch_damage, push = TRUE) + return TRUE diff --git a/code/game/objects/machinery.dm b/code/game/objects/machinery.dm index db6780065eb..a5544594f8d 100644 --- a/code/game/objects/machinery.dm +++ b/code/game/objects/machinery.dm @@ -449,3 +449,19 @@ . = ..() if(CHECK_BITFIELD(S.smoke_traits, SMOKE_XENO_ACID)) take_damage(10 * S.strength, BURN, ACID) + +/obj/machinery/punch_act(mob/living/carbon/xenomorph/xeno, punch_damage, ...) + xeno.do_attack_animation(src, ATTACK_EFFECT_YELLOWPUNCH) + xeno.do_attack_animation(src, ATTACK_EFFECT_DISARM2) + if(!(resistance_flags & UNACIDABLE) || resistance_flags & XENO_DAMAGEABLE) // If it's acidable or we can't acid it but it has the xeno damagable flag, we can damage it + attack_generic(xeno, punch_damage * 4, BRUTE, effects = FALSE) + playsound(src, pick('sound/effects/bang.ogg','sound/effects/metal_crash.ogg','sound/effects/meteorimpact.ogg'), 50, 1) + Shake(duration = 0.5 SECONDS) + if(!(machine_stat & PANEL_OPEN)) + machine_stat |= PANEL_OPEN + if(wires) + var/allcut = wires.is_all_cut() + if(!allcut) + wires.cut_all() + update_appearance() + return TRUE diff --git a/code/game/objects/machinery/camera/camera.dm b/code/game/objects/machinery/camera/camera.dm index fa52eec5d2e..00fdd581dbf 100644 --- a/code/game/objects/machinery/camera/camera.dm +++ b/code/game/objects/machinery/camera/camera.dm @@ -277,6 +277,14 @@ user.see_in_dark = 2 return TRUE +/obj/machinery/camera/punch_act(...) + . = ..() + var/datum/effect_system/spark_spread/sparks = new + sparks.set_up(2, 0, src) + sparks.attach(src) + sparks.start() + deactivate() + /obj/machinery/camera/autoname light_range = 1 light_power = 0.2 diff --git a/code/game/objects/machinery/computer/computer.dm b/code/game/objects/machinery/computer/computer.dm index 9f4c02ca665..bf824ef29ab 100644 --- a/code/game/objects/machinery/computer/computer.dm +++ b/code/game/objects/machinery/computer/computer.dm @@ -221,3 +221,7 @@ xeno_attacker.do_attack_animation(src, ATTACK_EFFECT_DISARM2) //SFX playsound(loc, pick('sound/effects/bang.ogg','sound/effects/metal_crash.ogg','sound/effects/meteorimpact.ogg'), 25, 1) //SFX Shake(duration = 0.5 SECONDS) + +/obj/machinery/computer/punch_act(...) + set_disabled() // Currently only computers use this; falcon punch away its density. + return ..() diff --git a/code/game/objects/machinery/vending/vending.dm b/code/game/objects/machinery/vending/vending.dm index 6a6b7966872..d26262b8afe 100644 --- a/code/game/objects/machinery/vending/vending.dm +++ b/code/game/objects/machinery/vending/vending.dm @@ -798,6 +798,11 @@ span_xenowarning("We slam [src] into the ground!")) return PRECRUSH_PLOWED +/obj/machinery/vending/punch_act(...) + . = ..() + if(tipped_level < 2) + tip_over() + #undef CAT_NORMAL #undef CAT_HIDDEN #undef CAT_COIN diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index e75e3a1bb0e..ff11335af18 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -194,3 +194,11 @@ . = ..() if(CHECK_BITFIELD(S.smoke_traits, SMOKE_XENO_ACID)) take_damage(10 * S.strength, BURN, ACID) + +/obj/structure/punch_act(mob/living/carbon/xenomorph/xeno, punch_damage, ...) + . = ..() + xeno.do_attack_animation(src, ATTACK_EFFECT_YELLOWPUNCH) + xeno.do_attack_animation(src, ATTACK_EFFECT_DISARM2) + attack_alien(xeno, punch_damage * 4, BRUTE, effects = FALSE) + playsound(src, pick('sound/effects/bang.ogg','sound/effects/metal_crash.ogg','sound/effects/meteorimpact.ogg'), 50, 1) + Shake(duration = 0.5 SECONDS) diff --git a/code/modules/mob/living/carbon/xenomorph/castes/warrior/abilities_warrior.dm b/code/modules/mob/living/carbon/xenomorph/castes/warrior/abilities_warrior.dm index a7ff5ea682c..26dbc36d1e4 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/warrior/abilities_warrior.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/warrior/abilities_warrior.dm @@ -457,14 +457,6 @@ // *************************************** // *********** Punch // *************************************** -#define WARRIOR_PUNCH_SLOWDOWN 3 -#define WARRIOR_PUNCH_STAGGER 3 -#define WARRIOR_PUNCH_EMPOWER_MULTIPLIER 1.8 // RU TGMC EDIT -#define WARRIOR_PUNCH_GRAPPLED_DAMAGE_MULTIPLIER 1.8 -#define WARRIOR_PUNCH_GRAPPLED_DEBUFF_MULTIPLIER 1.5 -#define WARRIOR_PUNCH_GRAPPLED_PARALYZE 0.5 SECONDS -#define WARRIOR_PUNCH_KNOCKBACK_DISTANCE 1 // in tiles -#define WARRIOR_PUNCH_KNOCKBACK_SPEED 1 /datum/action/ability/activable/xeno/warrior/punch name = "Punch" @@ -543,108 +535,6 @@ return FALSE return TRUE -/// Handles anything that should happen when the Warrior's punch hits any atom. -/atom/proc/punch_act(mob/living/carbon/xenomorph/xeno, punch_damage, push = TRUE) - return TRUE - -/obj/machinery/punch_act(mob/living/carbon/xenomorph/xeno, punch_damage, ...) - xeno.do_attack_animation(src, ATTACK_EFFECT_YELLOWPUNCH) - xeno.do_attack_animation(src, ATTACK_EFFECT_DISARM2) - if(!(resistance_flags & UNACIDABLE) || resistance_flags & XENO_DAMAGEABLE) // If it's acidable or we can't acid it but it has the xeno damagable flag, we can damage it - attack_generic(xeno, punch_damage * 4, BRUTE, effects = FALSE) - playsound(src, pick('sound/effects/bang.ogg','sound/effects/metal_crash.ogg','sound/effects/meteorimpact.ogg'), 50, 1) - Shake(duration = 0.5 SECONDS) - if(!(machine_stat & PANEL_OPEN)) - machine_stat |= PANEL_OPEN - if(wires) - var/allcut = wires.is_all_cut() - if(!allcut) - wires.cut_all() - //update_appearance() - return TRUE - -/obj/machinery/computer/punch_act(...) - set_disabled() // Currently only computers use this; falcon punch away its density. - return ..() - -/obj/machinery/light/punch_act(mob/living/carbon/xenomorph/xeno, ...) - . = ..() - attack_alien(xeno) - -/obj/machinery/camera/punch_act(...) - . = ..() - var/datum/effect_system/spark_spread/sparks = new - sparks.set_up(2, 0, src) - sparks.attach(src) - sparks.start() - deactivate() - -/obj/machinery/power/apc/punch_act(...) - . = ..() - beenhit += 4 // Break it open instantly. - //update_appearance() - -/obj/machinery/vending/punch_act(...) - . = ..() - if(tipped_level < 2) - tip_over() - -/obj/structure/punch_act(mob/living/carbon/xenomorph/xeno, punch_damage, ...) - . = ..() - xeno.do_attack_animation(src, ATTACK_EFFECT_YELLOWPUNCH) - xeno.do_attack_animation(src, ATTACK_EFFECT_DISARM2) - attack_alien(xeno, punch_damage * 4, BRUTE, effects = FALSE) - playsound(src, pick('sound/effects/bang.ogg','sound/effects/metal_crash.ogg','sound/effects/meteorimpact.ogg'), 50, 1) - Shake(duration = 0.5 SECONDS) - -/obj/vehicle/punch_act(mob/living/carbon/xenomorph/xeno, punch_damage, ...) - . = ..() - xeno.do_attack_animation(src, ATTACK_EFFECT_YELLOWPUNCH) - xeno.do_attack_animation(src, ATTACK_EFFECT_DISARM2) - attack_generic(xeno, punch_damage * 4, BRUTE, effects = FALSE) - playsound(src, pick('sound/effects/bang.ogg','sound/effects/metal_crash.ogg','sound/effects/meteorimpact.ogg'), 50, 1) - Shake(duration = 0.5 SECONDS) - return TRUE - -/mob/living/punch_act(mob/living/carbon/xenomorph/warrior/xeno, punch_damage, push = TRUE) - . = ..() - var/slowdown_stacks = WARRIOR_PUNCH_SLOWDOWN - var/stagger_stacks = WARRIOR_PUNCH_STAGGER - var/visual_effect = /obj/effect/temp_visual/warrior/punch/weak - var/sound_effect = 'sound/weapons/punch1.ogg' - if(pulledby == xeno) - xeno.stop_pulling() - punch_damage *= WARRIOR_PUNCH_GRAPPLED_DAMAGE_MULTIPLIER - slowdown_stacks *= WARRIOR_PUNCH_GRAPPLED_DEBUFF_MULTIPLIER - stagger_stacks *= WARRIOR_PUNCH_GRAPPLED_DEBUFF_MULTIPLIER - visual_effect = /obj/effect/temp_visual/warrior/punch/strong - sound_effect = 'sound/weapons/punch2.ogg' - Paralyze(WARRIOR_PUNCH_GRAPPLED_PARALYZE) - Shake(duration = 0.5 SECONDS) - var/datum/limb/target_limb - if(!iscarbon(src)) - var/mob/living/carbon/carbon_target = src - target_limb = carbon_target.get_limb(xeno.zone_selected) - if(!target_limb || (target_limb.limb_status & LIMB_DESTROYED)) - target_limb = carbon_target.get_limb(BODY_ZONE_CHEST) - xeno.face_atom(src) - xeno.do_attack_animation(src) - new visual_effect(get_turf(src)) - playsound(src, sound_effect, 50, 1) - shake_camera(src, 1, 1) - add_slowdown(slowdown_stacks) - adjust_stagger(stagger_stacks SECONDS) - adjust_blurriness(slowdown_stacks) - apply_damage(punch_damage, BRUTE, target_limb ? target_limb : 0, MELEE) - apply_damage(punch_damage, STAMINA, updating_health = TRUE) - var/turf_behind = get_step(src, REVERSE_DIR(get_dir(src, xeno))) - if(!push) - return - if(LinkBlocked(get_turf(src), turf_behind)) - do_attack_animation(turf_behind) - return - knockback(xeno, WARRIOR_PUNCH_KNOCKBACK_DISTANCE, WARRIOR_PUNCH_KNOCKBACK_SPEED) - /obj/effect/temp_visual/warrior/punch icon = 'icons/effects/effects.dmi' icon_state = "weak_punch" @@ -662,7 +552,6 @@ pixel_x = -16 pixel_y = -16 - // *************************************** // *********** Flurry // *************************************** diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index ba6d55c24c1..51db202422e 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -347,3 +347,42 @@ /mob/living/proc/emote_gored() return + +/mob/living/punch_act(mob/living/carbon/xenomorph/warrior/xeno, punch_damage, push = TRUE) + . = ..() + var/slowdown_stacks = WARRIOR_PUNCH_SLOWDOWN + var/stagger_stacks = WARRIOR_PUNCH_STAGGER + var/visual_effect = /obj/effect/temp_visual/warrior/punch/weak + var/sound_effect = 'sound/weapons/punch1.ogg' + if(pulledby == xeno) + xeno.stop_pulling() + punch_damage *= WARRIOR_PUNCH_GRAPPLED_DAMAGE_MULTIPLIER + slowdown_stacks *= WARRIOR_PUNCH_GRAPPLED_DEBUFF_MULTIPLIER + stagger_stacks *= WARRIOR_PUNCH_GRAPPLED_DEBUFF_MULTIPLIER + visual_effect = /obj/effect/temp_visual/warrior/punch/strong + sound_effect = 'sound/weapons/punch2.ogg' + Paralyze(WARRIOR_PUNCH_GRAPPLED_PARALYZE) + Shake(duration = 0.5 SECONDS) + var/datum/limb/target_limb + if(!iscarbon(src)) + var/mob/living/carbon/carbon_target = src + target_limb = carbon_target.get_limb(xeno.zone_selected) + if(!target_limb || (target_limb.limb_status & LIMB_DESTROYED)) + target_limb = carbon_target.get_limb(BODY_ZONE_CHEST) + xeno.face_atom(src) + xeno.do_attack_animation(src) + new visual_effect(get_turf(src)) + playsound(src, sound_effect, 50, 1) + shake_camera(src, 1, 1) + add_slowdown(slowdown_stacks) + adjust_stagger(stagger_stacks SECONDS) + adjust_blurriness(slowdown_stacks) + apply_damage(punch_damage, BRUTE, target_limb ? target_limb : 0, MELEE) + apply_damage(punch_damage, STAMINA, updating_health = TRUE) + var/turf_behind = get_step(src, REVERSE_DIR(get_dir(src, xeno))) + if(!push) + return + if(LinkBlocked(get_turf(src), turf_behind)) + do_attack_animation(turf_behind) + return + knockback(xeno, WARRIOR_PUNCH_KNOCKBACK_DISTANCE, WARRIOR_PUNCH_KNOCKBACK_SPEED) diff --git a/code/modules/power/apc/apc.dm b/code/modules/power/apc/apc.dm index 798b3177644..11b44ea56db 100644 --- a/code/modules/power/apc/apc.dm +++ b/code/modules/power/apc/apc.dm @@ -596,6 +596,10 @@ update() update_icon() +/obj/machinery/power/apc/punch_act(...) + . = ..() + beenhit += 4 // Break it open instantly. + update_appearance() //------Various APCs ------// diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index ac0b6084f1b..b3c011ddc13 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -480,6 +480,10 @@ cell_explosion(loc, 70, 30) qdel(src) +/obj/machinery/light/punch_act(mob/living/carbon/xenomorph/xeno, ...) + . = ..() + attack_alien(xeno) + /obj/machinery/light/mainship base_state = "tube" diff --git a/code/modules/vehicles/__vehicle.dm b/code/modules/vehicles/__vehicle.dm index 7f3bc5487f6..00b7552d921 100644 --- a/code/modules/vehicles/__vehicle.dm +++ b/code/modules/vehicles/__vehicle.dm @@ -193,3 +193,12 @@ return PRECRUSH_STOPPED charge_datum.speed_down(2) //Lose two turfs worth of speed. return NONE + +/obj/vehicle/punch_act(mob/living/carbon/xenomorph/xeno, punch_damage, ...) + . = ..() + xeno.do_attack_animation(src, ATTACK_EFFECT_YELLOWPUNCH) + xeno.do_attack_animation(src, ATTACK_EFFECT_DISARM2) + attack_generic(xeno, punch_damage * 4, BRUTE, effects = FALSE) + playsound(src, pick('sound/effects/bang.ogg','sound/effects/metal_crash.ogg','sound/effects/meteorimpact.ogg'), 50, 1) + Shake(duration = 0.5 SECONDS) + return TRUE