diff --git a/code/modules/mob/living/simple_animal/hostile/dark_wizard.dm b/code/modules/mob/living/simple_animal/hostile/dark_wizard.dm index 6305c786d80..5c3e60c8377 100644 --- a/code/modules/mob/living/simple_animal/hostile/dark_wizard.dm +++ b/code/modules/mob/living/simple_animal/hostile/dark_wizard.dm @@ -38,3 +38,4 @@ damage = 4 damage_type = BURN flag = "energy" + temperature = -100 // closer to the old temp loss diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm index 7455461709f..0bf55c1a321 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm @@ -43,7 +43,7 @@ damage_type = BURN nodamage = TRUE flag = "energy" - temperature = 50 + temperature = -50 // Cools you down! per hit! /obj/projectile/temp/basilisk/heated name = "energy blast" @@ -186,7 +186,7 @@ mob/living/simple_animal/hostile/asteroid/basilisk/proc/cool_down() damage = 5 damage_type = BURN nodamage = FALSE - temperature = 500 //Heats you up! + temperature = 200 // Heats you up! per hit! /obj/projectile/temp/basilisk/magmawing/on_hit(atom/target, blocked = FALSE) . = ..() diff --git a/code/modules/projectiles/projectile/magic.dm b/code/modules/projectiles/projectile/magic.dm index a24ec941b57..1196acd7210 100644 --- a/code/modules/projectiles/projectile/magic.dm +++ b/code/modules/projectiles/projectile/magic.dm @@ -701,5 +701,5 @@ damage_type = BURN nodamage = FALSE armour_penetration = 100 - temperature = 50 + temperature = -200 // Cools you down greatly per hit flag = "magic" diff --git a/code/modules/projectiles/projectile/special/temperature.dm b/code/modules/projectiles/projectile/special/temperature.dm index dbabf2f8ef8..bc3fda6b93b 100644 --- a/code/modules/projectiles/projectile/special/temperature.dm +++ b/code/modules/projectiles/projectile/special/temperature.dm @@ -5,21 +5,36 @@ damage_type = BURN nodamage = FALSE flag = "energy" - var/temperature = 100 + var/temperature = -50 // reduce the body temperature by 50 points /obj/projectile/temp/on_hit(atom/target, blocked = 0) . = ..() - if(isliving(target)) + if(iscarbon(target)) + var/mob/living/carbon/hit_mob = target + var/thermal_protection = 1 // The inverse of the amount of protection + + if(temperature > 0) // The projectile is hot + thermal_protection -= hit_mob.get_heat_protection(hit_mob.bodytemperature + temperature) + else // The projectile was cold + thermal_protection -= hit_mob.get_cold_protection(hit_mob.bodytemperature + temperature) + + // The new body temperature is adjusted by 100-blocked % of the bullet's effect temperature + // Reduce the amount of the effect temperature change based on the amount of insulation the mob is wearing + hit_mob.adjust_bodytemperature(((100 - blocked) / 100) * (thermal_protection * temperature)) + + else if(isliving(target)) var/mob/living/L = target - L.adjust_bodytemperature(((100-blocked)/100)*(temperature - L.bodytemperature)) // the new body temperature is adjusted by 100-blocked % of the delta between body temperature and the bullet's effect temperature + // the new body temperature is adjusted by 100-blocked % of the bullet's effect temperature + L.adjust_bodytemperature(((100 - blocked) / 100) * temperature) /obj/projectile/temp/hot name = "heat beam" - temperature = 400 + temperature = 100 // Raise the body temp by 100 points /obj/projectile/temp/cryo name = "cryo beam" range = 3 + temperature = -240 // Single slow shot reduces temp greatly /obj/projectile/temp/cryo/on_range() var/turf/T = get_turf(src)