Skip to content

Commit

Permalink
[s] Hallucinations 4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
XDTM authored and letterjay committed May 9, 2018
1 parent 3d0ae02 commit ec3516e
Show file tree
Hide file tree
Showing 16 changed files with 676 additions and 612 deletions.
2 changes: 1 addition & 1 deletion code/datums/brain_damage/severe.dm
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
to_chat(owner, "<span class='warning'>You feel really lonely...</span>")
else
to_chat(owner, "<span class='warning'>You're going mad with loneliness!</span>")
owner.hallucination += 20
owner.hallucination += 30

if(5)
if(!high_stress)
Expand Down
5 changes: 5 additions & 0 deletions code/datums/traits/negative.dm
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@
if(prob(2)) //we'll all be mad soon enough
madness()

<<<<<<< HEAD
/datum/trait/insanity/proc/madness(mad_fools)
set waitfor = FALSE
if(!mad_fools)
Expand All @@ -240,6 +241,10 @@
new hallucination_type (trait_holder, FALSE)
else
trait_holder.hallucination += rand(10, 50)
=======
/datum/quirk/insanity/proc/madness()
quirk_holder.hallucination += rand(10, 25)
>>>>>>> aa782ff... [s] Hallucinations 4.0 (#37423)

/datum/trait/insanity/post_add() //I don't /think/ we'll need this but for newbies who think "roleplay as insane" = "license to kill" it's probably a good thing to have
if(!trait_holder.mind || trait_holder.mind.special_role)
Expand Down
32 changes: 2 additions & 30 deletions code/game/machinery/doors/airlock.dm
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,12 @@
return
else
return
else if(user.hallucinating() && ishuman(user) && prob(4) && !operating)
else if(user.hallucinating() && ishuman(user) && prob(1) && !operating)
var/mob/living/carbon/human/H = user
if(H.gloves)
var/obj/item/clothing/gloves/G = H.gloves
if(G.siemens_coefficient)//not insulated
hallucinate_shock(H)
new /datum/hallucination/shock(H)
return
if (cyclelinkedairlock)
if (!shuttledocked && !emergency && !cyclelinkedairlock.shuttledocked && !cyclelinkedairlock.emergency && allowed(user))
Expand All @@ -338,34 +338,6 @@
addtimer(CALLBACK(cyclelinkedairlock, .proc/close), 2)
..()

/obj/machinery/door/airlock/proc/hallucinate_shock(mob/living/user)
var/image/shock_image = image(user, user, dir = user.dir)
var/image/electrocution_skeleton_anim = image('icons/mob/human.dmi', user, icon_state = "electrocuted_base", layer=ABOVE_MOB_LAYER)
shock_image.color = rgb(0,0,0)
shock_image.override = TRUE
electrocution_skeleton_anim.appearance_flags |= RESET_COLOR|KEEP_APART

to_chat(user, "<span class='userdanger'>You feel a powerful shock course through your body!</span>")
if(user.client)
user.client.images |= shock_image
user.client.images |= electrocution_skeleton_anim
addtimer(CALLBACK(src, .proc/reset_hallucinate_shock_animation, user, shock_image, electrocution_skeleton_anim), 40)
user.playsound_local(get_turf(src), "sparks", 100, 1)
user.staminaloss += 50
user.Stun(40)
user.jitteriness += 1000
user.do_jitter_animation(user.jitteriness)
addtimer(CALLBACK(src, .proc/hallucinate_shock_drop, user), 20)

/obj/machinery/door/airlock/proc/reset_hallucinate_shock_animation(mob/living/user, shock_image, electrocution_skeleton_anim)
if(user.client)
user.client.images.Remove(shock_image)
user.client.images.Remove(electrocution_skeleton_anim)

/obj/machinery/door/airlock/proc/hallucinate_shock_drop(mob/living/user)
user.jitteriness = max(user.jitteriness - 990, 10) //Still jittery, but vastly less
user.Knockdown(60)

/obj/machinery/door/airlock/proc/isElectrified()
if(src.secondsElectrified != NOT_ELECTRIFIED)
return TRUE
Expand Down
2 changes: 1 addition & 1 deletion code/modules/antagonists/abductor/equipment/gland.dm
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
H.confused += 15
H.adjustBrainLoss(10, 160)
if(3)
H.hallucination += 80
H.hallucination += 60

/obj/item/organ/heart/gland/pop
cooldown_low = 900
Expand Down
6 changes: 3 additions & 3 deletions code/modules/antagonists/changeling/powers/tiny_prick.dm
Original file line number Diff line number Diff line change
Expand Up @@ -214,19 +214,19 @@
/obj/effect/proc_holder/changeling/sting/LSD
name = "Hallucination Sting"
desc = "Causes terror in the target."
helptext = "We evolve the ability to sting a target with a powerful hallucinogenic chemical. The target does not notice they have been stung, and the effect occurs after 30 to 60 seconds."
helptext = "We evolve the ability to sting a target with a powerful hallucinogenic chemical. The target does not notice they have been stung, and the effect begins after a few seconds."
sting_icon = "sting_lsd"
chemical_cost = 10
dna_cost = 1

/obj/effect/proc_holder/changeling/sting/LSD/sting_action(mob/user, mob/living/carbon/target)
add_logs(user, target, "stung", "LSD sting")
addtimer(CALLBACK(src, .proc/hallucination_time, target), rand(300,600))
addtimer(CALLBACK(src, .proc/hallucination_time, target), rand(100,200))
return TRUE

/obj/effect/proc_holder/changeling/sting/LSD/proc/hallucination_time(mob/living/carbon/target)
if(target)
target.hallucination = max(400, target.hallucination)
target.hallucination = max(90, target.hallucination)

/obj/effect/proc_holder/changeling/sting/cryo
name = "Cryogenic Sting"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/antagonists/cult/blood_magic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@
if(!ishuman(target) || iscultist(target))
return
var/mob/living/carbon/human/H = target
H.hallucination = max(H.hallucination, 240)
H.hallucination = max(H.hallucination, 120)
SEND_SOUND(ranged_ability_user, sound('sound/effects/ghost.ogg',0,1,50))
var/image/C = image('icons/effects/cult_effects.dmi',H,"bloodsparkles", ABOVE_MOB_LAYER)
add_alt_appearance(/datum/atom_hud/alternate_appearance/basic/cult, "cult_apoc", C, FALSE)
Expand Down
17 changes: 11 additions & 6 deletions code/modules/events/mass_hallucination.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,27 @@
/datum/round_event/mass_hallucination/start()
switch(rand(1,4))
if(1) //same sound for everyone
var/sound = pick("explosion","far_explosion","phone","alarm","hallelujah","creepy","ratvar","shuttle_dock",
"wall_decon","door_hack","blob_alert","tesla","malf_ai","meteors")
var/sound = pick("airlock","airlock_pry","console","explosion","far_explosion","mech","glass","alarm","beepsky","mech","wall_decon","door_hack","tesla")
for(var/mob/living/carbon/C in GLOB.alive_mob_list)
new /datum/hallucination/sounds(C, TRUE, sound)
if(2 to 4)
if(2)
var/weirdsound = pick("phone","hallelujah","highlander","hyperspace","game_over","creepy","tesla")
for(var/mob/living/carbon/C in GLOB.alive_mob_list)
new /datum/hallucination/weird_sounds(C, TRUE, weirdsound)
if(3)
var/stationmessage = pick("ratvar","shuttle_dock","blob_alert","malf_ai","meteors","supermatter")
for(var/mob/living/carbon/C in GLOB.alive_mob_list)
new /datum/hallucination/stationmessage(C, TRUE, stationmessage)
if(4 to 6)
var/picked_hallucination = pick( /datum/hallucination/bolts,
/datum/hallucination/whispers,
/datum/hallucination/chat,
/datum/hallucination/message,
/datum/hallucination/bolts,
/datum/hallucination/fake_flood,
/datum/hallucination/battle,
/datum/hallucination/fire,
/datum/hallucination/self_delusion,
/datum/hallucination/fakeattacker,
/datum/hallucination/death,
/datum/hallucination/xeno_attack,
/datum/hallucination/delusion,
/datum/hallucination/oh_yeah)
for(var/mob/living/carbon/C in GLOB.alive_mob_list)
Expand Down
Loading

0 comments on commit ec3516e

Please sign in to comment.