Skip to content

Commit 7821301

Browse files
RealestEstateShiftyRailwest3436
authored
Buffs to Ironrot Reagent (#37481)
* ironrot buffs * Update code/modules/reagents/reagents/reagents_bio.dm * Apply suggestions from code review Co-authored-by: west3436 <[email protected]> --------- Co-authored-by: realestestate <> Co-authored-by: ShiftyRail <[email protected]> Co-authored-by: west3436 <[email protected]>
1 parent 42f65a6 commit 7821301

File tree

1 file changed

+52
-7
lines changed

1 file changed

+52
-7
lines changed

code/modules/reagents/reagents/reagents_bio.dm

+52-7
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@
334334
to_chat(M,"<span class='notice'>You feel [pick("further from danger", "like you're losing something chasing you", "less hunted down")]...</span>")
335335

336336
var/stench_radius = clamp(volume * 0.1, 1, 6) //Stench starts out with 1 tile radius and grows after every 10 reagents on you
337-
337+
338338
var/alerted = 0
339339
for(var/mob/living/simple_animal/hostile/retaliate/R in view(stench_radius, M)) //All other retaliating hostile mobs in radius
340340
if(R == M || R.stat || R.hostile || (M in R.enemies))
@@ -461,37 +461,82 @@
461461
description = "A mutated fungal compound that causes rapid rotting in iron infrastructures."
462462
reagent_state = REAGENT_STATE_LIQUID
463463
color = "#005200" //moldy green
464+
var/roboorgan_damage=10
465+
var/melt_robolimb_threshold = 70
466+
var/robolimb_damage_multiplier =2 //all multiplier vars scale damage with volume
467+
var/robot_damage_multiplier = 2
468+
var/mecha_damage_multiplier = 2
464469

465470
/datum/reagent/ironrot/reaction_turf(var/turf/simulated/T, var/volume)
466471
if(..())
467472
return 1
468473

469-
if(volume >= 5 && T.can_thermite && istype(T, /turf/simulated/wall))
474+
if(istype(T,/turf/simulated/floor) && volume >= 1)
475+
var/turf/simulated/floor/F = T
476+
if(F.floor_tile?.material == "metal") //"rots away" metal floor tiles
477+
F.make_plating()
478+
if(istype(T, /turf/simulated/wall) && volume >= 5 &&T.can_thermite)
470479
var/turf/simulated/wall/W = T
471480
W.rot()
472481

473482
/datum/reagent/ironrot/on_mob_life(var/mob/living/M)
474483
if(..())
475484
return 1
476485

477-
M.adjustToxLoss(2 * REM)
486+
M.adjustToxLoss(1 * REM)
478487

479488
if(ishuman(M))
480489
var/mob/living/carbon/human/H = M
481490
var/datum/organ/external/chest/C = H.get_organ(LIMB_CHEST)
482491
for(var/datum/organ/internal/I in C.internal_organs)
483492
if(I.robotic == 2)
484-
I.take_damage(10, 0)//robo organs get damaged by ingested ironrot
493+
I.take_damage(roboorgan_damage, 0)//robo organs get damaged by ingested ironrot
485494

486495
/datum/reagent/ironrot/reaction_mob(var/mob/living/M, var/method = TOUCH, var/volume, var/list/zone_sels = ALL_LIMBS)
487496
if(..())
488497
return 1
489498

490499
if(method == TOUCH)
491500
if(issilicon(M))//borgs are hurt on touch by this chem
492-
M.adjustFireLoss(10)
493-
M.adjustBruteLoss(10)
494-
//todo : mech and pod damage
501+
M.adjustFireLoss(ceil((robot_damage_multiplier*volume)/2))
502+
M.adjustBruteLoss(ceil((robot_damage_multiplier*volume)/2))
503+
if(M.mob_property_flags & MOB_ROBOTIC)
504+
M.adjustFireLoss(ceil((robot_damage_multiplier*volume)/2))
505+
M.adjustBruteLoss(ceil((robot_damage_multiplier*volume)/2))
506+
if(ishuman(M))
507+
var/mob/living/carbon/human/H=M
508+
var/list/damaged_organs_list = new/list()
509+
for(var/datum/organ/external/affecting in H.organs)
510+
if(affecting.is_robotic()&& affecting.status != ORGAN_DESTROYED)
511+
if((affecting.get_health() + (robolimb_damage_multiplier*volume)) >= melt_robolimb_threshold)
512+
to_chat(H,"<span class = 'danger'>\The [src.name] completely corrodes away your [affecting.display_name]!</span>")
513+
affecting.dust()
514+
continue
515+
affecting.take_damage(ceil((robolimb_damage_multiplier*volume)/2),ceil((robolimb_damage_multiplier*volume)/2), 0, 0, used_weapon = "iron-rotting agent")
516+
damaged_organs_list.Add(affecting.display_name)
517+
if(damaged_organs_list) //formats the string to be less spammy using the message multiplier.
518+
var/ampersand = FALSE
519+
var/damaged_organs_string = ""
520+
for(var/organ_name in damaged_organs_list)
521+
damaged_organs_string = "[damaged_organs_string][ampersand? " & ":""][organ_name]"
522+
if(!ampersand)
523+
ampersand=TRUE
524+
to_chat(H, "<span class = 'warning'>The [src.name] burns your [damaged_organs_string]!</span>")
525+
526+
/datum/reagent/ironrot/reaction_obj(var/obj/O, var/volume)
527+
if(..())
528+
return 1
529+
530+
if(istype(O,/obj/mecha))
531+
var/obj/mecha/ME=O
532+
ME.take_damage(ceil((mecha_damage_multiplier*volume)/2), damage_type = "fire")
533+
ME.take_damage(ceil((mecha_damage_multiplier*volume)/2), damage_type = "brute")
534+
return
535+
if(istype(O,/obj/machinery/turret))
536+
var/obj/machinery/turret/TU = O
537+
TU.health-=mecha_damage_multiplier*volume
538+
if(O.w_type == RECYK_METAL)
539+
O.acid_melt()
495540

496541
/datum/reagent/mucus
497542
name = "Mucus"

0 commit comments

Comments
 (0)