-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Jsonify addictions: convert harcoded effects to EOCs
- Loading branch information
Showing
7 changed files
with
355 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,175 @@ | ||
[ | ||
{ | ||
"type": "effect_on_condition", | ||
"id": "EOC_CAFFEINE_ADDICTION", | ||
"condition": { "compare_int": [ { "rand": 2000 }, "<", { "u_val": "addiction_intensity", "addiction": "caffeine", "mod": 20 } ] }, | ||
"effect": [ | ||
{ "u_message": "You want some caffeine.", "type": "warning" }, | ||
{ "u_add_morale": "morale_craving_caffeine", "bonus": -5, "max_bonus": -30 }, | ||
{ | ||
"run_eocs": [ | ||
{ | ||
"id": "EOC_CAFFEINE_ADDICTION_MODSTIM", | ||
"condition": { | ||
"and": [ | ||
{ "compare_int": [ { "u_val": "stim" }, ">", { "u_val": "addiction_intensity", "addiction": "caffeine", "mod": -10 } ] }, | ||
{ | ||
"compare_int": [ { "rand": 10 }, "<", { "u_val": "addiction_intensity", "addiction": "caffeine" } ] | ||
} | ||
] | ||
}, | ||
"effect": { "arithmetic": [ { "u_val": "stim" }, "-=", { "const": 1 } ] } | ||
}, | ||
{ | ||
"id": "EOC_CAFFEINE_ADDICTION_SHAKES", | ||
"condition": { | ||
"and": [ | ||
{ "compare_int": [ { "const": 8 }, ">=", { "u_val": "addiction_intensity", "addiction": "caffeine" } ] }, | ||
{ | ||
"compare_int": [ { "rand": 392 }, "<", { "u_val": "addiction_intensity", "addiction": "caffeine" } ] | ||
} | ||
] | ||
}, | ||
"effect": [ | ||
{ "u_message": "Your hands start shaking… you need it bad!", "type": "bad" }, | ||
{ "u_add_effect": "shakes", "duration": "2 minutes" } | ||
] | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "effect_on_condition", | ||
"id": "EOC_SLEEP_ADDICTION", | ||
"//": "Actual effects processed in player::can_sleep(). Here, only prolong this addiction longer than usual.", | ||
"condition": { | ||
"and": [ | ||
{ "compare_int": [ { "rand": 2 }, "==", { "const": 1 } ] }, | ||
{ "compare_int": [ { "u_val": "addiction_turns", "addiction": "sleeping pill" }, "<", { "const": 0 } ] } | ||
] | ||
}, | ||
"effect": { "arithmetic": [ { "u_val": "addiction_turns", "addiction": "sleeping pill" }, "+=", { "const": 1 } ] } | ||
}, | ||
{ | ||
"type": "effect_on_condition", | ||
"id": "EOC_MARLOSS_R_ADDICTION", | ||
"condition": { "compare_int": [ { "rand": 800 }, "<", { "u_val": "addiction_intensity", "addiction": "marloss_r", "mod": 20 } ] }, | ||
"effect": [ | ||
{ "u_add_morale": "morale_craving_marloss", "bonus": -5, "max_bonus": -30 }, | ||
{ "u_message": "You daydream about luscious pink berries as big as your fist.", "type": "info" }, | ||
{ | ||
"run_eocs": [ | ||
{ | ||
"id": "EOC_MARLOSS_R_ADDICTION_MODFOCUS", | ||
"condition": { "compare_int": [ { "u_val": "focus" }, ">", { "const": 40 } ] }, | ||
"effect": { "arithmetic": [ { "u_val": "focus" }, "-=", { "const": 1 } ] } | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "effect_on_condition", | ||
"id": "EOC_MARLOSS_B_ADDICTION", | ||
"condition": { "compare_int": [ { "rand": 800 }, "<", { "u_val": "addiction_intensity", "addiction": "marloss_b", "mod": 20 } ] }, | ||
"effect": [ | ||
{ "u_add_morale": "morale_craving_marloss", "bonus": -5, "max_bonus": -30 }, | ||
{ "u_message": "You daydream about nutty cyan seeds as big as your hand.", "type": "info" }, | ||
{ | ||
"run_eocs": [ | ||
{ | ||
"id": "EOC_MARLOSS_B_ADDICTION_MODFOCUS", | ||
"condition": { "compare_int": [ { "u_val": "focus" }, ">", { "const": 40 } ] }, | ||
"effect": { "arithmetic": [ { "u_val": "focus" }, "-=", { "const": 1 } ] } | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "effect_on_condition", | ||
"id": "EOC_MARLOSS_Y_ADDICTION", | ||
"condition": { "compare_int": [ { "rand": 800 }, "<", { "u_val": "addiction_intensity", "addiction": "marloss_y", "mod": 20 } ] }, | ||
"effect": [ | ||
{ "u_add_morale": "morale_craving_marloss", "bonus": -5, "max_bonus": -30 }, | ||
{ "u_message": "You daydream about succulent, pale golden gel, sweet but light.", "type": "info" }, | ||
{ | ||
"run_eocs": [ | ||
{ | ||
"id": "EOC_MARLOSS_Y_ADDICTION_MODFOCUS", | ||
"condition": { "compare_int": [ { "u_val": "focus" }, ">", { "const": 40 } ] }, | ||
"effect": { "arithmetic": [ { "u_val": "focus" }, "-=", { "const": 1 } ] } | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "effect_on_condition", | ||
"id": "EOC_MUTAGEN_ADDICTION", | ||
"condition": { "u_has_trait": "MUT_JUNKIE" }, | ||
"effect": [ | ||
{ | ||
"run_eocs": [ | ||
{ | ||
"id": "EOC_MUTAGEN_ADDICTION_JUNKIE_MORALE", | ||
"condition": { "compare_int": [ { "rand": 600 }, "<", { "u_val": "addiction_intensity", "addiction": "mutagen", "mod": 50 } ] }, | ||
"effect": [ | ||
{ | ||
"run_eocs": [ | ||
{ | ||
"id": "EOC_MUTAGEN_ADDICTION_JUNKIE_MORALE_MSG", | ||
"condition": { "compare_int": [ { "rand": 6 }, "<", { "u_val": "addiction_intensity", "addiction": "mutagen" } ] }, | ||
"effect": { "u_message": "You so miss the exquisite rainbow of post-humanity.", "type": "warning" }, | ||
"false_effect": { "u_message": "Your body is SOO booorrrring. Just a little sip to liven things up?", "type": "warning" } | ||
} | ||
] | ||
}, | ||
{ "u_add_morale": "morale_craving_mutagen", "bonus": -20, "max_bonus": -200 } | ||
] | ||
}, | ||
{ | ||
"id": "EOC_MUTAGEN_ADDICTION_JUNKIE_FOCUS", | ||
"condition": { | ||
"and": [ | ||
{ "compare_int": [ { "u_val": "focus" }, ">", { "const": 40 } ] }, | ||
{ | ||
"compare_int": [ { "rand": 800 }, "<", { "u_val": "addiction_intensity", "addiction": "mutagen", "mod": 20 } ] | ||
} | ||
] | ||
}, | ||
"effect": [ | ||
{ "arithmetic": [ { "u_val": "focus" }, "-=", { "u_val": "addiction_intensity", "addiction": "mutagen" } ] }, | ||
{ | ||
"u_message": "You daydream what it'd be like if you were *different*. Different is good.", | ||
"type": "warning" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"false_effect": { | ||
"run_eocs": [ | ||
{ | ||
"id": "EOC_MUTAGEN_ADDICTION_NOJUNKIE", | ||
"condition": { "compare_int": [ { "rand": 500 }, "<", { "u_val": "addiction_intensity", "addiction": "mutagen", "mod": 15 } ] }, | ||
"effect": [ | ||
{ | ||
"run_eocs": [ | ||
{ | ||
"id": "EOC_MUTAGEN_ADDICTION_NOJUNKIE_MSG", | ||
"condition": { "compare_int": [ { "rand": 6 }, "<", { "u_val": "addiction_intensity", "addiction": "mutagen" } ] }, | ||
"effect": { "u_message": "You haven't had any mutagen lately.", "type": "warning" }, | ||
"false_effect": { "u_message": "You could use some new parts…", "type": "warning" } | ||
} | ||
] | ||
}, | ||
{ "u_add_morale": "morale_craving_mutagen", "bonus": -5, "max_bonus": -50 } | ||
] | ||
} | ||
] | ||
} | ||
} | ||
] |
Oops, something went wrong.