From 14a6b14ab3d6facf59b10c2ad5fe8a328023cd5b Mon Sep 17 00:00:00 2001 From: ursulamejor Date: Mon, 18 Nov 2019 22:27:24 -0800 Subject: [PATCH 1/2] UM-036 - Chill Pill Tweak - Ice Cubes now cool down mobs inside of them at -40 degrees / cycle - When Ice Cubes cool you down, they take 1 damage - Cryosty no longer instantly cools you to 0 - Passive Cryosty cooling reduced from -50 to -10 per cycle - Cryosty ice cube now has a health of volume ingested/5 - Cryoxadone now warms you up when it heals you at +35 degrees/cycle - Cryoxadone now needs you to be at (base_temp - 100) instead of (base_temp - 45) to heal --- code/datums/abilities/wizard/iceburst.dm | 11 +++++++++++ code/datums/chemistry/Reagents-Medical.dm | 3 ++- code/datums/chemistry/Reagents-Misc.dm | 7 ++++--- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/code/datums/abilities/wizard/iceburst.dm b/code/datums/abilities/wizard/iceburst.dm index 49d8236e..4438c5de 100644 --- a/code/datums/abilities/wizard/iceburst.dm +++ b/code/datums/abilities/wizard/iceburst.dm @@ -98,6 +98,10 @@ src.underlays += iced boutput(iced, "You are trapped within [src]!") // since this is used in at least two places to trap people in things other than ice cubes src.health *= (rand(10,20)/10) + + if (!(src in processing_items)) + processing_items.Add(src) + return relaymove(mob/user as mob) @@ -110,6 +114,12 @@ qdel(src) return + proc/process() + for(var/mob/M in src) + if (M.bodytemperature > 0) + M.bodytemperature = max(M.bodytemperature-40,0) + src.health-- + attack_hand(mob/user as mob) user.visible_message("[user] kicks [src]!", "You kick [src].") @@ -151,6 +161,7 @@ return disposing() + processing_items.Remove(src) for(var/atom/movable/AM in src) if(ismob(AM)) var/mob/M = AM diff --git a/code/datums/chemistry/Reagents-Medical.dm b/code/datums/chemistry/Reagents-Medical.dm index 64398e34..bb6742fd 100644 --- a/code/datums/chemistry/Reagents-Medical.dm +++ b/code/datums/chemistry/Reagents-Medical.dm @@ -993,12 +993,13 @@ datum on_mob_life(var/mob/M) if(!M) M = holder.my_atom - if(M.bodytemperature < M.base_body_temp - 45) + if(M.bodytemperature < M.base_body_temp - 100) if(M.get_oxygen_deprivation()) M.take_oxygen_deprivation(-10) if(M.get_toxin_damage()) M.take_toxin_damage(-3) M.HealDamage("All", 12, 12) + M.bodytemperature = min(M.bodytemperature+35,M.base_body_temp) M.updatehealth() if(prob(25)) M.UpdateDamageIcon() // gonna leave this one on for now, but only call it a quarter of the time diff --git a/code/datums/chemistry/Reagents-Misc.dm b/code/datums/chemistry/Reagents-Misc.dm index 03c86023..09d2f9ce 100644 --- a/code/datums/chemistry/Reagents-Misc.dm +++ b/code/datums/chemistry/Reagents-Misc.dm @@ -736,14 +736,15 @@ datum if (M.bioHolder) if (!M.is_cold_resistant()) - new /obj/icecube(get_turf(M), M) - M.bodytemperature = 0 + var/obj/icecube/I = new/obj/icecube(get_turf(M), M) + I.health = max(volume_passed/5,1) + //M.bodytemperature = 0 return on_mob_life(var/mob/M) if (!M) M = holder.my_atom if (M.bodytemperature > 0) - M.bodytemperature = max(M.bodytemperature-50,0) + M.bodytemperature = max(M.bodytemperature-10,0) ..(M) return From a1c33e2dff4cb05eec10dbc157ff8f2015f69def Mon Sep 17 00:00:00 2001 From: ursulamejor Date: Wed, 20 Nov 2019 20:30:54 -0800 Subject: [PATCH 2/2] UM-036 - Chill Pill Tweak - Fixed bug with ice cubes not bursting on their own due to heating mobs inside them - Adjusted cryox to only heat you when it heals you, and even then, only proportional to amount healed --- code/datums/abilities/wizard/iceburst.dm | 18 ++++++++++-------- code/datums/chemistry/Reagents-Medical.dm | 5 ++++- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/code/datums/abilities/wizard/iceburst.dm b/code/datums/abilities/wizard/iceburst.dm index 4438c5de..20bf2cb5 100644 --- a/code/datums/abilities/wizard/iceburst.dm +++ b/code/datums/abilities/wizard/iceburst.dm @@ -110,8 +110,7 @@ if(prob(25)) src.health-- - if(src.health <= 0) - qdel(src) + src.check_health() return proc/process() @@ -119,14 +118,20 @@ if (M.bodytemperature > 0) M.bodytemperature = max(M.bodytemperature-40,0) src.health-- + src.check_health() attack_hand(mob/user as mob) user.visible_message("[user] kicks [src]!", "You kick [src].") src.health -= 2 + src.check_health() + return + + proc/check_health() if(src.health <= 0) qdel(src) - return + return 1 + return 0 bullet_act(var/obj/projectile/P) var/damage = 0 @@ -147,15 +152,12 @@ if(D_ENERGY) src.health -= (damage/4) - if(src.health <= 0) - qdel(src) - + src.check_health() return attackby(obj/item/W as obj, mob/user as mob) src.health -= W.force - if(src.health <= 0) - qdel(src) + if(src.check_health()) return ..() return diff --git a/code/datums/chemistry/Reagents-Medical.dm b/code/datums/chemistry/Reagents-Medical.dm index bb6742fd..4f9bf2e0 100644 --- a/code/datums/chemistry/Reagents-Medical.dm +++ b/code/datums/chemistry/Reagents-Medical.dm @@ -994,12 +994,15 @@ datum on_mob_life(var/mob/M) if(!M) M = holder.my_atom if(M.bodytemperature < M.base_body_temp - 100) + var/health_before = M.health if(M.get_oxygen_deprivation()) M.take_oxygen_deprivation(-10) if(M.get_toxin_damage()) M.take_toxin_damage(-3) M.HealDamage("All", 12, 12) - M.bodytemperature = min(M.bodytemperature+35,M.base_body_temp) + if(M.health > health_before) + var/increase = min((M.health - health_before)/37*25,25) //12+12+3+10 = 37 health healed possible, 25 max temp increase possible + M.bodytemperature = min(M.bodytemperature+increase,M.base_body_temp) M.updatehealth() if(prob(25)) M.UpdateDamageIcon() // gonna leave this one on for now, but only call it a quarter of the time