Skip to content

Commit

Permalink
what the fuck is this syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
Karol1223 committed Jul 10, 2024
1 parent 83d9ac5 commit 82c1ab9
Showing 1 changed file with 41 additions and 42 deletions.
83 changes: 41 additions & 42 deletions data/json/effects_on_condition/effects_eocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,47 +120,46 @@
{ "u_lose_effect": "dermatik" }
]
},
[
{
"type": "effect_on_condition",
"id": "EOC_FORMICATION_INIT",
"eoc_type": "EVENT",
"required_event": "character_gains_effect",
"condition": { "compare_string": [ "formication", { "context_val": "effect" } ] },
"effect": [ { "queue_eocs": "EOC_FORMICATION", "time_in_future": "1 s" } ]
},
{
"type": "effect_on_condition",
"id": "EOC_FORMICATION",
"condition": { "u_has_effect": "formication" },
"effect": [
{
"if": { "or": [ { "u_has_effect": "narcosis" }, { "u_has_effect": "sleep" } ] },
"else": { "run_eocs": [ "EOC_TRY_SCRATCH" ] }
{
"type": "effect_on_condition",
"id": "EOC_FORMICATION_INIT",
"eoc_type": "EVENT",
"required_event": "character_gains_effect",
"condition": { "compare_string": [ "formication", { "context_val": "effect" } ] },
"effect": [ { "queue_eocs": "EOC_FORMICATION", "time_in_future": "1 s" } ]
},
{
"type": "effect_on_condition",
"id": "EOC_FORMICATION",
"condition": { "u_has_effect": "formication" },
"effect": [
{
"if": { "or": [ { "u_has_effect": "narcosis" }, { "u_has_effect": "sleep" } ] },
"else": { "run_eocs": [ "EOC_TRY_SCRATCH" ] }
},
{ "queue_eocs": "EOC_FORMICATION", "time_in_future": "1 s" }
]
},
{
"type": "effect_on_condition",
"id": "EOC_TRY_SCRATCH",
"effect": [
{
"if": {
"x_in_y_chance": {
"x": { "math": [ "u_effect_intensity('formication', 'bodypart': _bodypart)" ] },
"y": { "math": [ "600 + 300 * u_val('intelligence')" ] }
}
},
{ "queue_eocs": "EOC_FORMICATION", "time_in_future": "1 s" }
]
},
{
"type": "effect_on_condition",
"id": "EOC_TRY_SCRATCH",
"effect": [
{
"if": {
"x_in_y_chance": {
"x": { "math": [ "u_effect_intensity('formication', 'bodypart': _bodypart)" ] },
"y": { "math": [ "600 + 300 * u_val('intelligence')" ] }
}
},
"then": [
{ "u_message": "You start scratching yourself!" },
{ "npc_message": "<npc_name> stars scratching themselves!" },
{ "turn_cost": 1.5 },
{ "math": [ "u_pain()", "++" ] },
{ "math": [ "hp(_bodypart)", "--" ] }
],
"else": { "u_message": "You want to scratch yourself badly, but you force yourself to stop." }
}
]
}
"then": [
{ "u_message": "You start scratching yourself!" },
{ "npc_message": "<npc_name> stars scratching themselves!" },
{ "turn_cost": 1.5 },
{ "math": [ "u_pain()", "++" ] },
{ "math": [ "hp(_bodypart)", "--" ] }
],
"else": { "u_message": "You want to scratch yourself badly, but you force yourself to stop." }
}
]
}
]

0 comments on commit 82c1ab9

Please sign in to comment.