Skip to content

Commit

Permalink
Merge pull request #77978 from Standing-Storm/photokinesis-radiation
Browse files Browse the repository at this point in the history
[MoM] Add the Gamma Sterilization photokinetic power
  • Loading branch information
Anton Burmistrov authored Nov 20, 2024
2 parents a720a63 + 2e3294f commit 30f1da0
Show file tree
Hide file tree
Showing 9 changed files with 276 additions and 1 deletion.
9 changes: 9 additions & 0 deletions data/mods/MindOverMatter/PowerDescriptionSpoilers.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.<br />
*Prerequisites*: Star Flash 5 *or* Photon Beam 4, Radio Transception 6<br />

## Gamma Sterilization (C)
*Difficulty*: 5<br />
*Target*: Self<br />
*Duration*: 10 seconds per item of food sterilized<br />
*Stamina Cost*: 7500, minus 200 per level to a minimum of 4000<br />
*Channeling Time*: 15 seconds<br />
*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.<br />
*Prerequisites*: Lucent Barrier 7, Chameleoflage 4, Illuminate 9 *or* Photon Beam 5 *or* Star Flash 3<br />

## Veil of Light (C)
*Difficulty*: 6<br />
*Target*: Self<br />
Expand Down
9 changes: 9 additions & 0 deletions data/mods/MindOverMatter/activity_types.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
7 changes: 7 additions & 0 deletions data/mods/MindOverMatter/effects/effects_psionic.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 5 additions & 0 deletions data/mods/MindOverMatter/json_flags.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
51 changes: 50 additions & 1 deletion data/mods/MindOverMatter/powers/learning_eocs/photokinesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
]
Expand Down
22 changes: 22 additions & 0 deletions data/mods/MindOverMatter/powers/photokinesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 <color_red>extremely taxing</color>.",
"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",
Expand Down
73 changes: 73 additions & 0 deletions data/mods/MindOverMatter/powers/photokinesis_eocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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": [
{
Expand Down Expand Up @@ -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: <spell_name:<u_val:latest_studied_power_name>>.",
"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",
Expand All @@ -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": [
{
Expand Down

0 comments on commit 30f1da0

Please sign in to comment.