Buffs the proto-kinetic crusher and cleans up the code a little bit (#88171)

## About The Pull Request
Buffs the crusher:
- Mining with the crusher gives mining XP
- If you mine with the crusher, your mining level will reduce the charge
time (more skilled miners can mine faster)
- Shooting the kinetic blast (crusher right click) no longer puts your
click on cooldown

For the mark, it now has a delay of 0.8 seconds. So even though the
click delay from shooting the mark is gone, you'll still have to wait
for it to be ready to detonate it.

Adds code support for the crusher projectile to have effects on hitting
a mob/mineral
- Buffs the bileworm trophy to give it AOE mining radius

Reorganizes all the crusher code + trophies to be in its own folder +
documents it somewhat
## Why It's Good For The Game
Crusher code is a bit outdated so I wanted to clean it up a bit while I
gave it the buffs I wanted.
I feel like it can afford to be better as a mining tool so I gave it
access to mining XP. I also gave it AOE mining from the bileworm trophy
so it can keep up with the other mining tools (pka/pc)
## Changelog
🆑
add: Bileworm crusher trophy now gives you AOE mining
balance: The pk crusher no longer has click delay after shooting the
projectile
balance: The pk crusher gives mining XP when it mines rocks
balance: the pk crusher charges faster when you mine rocks based on your
skill as a miner
code: cleaned up some of the kinetic crusher code
/🆑
This commit is contained in:
Xander3359
2024-12-26 11:11:49 +01:00
committed by GitHub
parent 6c03bf8501
commit e8877f792c
17 changed files with 970 additions and 855 deletions
@@ -9,50 +9,3 @@
icon_state = "sheet-bileworm"
inhand_icon_state = null
merge_type = /obj/item/stack/sheet/animalhide/bileworm
//trophy
/obj/item/crusher_trophy/bileworm_spewlet
name = "bileworm spewlet"
icon = 'icons/mob/simple/lavaland/bileworm.dmi'
icon_state = "bileworm_spewlet"
desc = "A baby bileworm. Suitable as a trophy for a kinetic crusher."
denied_type = /obj/item/crusher_trophy/bileworm_spewlet
///item ability that handles the effect
var/datum/action/cooldown/mob_cooldown/projectile_attack/dir_shots/spewlet/ability
/obj/item/crusher_trophy/bileworm_spewlet/Initialize(mapload)
. = ..()
ability = new()
/obj/item/crusher_trophy/bileworm_spewlet/Destroy(force)
. = ..()
QDEL_NULL(ability)
/obj/item/crusher_trophy/bileworm_spewlet/add_to(obj/item/kinetic_crusher/crusher, mob/living/user)
. = ..()
if(.)
crusher.add_item_action(ability)
/obj/item/crusher_trophy/bileworm_spewlet/remove_from(obj/item/kinetic_crusher/crusher, mob/living/user)
. = ..()
crusher.remove_item_action(ability)
/obj/item/crusher_trophy/bileworm_spewlet/effect_desc()
return "mark detonation launches projectiles in cardinal directions on a 10 second cooldown"
/obj/item/crusher_trophy/bileworm_spewlet/on_mark_detonation(mob/living/target, mob/living/user)
//ability itself handles cooldowns.
ability.InterceptClickOn(user, null, target)
//yes this is a /mob_cooldown subtype being added to an item. I can't recommend you do what I'm doing
/datum/action/cooldown/mob_cooldown/projectile_attack/dir_shots/spewlet
check_flags = NONE
owner_has_control = FALSE
cooldown_time = 10 SECONDS
projectile_type = /obj/projectile/bileworm_acid
projectile_sound = 'sound/mobs/non-humanoids/bileworm/bileworm_spit.ogg'
/datum/action/cooldown/mob_cooldown/projectile_attack/dir_shots/spewlet/New(Target)
firing_directions = GLOB.cardinals.Copy()
return ..()
@@ -1,19 +1,3 @@
/// Brimdemon crusher trophy, it... makes a funny sound?
/obj/item/crusher_trophy/brimdemon_fang
name = "brimdemon's fang"
icon_state = "brimdemon_fang"
desc = "A fang from a brimdemon's corpse."
denied_type = /obj/item/crusher_trophy/brimdemon_fang
/// Cartoon punching vfx
var/static/list/comic_phrases = list("BOOM", "BANG", "KABLOW", "KAPOW", "OUCH", "BAM", "KAPOW", "WHAM", "POW", "KABOOM")
/obj/item/crusher_trophy/brimdemon_fang/effect_desc()
return "mark detonation to create visual and audiosensory effects at the target"
/obj/item/crusher_trophy/brimdemon_fang/on_mark_detonation(mob/living/target, mob/living/user)
target.balloon_alert_to_viewers("[pick(comic_phrases)]!")
playsound(target, 'sound/mobs/non-humanoids/brimdemon/brimdemon_crush.ogg', 100)
/// Reagent pool left by dying brimdemon
/obj/effect/decal/cleanable/brimdust
name = "brimdust"
@@ -1,25 +0,0 @@
/// Mining crusher trophy from a goliath. Increases damage as your health decreases.
/obj/item/crusher_trophy/goliath_tentacle
name = "goliath tentacle"
desc = "A sliced-off goliath tentacle. Suitable as a trophy for a kinetic crusher."
icon_state = "goliath_tentacle"
denied_type = /obj/item/crusher_trophy/goliath_tentacle
bonus_value = 2
/// Your missing health is multiplied by this value to find the bonus damage
var/missing_health_ratio = 0.1
/// Amount of health you must lose to gain damage, according to the examine text. Cached so we don't recalculate it every examine.
var/missing_health_desc
/obj/item/crusher_trophy/goliath_tentacle/Initialize(mapload)
. = ..()
missing_health_desc = 1 / missing_health_ratio / bonus_value
/obj/item/crusher_trophy/goliath_tentacle/effect_desc()
return "mark detonation to do <b>[bonus_value]</b> more damage for every <b>[missing_health_desc]</b> health you are missing"
/obj/item/crusher_trophy/goliath_tentacle/on_mark_detonation(mob/living/target, mob/living/user)
var/missing_health = user.maxHealth - user.health
missing_health *= missing_health_ratio //bonus is active at all times, even if you're above 90 health
missing_health *= bonus_value //multiply the remaining amount by bonus_value
if(missing_health > 0)
target.adjustBruteLoss(missing_health) //and do that much damage
@@ -1,13 +0,0 @@
/// Lobstrosity crusher trophy. Rebukes targets, increasing their click cooldown.
/obj/item/crusher_trophy/lobster_claw
name = "lobster claw"
icon_state = "lobster_claw"
desc = "A lobster claw."
denied_type = /obj/item/crusher_trophy/lobster_claw
bonus_value = 1
/obj/item/crusher_trophy/lobster_claw/effect_desc()
return "mark detonation to briefly rebuke the target for [bonus_value] seconds"
/obj/item/crusher_trophy/lobster_claw/on_mark_detonation(mob/living/target, mob/living/user)
target.apply_status_effect(/datum/status_effect/rebuked, bonus_value SECONDS)