Skip to content

Commit

Permalink
Merge pull request #75128 from GuardianDll/npc_hallu
Browse files Browse the repository at this point in the history
fix NPCs spawning hallucinations, that player can see
  • Loading branch information
Maleclypse authored Jul 24, 2024
2 parents 591d326 + 4ae687c commit a24a4db
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
{
"type": "effect_on_condition",
"id": "self_shout",
"effect": { "u_make_sound": "schizo_self_shout", "volume": 20, "snippet": true, "type": "speech" }
"effect": { "u_make_sound": "schizo_self_shout", "volume": 20, "snippet": true }
},
{
"type": "effect_on_condition",
Expand Down Expand Up @@ -176,7 +176,8 @@
"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",
"condition": { "and": [ { "math": [ "rand(3)", "<", "3" ] }, { "math": [ "u_monsters_nearby()", ">", "0" ] } ] },
"//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_spawn_monster": "",
Expand All @@ -192,6 +193,7 @@
"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,
Expand Down

0 comments on commit a24a4db

Please sign in to comment.