Changes nullrod hammer to work nicer and throw a bit further (#18544)

* changes hammer

* remove comment from copied location
This commit is contained in:
Molti
2023-04-18 21:58:05 -05:00
committed by GitHub
parent 267dff010c
commit 50fb8ff837
3 changed files with 12 additions and 10 deletions

View File

@@ -136,6 +136,7 @@
#define TRAIT_XENO_HOST "xeno_host" //Tracks whether we're gonna be a baby alien's mummy. #define TRAIT_XENO_HOST "xeno_host" //Tracks whether we're gonna be a baby alien's mummy.
#define TRAIT_STUNIMMUNE "stun_immunity" #define TRAIT_STUNIMMUNE "stun_immunity"
#define TRAIT_SLEEPIMMUNE "sleep_immunity" #define TRAIT_SLEEPIMMUNE "sleep_immunity"
#define TRAIT_IMPACTIMMUNE "impact_immunity" //protects from the damage of getting launched into a wall hard
#define TRAIT_PUSHIMMUNE "push_immunity" #define TRAIT_PUSHIMMUNE "push_immunity"
#define TRAIT_SHOCKIMMUNE "shock_immunity" #define TRAIT_SHOCKIMMUNE "shock_immunity"
#define TRAIT_STABLEHEART "stable_heart" #define TRAIT_STABLEHEART "stable_heart"

View File

@@ -432,16 +432,15 @@
. = ..() . = ..()
if(M == user) if(M == user)
return return
var/throw_direction = get_dir(user, M) var/atom/throw_target = get_edge_target_turf(M, user.dir)
var/atom/throw_target = get_edge_target_turf(M, throw_direction) ADD_TRAIT(M, TRAIT_IMPACTIMMUNE, "Nullrod Hammer")
var/turf/throw_location = get_step_towards(M, throw_target) var/distance = rand(1,5)
M.SpinAnimation(5, 1) if(prob(1))
if(throw_location.density) distance = 50 //hehe funny hallway launch
return M.throw_at(throw_target, distance, 3, user, TRUE, TRUE, callback = CALLBACK(src, .proc/afterimpact, M))
for(var/obj/D in throw_location.contents)
if(D.density) /obj/item/twohanded/required/nullrod/proc/afterimpact(mob/living/M)
return REMOVE_TRAIT(M, TRAIT_IMPACTIMMUNE, "Nullrod Hammer")
M.forceMove(throw_location)
/*--------------------------------------------------------------------------- /*---------------------------------------------------------------------------
| |

View File

@@ -93,6 +93,8 @@
/mob/living/carbon/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum) /mob/living/carbon/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(mind?.martial_art.handle_throw(hit_atom, src)) if(mind?.martial_art.handle_throw(hit_atom, src))
return return
if(HAS_TRAIT(src, TRAIT_IMPACTIMMUNE))
return
. = ..() . = ..()
var/hurt = TRUE var/hurt = TRUE
var/extra_speed = 0 var/extra_speed = 0