diff --git a/code/datums/status_effects/gas.dm b/code/datums/status_effects/gas.dm new file mode 100644 index 00000000000..bdd80e7fc32 --- /dev/null +++ b/code/datums/status_effects/gas.dm @@ -0,0 +1,46 @@ +/datum/status_effect/freon + id = "frozen" + duration = 100 + status_type = STATUS_EFFECT_UNIQUE + alert_type = /obj/screen/alert/status_effect/freon + var/icon/cube + var/can_melt = TRUE + +/obj/screen/alert/status_effect/freon + name = "Frozen Solid" + desc = "You're frozen inside an ice cube, and cannot move! You can still do stuff, like shooting. Resist out of the cube!" + icon_state = "frozen" + +/datum/status_effect/freon/on_apply() + RegisterSignal(owner, COMSIG_LIVING_RESIST, .proc/owner_resist) + if(!owner.stat) + to_chat(owner, "You become frozen in a cube!") + cube = icon('icons/effects/freeze.dmi', "ice_cube") + owner.add_overlay(cube) + owner.update_canmove() + return ..() + +/datum/status_effect/freon/tick() + owner.update_canmove() + if(can_melt && owner.bodytemperature >= BODYTEMP_NORMAL) + qdel(src) + +/datum/status_effect/freon/proc/owner_resist() + to_chat(owner, "You start breaking out of the ice cube!") + if(do_mob(owner, owner, 40)) + if(!QDELETED(src)) + to_chat(owner, "You break out of the ice cube!") + owner.remove_status_effect(/datum/status_effect/freon) + owner.update_canmove() + +/datum/status_effect/freon/on_remove() + if(!owner.stat) + to_chat(owner, "The cube melts!") + owner.cut_overlay(cube) + owner.adjust_bodytemperature(100) + owner.update_canmove() + UnregisterSignal(owner, COMSIG_LIVING_RESIST) + +/datum/status_effect/freon/watcher + duration = 8 + can_melt = FALSE \ No newline at end of file diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index cd20656254f..882f0b6b047 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -617,6 +617,8 @@ return changeNext_move(CLICK_CD_RESIST) + SEND_SIGNAL(src, COMSIG_LIVING_RESIST, src) + if(!restrained()) if(resist_grab()) return diff --git a/code/modules/mob/living/simple_animal/hostile/mining/basilisk.dm b/code/modules/mob/living/simple_animal/hostile/mining/basilisk.dm index 4d5009109f3..4dbd306c9e0 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining/basilisk.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining/basilisk.dm @@ -132,7 +132,7 @@ . = ..() if(.) var/mob/living/L = target - if (istype(L)) + if(istype(L)) L.adjust_fire_stacks(0.1) L.IgniteMob() @@ -141,5 +141,12 @@ damage_type = BURN nodamage = FALSE +/obj/item/projectile/temp/basilisk/icewing/on_hit(atom/target, blocked = FALSE) + . = ..() + if(.) + var/mob/living/L = target + if(istype(L)) + L.apply_status_effect(/datum/status_effect/freon/watcher) + /mob/living/simple_animal/hostile/asteroid/basilisk/watcher/tendril fromtendril = TRUE \ No newline at end of file diff --git a/code/modules/mob/living/status_procs.dm b/code/modules/mob/living/status_procs.dm index 0794b7d9c70..ad6d00d88aa 100644 --- a/code/modules/mob/living/status_procs.dm +++ b/code/modules/mob/living/status_procs.dm @@ -556,6 +556,11 @@ genemutcheck(src, block,null, MUTCHK_FORCED) dna.UpdateSE() +///////////////////////////////// FROZEN ///////////////////////////////////// + +/mob/living/proc/IsFrozen() + return has_status_effect(/datum/status_effect/freon) + ///////////////////////////////////// STUN ABSORPTION ///////////////////////////////////// /mob/living/proc/add_stun_absorption(key, duration, priority, message, self_message, examine_message) diff --git a/code/modules/mob/living/update_status.dm b/code/modules/mob/living/update_status.dm index 39357533abb..bdaa0972aef 100644 --- a/code/modules/mob/living/update_status.dm +++ b/code/modules/mob/living/update_status.dm @@ -89,7 +89,7 @@ else if((fall_over || resting) && !lying) fall(fall_over) - canmove = !(fall_over || resting || stunned || buckled) + canmove = !(fall_over || resting || stunned || IsFrozen() || buckled) density = !lying if(lying) if(layer == initial(layer)) diff --git a/icons/effects/freeze.dmi b/icons/effects/freeze.dmi new file mode 100644 index 00000000000..04616190645 Binary files /dev/null and b/icons/effects/freeze.dmi differ diff --git a/icons/mob/screen_alert.dmi b/icons/mob/screen_alert.dmi index cb6a2c6bd64..2b29cad5b0c 100644 Binary files a/icons/mob/screen_alert.dmi and b/icons/mob/screen_alert.dmi differ diff --git a/paradise.dme b/paradise.dme index cda0cebff3e..b5e6fdac621 100644 --- a/paradise.dme +++ b/paradise.dme @@ -399,6 +399,7 @@ #include "code\datums\spells\wizard.dm" #include "code\datums\status_effects\buffs.dm" #include "code\datums\status_effects\debuffs.dm" +#include "code\datums\status_effects\gas.dm" #include "code\datums\status_effects\neutral.dm" #include "code\datums\status_effects\status_effect.dm" #include "code\datums\vr\level.dm"