Skip to content

Commit

Permalink
[MoM] Add pseudo tool to nether crystal outcroppings, add that tool a…
Browse files Browse the repository at this point in the history
…s a possibility to contemplation recipes (CleverRaven#72794)

* Create pseudo.json

* Add pseudo-tool to glowing crystal

* Update practice recipes

* Detect nearby nether crystals, then check if they're still nearby

* Add observed effect

* Add missing spaces
  • Loading branch information
Standing-Storm authored Apr 16, 2024
1 parent cc2b057 commit 14fd9ea
Show file tree
Hide file tree
Showing 14 changed files with 647 additions and 194 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1103,67 +1103,5 @@
{ "u_message": "As you concentrate on your powers, you feel a burning sensation in your veins!", "type": "bad" },
{ "math": [ "u_pain()", "+=", "rand(4) + 1" ] }
]
},
{
"type": "effect_on_condition",
"id": "EOC_NETHER_ATTENTION_NIGHTMARES",
"eoc_type": "EVENT",
"required_event": "character_wakes_up",
"condition": { "and": [ { "u_has_effect": "psi_nether_attention" }, { "x_in_y_chance": { "x": 1, "y": 3 } } ] },
"effect": [
{ "u_message": "psi_nether_attention_nightmares", "snippet": true, "type": "bad" },
{ "u_add_morale": "morale_nightmare", "bonus": [ -15, -30 ], "max_bonus": -30 },
{ "math": [ "u_vitamin('vitamin_psionic_drain')", "+=", "rand(7) + 3" ] }
]
},
{
"type": "effect_on_condition",
"id": "EOC_PSIONICS_NETHER_AREA_CHECK",
"eoc_type": "EVENT",
"//": "The locations below should contain everything related to the Nether",
"required_event": "spellcasting_finish",
"condition": {
"and": [
{ "test_eoc": "EOC_CONDITION_SPELLCASTING_FINISH_TRAIT_AND_SCHOOL_LIST" },
{
"or": [
{ "test_eoc": "EOC_CONDITION_CAUGHT_IN_NETHER_WEATHER" },
{ "test_eoc": "EOC_CONDITION_NEAR_NETHER_RELATED_LOCATION" }
]
}
]
},
"effect": [
{ "math": [ "u_vitamin('vitamin_psionic_drain')", "+=", "rand( 1 )" ] },
{
"run_eocs": [
{
"id": "EOC_PSIONICS_NETHER_AREA_ATTENTION_CHECK",
"condition": {
"and": [
{ "not": { "u_has_effect": "effect_telepathic_psi_armor" } },
{
"x_in_y_chance": {
"x": {
"math": [
"rand(50 * (1 + (nether_attune_difficulty_scaler(u_latest_channeled_power_difficulty)) - ( u_skill('metaphysics') / 2 ) ) )"
]
},
"y": 1000
}
}
]
},
"effect": [
{
"u_message": "The hairs stand up on the back of your neck. You have a strong feeling that you're being watched.",
"type": "bad"
},
{ "u_add_effect": "psi_nether_attention", "duration": "7 days" }
]
}
]
}
]
}
]
115 changes: 115 additions & 0 deletions data/mods/MindOverMatter/effectoncondition/eoc_observed.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
[
{
"type": "effect_on_condition",
"id": "EOC_PSIONICS_NETHER_AREA_CHECK",
"eoc_type": "EVENT",
"required_event": "spellcasting_finish",
"condition": {
"and": [
{ "test_eoc": "EOC_CONDITION_SPELLCASTING_FINISH_TRAIT_AND_SCHOOL_LIST" },
{
"or": [
{ "test_eoc": "EOC_CONDITION_CAUGHT_IN_NETHER_WEATHER" },
{ "test_eoc": "EOC_CONDITION_NEAR_NETHER_RELATED_LOCATION" }
]
}
]
},
"effect": [
{ "math": [ "u_vitamin('vitamin_psionic_drain')", "+=", "rand( 1 )" ] },
{
"run_eocs": [
{
"id": "EOC_PSIONICS_NETHER_AREA_ATTENTION_CHECK",
"condition": {
"and": [
{ "test_eoc": "EOC_PORTAL_STORM_CONDITION_FLAG_PORTAL_PROOF" },
{
"x_in_y_chance": {
"x": {
"math": [
"rand(50 * (1 + (nether_attune_difficulty_scaler(u_latest_channeled_power_difficulty)) - ( u_skill('metaphysics') / 2 ) ) )"
]
},
"y": 1000
}
}
]
},
"effect": [
{
"u_message": "The hairs stand up on the back of your neck. You have a strong feeling that you're being watched.",
"type": "bad"
},
{ "u_add_effect": "psi_nether_attention", "duration": "7 days" }
]
}
]
}
]
},
{
"type": "effect_on_condition",
"id": "EOC_OBSERVED_SIDE_EFFECTS",
"effect": {
"switch": { "math": [ "u_effect_intensity('psi_nether_attention')" ] },
"cases": [ { "case": 1, "effect": { "weighted_list_eocs": [ [ "EOC_OBSERVED_EFFECT_HEARING_SOUNDS", 1 ] ] } } ]
}
},
{
"type": "effect_on_condition",
"id": "EOC_OBSERVED_EFFECT_HEARING_SOUNDS",
"effect": { "u_message": "observed_effect_hearing_sounds", "snippet": true }
},
{
"type": "effect_on_condition",
"id": "EOC_CHECK_NEAR_NETHER_CRYSTAL_RECURRING",
"recurrence": [ "2 hours", "16 hours" ],
"effect": [
{
"u_location_variable": { "u_val": "near_nether_crystal_coordinate_check" },
"target_min_radius": 0,
"target_max_radius": 6,
"furniture": "f_nether_crystal_structure",
"true_eocs": [
{
"id": "EOC_CHECK_NEAR_NETHER_CRYSTAL_FOLLOWUP",
"effect": [ { "queue_eocs": "EOC_CHECK_NEAR_NETHER_CRYSTAL_FOLLOWUP_2", "time_in_future": "30 minutes" } ]
}
]
}
]
},
{
"type": "effect_on_condition",
"id": "EOC_CHECK_NEAR_NETHER_CRYSTAL_FOLLOWUP_2",
"effect": [
{
"u_location_variable": { "u_val": "near_nether_crystal_coordinate_check" },
"target_min_radius": 0,
"target_max_radius": 6,
"furniture": "f_nether_crystal_structure",
"true_eocs": "EOC_CHECK_NEAR_NETHER_CRYSTAL_EFFECTS"
}
]
},
{
"type": "effect_on_condition",
"id": "EOC_CHECK_NEAR_NETHER_CRYSTAL_EFFECTS",
"condition": { "u_has_effect": "psi_nether_attention" },
"effect": [ { "run_eocs": "EOC_OBSERVED_SIDE_EFFECTS" } ],
"false_effect": { "run_eocs": "EOC_PSIONICS_NETHER_AREA_ATTENTION_CHECK" }
},
{
"type": "effect_on_condition",
"id": "EOC_NETHER_ATTENTION_NIGHTMARES",
"eoc_type": "EVENT",
"required_event": "character_wakes_up",
"condition": { "and": [ { "u_has_effect": "psi_nether_attention" }, { "x_in_y_chance": { "x": 1, "y": 3 } } ] },
"effect": [
{ "u_message": "psi_nether_attention_nightmares", "snippet": true, "type": "bad" },
{ "u_add_morale": "morale_nightmare", "bonus": [ -15, -30 ], "max_bonus": -30 },
{ "math": [ "u_vitamin('vitamin_psionic_drain')", "+=", "rand(7) + 3" ] }
]
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@
"looks_like": "f_boulder_large",
"coverage": 75,
"required_str": 32,
"crafting_pseudo_item": "black_nether_crystal_pseudo_tool",
"flags": [ "NOITEM", "MINEABLE", "BLOCK_WIND" ],
"bash": {
"str_min": 25,
Expand Down
13 changes: 13 additions & 0 deletions data/mods/MindOverMatter/items/tools/pseudo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[
{
"id": "black_nether_crystal_pseudo_tool",
"type": "TOOL",
"name": { "str": "nether crystal outcropping" },
"description": "This is the pseudo-tool provided by having a nearby cluster of black nether crystal. You shouldn't see this as an individual item.",
"symbol": "O",
"color": "red",
"weight": "0 g",
"volume": "0 ml",
"flags": [ "ZERO_WEIGHT" ]
}
]
60 changes: 45 additions & 15 deletions data/mods/MindOverMatter/recipes/practice/biokinetic_practice.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@
"time": "30 m",
"autolearn": false,
"proficiencies": [ { "proficiency": "prof_contemplation_biokinesis", "required": false } ],
"tools": [ [ [ "matrix_crystal_drained", -1 ], [ "matrix_crystal_biokinesis", -1 ] ] ],
"tools": [
[ [ "matrix_crystal_drained", -1 ], [ "black_nether_crystal_pseudo_tool", -1 ], [ "matrix_crystal_biokinesis", -1 ] ]
],
"flags": [ "SECRET", "BLIND_HARD" ],
"result_eocs": [
{
Expand Down Expand Up @@ -71,7 +73,9 @@
"time": "30 m",
"autolearn": false,
"proficiencies": [ { "proficiency": "prof_contemplation_biokinesis", "required": false } ],
"tools": [ [ [ "matrix_crystal_drained", -1 ], [ "matrix_crystal_biokinesis", -1 ] ] ],
"tools": [
[ [ "matrix_crystal_drained", -1 ], [ "black_nether_crystal_pseudo_tool", -1 ], [ "matrix_crystal_biokinesis", -1 ] ]
],
"flags": [ "SECRET", "BLIND_HARD" ],
"result_eocs": [
{
Expand Down Expand Up @@ -100,7 +104,9 @@
"time": "30 m",
"autolearn": false,
"proficiencies": [ { "proficiency": "prof_contemplation_biokinesis", "required": false } ],
"tools": [ [ [ "matrix_crystal_drained", -1 ], [ "matrix_crystal_biokinesis", -1 ] ] ],
"tools": [
[ [ "matrix_crystal_drained", -1 ], [ "black_nether_crystal_pseudo_tool", -1 ], [ "matrix_crystal_biokinesis", -1 ] ]
],
"flags": [ "SECRET", "BLIND_HARD" ],
"result_eocs": [
{
Expand Down Expand Up @@ -180,7 +186,9 @@
"time": "30 m",
"autolearn": false,
"proficiencies": [ { "proficiency": "prof_contemplation_biokinesis", "required": false } ],
"tools": [ [ [ "matrix_crystal_drained", -1 ], [ "matrix_crystal_biokinesis", -1 ] ] ],
"tools": [
[ [ "matrix_crystal_drained", -1 ], [ "black_nether_crystal_pseudo_tool", -1 ], [ "matrix_crystal_biokinesis", -1 ] ]
],
"flags": [ "SECRET", "BLIND_HARD" ],
"result_eocs": [
{
Expand Down Expand Up @@ -256,7 +264,9 @@
"time": "30 m",
"autolearn": false,
"proficiencies": [ { "proficiency": "prof_contemplation_biokinesis", "required": false } ],
"tools": [ [ [ "matrix_crystal_drained", -1 ], [ "matrix_crystal_biokinesis", -1 ] ] ],
"tools": [
[ [ "matrix_crystal_drained", -1 ], [ "black_nether_crystal_pseudo_tool", -1 ], [ "matrix_crystal_biokinesis", -1 ] ]
],
"flags": [ "SECRET", "BLIND_HARD" ],
"result_eocs": [
{
Expand Down Expand Up @@ -332,7 +342,9 @@
"time": "30 m",
"autolearn": false,
"proficiencies": [ { "proficiency": "prof_contemplation_biokinesis", "required": false } ],
"tools": [ [ [ "matrix_crystal_drained", -1 ], [ "matrix_crystal_biokinesis", -1 ] ] ],
"tools": [
[ [ "matrix_crystal_drained", -1 ], [ "black_nether_crystal_pseudo_tool", -1 ], [ "matrix_crystal_biokinesis", -1 ] ]
],
"components": [ [ [ "matrix_crystal_biokin_dust", 1 ] ] ],
"flags": [ "SECRET", "BLIND_HARD" ],
"result_eocs": [
Expand Down Expand Up @@ -409,7 +421,9 @@
"time": "30 m",
"autolearn": false,
"proficiencies": [ { "proficiency": "prof_contemplation_biokinesis", "required": false } ],
"tools": [ [ [ "matrix_crystal_drained", -1 ], [ "matrix_crystal_biokinesis", -1 ] ] ],
"tools": [
[ [ "matrix_crystal_drained", -1 ], [ "black_nether_crystal_pseudo_tool", -1 ], [ "matrix_crystal_biokinesis", -1 ] ]
],
"components": [ [ [ "matrix_crystal_biokin_dust", 1 ] ] ],
"flags": [ "SECRET", "BLIND_HARD" ],
"result_eocs": [
Expand Down Expand Up @@ -486,7 +500,9 @@
"time": "30 m",
"autolearn": false,
"proficiencies": [ { "proficiency": "prof_contemplation_biokinesis", "required": false } ],
"tools": [ [ [ "matrix_crystal_drained", -1 ], [ "matrix_crystal_biokinesis", -1 ] ] ],
"tools": [
[ [ "matrix_crystal_drained", -1 ], [ "black_nether_crystal_pseudo_tool", -1 ], [ "matrix_crystal_biokinesis", -1 ] ]
],
"components": [ [ [ "matrix_crystal_biokin_dust", 1 ] ] ],
"flags": [ "SECRET", "BLIND_HARD" ],
"result_eocs": [
Expand Down Expand Up @@ -563,7 +579,9 @@
"time": "30 m",
"autolearn": false,
"proficiencies": [ { "proficiency": "prof_contemplation_biokinesis", "required": false } ],
"tools": [ [ [ "matrix_crystal_drained", -1 ], [ "matrix_crystal_biokinesis", -1 ] ] ],
"tools": [
[ [ "matrix_crystal_drained", -1 ], [ "black_nether_crystal_pseudo_tool", -1 ], [ "matrix_crystal_biokinesis", -1 ] ]
],
"components": [ [ [ "matrix_crystal_biokin_dust", 1 ] ] ],
"flags": [ "SECRET", "BLIND_HARD" ],
"result_eocs": [
Expand Down Expand Up @@ -640,7 +658,9 @@
"time": "30 m",
"autolearn": false,
"proficiencies": [ { "proficiency": "prof_contemplation_biokinesis", "required": false } ],
"tools": [ [ [ "matrix_crystal_drained", -1 ], [ "matrix_crystal_biokinesis", -1 ] ] ],
"tools": [
[ [ "matrix_crystal_drained", -1 ], [ "black_nether_crystal_pseudo_tool", -1 ], [ "matrix_crystal_biokinesis", -1 ] ]
],
"components": [ [ [ "matrix_crystal_biokin_dust", 1 ] ] ],
"flags": [ "SECRET", "BLIND_HARD" ],
"result_eocs": [
Expand Down Expand Up @@ -717,7 +737,9 @@
"time": "30 m",
"autolearn": false,
"proficiencies": [ { "proficiency": "prof_contemplation_biokinesis", "required": false } ],
"tools": [ [ [ "matrix_crystal_drained", -1 ], [ "matrix_crystal_biokinesis", -1 ] ] ],
"tools": [
[ [ "matrix_crystal_drained", -1 ], [ "black_nether_crystal_pseudo_tool", -1 ], [ "matrix_crystal_biokinesis", -1 ] ]
],
"components": [ [ [ "matrix_crystal_biokin_dust", 1 ] ] ],
"flags": [ "SECRET", "BLIND_HARD" ],
"result_eocs": [
Expand Down Expand Up @@ -794,7 +816,9 @@
"time": "30 m",
"autolearn": false,
"proficiencies": [ { "proficiency": "prof_contemplation_biokinesis", "required": false } ],
"tools": [ [ [ "matrix_crystal_drained", -1 ], [ "matrix_crystal_biokinesis", -1 ] ] ],
"tools": [
[ [ "matrix_crystal_drained", -1 ], [ "black_nether_crystal_pseudo_tool", -1 ], [ "matrix_crystal_biokinesis", -1 ] ]
],
"components": [ [ [ "matrix_crystal_biokin_dust", 1 ] ] ],
"flags": [ "SECRET", "BLIND_HARD" ],
"result_eocs": [
Expand Down Expand Up @@ -871,7 +895,9 @@
"time": "30 m",
"autolearn": false,
"proficiencies": [ { "proficiency": "prof_contemplation_biokinesis", "required": false } ],
"tools": [ [ [ "matrix_crystal_drained", -1 ], [ "matrix_crystal_biokinesis", -1 ] ] ],
"tools": [
[ [ "matrix_crystal_drained", -1 ], [ "black_nether_crystal_pseudo_tool", -1 ], [ "matrix_crystal_biokinesis", -1 ] ]
],
"components": [ [ [ "matrix_crystal_biokin_dust", 1 ] ] ],
"flags": [ "SECRET", "BLIND_HARD" ],
"result_eocs": [
Expand Down Expand Up @@ -948,7 +974,9 @@
"time": "30 m",
"autolearn": false,
"proficiencies": [ { "proficiency": "prof_contemplation_biokinesis", "required": false } ],
"tools": [ [ [ "matrix_crystal_drained", -1 ], [ "matrix_crystal_biokinesis", -1 ] ] ],
"tools": [
[ [ "matrix_crystal_drained", -1 ], [ "black_nether_crystal_pseudo_tool", -1 ], [ "matrix_crystal_biokinesis", -1 ] ]
],
"components": [ [ [ "matrix_crystal_biokin_dust", 1 ] ] ],
"flags": [ "SECRET", "BLIND_HARD" ],
"result_eocs": [
Expand Down Expand Up @@ -1025,7 +1053,9 @@
"time": "30 m",
"autolearn": false,
"proficiencies": [ { "proficiency": "prof_contemplation_biokinesis", "required": false } ],
"tools": [ [ [ "matrix_crystal_drained", -1 ], [ "matrix_crystal_biokinesis", -1 ] ] ],
"tools": [
[ [ "matrix_crystal_drained", -1 ], [ "black_nether_crystal_pseudo_tool", -1 ], [ "matrix_crystal_biokinesis", -1 ] ]
],
"components": [ [ [ "matrix_crystal_biokin_dust", 1 ] ] ],
"flags": [ "SECRET", "BLIND_HARD" ],
"result_eocs": [
Expand Down
Loading

0 comments on commit 14fd9ea

Please sign in to comment.