mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 13:38:41 +01:00
Fixes the watcher trophy not working on basic mobs (#88991)
## About The Pull Request currently, the watcher trophy has no effect on 95% of the lavaland mobs since theyve all been refactored to basic mobs, this rectifies that ## Why It's Good For The Game Fixes the watcher trophy not working on basic mobs ## Changelog 🆑 fix: Fixes the watcher trophy not working on basic mobs /🆑 --------- Co-authored-by: Jacquerel <hnevard@gmail.com>
This commit is contained in:
co-authored by
Jacquerel
parent
7e6a5b0a45
commit
c47049212f
@@ -9,6 +9,8 @@
|
||||
icon_state = "tail_spike"
|
||||
/// if it has a bonus effect, this is how much that effect is
|
||||
var/bonus_value = 10
|
||||
/// id of the trophy to be sent by the signal
|
||||
var/trophy_id
|
||||
/// what type of trophies will block this trophy from being added, must be overriden
|
||||
var/denied_type = /obj/item/crusher_trophy
|
||||
|
||||
@@ -60,4 +62,6 @@
|
||||
|
||||
/// Does an effect when you hit a mob that is marked via the projectile
|
||||
/obj/item/crusher_trophy/proc/on_mark_detonation(mob/living/target, mob/living/user) //the target and the user
|
||||
return
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
//if we dont have a set id, use the typepath as identifier
|
||||
SEND_SIGNAL(target, COMSIG_MOB_TROPHY_ACTIVATED(trophy_id || type), src, user)
|
||||
|
||||
@@ -8,19 +8,23 @@
|
||||
desc = "A wing ripped from a watcher. Suitable as a trophy for a kinetic crusher."
|
||||
icon_state = "watcher_wing"
|
||||
denied_type = /obj/item/crusher_trophy/watcher_wing
|
||||
trophy_id = TROPHY_WATCHER
|
||||
bonus_value = 5
|
||||
|
||||
/obj/item/crusher_trophy/watcher_wing/effect_desc()
|
||||
return "mark detonation to prevent certain creatures from using certain attacks for <b>[bonus_value*0.1]</b> second\s"
|
||||
|
||||
/obj/item/crusher_trophy/watcher_wing/on_mark_detonation(mob/living/target, mob/living/user)
|
||||
if(ishostile(target))
|
||||
var/mob/living/simple_animal/hostile/H = target
|
||||
if(H.ranged) //briefly delay ranged attacks
|
||||
if(H.ranged_cooldown >= world.time)
|
||||
H.ranged_cooldown += bonus_value
|
||||
else
|
||||
H.ranged_cooldown = bonus_value + world.time
|
||||
. = ..()
|
||||
if(!ishostile(target))
|
||||
return
|
||||
var/mob/living/simple_animal/hostile/hostile_animal = target
|
||||
if(!hostile_animal.ranged)
|
||||
return
|
||||
if(hostile_animal.ranged_cooldown >= world.time) //briefly delay ranged attacks
|
||||
hostile_animal.ranged_cooldown += bonus_value
|
||||
else
|
||||
hostile_animal.ranged_cooldown = bonus_value + world.time
|
||||
|
||||
//magmawing watcher
|
||||
/obj/item/crusher_trophy/blaster_tubes/magma_wing
|
||||
@@ -75,6 +79,7 @@
|
||||
icon_state = "goliath_tentacle"
|
||||
denied_type = /obj/item/crusher_trophy/goliath_tentacle
|
||||
bonus_value = 2
|
||||
trophy_id = TROPHY_GOLIATH_TENTACLE
|
||||
/// 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.
|
||||
@@ -88,6 +93,7 @@
|
||||
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
|
||||
@@ -100,12 +106,14 @@
|
||||
icon_state = "lobster_claw"
|
||||
desc = "A lobster claw."
|
||||
denied_type = /obj/item/crusher_trophy/lobster_claw
|
||||
trophy_id = 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)
|
||||
|
||||
// Brimdemon - makes a funny sound, the most essential trophy out of all
|
||||
@@ -114,6 +122,7 @@
|
||||
icon_state = "brimdemon_fang"
|
||||
desc = "A fang from a brimdemon's corpse."
|
||||
denied_type = /obj/item/crusher_trophy/brimdemon_fang
|
||||
trophy_id = TROPHY_BRIMDEMON_FANG
|
||||
/// Cartoon punching vfx
|
||||
var/static/list/comic_phrases = list("BOOM", "BANG", "KABLOW", "KAPOW", "OUCH", "BAM", "KAPOW", "WHAM", "POW", "KABOOM")
|
||||
|
||||
@@ -121,6 +130,7 @@
|
||||
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)
|
||||
|
||||
@@ -155,6 +165,7 @@
|
||||
return "mark detonation launches projectiles in cardinal directions on a 10 second cooldown. Also gives you an AOE when mining minerals"
|
||||
|
||||
/obj/item/crusher_trophy/bileworm_spewlet/on_mark_detonation(mob/living/target, mob/living/user)
|
||||
. = ..()
|
||||
//ability itself handles cooldowns.
|
||||
ability.InterceptClickOn(user, null, target)
|
||||
|
||||
@@ -180,6 +191,7 @@
|
||||
desc = "A stone cold cube dropped from an ice demon."
|
||||
icon_state = "ice_demon_cube"
|
||||
denied_type = /obj/item/crusher_trophy/ice_demon_cube
|
||||
trophy_id = TROPHY_ICE_DEMON
|
||||
///how many will we summon?
|
||||
var/summon_amount = 2
|
||||
///cooldown to summon demons upon the target
|
||||
@@ -189,6 +201,7 @@
|
||||
return "mark detonation to unleash demonic ice clones upon the target"
|
||||
|
||||
/obj/item/crusher_trophy/ice_demon_cube/on_mark_detonation(mob/living/target, mob/living/user)
|
||||
. = ..()
|
||||
if(isnull(target) || !COOLDOWN_FINISHED(src, summon_cooldown))
|
||||
return
|
||||
for(var/i in 1 to summon_amount)
|
||||
@@ -214,12 +227,14 @@
|
||||
name = "wolf ear"
|
||||
desc = "It's a wolf ear."
|
||||
icon_state = "wolf_ear"
|
||||
trophy_id = TROPHY_WOLF_EAR
|
||||
denied_type = /obj/item/crusher_trophy/wolf_ear
|
||||
|
||||
/obj/item/crusher_trophy/wolf_ear/effect_desc()
|
||||
return "mark detonation to gain a slight speed boost temporarily"
|
||||
|
||||
/obj/item/crusher_trophy/wolf_ear/on_mark_detonation(mob/living/target, mob/living/user)
|
||||
. = ..()
|
||||
user.apply_status_effect(/datum/status_effect/speed_boost, 1 SECONDS)
|
||||
|
||||
// Polar bear
|
||||
@@ -227,12 +242,14 @@
|
||||
name = "polar bear paw"
|
||||
desc = "It's a polar bear paw."
|
||||
icon_state = "bear_paw"
|
||||
trophy_id = TROPHY_BEAR_PAW
|
||||
denied_type = /obj/item/crusher_trophy/bear_paw
|
||||
|
||||
/obj/item/crusher_trophy/bear_paw/effect_desc()
|
||||
return "mark detonation to attack twice if you are below half your life"
|
||||
|
||||
/obj/item/crusher_trophy/bear_paw/on_mark_detonation(mob/living/target, mob/living/user)
|
||||
. = ..()
|
||||
if(user.health / user.maxHealth > 0.5)
|
||||
return
|
||||
var/obj/item/I = user.get_active_held_item()
|
||||
|
||||
@@ -7,24 +7,28 @@
|
||||
name = "eye of a blood-drunk hunter"
|
||||
desc = "Its pupil is collapsed and turned to mush. Suitable as a trophy for a kinetic crusher."
|
||||
icon_state = "hunter_eye"
|
||||
trophy_id = TROPHY_MINER_EYE
|
||||
denied_type = /obj/item/crusher_trophy/miner_eye
|
||||
|
||||
/obj/item/crusher_trophy/miner_eye/effect_desc()
|
||||
return "mark detonation to grant stun immunity and <b>90%</b> damage reduction for <b>1</b> second"
|
||||
|
||||
/obj/item/crusher_trophy/miner_eye/on_mark_detonation(mob/living/target, mob/living/user)
|
||||
. = ..()
|
||||
user.apply_status_effect(/datum/status_effect/blooddrunk)
|
||||
|
||||
//ash drake
|
||||
/obj/item/crusher_trophy/tail_spike
|
||||
desc = "A spike taken from an ash drake's tail. Suitable as a trophy for a kinetic crusher."
|
||||
denied_type = /obj/item/crusher_trophy/tail_spike
|
||||
trophy_id = TROPHY_TAIL_SPIKE
|
||||
bonus_value = 5
|
||||
|
||||
/obj/item/crusher_trophy/tail_spike/effect_desc()
|
||||
return "mark detonation to do <b>[bonus_value]</b> damage to nearby creatures and push them back"
|
||||
|
||||
/obj/item/crusher_trophy/tail_spike/on_mark_detonation(mob/living/target, mob/living/user)
|
||||
. = ..()
|
||||
for(var/mob/living/living_target in oview(2, user))
|
||||
if(user.faction_check_atom(living_target) || living_target.stat == DEAD)
|
||||
continue
|
||||
@@ -45,6 +49,7 @@
|
||||
gender = PLURAL
|
||||
denied_type = /obj/item/crusher_trophy/demon_claws
|
||||
bonus_value = 10
|
||||
trophy_id = TROPHY_DEMON_CLAWS
|
||||
var/static/list/damage_heal_order = list(BRUTE, BURN, OXY)
|
||||
|
||||
/obj/item/crusher_trophy/demon_claws/effect_desc()
|
||||
@@ -68,6 +73,7 @@
|
||||
user.heal_ordered_damage(bonus_value * 0.1, damage_heal_order)
|
||||
|
||||
/obj/item/crusher_trophy/demon_claws/on_mark_detonation(mob/living/target, mob/living/user)
|
||||
. = ..()
|
||||
user.heal_ordered_damage(bonus_value * 0.4, damage_heal_order)
|
||||
|
||||
//colossus
|
||||
@@ -78,6 +84,7 @@
|
||||
gender = PLURAL
|
||||
denied_type = /obj/item/crusher_trophy/blaster_tubes
|
||||
bonus_value = 15
|
||||
trophy_id = TROPHY_BLASTER_TUBES
|
||||
var/deadly_shot = FALSE
|
||||
|
||||
/obj/item/crusher_trophy/blaster_tubes/effect_desc()
|
||||
@@ -92,6 +99,7 @@
|
||||
deadly_shot = FALSE
|
||||
|
||||
/obj/item/crusher_trophy/blaster_tubes/on_mark_detonation(mob/living/target, mob/living/user)
|
||||
. = ..()
|
||||
deadly_shot = TRUE
|
||||
addtimer(CALLBACK(src, PROC_REF(reset_deadly_shot)), 300, TIMER_UNIQUE|TIMER_OVERRIDE)
|
||||
|
||||
@@ -103,12 +111,14 @@
|
||||
name = "vortex talisman"
|
||||
desc = "A glowing trinket that was originally the Hierophant's beacon. Suitable as a trophy for a kinetic crusher."
|
||||
icon_state = "vortex_talisman"
|
||||
trophy_id = TROPHY_VORTEX
|
||||
denied_type = /obj/item/crusher_trophy/vortex_talisman
|
||||
|
||||
/obj/item/crusher_trophy/vortex_talisman/effect_desc()
|
||||
return "mark detonation to create a homing hierophant chaser"
|
||||
|
||||
/obj/item/crusher_trophy/vortex_talisman/on_mark_detonation(mob/living/target, mob/living/user)
|
||||
. = ..()
|
||||
if(isliving(target))
|
||||
var/obj/effect/temp_visual/hierophant/chaser/chaser = new(get_turf(user), user, target, 3, TRUE)
|
||||
chaser.monster_damage_boost = FALSE // Weaker cuz no cooldown
|
||||
@@ -120,12 +130,14 @@
|
||||
name = "ice block talisman"
|
||||
desc = "A glowing trinket that a demonic miner had on him, it seems he couldn't utilize it for whatever reason."
|
||||
icon_state = "ice_trap_talisman"
|
||||
trophy_id = TROPHY_ICE_BLOCK
|
||||
denied_type = /obj/item/crusher_trophy/ice_block_talisman
|
||||
|
||||
/obj/item/crusher_trophy/ice_block_talisman/effect_desc()
|
||||
return "mark detonation to freeze a creature in a block of ice for a period, preventing them from moving"
|
||||
|
||||
/obj/item/crusher_trophy/ice_block_talisman/on_mark_detonation(mob/living/target, mob/living/user)
|
||||
. = ..()
|
||||
target.apply_status_effect(/datum/status_effect/ice_block_talisman)
|
||||
|
||||
// Wendigo
|
||||
@@ -156,6 +168,7 @@
|
||||
icon_state = "broodmother_tongue"
|
||||
denied_type = /obj/item/crusher_trophy/broodmother_tongue
|
||||
bonus_value = 10
|
||||
trophy_id = TROPHY_BROOD_TONGUE
|
||||
/// Time at which the item becomes usable again
|
||||
var/use_time
|
||||
|
||||
@@ -163,6 +176,7 @@
|
||||
return "mark detonation to have a <b>[bonus_value]%</b> chance to summon a patch of goliath tentacles at the target's location"
|
||||
|
||||
/obj/item/crusher_trophy/broodmother_tongue/on_mark_detonation(mob/living/target, mob/living/user)
|
||||
. = ..()
|
||||
if(prob(bonus_value) && target.stat != DEAD)
|
||||
new /obj/effect/goliath_tentacle/broodmother/patch(get_turf(target), user)
|
||||
|
||||
@@ -189,6 +203,7 @@
|
||||
icon_state = "legionnaire_spine"
|
||||
denied_type = /obj/item/crusher_trophy/legionnaire_spine
|
||||
bonus_value = 20
|
||||
trophy_id = TROPHY_LEGIONNAIRE_SPINE
|
||||
/// Time at which the item becomes usable again
|
||||
var/next_use_time
|
||||
|
||||
@@ -196,6 +211,7 @@
|
||||
return "mark detonation to have a <b>[bonus_value]%</b> chance to summon a loyal legion skull"
|
||||
|
||||
/obj/item/crusher_trophy/legionnaire_spine/on_mark_detonation(mob/living/target, mob/living/user)
|
||||
. = ..()
|
||||
if(!prob(bonus_value) || target.stat == DEAD)
|
||||
return
|
||||
var/mob/living/basic/legion_brood/minion = new (user.loc)
|
||||
|
||||
Reference in New Issue
Block a user