grug mine rock. rock good for tribe shaman. tribe shaman make thing blessed by gods. grug mine more rock.

This commit is contained in:
Kraseo
2019-11-26 15:19:49 +01:00
parent 7de072e277
commit c71a0c60f3
8 changed files with 63 additions and 32 deletions
@@ -1,17 +1,17 @@
/*********************Mining Hammer****************/
/obj/item/twohanded/required/kinetic_crusher
/obj/item/twohanded/kinetic_crusher
icon = 'icons/obj/mining.dmi'
icon_state = "mining_hammer1"
item_state = "mining_hammer1"
icon_state = "mining_hammer"
item_state = "mining_hammer0"
lefthand_file = 'icons/mob/inhands/weapons/hammers_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/hammers_righthand.dmi'
name = "proto-kinetic crusher"
desc = "An early design of the proto-kinetic accelerator, it is little more than an combination of various mining tools cobbled together, forming a high-tech club. \
While it is an effective mining tool, it did little to aid any but the most skilled and/or suicidal miners against local fauna."
force = 20 //As much as a bone spear, but this is significantly more annoying to carry around due to requiring the use of both hands at all times
force = 0 //just in case
w_class = WEIGHT_CLASS_BULKY
slot_flags = ITEM_SLOT_BACK
force_unwielded = 20 //It's never not wielded so these are the same
force_unwielded = 0 //ditto
force_wielded = 20
throwforce = 5
throw_speed = 4
@@ -22,29 +22,32 @@
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("smashed", "crushed", "cleaved", "chopped", "pulped")
sharpness = IS_SHARP
actions_types = list(/datum/action/item_action/toggle_light)
var/list/trophies = list()
var/charged = TRUE
var/charge_time = 15
var/detonation_damage = 50
var/backstab_bonus = 30
var/light_on = FALSE
var/brightness_on = 5 //same light as a lit seclite on a PKA
/obj/item/twohanded/required/kinetic_crusher/Initialize()
/obj/item/twohanded/kinetic_crusher/Initialize()
. = ..()
AddComponent(/datum/component/butchering, 60, 110) //technically it's huge and bulky, but this provides an incentive to use it
/obj/item/twohanded/required/kinetic_crusher/Destroy()
/obj/item/twohanded/kinetic_crusher/Destroy()
QDEL_LIST(trophies)
return ..()
/obj/item/twohanded/required/kinetic_crusher/examine(mob/living/user)
..()
to_chat(user, "<span class='notice'>Mark a large creature with the destabilizing force, then hit them in melee to do <b>[force + detonation_damage]</b> damage.</span>")
to_chat(user, "<span class='notice'>Does <b>[force + detonation_damage + backstab_bonus]</b> damage if the target is backstabbed, instead of <b>[force + detonation_damage]</b>.</span>")
/obj/item/twohanded/kinetic_crusher/examine(mob/living/user)
. =..()
. += "<span class='notice'>Mark a large creature with the destabilizing force, then hit them in melee to do <b>[force + detonation_damage]</b> damage.</span>"
. += "<span class='notice'>Does <b>[force + detonation_damage + backstab_bonus]</b> damage if the target is backstabbed, instead of <b>[force + detonation_damage]</b>.</span>"
for(var/t in trophies)
var/obj/item/crusher_trophy/T = t
to_chat(user, "<span class='notice'>It has \a [T] attached, which causes [T.effect_desc()].</span>")
. += "<span class='notice'>It has \a [T] attached, which causes [T.effect_desc()].</span>"
/obj/item/twohanded/required/kinetic_crusher/attackby(obj/item/I, mob/living/user)
/obj/item/twohanded/kinetic_crusher/attackby(obj/item/I, mob/living/user)
if(istype(I, /obj/item/crowbar))
if(LAZYLEN(trophies))
to_chat(user, "<span class='notice'>You remove [src]'s trophies.</span>")
@@ -60,7 +63,11 @@
else
return ..()
/obj/item/twohanded/required/kinetic_crusher/attack(mob/living/target, mob/living/carbon/user)
/obj/item/twohanded/kinetic_crusher/attack(mob/living/target, mob/living/carbon/user)
if(!wielded)
to_chat(user, "<span class='warning'>[src] is too heavy to use with one hand. You fumble and drop everything.")
user.drop_all_held_items()
return
var/datum/status_effect/crusher_damage/C = target.has_status_effect(STATUS_EFFECT_CRUSHERDAMAGETRACKING)
var/target_health = target.health
..()
@@ -71,7 +78,7 @@
if(!QDELETED(C) && !QDELETED(target))
C.total_damage += target_health - target.health //we did some damage, but let's not assume how much we did
/obj/item/twohanded/required/kinetic_crusher/afterattack(atom/target, mob/living/user, proximity_flag, clickparams)
/obj/item/twohanded/kinetic_crusher/afterattack(atom/target, mob/living/user, proximity_flag, clickparams)
. = ..()
if(istype(target, /obj/item/crusher_trophy))
var/obj/item/crusher_trophy/T = target
@@ -122,12 +129,36 @@
if(user && lavaland_equipment_pressure_check(get_turf(user))) //CIT CHANGE - makes sure below only happens in low pressure environments
user.adjustStaminaLoss(-30)//CIT CHANGE - makes crushers heal stamina
/obj/item/twohanded/required/kinetic_crusher/proc/Recharge()
/obj/item/twohanded/kinetic_crusher/proc/Recharge()
if(!charged)
charged = TRUE
icon_state = "mining_hammer1"
update_icon()
playsound(src.loc, 'sound/weapons/kenetic_reload.ogg', 60, 1)
/obj/item/twohanded/kinetic_crusher/ui_action_click(mob/user, actiontype)
light_on = !light_on
playsound(user, 'sound/weapons/empty.ogg', 100, TRUE)
update_brightness(user)
update_icon()
/obj/item/twohanded/kinetic_crusher/proc/update_brightness(mob/user = null)
if(light_on)
set_light(brightness_on)
else
set_light(0)
/obj/item/twohanded/kinetic_crusher/update_icon()
..()
cut_overlays()
if(!charged)
add_overlay("[icon_state]_uncharged")
if(light_on)
add_overlay("[icon_state]_lit")
spawn(1)
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon()
item_state = "mining_hammer[wielded]"
//destablizing force
/obj/item/projectile/destabilizer
name = "destabilizing force"
@@ -138,7 +169,7 @@
flag = "bomb"
range = 6
log_override = TRUE
var/obj/item/twohanded/required/kinetic_crusher/hammer_synced
var/obj/item/twohanded/kinetic_crusher/hammer_synced
/obj/item/projectile/destabilizer/Destroy()
hammer_synced = null
@@ -177,12 +208,12 @@
return "errors"
/obj/item/crusher_trophy/attackby(obj/item/A, mob/living/user)
if(istype(A, /obj/item/twohanded/required/kinetic_crusher))
if(istype(A, /obj/item/twohanded/kinetic_crusher))
add_to(A, user)
else
..()
/obj/item/crusher_trophy/proc/add_to(obj/item/twohanded/required/kinetic_crusher/H, mob/living/user)
/obj/item/crusher_trophy/proc/add_to(obj/item/twohanded/kinetic_crusher/H, mob/living/user)
for(var/t in H.trophies)
var/obj/item/crusher_trophy/T = t
if(istype(T, denied_type) || istype(src, T.denied_type))
@@ -194,7 +225,7 @@
to_chat(user, "<span class='notice'>You attach [src] to [H].</span>")
return TRUE
/obj/item/crusher_trophy/proc/remove_from(obj/item/twohanded/required/kinetic_crusher/H, mob/living/user)
/obj/item/crusher_trophy/proc/remove_from(obj/item/twohanded/kinetic_crusher/H, mob/living/user)
forceMove(get_turf(H))
H.trophies -= src
return TRUE
@@ -281,12 +312,12 @@
/obj/item/crusher_trophy/legion_skull/effect_desc()
return "a kinetic crusher to recharge <b>[bonus_value*0.1]</b> second\s faster"
/obj/item/crusher_trophy/legion_skull/add_to(obj/item/twohanded/required/kinetic_crusher/H, mob/living/user)
/obj/item/crusher_trophy/legion_skull/add_to(obj/item/twohanded/kinetic_crusher/H, mob/living/user)
. = ..()
if(.)
H.charge_time -= bonus_value
/obj/item/crusher_trophy/legion_skull/remove_from(obj/item/twohanded/required/kinetic_crusher/H, mob/living/user)
/obj/item/crusher_trophy/legion_skull/remove_from(obj/item/twohanded/kinetic_crusher/H, mob/living/user)
. = ..()
if(.)
H.charge_time += bonus_value
@@ -339,7 +370,7 @@
/obj/item/crusher_trophy/demon_claws/effect_desc()
return "melee hits to do <b>[bonus_value * 0.2]</b> more damage and heal you for <b>[bonus_value * 0.1]</b>, with <b>5X</b> effect on mark detonation"
/obj/item/crusher_trophy/demon_claws/add_to(obj/item/twohanded/required/kinetic_crusher/H, mob/living/user)
/obj/item/crusher_trophy/demon_claws/add_to(obj/item/twohanded/kinetic_crusher/H, mob/living/user)
. = ..()
if(.)
H.force += bonus_value * 0.2
@@ -347,7 +378,7 @@
H.force_wielded += bonus_value * 0.2
H.detonation_damage += bonus_value * 0.8
/obj/item/crusher_trophy/demon_claws/remove_from(obj/item/twohanded/required/kinetic_crusher/H, mob/living/user)
/obj/item/crusher_trophy/demon_claws/remove_from(obj/item/twohanded/kinetic_crusher/H, mob/living/user)
. = ..()
if(.)
H.force -= bonus_value * 0.2
+2 -2
View File
@@ -30,7 +30,7 @@
new /datum/data/mining_equipment("500 Point Transfer Card", /obj/item/card/mining_point_card/mp500, 500),
new /datum/data/mining_equipment("Tracking Implant Kit", /obj/item/storage/box/minertracker, 600),
new /datum/data/mining_equipment("Jaunter", /obj/item/wormhole_jaunter, 750),
new /datum/data/mining_equipment("Kinetic Crusher", /obj/item/twohanded/required/kinetic_crusher, 750),
new /datum/data/mining_equipment("Kinetic Crusher", /obj/item/twohanded/kinetic_crusher, 750),
new /datum/data/mining_equipment("Kinetic Accelerator", /obj/item/gun/energy/kinetic_accelerator, 750),
new /datum/data/mining_equipment("Survival Medipen", /obj/item/reagent_containers/hypospray/medipen/survival, 750),
new /datum/data/mining_equipment("Brute First-Aid Kit", /obj/item/storage/firstaid/brute, 800),
@@ -201,7 +201,7 @@
new /obj/item/stack/marker_beacon/thirty(drop_location)
if("Crusher Kit")
new /obj/item/extinguisher/mini(drop_location)
new /obj/item/twohanded/required/kinetic_crusher(drop_location)
new /obj/item/twohanded/kinetic_crusher(drop_location)
if("Mining Conscription Kit")
new /obj/item/storage/backpack/duffelbag/mining_conscript(drop_location)
@@ -127,7 +127,7 @@
var/client/C = L.client
SSmedals.UnlockMedal("Boss [BOSS_KILL_MEDAL]", C)
SSmedals.UnlockMedal("[medaltype] [BOSS_KILL_MEDAL]", C)
if(crusher_kill && istype(L.get_active_held_item(), /obj/item/twohanded/required/kinetic_crusher))
if(crusher_kill && istype(L.get_active_held_item(), /obj/item/twohanded/kinetic_crusher))
SSmedals.UnlockMedal("[medaltype] [BOSS_KILL_MEDAL_CRUSHER]", C)
SSmedals.SetScore(BOSS_SCORE, C, 1)
SSmedals.SetScore(score_type, C, 1)
@@ -20,7 +20,7 @@
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
mob_size = MOB_SIZE_LARGE
var/icon_aggro = null
var/crusher_drop_mod = 5
var/crusher_drop_mod = 25
/mob/living/simple_animal/hostile/asteroid/Initialize(mapload)
. = ..()
@@ -58,7 +58,7 @@
/mob/living/simple_animal/hostile/asteroid/death(gibbed)
SSblackbox.record_feedback("tally", "mobs_killed_mining", 1, type)
var/datum/status_effect/crusher_damage/C = has_status_effect(STATUS_EFFECT_CRUSHERDAMAGETRACKING)
if(C && crusher_loot && prob((C.total_damage/maxHealth) * crusher_drop_mod)) //on average, you'll need to kill 20 creatures before getting the item
if(C && crusher_loot && prob((C.total_damage/maxHealth) * crusher_drop_mod)) //on average, you'll need to kill 4 creatures only using the crusher before getting the item
spawn_crusher_loot()
..(gibbed)