diff --git a/code/__defines/admin.dm b/code/__defines/admin.dm index 38af783088..4895a51ae6 100644 --- a/code/__defines/admin.dm +++ b/code/__defines/admin.dm @@ -46,6 +46,7 @@ #define SMITE_BLUESPACEARTILLERY "Bluespace Artillery" #define SMITE_SPONTANEOUSCOMBUSTION "Spontaneous Combustion" #define SMITE_LIGHTNINGBOLT "Lightning Bolt" +#define SMITE_TERROR "Terrify" #define ADMIN_QUE(user) "(?)" #define ADMIN_FLW(user) "(FLW)" diff --git a/code/_onclick/hud/fullscreen.dm b/code/_onclick/hud/fullscreen.dm index 38646ccbc3..8841c19aa8 100644 --- a/code/_onclick/hud/fullscreen.dm +++ b/code/_onclick/hud/fullscreen.dm @@ -132,7 +132,10 @@ layer = FULLSCREEN_LAYER /obj/screen/fullscreen/fishbed - icon_state = "fishbed" + icon_state = "fishbed" + +/obj/screen/fullscreen/fear + icon_state = "fear" /obj/screen/fullscreen/lighting_backdrop icon = 'icons/mob/screen_gen.dmi' diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm index aa8764ea6a..2340df5681 100644 --- a/code/game/mecha/equipment/weapons/weapons.dm +++ b/code/game/mecha/equipment/weapons/weapons.dm @@ -97,4 +97,6 @@ var/mob/living/carbon/human/H = user if(H.species) P.accuracy += H.species.gun_accuracy_mod - P.dispersion = max(P.dispersion + H.species.gun_accuracy_dispersion_mod, 0) \ No newline at end of file + P.dispersion = max(P.dispersion + H.species.gun_accuracy_dispersion_mod, 0) + if(H.fear > 30) + P.accuracy -= 35 diff --git a/code/modules/admin/verbs/smite.dm b/code/modules/admin/verbs/smite.dm index 9ecaeec1a5..c7d8255161 100644 --- a/code/modules/admin/verbs/smite.dm +++ b/code/modules/admin/verbs/smite.dm @@ -9,7 +9,7 @@ return var/list/smite_types = list(SMITE_BREAKLEGS,SMITE_BLUESPACEARTILLERY,SMITE_SPONTANEOUSCOMBUSTION,SMITE_LIGHTNINGBOLT, - SMITE_SHADEKIN_ATTACK,SMITE_SHADEKIN_NOMF,SMITE_AD_SPAM,SMITE_REDSPACE_ABDUCT,SMITE_AUTOSAVE,SMITE_AUTOSAVE_WIDE) + SMITE_SHADEKIN_ATTACK,SMITE_SHADEKIN_NOMF,SMITE_AD_SPAM,SMITE_REDSPACE_ABDUCT,SMITE_AUTOSAVE,SMITE_AUTOSAVE_WIDE,SMITE_TERROR) var/smite_choice = tgui_input_list(usr, "Select the type of SMITE for [target]","SMITE Type Choice", smite_types) if(!smite_choice) @@ -158,6 +158,10 @@ if(target.client) target.client.create_fake_ad_popup_multiple(/obj/screen/popup/default, 15) + if(SMITE_TERROR) + if(ishuman(target)) + target.fear = 200 + else return //Injection? Don't print any messages. diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index 2a0bf0dc14..5b816be294 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -162,4 +162,6 @@ // Custom Species Name var/custom_species - var/block_hud \ No newline at end of file + var/block_hud + + var/phobias //For holding a list of phobias \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 12e7fa470c..6a75c780f2 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -73,6 +73,8 @@ handle_heartbeat() handle_nif() //VOREStation Addition + if(phobias) + handle_phobias() if(!client) species.handle_npc(src) @@ -1244,6 +1246,27 @@ if(tiredness >= 100) Sleeping(5) + if(fear) + fear = (fear - 1) + if(fear >= 80 && is_preference_enabled(/datum/client_preference/play_ambiance)) + if(last_fear_sound + 51 SECONDS <= world.time) + src << sound('sound/effects/Heart Beat.ogg',0,0,0,25) + last_fear_sound = world.time + if(fear >= 80 && !isSynthetic()) + if(prob(1) && get_active_hand()) + var/stuff_to_drop = get_active_hand() + drop_item() + visible_message("\The [src] suddenly drops their [stuff_to_drop].","You drop your [stuff_to_drop]!") + if(prob(5)) + var/fear_self = pick(fear_message_self) + var/fear_other = pick(fear_message_other) + visible_message("\The [src][fear_other]","[fear_self]") + else if(fear >= 30 && !isSynthetic()) + if(prob(2)) + var/fear_self = pick(fear_message_self) + var/fear_other = pick(fear_message_other) + visible_message("\The [src][fear_other]","[fear_self]") + if(paralysis || sleeping) blinded = 1 set_stat(UNCONSCIOUS) @@ -1442,6 +1465,19 @@ else clear_fullscreen("tired") + if(fear) + var/severity = 0 + switch(fear) + if(10 to 20) severity = 1 + if(20 to 30) severity = 2 + if(30 to 50) severity = 3 + if(50 to 70) severity = 4 + if(70 to 90) severity = 5 + if(90 to INFINITY) severity = 6 + overlay_fullscreen("fear", /obj/screen/fullscreen/fear, severity) + else + clear_fullscreen("fear") + if(healths) if (chem_effects[CE_PAINKILLER] > 100) healths.icon_state = "health_numb" diff --git a/code/modules/mob/living/carbon/human/phobias.dm b/code/modules/mob/living/carbon/human/phobias.dm new file mode 100644 index 0000000000..24c2c02efb --- /dev/null +++ b/code/modules/mob/living/carbon/human/phobias.dm @@ -0,0 +1,58 @@ +//Handling and defining of phobias and fears +#define NYCTOPHOBIA 1 +#define ARACHNOPHOBIA 2 +#define HEMOPHOBIA 4 +#define THALASSOPHOBIA 8 +#define CLAUSTROPHOBIA_MINOR 16 +#define CLAUSTROPHOBIA_MAJOR 32 +#define ANATIDAEPHOBIA 64 +#define AGRAVIAPHOBIA 128 + +/mob/living/carbon/human/proc/handle_phobias() + if(phobias & NYCTOPHOBIA) + var/turf/T = get_turf(src) + var/brightness = T.get_lumcount() + if(brightness < 0.2) + fear = min((fear + 3), 102) + if(phobias & ARACHNOPHOBIA) + for (var/mob/living/simple_mob/animal/giant_spider/S in viewers(src, null)) + if(!istype(S) || S.stat) + continue + fear = min((fear + 6), 102) + if(phobias & HEMOPHOBIA) + for(var/obj/effect/decal/cleanable/blood/B in view(7, src)) + var/obj/effect/decal/cleanable/blood/oil/O = B + var/obj/effect/decal/cleanable/blood/tracks/T = B + if(istype(O) || istype(T)) + continue + fear = min((fear + 2), 102) + for(var/turf/simulated/floor/water/blood/T in view(7, src)) + fear = min((fear + 2), 102) + if(phobias & THALASSOPHOBIA) + var/turf/T = get_turf(src) + if(istype(T,/turf/simulated/floor/water/underwater) || istype(T,/turf/simulated/floor/water/deep)) + fear = min((fear + 4), 102) + if(phobias & CLAUSTROPHOBIA_MINOR) + if(!isturf(loc)) + if(!istype(loc,/obj/belly) && !istype(loc,/obj/item/weapon/holder/micro)) + fear = min((fear + 3), 102) + if(phobias & CLAUSTROPHOBIA_MAJOR) //Also activated inside of a belly + if(!isturf(loc)) + if(!istype(loc,/obj/item/weapon/holder/micro)) + fear = min((fear + 3), 102) + if(phobias & ANATIDAEPHOBIA) + for (var/mob/living/simple_mob/animal/space/goose/G in viewers(src, null)) + if(!istype(G) || G.stat) + continue + fear = min((fear + 3), 102) + for (var/mob/living/simple_mob/animal/sif/duck/D in viewers(src, null)) + if(!istype(D) || D.stat) + continue + fear = min((fear + 3), 102) + for(var/obj/item/weapon/bikehorn/rubberducky/R in view(7, src)) + if(!istype(R)) + continue + fear = min((fear + 2), 102) + if(phobias & AGRAVIAPHOBIA) + if(is_floating) + fear = min((fear + 4), 102) diff --git a/code/modules/mob/living/carbon/human/species/station/traits_vr/neutral.dm b/code/modules/mob/living/carbon/human/species/station/traits_vr/neutral.dm index 2575d52dcf..d2257ee669 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits_vr/neutral.dm +++ b/code/modules/mob/living/carbon/human/species/station/traits_vr/neutral.dm @@ -1088,3 +1088,86 @@ /datum/trait/neutral/food_pref/coffee ) our_allergens = list(ALLERGEN_STIMULANT) + + +//////////////PHOBIAS///////////////// + +/datum/trait/neutral/nyctophobia + name = "Phobia: Nyctophobia" + desc = "You are afraid of the dark. When in very dark conditions, you will become afraid." + cost = 0 + custom_only = FALSE + +/datum/trait/neutral/nyctophobia/apply(var/datum/species/S,var/mob/living/carbon/human/H, var/trait_prefs = null) + ..() + H.phobias |= NYCTOPHOBIA + +/datum/trait/neutral/arachnophobia + name = "Phobia: Arachnophobia" + desc = "You are afraid of spiders. When you can see a large spider, you will become afraid." + cost = 0 + custom_only = FALSE + +/datum/trait/neutral/arachnophobia/apply(var/datum/species/S,var/mob/living/carbon/human/H, var/trait_prefs = null) + ..() + H.phobias |= ARACHNOPHOBIA + +/datum/trait/neutral/hemophobia + name = "Phobia: Hemophobia" + desc = "You are afraid of blood. When you can see large amounts of blood, you will become afraid." + cost = 0 + custom_only = FALSE + +/datum/trait/neutral/hemophobia/apply(var/datum/species/S,var/mob/living/carbon/human/H, var/trait_prefs = null) + ..() + H.phobias |= HEMOPHOBIA + +/datum/trait/neutral/thalassophobia + name = "Phobia: Thalassophobia" + desc = "You are afraid of deep water. When in deep water, you will become afraid." + cost = 0 + custom_only = FALSE + +/datum/trait/neutral/thalassophobia/apply(var/datum/species/S,var/mob/living/carbon/human/H, var/trait_prefs = null) + ..() + H.phobias |= THALASSOPHOBIA + +/datum/trait/neutral/clasutrophobia_minor + name = "Phobia: Claustrophobia (non-vore)" + desc = "You are afraid of tight, enclosed spaces. When inside of another object, you will become afraid." + cost = 0 + custom_only = FALSE + +/datum/trait/neutral/clasutrophobia_minor/apply(var/datum/species/S,var/mob/living/carbon/human/H, var/trait_prefs = null) + ..() + H.phobias |= CLAUSTROPHOBIA_MINOR + +/datum/trait/neutral/clasutrophobia_major + name = "Phobia: Claustrophobia (vore)" + desc = "You are afraid of tight, enclosed spaces. When inside of another object, including vore bellies, you will become afraid." + cost = 0 + custom_only = FALSE + +/datum/trait/neutral/clasutrophobia_major/apply(var/datum/species/S,var/mob/living/carbon/human/H, var/trait_prefs = null) + ..() + H.phobias |= CLAUSTROPHOBIA_MAJOR + +/datum/trait/neutral/anatidaephobia + name = "Phobia: Anatidaephobia" + desc = "You are afraid of ducks. When you can see a duck (even rubber ones), you will become afraid." + cost = 0 + custom_only = FALSE + +/datum/trait/neutral/anatidaephobia/apply(var/datum/species/S,var/mob/living/carbon/human/H, var/trait_prefs = null) + ..() + H.phobias |= ANATIDAEPHOBIA + +/datum/trait/neutral/agraviaphobia + name = "Phobia: Agraviaphobia" + desc = "You are afraid of a lack of gravity. When you find yourself floating, you will become afraid." + cost = 0 + custom_only = FALSE + +/datum/trait/neutral/agraviaphobia/apply(var/datum/species/S,var/mob/living/carbon/human/H, var/trait_prefs = null) + ..() + H.phobias |= AGRAVIAPHOBIA diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm index 6635200baa..697337a26d 100644 --- a/code/modules/mob/living/living_defines.dm +++ b/code/modules/mob/living/living_defines.dm @@ -83,3 +83,26 @@ var/datum/inventory_panel/inventory_panel var/last_resist_time = 0 // world.time of the most recent resist that wasn't on cooldown. var/tiredness = 0 //For vore draining + var/fear = 0 //For fear effects and phobias + var/last_fear_sound = 0 //For making sure the heartbeats don't play over each other + + var/list/fear_message_self = list( + "Your heart is racing, it feels like it's going burst from your chest.", + "Your stomach clenches and churns with anxiety.", + "It's getting hard to breathe, you're panting heavily.", + "You feel your eyes straining.", + "A sharp shiver runs down your spine.", + "You feel like you are drowning.", + "You feel your palms clamming up.", + "Your legs feel weak, you can barely control them.", + "You have difficulty even swallowing." + ) + var/list/fear_message_other = list( + "'s eyes are darting around the room rapidly.", + " looks like they are shivering, literally shaking.", + " is breathing rapidly.", + " looks profoundly uncomfortable.", + "s literally trembling in front of you.", + "'s hands are shaking.", + " is rocking slightly from side to side." + ) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 6c2aafb0c8..ac6faeb412 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -658,6 +658,8 @@ if(H.species) P.accuracy += H.species.gun_accuracy_mod P.dispersion = max(P.dispersion + H.species.gun_accuracy_dispersion_mod, 0) + if(H.fear > 30) + P.accuracy -= 35 //does the actual launching of the projectile /obj/item/weapon/gun/proc/process_projectile(obj/projectile, mob/user, atom/target, var/target_zone, var/params=null) diff --git a/code/modules/reagents/reagents/drugs.dm b/code/modules/reagents/reagents/drugs.dm index 28a42a5b48..f24d1c8397 100644 --- a/code/modules/reagents/reagents/drugs.dm +++ b/code/modules/reagents/reagents/drugs.dm @@ -232,6 +232,11 @@ high_message_list = list("Everything feels a bit more steady.", "Your mind feels stable.") sober_message_list = list("You feel a little tired.", "You feel a little more listless...") +/datum/reagent/drugs/citalopram/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) + ..() + + M.fear = max((M.fear - 3),0) + /datum/reagent/drugs/paroxetine name = "Paroxetine" id = "paroxetine" @@ -243,6 +248,8 @@ /datum/reagent/drugs/paroxetine/affect_blood(mob/living/carbon/M, var/alien, var/removed) ..() + + M.fear = max((M.fear - 6),0) if(prob(5) && prob_proc == TRUE) to_chat(M, "Everything feels out of control...") M.hallucination += 200 diff --git a/icons/mob/screen_full.dmi b/icons/mob/screen_full.dmi index e8602a41ce..14d3b54d9f 100644 Binary files a/icons/mob/screen_full.dmi and b/icons/mob/screen_full.dmi differ diff --git a/vorestation.dme b/vorestation.dme index 73e66c7613..44b467cb41 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -2942,6 +2942,7 @@ #include "code\modules\mob\living\carbon\human\logout.dm" #include "code\modules\mob\living\carbon\human\MedicalSideEffects.dm" #include "code\modules\mob\living\carbon\human\npcs.dm" +#include "code\modules\mob\living\carbon\human\phobias.dm" #include "code\modules\mob\living\carbon\human\say.dm" #include "code\modules\mob\living\carbon\human\stripping.dm" #include "code\modules\mob\living\carbon\human\unarmed_attack.dm"