mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Proto-kinetic crushers are significantly better (#27379)
This commit is contained in:
@@ -40,3 +40,5 @@
|
||||
#define STATUS_EFFECT_HISWRATH /datum/status_effect/his_wrath //His Wrath.
|
||||
|
||||
#define STATUS_EFFECT_SUMMONEDGHOST /datum/status_effect/cultghost //is a cult ghost and can't use manifest runes
|
||||
|
||||
#define STATUS_EFFECT_CRUSHERMARK /datum/status_effect/crusher_mark //if struck with a proto-kinetic crusher, takes a ton of damage
|
||||
|
||||
@@ -167,3 +167,30 @@
|
||||
id = "cult_ghost"
|
||||
duration = -1
|
||||
alert_type = null
|
||||
|
||||
/datum/status_effect/crusher_mark
|
||||
id = "crusher_mark"
|
||||
duration = 300 //if you leave for 30 seconds you lose the mark, deal with it
|
||||
status_type = STATUS_EFFECT_REPLACE
|
||||
alert_type = null
|
||||
var/mutable_appearance/marked_underlay
|
||||
var/obj/item/weapon/twohanded/required/mining_hammer/hammer_synced
|
||||
|
||||
/datum/status_effect/crusher_mark/on_apply()
|
||||
if(owner.mob_size >= MOB_SIZE_LARGE)
|
||||
marked_underlay = mutable_appearance('icons/effects/effects.dmi', "shield2")
|
||||
marked_underlay.pixel_x = -owner.pixel_x
|
||||
marked_underlay.pixel_y = -owner.pixel_y
|
||||
owner.underlays += marked_underlay
|
||||
return FALSE
|
||||
|
||||
/datum/status_effect/crusher_mark/Destroy()
|
||||
hammer_synced = null
|
||||
if(owner)
|
||||
owner.underlays -= marked_underlay
|
||||
QDEL_NULL(marked_underlay)
|
||||
return ..()
|
||||
|
||||
/datum/status_effect/crusher_mark/be_replaced()
|
||||
owner.underlays -= marked_underlay //if this is being called, we should have an owner at this point.
|
||||
..()
|
||||
|
||||
@@ -510,36 +510,29 @@
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
attack_verb = list("smashed", "crushed", "cleaved", "chopped", "pulped")
|
||||
sharpness = IS_SHARP
|
||||
var/charged = 1
|
||||
var/charge_time = 16
|
||||
var/atom/mark = null
|
||||
var/mutable_appearance/marked_underlay
|
||||
var/charged = TRUE
|
||||
var/charge_time = 14
|
||||
|
||||
/obj/item/projectile/destabilizer
|
||||
name = "destabilizing force"
|
||||
icon_state = "pulse1"
|
||||
nodamage = TRUE
|
||||
damage = 0 //We're just here to mark people. This is still a melee weapon.
|
||||
damage_type = BRUTE
|
||||
flag = "bomb"
|
||||
range = 6
|
||||
var/obj/item/weapon/twohanded/required/mining_hammer/hammer_synced = null
|
||||
log_override = TRUE
|
||||
var/obj/item/weapon/twohanded/required/mining_hammer/hammer_synced
|
||||
|
||||
/obj/item/projectile/destabilizer/Destroy()
|
||||
hammer_synced = null
|
||||
return ..()
|
||||
|
||||
/obj/item/projectile/destabilizer/on_hit(atom/target, blocked = 0)
|
||||
if(hammer_synced)
|
||||
if(hammer_synced.mark == target)
|
||||
return ..()
|
||||
if(isliving(target))
|
||||
if(hammer_synced.mark && hammer_synced.marked_underlay)
|
||||
hammer_synced.mark.underlays -= hammer_synced.marked_underlay
|
||||
hammer_synced.marked_underlay = null
|
||||
var/mob/living/L = target
|
||||
if(L.mob_size >= MOB_SIZE_LARGE)
|
||||
hammer_synced.mark = L
|
||||
hammer_synced.marked_underlay = mutable_appearance('icons/effects/effects.dmi', "shield2")
|
||||
hammer_synced.marked_underlay.pixel_x = -L.pixel_x
|
||||
hammer_synced.marked_underlay.pixel_y = -L.pixel_y
|
||||
L.underlays += hammer_synced.marked_underlay
|
||||
var/datum/status_effect/crusher_mark/CM = L.apply_status_effect(STATUS_EFFECT_CRUSHERMARK)
|
||||
CM.hammer_synced = hammer_synced
|
||||
var/target_turf = get_turf(target)
|
||||
if(ismineralturf(target_turf))
|
||||
var/turf/closed/mineral/M = target_turf
|
||||
@@ -549,30 +542,24 @@
|
||||
|
||||
/obj/item/weapon/twohanded/required/mining_hammer/afterattack(atom/target, mob/user, proximity_flag)
|
||||
if(!proximity_flag && charged)//Mark a target, or mine a tile.
|
||||
var/turf/proj_turf = get_turf(src)
|
||||
var/turf/proj_turf = user.loc
|
||||
if(!isturf(proj_turf))
|
||||
return
|
||||
var/datum/gas_mixture/environment = proj_turf.return_air()
|
||||
var/pressure = environment.return_pressure()
|
||||
if(pressure > 50)
|
||||
playsound(user, 'sound/weapons/empty.ogg', 100, 1)
|
||||
return
|
||||
var/obj/item/projectile/destabilizer/D = new /obj/item/projectile/destabilizer(user.loc)
|
||||
var/obj/item/projectile/destabilizer/D = new /obj/item/projectile/destabilizer(proj_turf)
|
||||
D.preparePixelProjectile(target, get_turf(target), user)
|
||||
D.hammer_synced = src
|
||||
playsound(user, 'sound/weapons/plasma_cutter.ogg', 100, 1)
|
||||
D.fire()
|
||||
charged = 0
|
||||
charged = FALSE
|
||||
icon_state = "mining_hammer1_uncharged"
|
||||
addtimer(CALLBACK(src, .proc/Recharge), charge_time)
|
||||
return
|
||||
if(proximity_flag && target == mark && isliving(target))
|
||||
if(proximity_flag && isliving(target))
|
||||
var/mob/living/L = target
|
||||
var/datum/status_effect/crusher_mark/CM = L.has_status_effect(STATUS_EFFECT_CRUSHERMARK)
|
||||
if(!CM || CM.hammer_synced != src || !L.remove_status_effect(STATUS_EFFECT_CRUSHERMARK))
|
||||
return
|
||||
new /obj/effect/temp_visual/kinetic_blast(get_turf(L))
|
||||
mark = 0
|
||||
if(L.mob_size >= MOB_SIZE_LARGE)
|
||||
L.underlays -= marked_underlay
|
||||
QDEL_NULL(marked_underlay)
|
||||
var/backstab_dir = get_dir(user, L)
|
||||
var/def_check = L.getarmor(type = "bomb")
|
||||
if((user.dir & backstab_dir) && (L.dir & backstab_dir))
|
||||
@@ -583,6 +570,6 @@
|
||||
|
||||
/obj/item/weapon/twohanded/required/mining_hammer/proc/Recharge()
|
||||
if(!charged)
|
||||
charged = 1
|
||||
charged = TRUE
|
||||
icon_state = "mining_hammer1"
|
||||
playsound(src.loc, 'sound/weapons/kenetic_reload.ogg', 60, 1)
|
||||
|
||||
Reference in New Issue
Block a user