mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-09 16:12:17 +00:00
[MIRROR] Fear and Phobias (#8857)
Co-authored-by: SatinIsle <98125273+SatinIsle@users.noreply.github.com> Co-authored-by: Kashargul <KashL@t-online.de>
This commit is contained in:
@@ -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) "(<a href='?_src_=holder;[HrefToken(TRUE)];adminmoreinfo=\ref[user]'>?</a>)"
|
||||
#define ADMIN_FLW(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];adminplayerobservefollow=\ref[user]'>FLW</a>)"
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -101,3 +101,5 @@
|
||||
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
|
||||
|
||||
@@ -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,
|
||||
SMITE_PIE, SMITE_SPICE, SMITE_HOTDOG) //CHOMP Add pie, spicy air and hot dog
|
||||
|
||||
var/smite_choice = tgui_input_list(usr, "Select the type of SMITE for [target]","SMITE Type Choice", smite_types)
|
||||
@@ -159,6 +159,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
|
||||
|
||||
if(SMITE_PIE) //CHOMP Add
|
||||
new/obj/effect/decal/cleanable/pie_smudge(get_turf(target))
|
||||
playsound(target, 'sound/effects/slime_squish.ogg', 100, 1, get_rand_frequency(), falloff = 5)
|
||||
|
||||
@@ -162,4 +162,6 @@
|
||||
// Custom Species Name
|
||||
var/custom_species
|
||||
|
||||
var/block_hud
|
||||
var/block_hud
|
||||
|
||||
var/phobias //For holding a list of phobias
|
||||
@@ -73,6 +73,8 @@
|
||||
|
||||
handle_heartbeat()
|
||||
handle_nif() //VOREStation Addition
|
||||
if(phobias)
|
||||
handle_phobias()
|
||||
if(!client)
|
||||
species.handle_npc(src)
|
||||
|
||||
@@ -1308,6 +1310,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("<span class='notice'>\The [src] suddenly drops their [stuff_to_drop].</span>","<span class='warning'>You drop your [stuff_to_drop]!</span>")
|
||||
if(prob(5))
|
||||
var/fear_self = pick(fear_message_self)
|
||||
var/fear_other = pick(fear_message_other)
|
||||
visible_message("<span class='notice'>\The [src][fear_other]</span>","<span class='warning'>[fear_self]</span>")
|
||||
else if(fear >= 30 && !isSynthetic())
|
||||
if(prob(2))
|
||||
var/fear_self = pick(fear_message_self)
|
||||
var/fear_other = pick(fear_message_other)
|
||||
visible_message("<span class='notice'>\The [src][fear_other]</span>","<span class='warning'>[fear_self]</span>")
|
||||
|
||||
if(paralysis || sleeping)
|
||||
blinded = 1
|
||||
set_stat(UNCONSCIOUS)
|
||||
@@ -1512,6 +1535,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"
|
||||
|
||||
58
code/modules/mob/living/carbon/human/phobias.dm
Normal file
58
code/modules/mob/living/carbon/human/phobias.dm
Normal file
@@ -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)
|
||||
@@ -1098,3 +1098,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
|
||||
|
||||
@@ -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."
|
||||
)
|
||||
|
||||
@@ -677,6 +677,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)
|
||||
|
||||
@@ -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, "<span class='warning'>Everything feels out of control...</span>")
|
||||
M.hallucination += 200
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.5 MiB After Width: | Height: | Size: 2.3 MiB |
@@ -3157,6 +3157,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"
|
||||
|
||||
Reference in New Issue
Block a user