diff --git a/data/mods/MindOverMatter/PowerDescriptionSpoilers.md b/data/mods/MindOverMatter/PowerDescriptionSpoilers.md index 1e47b6ceed29f..f6855bbd1e858 100644 --- a/data/mods/MindOverMatter/PowerDescriptionSpoilers.md +++ b/data/mods/MindOverMatter/PowerDescriptionSpoilers.md @@ -575,6 +575,15 @@ Powers causing photokinetic damage have a 40% chance to blind the target for 3 s *Effects*: Unleash a burst of electromagnetic waves, overloading any electronic sensors within the target area. Any robots caught in the blast will be unable to perceive their environment for the power's duration.
*Prerequisites*: Star Flash 5 *or* Photon Beam 4, Radio Transception 6
+## Gamma Sterilization (C) +*Difficulty*: 5
+*Target*: Self
+*Duration*: 10 seconds per item of food sterilized
+*Stamina Cost*: 7500, minus 200 per level to a minimum of 4000
+*Channeling Time*: 15 seconds
+*Effects*: Irradiate food, killing bacteria and helping to preserve it for far longer. The psion may irradiate as much food as they can carry, but it takes longer the greater amount of food they wish to irradiate (40g per second time). Every 10 to 15 seconds spent irradiating costs the psion 1 to 3 calories.
+*Prerequisites*: Lucent Barrier 7, Chameleoflage 4, Illuminate 9 *or* Photon Beam 5 *or* Star Flash 3
+ ## Veil of Light (C) *Difficulty*: 6
*Target*: Self
diff --git a/data/mods/MindOverMatter/activity_types.json b/data/mods/MindOverMatter/activity_types.json index 40921ed8f416c..7eb84b21b343e 100644 --- a/data/mods/MindOverMatter/activity_types.json +++ b/data/mods/MindOverMatter/activity_types.json @@ -15,6 +15,15 @@ "rooted": true, "based_on": "time" }, + { + "id": "ACT_PSI_PHOTOKIN_RADIATION_STERILIZATION", + "type": "activity_type", + "activity_level": "LIGHT_EXERCISE", + "verb": "sterilizing", + "based_on": "time", + "can_resume": false, + "completion_eoc": "EOC_PHOTOKIN_RADIATION_STERILIZATION_FINALIZE" + }, { "id": "ACT_PSI_STUDYING_POWER", "type": "activity_type", diff --git a/data/mods/MindOverMatter/effectoncondition/eoc_learn_recipes.json b/data/mods/MindOverMatter/effectoncondition/eoc_learn_recipes.json index 22854292b930f..230d88c011e8a 100644 --- a/data/mods/MindOverMatter/effectoncondition/eoc_learn_recipes.json +++ b/data/mods/MindOverMatter/effectoncondition/eoc_learn_recipes.json @@ -439,6 +439,7 @@ "EOC_CHECK_GAMEBEGIN_PHOTOKIN_RECIPE_HIDE_UGLY", "EOC_CHECK_GAMEBEGIN_PHOTOKIN_RECIPE_LIGHT_IMAGE", "EOC_CHECK_GAMEBEGIN_PHOTOKIN_RECIPE_RADIO", + "EOC_CHECK_GAMEBEGIN_PHOTOKIN_RECIPE_STERILIZE_FOOD", "EOC_CHECK_GAMEBEGIN_PHOTOKIN_RECIPE_STUN_ROBOTS", "EOC_CHECK_GAMEBEGIN_PHOTOKIN_RECIPE_INVISIBILITY", "EOC_CHECK_GAMEBEGIN_PHOTOKIN_RECIPE_LIGHT_FLASH", @@ -518,6 +519,14 @@ "condition": { "and": [ { "u_has_trait": "PHOTOKINETIC" }, { "math": [ "u_spell_level('photokinetic_radio')", ">=", "0" ] } ] }, "effect": [ { "u_learn_recipe": "practice_photokinetic_radio" } ] }, + { + "type": "effect_on_condition", + "id": "EOC_CHECK_GAMEBEGIN_PHOTOKIN_RECIPE_STERILIZE_FOOD", + "condition": { + "and": [ { "u_has_trait": "PHOTOKINETIC" }, { "math": [ "u_spell_level('photokinetic_sterilize_food')", ">=", "0" ] } ] + }, + "effect": [ { "u_learn_recipe": "practice_photokinetic_sterilize_food" } ] + }, { "type": "effect_on_condition", "id": "EOC_CHECK_GAMEBEGIN_PHOTOKIN_RECIPE_STUN_ROBOTS", diff --git a/data/mods/MindOverMatter/effects/effects_psionic.json b/data/mods/MindOverMatter/effects/effects_psionic.json index ecc8323e99526..fa287b73cc54c 100644 --- a/data/mods/MindOverMatter/effects/effects_psionic.json +++ b/data/mods/MindOverMatter/effects/effects_psionic.json @@ -1273,6 +1273,13 @@ "rating": "good", "max_duration": "7 days" }, + { + "type": "effect_type", + "id": "effect_photokin_sterilization", + "//": "Hidden effect, used as a tracker", + "name": [ "" ], + "desc": [ "" ] + }, { "type": "effect_type", "id": "effect_photokin_invisibility", diff --git a/data/mods/MindOverMatter/json_flags.json b/data/mods/MindOverMatter/json_flags.json index 04832f9bdcfe5..37031a649c6b4 100644 --- a/data/mods/MindOverMatter/json_flags.json +++ b/data/mods/MindOverMatter/json_flags.json @@ -107,5 +107,10 @@ "id": "TELEPORT_IMMUNE", "type": "monster_flag", "//": "Immune to forcible teleportation" + }, + { + "id": "PHOTOKIN_IRRADIATION_READY", + "type": "json_flag", + "//": "Used to tag foods to be radiation sterilized" } ] diff --git a/data/mods/MindOverMatter/powers/learning_eocs/photokinesis.json b/data/mods/MindOverMatter/powers/learning_eocs/photokinesis.json index 25739a3b2f768..f94394baaaac4 100644 --- a/data/mods/MindOverMatter/powers/learning_eocs/photokinesis.json +++ b/data/mods/MindOverMatter/powers/learning_eocs/photokinesis.json @@ -391,7 +391,56 @@ { "math": [ "u_vitamin('vitamin_psi_learning_counter')", "=", "0" ] }, { "u_learn_recipe": "practice_photokinetic_radio" }, { - "u_message": "Use of your powers has led to an insight. You read and broadcast radio waves, communicating with anyone else who is left out there, if you can figure out the technique.", + "u_message": "Use of your powers has led to an insight. You could read and broadcast radio waves, communicating with anyone else who is left out there, if you can figure out the technique.", + "popup": true + } + ] + }, + { + "type": "effect_on_condition", + "id": "EOC_PHOTOKIN_LEARNING_STERILIZE_FOOD", + "recurrence": [ + { "math": [ "jmath_photokinesis_learning_eocs_modifiers(global_tier_two_power_learning_time_low)" ] }, + { "math": [ "jmath_photokinesis_learning_eocs_modifiers(global_tier_two_power_learning_time_high)" ] } + ], + "condition": { + "and": [ + { "u_has_trait": "PHOTOKINETIC" }, + { "math": [ "u_vitamin('vitamin_psi_learning_counter')", "==", "1" ] }, + { + "or": [ + { "test_eoc": "EOC_CONDITION_ODDS_OF_RANDOM_TIER_TWO_POWER_INSIGHT" }, + { + "and": [ + { "math": [ "u_spell_level('photokinetic_rad_immunity')", ">=", "7" ] }, + { "math": [ "u_spell_level('photokinetic_camouflage')", ">=", "4" ] }, + { + "or": [ + { "math": [ "u_spell_level('photokinetic_light_flash')", ">=", "3" ] }, + { "math": [ "u_spell_level('photokinetic_light_up_enemy')", ">=", "9" ] }, + { "math": [ "u_spell_level('photokinetic_light_beam')", ">=", "5" ] } + ] + } + ] + } + ] + }, + { "test_eoc": "EOC_PSI_LEARNING_BANNED_EFFECTS" }, + { "math": [ "u_spell_level('photokinetic_sterilize_food')", "<=", "0" ] }, + { "not": { "u_know_recipe": "practice_photokinetic_sterilize_food" } } + ] + }, + "deactivate_condition": { + "or": [ + { "not": { "u_has_trait": "PHOTOKINETIC" } }, + { "math": [ "u_spell_level('photokinetic_sterilize_food')", ">=", "1" ] } + ] + }, + "effect": [ + { "math": [ "u_vitamin('vitamin_psi_learning_counter')", "=", "0" ] }, + { "u_learn_recipe": "practice_photokinetic_sterilize_food" }, + { + "u_message": "Use of your powers has led to an insight. With a focused burst of radiation, you could sterilize food, making it last much longer without going rotten, if you can figure out the technique.", "popup": true } ] diff --git a/data/mods/MindOverMatter/powers/photokinesis.json b/data/mods/MindOverMatter/powers/photokinesis.json index b8e9d2226ff40..9926b3e0b78fb 100644 --- a/data/mods/MindOverMatter/powers/photokinesis.json +++ b/data/mods/MindOverMatter/powers/photokinesis.json @@ -544,6 +544,28 @@ ] } }, + { + "id": "photokinetic_sterilize_food", + "type": "SPELL", + "name": "[Ψ]Gamma Sterilization", + "description": "Use a focused emission of high-power radiation to eliminating microorganisms in food and allowing it to last much longer before rotting. This power is extremely taxing.", + "message": "", + "teachable": false, + "valid_targets": [ "self" ], + "spell_class": "PHOTOKINETIC", + "skill": "metaphysics", + "flags": [ "PSIONIC", "CONCENTRATE", "NO_HANDS", "NO_LEGS", "SILENT", "RANDOM_DAMAGE" ], + "difficulty": 5, + "max_level": { "math": [ "int_to_level(1)" ] }, + "effect": "effect_on_condition", + "effect_str": "EOC_PHOTOKINETIC_STERILIZE_FOODS", + "shape": "blast", + "energy_source": "STAMINA", + "base_energy_cost": 7500, + "final_energy_cost": 4000, + "energy_increment": -200, + "base_casting_time": 1500 + }, { "id": "photokinetic_stun_robots", "type": "SPELL", diff --git a/data/mods/MindOverMatter/powers/photokinesis_eocs.json b/data/mods/MindOverMatter/powers/photokinesis_eocs.json index aa0e08059490d..83c2dd7e8e701 100644 --- a/data/mods/MindOverMatter/powers/photokinesis_eocs.json +++ b/data/mods/MindOverMatter/powers/photokinesis_eocs.json @@ -99,6 +99,79 @@ ] } }, + { + "type": "effect_on_condition", + "id": "EOC_PHOTOKINETIC_STERILIZE_FOODS", + "effect": [ + { "math": [ "u_photokinetic_sterilize_item_weight_in_grams", "=", "0" ] }, + { + "u_run_inv_eocs": "manual_mult", + "title": "What food or drink do you want to sterilize?", + "search_data": [ + { "category": "food", "excluded_flags": [ "IRRADIATED" ] }, + { "category": "drink", "excluded_flags": [ "IRRADIATED" ] } + ], + "true_eocs": [ + { + "id": "EOC_PHOTOKINETIC_STERILIZE_FOODS_PREP", + "effect": [ + { "math": [ "u_photokinetic_sterilize_item_weight_in_grams", "+=", "n_weight() / 1000" ] }, + { "npc_set_flag": "PHOTOKIN_IRRADIATION_READY" } + ] + } + ] + }, + { "math": [ "u_photokinetic_sterilize_item_weight_in_grams", "/=", "40" ] }, + { + "u_add_effect": "effect_photokin_sterilization", + "duration": { "math": [ "max( ( u_photokinetic_sterilize_item_weight_in_grams + 1), 1)" ] } + }, + { + "u_assign_activity": "ACT_PSI_PHOTOKIN_RADIATION_STERILIZATION", + "duration": { "math": [ "max( ( u_photokinetic_sterilize_item_weight_in_grams + 1), 1)" ] } + }, + { "run_eocs": "EOC_PHOTOKIN_RADIATION_STERILIZATION_COST" } + ] + }, + { + "type": "effect_on_condition", + "id": "EOC_PHOTOKIN_RADIATION_STERILIZATION_CANCELS_STERILIZING", + "eoc_type": "EVENT", + "required_event": "character_finished_activity", + "condition": { + "and": [ + { "compare_string": [ "ACT_PSI_PHOTOKIN_RADIATION_STERILIZATION", { "context_val": "activity" } ] }, + { "u_has_effect": "effect_photokin_sterilization" } + ] + }, + "effect": [ { "u_lose_effect": "effect_photokin_sterilization" } ] + }, + { + "type": "effect_on_condition", + "id": "EOC_PHOTOKIN_RADIATION_STERILIZATION_COST", + "condition": { "u_has_effect": "effect_photokin_sterilization" }, + "effect": [ + { "math": [ "u_calories()", "-=", "rand(2) + 1" ] }, + { "run_eocs": "EOC_PHOTOKIN_RADIATION_STERILIZATION_COST", "time_in_future": [ 10, 15 ] } + ] + }, + { + "type": "effect_on_condition", + "id": "EOC_PHOTOKIN_RADIATION_STERILIZATION_FINALIZE", + "condition": { "u_has_effect": "effect_photokin_sterilization" }, + "effect": [ + { + "u_run_inv_eocs": "all", + "search_data": [ { "flags": [ "PHOTOKIN_IRRADIATION_READY" ] } ], + "true_eocs": [ + { + "id": "EOC_PHOTOKIN_RADIATION_STERILIZATION_FINALIZE_END", + "effect": [ { "npc_unset_flag": "PHOTOKIN_IRRADIATION_READY" }, { "npc_set_flag": "IRRADIATED" } ] + } + ] + } + ] + }, { "type": "effect_on_condition", "id": "EOC_PHOTOKIN_REMOVE_INVISIBILITY_MELEE_CHARACTER", diff --git a/data/mods/MindOverMatter/recipes/practice/photokinesis_practice.json b/data/mods/MindOverMatter/recipes/practice/photokinesis_practice.json index 1f80b2b1bd94c..fd29dad99e969 100644 --- a/data/mods/MindOverMatter/recipes/practice/photokinesis_practice.json +++ b/data/mods/MindOverMatter/recipes/practice/photokinesis_practice.json @@ -21,6 +21,7 @@ "practice_photokinetic_hide_ugly", "practice_photokinetic_light_image", "practice_photokinetic_radio", + "practice_photokinetic_sterilize_food", "practice_photokinetic_stun_robots", "practice_photokinetic_invisibility", "practice_photokinetic_light_flash", @@ -906,6 +907,7 @@ "tools": [ [ [ "matrix_crystal_drained", -1 ], [ "black_nether_crystal_pseudo_tool", -1 ], [ "matrix_crystal_photokinesis", -1 ] ] ], + "components": [ [ [ "matrix_crystal_photokin_dust", 1 ] ] ], "flags": [ "SECRET", "BLIND_EASY", "NO_MANIP", "AFFECTED_BY_PAIN", "NO_BENCH", "NO_ENCHANTMENT" ], "result_eocs": [ { @@ -978,6 +980,95 @@ } ] }, + { + "type": "recipe", + "activity_level": "LIGHT_EXERCISE", + "name": "contemplation: gamma sterilization", + "id": "practice_photokinetic_sterilize_food", + "description": "Contemplate your powers and improve your ability use focused radiation to make food last longer.", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", + "skill_used": "metaphysics", + "difficulty": 4, + "time": "0 s", + "autolearn": false, + "proficiencies": [ { "proficiency": "prof_contemplation_photokinesis", "required": false } ], + "tools": [ + [ [ "matrix_crystal_drained", -1 ], [ "black_nether_crystal_pseudo_tool", -1 ], [ "matrix_crystal_photokinesis", -1 ] ] + ], + "components": [ [ [ "matrix_crystal_photokin_dust", 1 ] ] ], + "flags": [ "SECRET", "BLIND_EASY", "NO_MANIP", "AFFECTED_BY_PAIN", "NO_BENCH", "NO_ENCHANTMENT" ], + "result_eocs": [ + { + "id": "EOC_PRACTICE_PHOTOKIN_STERILIZE_FOOD", + "condition": { "math": [ "u_spell_level('photokinetic_sterilize_food')", ">=", "1" ] }, + "effect": [ + { "set_string_var": "photokinetic_sterilize_food", "target_var": { "u_val": "latest_studied_power_name" } }, + { + "set_string_var": "prof_contemplation_photokinesis", + "target_var": { "u_val": "latest_studied_power_proficiency" } + }, + { "math": [ "u_latest_studied_power_difficulty", "=", "5" ] }, + { "run_eocs": [ "EOC_PSI_STUDYING_POWER_BEGIN", "EOC_PSI_STUDYING_POWER_SIDE_EFFECTS" ] } + ], + "false_effect": [ + { "set_string_var": "photokinetic_sterilize_food", "target_var": { "u_val": "latest_studied_power_name" } }, + { "u_message": "You attempt to unlock new capabilities within your mind." }, + { "u_assign_activity": "ACT_PSI_LEARNING_NEW_POWER", "duration": "16 hours" }, + { "u_add_effect": "effect_psi_learning_new_power", "duration": "16 hours" }, + { "run_eocs": "EOC_PSI_PRACTICE_FOCUS_MOD" }, + { + "run_eocs": "EOC_PRACTICE_PHOTOKIN_STERILIZE_FOOD_LEARNING", + "time_in_future": [ { "math": [ "learn_new_power_lower_time_bound(5)" ] }, { "math": [ "learn_new_power_upper_time_bound(5)" ] } ] + } + ] + } + ] + }, + { + "type": "effect_on_condition", + "id": "EOC_PRACTICE_PHOTOKIN_STERILIZE_FOOD_LEARNING", + "condition": { + "and": [ + { "compare_string": [ "photokinetic_sterilize_food", { "u_val": "latest_studied_power_name" } ] }, + { "u_has_effect": "effect_psi_learning_new_power" }, + { + "not": { "u_has_any_effect": [ "sleep", "effect_vitakin_wakeful_resting", "lack_sleep", "sleep_deprived", "under_operation" ] } + } + ] + }, + "effect": [ + { + "run_eocs": [ + { + "id": "EOC_PRACTICE_PHOTOKIN_STERILIZE_FOOD_LEARNING_2", + "condition": { + "and": [ + { + "roll_contested": { "math": [ "u_skill('metaphysics') + u_has_proficiency('prof_contemplation_photokinesis')" ] }, + "difficulty": 9 + } + ] + }, + "effect": [ + { + "u_message": "As you meditate, all the pieces suddenly come together. You've unlocked: >.", + "popup": true + }, + { "math": [ "u_spell_level('photokinetic_sterilize_food')", "=", "1" ] }, + { "math": [ "u_vitamin('vitamin_psionic_drain')", "+=", "rng( 25,50)" ] }, + { "u_lose_effect": "effect_psi_learning_new_power" } + ], + "false_effect": [ + { "u_message": "You just couldn't manage to grasp the technique. You'll have to try again.", "popup": true }, + { "math": [ "u_vitamin('vitamin_psionic_drain')", "+=", "rng( 25,50 )" ] }, + { "u_lose_effect": "effect_psi_learning_new_power" } + ] + } + ] + } + ] + }, { "type": "recipe", "activity_level": "LIGHT_EXERCISE", @@ -994,6 +1085,7 @@ "tools": [ [ [ "matrix_crystal_drained", -1 ], [ "black_nether_crystal_pseudo_tool", -1 ], [ "matrix_crystal_photokinesis", -1 ] ] ], + "components": [ [ [ "matrix_crystal_photokin_dust", 1 ] ] ], "flags": [ "SECRET", "BLIND_EASY", "NO_MANIP", "AFFECTED_BY_PAIN", "NO_BENCH", "NO_ENCHANTMENT" ], "result_eocs": [ {