Files
MrMelbert eb0e842320 Hallucination revamps and additions (#89865)
## About The Pull Request

1. Hallucination effects are now tiered

Hallucinations now all have tiers, ranging from common to special. 
If you are just hallucinating a teeny bit, you will not experience the
more extreme hallucinations, like bubblegum or your mom.
But if you're hallucinating off your butt, you will be a bit more likely
to experience them.

2. Hallucination rate has been tweaked

Default hallucination cooldown is now 20-80 seconds, up from 10-60
seconds.
However the cooldown will *also* vary depending on just how much you're
hallucinating, going down to 10-40 seconds.

3. RDS is now capped a bit lower (meaning you don't see the higher tiers
like bubblegum).

But I added a preference to uncap it. For the people who actually like
bubblegum visits.

4. If a hallucination fails to trigger, the cooldown will partially
reset. (by 75%)

5. "Fake chat" hallucination will pick more viable subjects.

Fake chat will try to find someone who can actually speak your language,
rather than make a monkey speak mothic or something.
(I may revisit this so if you're super-hallucinating it reverts to old
behavior though.)

6. Adds a hallucination: Fake blood

You hallucinate that you start bleeding, very simple.

7. Adds a hallucination: Fake telepathy

You hallucinate a random telepathic message, similar to fake chat.

8. Adds a hallucination: Eyes in the Dark

A nearby dark turf will have a set of glowing red eyes shine through the
dark. A classic.

9. Adds some new sub-hallucination: PDA ringtone (fake sound), summon
guns/magic (fake item)

Funny prank.

10. Makes mindbreaker a bit more effective at combating RDS.

Pretty much does nothing right now unless you gulp like 50u.

## Why It's Good For The Game

Hallucinations are pretty one note if you experience them for longer
than 10 minutes.

This is due to two fold:
- Many hallucinations are goofy, and not subtle
- Hallucinations trigger very rapidly

You will never fall for a hallucination because in between "You see John
Greytide put the blueprints away", you get your mom yelling at you,
everyone looking like syndies (again), and bubblegum

This pr addresses it by
- Limiting the wacky hallucinations for when you're really off your
gourd
- Reducing the period between triggers
- Adding a few hallucinations

If the wackier hallucinations are reserved for when you're really off
your rocker, this lets the more subtle ones sink in over time, leaves
more room for second guessing

## Changelog

🆑 Melbert
add: Adds 4-5 new hallucinations. Collect them all.
balance: If you are only hallucinating a little bit, the game will
prefer to pick more subtle hallucinations. If you are hallucinating a
ton, it will prefer the more wacky hallucinations.
balance: If you are only hallucinating a little bit, the cooldown
between hallucinations is longer. If you are hallucinating a ton, it
will be shorter.
balance: If a hallucination fails to trigger (such as a deaf person
getting a sound hallucination) the next one will be a lot sooner.
balance: RDS hallucination amount is capped at mid tier hallucinations.
This means bubblegum and co. will be a lot rarer, or will even never
show. HOWEVER, there is now a preference allowing you to uncap your RDS
hallucinations.
balance: Mindbreaker toxin is more effective at suppressing RDS.
balance: Some hallucinations effects have been tweaked up or down
according to the new thresholds. Madness mask as an example.
fix: "Fake Fire" Hallucination works again, and now has a unique message
for if you stop-drop-roll that other people see.
/🆑
2025-03-20 21:36:56 +00:00

105 lines
3.2 KiB
Plaintext

/// Fake alert hallucination. Causes a fake alert to be thrown to the hallucinator.
/datum/hallucination/fake_alert
abstract_hallucination_parent = /datum/hallucination/fake_alert
random_hallucination_weight = 1
hallucination_tier = HALLUCINATION_TIER_COMMON
var/del_timer_id
/// The duration of the alert being thrown.
var/duration
/// The category of the fake alert
var/alert_category
/// The type of the fake alert. Can be a list, if you want it to draw from multiple types (randomly).
var/alert_type
/// Optional, the severity of the alert.
var/optional_severity
/datum/hallucination/fake_alert/New(mob/living/hallucinator, duration = 15 SECONDS)
src.duration = duration
return ..()
/datum/hallucination/fake_alert/Destroy()
if(del_timer_id)
deltimer(del_timer_id)
if(!QDELETED(hallucinator))
hallucinator.clear_alert(alert_category, clear_override = TRUE)
return ..()
/datum/hallucination/fake_alert/start()
var/picked_type = islist(alert_type) ? pick(alert_type) : alert_type
feedback_details += "Alert type: [alert_category], Actual type: [alert_type]"
hallucinator.throw_alert(
category = alert_category,
type = picked_type,
severity = optional_severity,
override = TRUE,
)
del_timer_id = QDEL_IN_STOPPABLE(src, duration)
return TRUE
/datum/hallucination/fake_alert/need_oxygen
alert_category = ALERT_NOT_ENOUGH_OXYGEN
alert_type = /atom/movable/screen/alert/not_enough_oxy
/datum/hallucination/fake_alert/need_plasma
alert_category = ALERT_NOT_ENOUGH_PLASMA
alert_type = /atom/movable/screen/alert/not_enough_plas
/datum/hallucination/fake_alert/need_co2
alert_category = ALERT_NOT_ENOUGH_CO2
alert_type = /atom/movable/screen/alert/not_enough_co2
/datum/hallucination/fake_alert/bad_oxygen
alert_category = ALERT_TOO_MUCH_OXYGEN
alert_type = /atom/movable/screen/alert/too_much_oxy
/datum/hallucination/fake_alert/bad_plasma
alert_category = ALERT_TOO_MUCH_PLASMA
alert_type = /atom/movable/screen/alert/too_much_plas
/datum/hallucination/fake_alert/bad_co2
alert_category = ALERT_TOO_MUCH_CO2
alert_type = /atom/movable/screen/alert/too_much_co2
/datum/hallucination/fake_alert/gravity
alert_category = ALERT_GRAVITY
alert_type = /atom/movable/screen/alert/weightless
/datum/hallucination/fake_alert/fire
alert_category = ALERT_FIRE
alert_type = /atom/movable/screen/alert/fire
/datum/hallucination/fake_alert/hot
alert_category = ALERT_TEMPERATURE
alert_type = /atom/movable/screen/alert/hot
optional_severity = 3
/datum/hallucination/fake_alert/cold
alert_category = ALERT_TEMPERATURE
alert_type = /atom/movable/screen/alert/cold
optional_severity = 3
/datum/hallucination/fake_alert/pressure
alert_category = ALERT_PRESSURE
alert_type = list(/atom/movable/screen/alert/highpressure, /atom/movable/screen/alert/lowpressure)
optional_severity = 2
/datum/hallucination/fake_alert/law
alert_category = ALERT_NEW_LAW
alert_type = /atom/movable/screen/alert/newlaw
/datum/hallucination/fake_alert/locked
alert_category = ALERT_LOCKED
alert_type = /atom/movable/screen/alert/locked
/datum/hallucination/fake_alert/hacked
alert_category = ALERT_HACKED
alert_type = /atom/movable/screen/alert/hacked
/datum/hallucination/fake_alert/need_charge
alert_category = ALERT_CHARGE
alert_type = /atom/movable/screen/alert/emptycell