mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 16:47:13 +01:00
Bane refactor (now uses damage multipliers) (#96003)
This commit is contained in:
@@ -92,11 +92,12 @@
|
||||
set_slot(new line(src), ROD_SLOT_LINE)
|
||||
|
||||
update_appearance()
|
||||
|
||||
//Bane effect that make it extra-effective against mobs with water adaptation (read: fish infusion)
|
||||
AddElement(/datum/element/bane, target_type = /mob/living, damage_multiplier = 1.25)
|
||||
RegisterSignal(src, COMSIG_OBJECT_PRE_BANING, PROC_REF(attempt_bane))
|
||||
RegisterSignal(src, COMSIG_OBJECT_ON_BANING, PROC_REF(bane_effects))
|
||||
AddComponent(/datum/component/bane, \
|
||||
damage_multiplier = 2.25, \
|
||||
should_bane_callback = CALLBACK(src, PROC_REF(should_bane_fish_infusions)), \
|
||||
on_bane_callback = CALLBACK(src, PROC_REF(on_bane_fish_infusions)), \
|
||||
label_text = "fishpeople", \
|
||||
)
|
||||
|
||||
/obj/item/fishing_rod/add_context(atom/source, list/context, obj/item/held_item, mob/user)
|
||||
if(src == held_item)
|
||||
@@ -260,18 +261,13 @@
|
||||
material_chance += user.mind?.get_skill_level(/datum/skill/fishing) * 1.5
|
||||
return material_chance
|
||||
|
||||
///Fishing rodss should only bane fish DNA-infused spessman
|
||||
/obj/item/fishing_rod/proc/attempt_bane(datum/source, mob/living/fish)
|
||||
SIGNAL_HANDLER
|
||||
if(!force || !HAS_TRAIT(fish, TRAIT_WATER_ADAPTATION))
|
||||
return COMPONENT_CANCEL_BANING
|
||||
/obj/item/fishing_rod/proc/should_bane_fish_infusions(mob/living/target)
|
||||
return force > 0 && HAS_TRAIT(target, TRAIT_WATER_ADAPTATION)
|
||||
|
||||
///Fishing rods should hard-counter fish DNA-infused spessman
|
||||
/obj/item/fishing_rod/proc/bane_effects(datum/source, mob/living/fish)
|
||||
SIGNAL_HANDLER
|
||||
fish.adjust_staggered_up_to(STAGGERED_SLOWDOWN_LENGTH, 4 SECONDS)
|
||||
fish.adjust_confusion_up_to(1.5 SECONDS, 3 SECONDS)
|
||||
fish.adjust_wet_stacks(-4)
|
||||
/obj/item/fishing_rod/proc/on_bane_fish_infusions(mob/living/target, mob/living/attacker)
|
||||
target.adjust_staggered_up_to(STAGGERED_SLOWDOWN_LENGTH, 4 SECONDS)
|
||||
target.adjust_confusion_up_to(1.5 SECONDS, 3 SECONDS)
|
||||
target.adjust_wet_stacks(-4)
|
||||
|
||||
/obj/item/fishing_rod/interact(mob/user)
|
||||
if(currently_hooked)
|
||||
|
||||
Reference in New Issue
Block a user