Skip to content

Commit

Permalink
Merge pull request #75250 from CleverRaven/port_hallucinations
Browse files Browse the repository at this point in the history
[0.H backport] port hallucinations
  • Loading branch information
Maleclypse authored Jul 26, 2024
2 parents c086611 + a1bdad0 commit 2a9910a
Showing 1 changed file with 45 additions and 8 deletions.
53 changes: 45 additions & 8 deletions data/json/effects_on_condition/npc_eocs/hallucination_eocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
{
"type": "effect_on_condition",
"id": "bad_hallucinations",
"effect": [ { "weighted_list_eocs": [ [ "creature_hallucinations", 20 ], [ "visuals", 10 ] ] } ]
"effect": [ { "weighted_list_eocs": [ [ "creature_hallucinations", 20 ], [ "visuals", 10 ], [ "hallucination_swarm", 4 ] ] } ]
},
{
"type": "effect_on_condition",
Expand Down Expand Up @@ -98,19 +98,19 @@
{
"id": "injured_talk",
"condition": { "math": [ "n_hp('ALL')", "<", "n_hp_max('bp_null')" ] },
"effect": { "u_message": "Your weapon says \"<schizo_weapon_talk_damaged>\"" },
"effect": { "u_message": "Your <npc_name> says \"<schizo_weapon_talk_damaged>\"" },
"false_effect": {
"run_eocs": {
"id": "you_injured_talk",
"//": "Weapon will be concerned for you if you're significantly injured.",
"condition": { "math": [ "(u_hp('ALL') * 1.4)", "<", "u_hp_max('bp_null')" ] },
"effect": { "u_message": "Your weapon says \"<schizo_weapon_talk_bleeding>\"" },
"effect": { "u_message": "Your <npc_name> says \"<schizo_weapon_talk_bleeding>\"" },
"false_effect": {
"run_eocs": {
"id": "monsters_nearby_talk",
"condition": { "and": [ "u_can_see", { "math": [ "u_monsters_nearby('radius': 10)", ">=", "1" ] } ] },
"effect": { "u_message": "Your weapon says \"<schizo_weapon_talk_monster>\"" },
"false_effect": { "run_eocs": { "id": "normal_talk", "effect": { "u_message": "Your weapon says \"<schizo_weapon_talk_misc>\"" } } }
"effect": { "u_message": "Your <npc_name> says \"<schizo_weapon_talk_monster>\"" },
"false_effect": { "run_eocs": { "id": "normal_talk", "effect": { "u_message": "Your <npc_name> says \"<schizo_weapon_talk_misc>\"" } } }
}
}
}
Expand Down Expand Up @@ -174,10 +174,33 @@
{
"type": "effect_on_condition",
"id": "creature_hallucinations",
"//TODO": "ideally checks is the tile visible, and then spawns hallu where player can't see it",
"//": "If monsters are nearby, 3/4 chance to spawn some hallucinations of random monsters nearby and run again half the time, 1/4 chance to spawn some of YOUR_FEARS. If not, spawns some of YOUR_FEARS",
"//2": "avatar check to prevent NPCs from spawning hallucinations, that player can see",
"condition": { "and": [ { "math": [ "rand(3)", "<", "3" ] }, { "math": [ "u_monsters_nearby()", ">", "0" ] }, "u_is_avatar" ] },
"effect": [
{ "u_message": "You can't trust everything you see…", "type": "bad" },
{ "u_add_effect": "hallu", "duration": [ "1 hour", "3 hours" ] }
]
{
"u_spawn_monster": "",
"hallucination_count": { "math": [ "1 + rand(4)" ] },
"target_range": 50,
"lifespan": [ "2 hours", "9 hours" ]
},
{ "weighted_list_eocs": [ [ "creature_hallucinations", 1 ], [ "EOC_NONE", 1 ] ] }
],
"false_effect": { "run_eocs": "creature_hallucinations_fears" }
},
{
"type": "effect_on_condition",
"id": "creature_hallucinations_fears",
"//TODO": "ideally checks is the tile visible, and then spawns hallu where player can't see it",
"condition": "u_is_avatar",
"effect": {
"u_spawn_monster": "GROUP_YOUR_FEARS",
"group": true,
"hallucination_count": { "math": [ "1 + rand(2)" ] },
"max_radius": 40,
"lifespan": [ "1 hours", "4 hours" ]
}
},
{
"type": "effect_on_condition",
Expand All @@ -186,5 +209,19 @@
{ "u_message": "Your vision becomes very distorted…", "type": "bad" },
{ "u_add_effect": "visuals", "duration": [ 15, 60 ] }
]
},
{
"type": "effect_on_condition",
"id": "hallucination_swarm",
"condition": { "math": [ "u_monsters_nearby()", ">", "1" ] },
"effect": [
{
"u_spawn_monster": "",
"hallucination_count": [ 50, 100 ],
"target_range": 50,
"max_radius": 50,
"lifespan": [ "2 hours", "9 hours" ]
}
]
}
]

0 comments on commit 2a9910a

Please sign in to comment.