Skip to content

Commit

Permalink
[MoM] Add the Mesmerize telepathic power (#77051)
Browse files Browse the repository at this point in the history
* Initial commit

* Description

* Edit success chance

* more successful on ferals

* Fixes

* Fix incorrect math statement
  • Loading branch information
Standing-Storm authored Oct 17, 2024
1 parent 413c736 commit 6b7ded3
Show file tree
Hide file tree
Showing 6 changed files with 299 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 @@ -934,6 +934,15 @@ Powers causing telepathic damage have a 5% chance to down the target, a 33% chan
*Effects*: Place a shield over the psion's mind, preventing telepathic assault and also rendering the psion immune to the attacks of flaming eyes and the personal effects of portal storms. The psion is immune to telepathic damage and most telepathy-related effects while this power is active.<br />
*Prerequisites*: Concentration Trance 5<br />

## Mesmerize (C)
*Difficulty*: 3<br />
*Target*: One target within 3 squares plus 1.1 squares per power level<br />
*Duration*: 8 minutes to 20 seconds, plus 2 to 5 seconds per power level<br />
*Stamina Cost*: 3500, minus 75 per level to a minimum of 750<br />
*Channeling Time*: 100 moves, minus 5 moves per level to a minimum of 35<br />
*Effects*: Send your target into a trance, making them stand in place or wander aimlessly for the power's duration. The chance to be mesmerized depends on the target: animals and similar beings are always mesmerized, against feral humans there is a 90% chance of success, against sapient humans the chance depends on their intelligence and perception, and against alien beings there is a 50% chance of success. If the target takes any damage, it will snap them out of the mesmerize effect.<br />
*Prerequisites*: Sense Minds 6<br />

## Mood Stabilization (C)
*Difficulty*: 3<br />
*Target*: Self or one within 3 squares plus 1.1 squares per power level<br />
Expand Down
9 changes: 9 additions & 0 deletions data/mods/MindOverMatter/effects/effects_psionic.json
Original file line number Diff line number Diff line change
Expand Up @@ -1947,6 +1947,15 @@
}
]
},
{
"type": "effect_type",
"id": "effect_telepath_mesmerize_tracker",
"name": [ "Mesmerized" ],
"desc": [ "You are in a daze." ],
"apply_message": "",
"remove_message": "You snap out of your trance.",
"show_in_info": true
},
{
"type": "effect_type",
"id": "effect_telepathic_morale",
Expand Down
34 changes: 34 additions & 0 deletions data/mods/MindOverMatter/powers/learning_eocs/telepathy.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,40 @@
}
]
},
{
"type": "effect_on_condition",
"id": "EOC_TELEPATH_LEARNING_MESMERIZE",
"recurrence": [
{ "math": [ "jmath_telepathy_learning_eocs_modifiers(global_tier_one_power_learning_time_low)" ] },
{ "math": [ "jmath_telepathy_learning_eocs_modifiers(global_tier_one_power_learning_time_high)" ] }
],
"condition": {
"and": [
{ "u_has_trait": "TELEPATH" },
{ "math": [ "u_vitamin('vitamin_psi_learning_counter')", "==", "1" ] },
{
"or": [
{ "test_eoc": "EOC_CONDITION_ODDS_OF_RANDOM_TIER_ONE_POWER_INSIGHT" },
{ "and": [ { "math": [ "u_spell_level('telepathic_mind_sense')", ">=", "6" ] } ] }
]
},
{ "test_eoc": "EOC_PSI_LEARNING_BANNED_EFFECTS" },
{ "math": [ "u_spell_level('telepathic_mesmerize')", "<=", "0" ] },
{ "not": { "u_know_recipe": "practice_telepathic_mesmerize" } }
]
},
"deactivate_condition": {
"or": [ { "not": { "u_has_trait": "TELEPATH" } }, { "math": [ "u_spell_level('telepathic_mesmerize')", ">=", "1" ] } ]
},
"effect": [
{ "math": [ "u_vitamin('vitamin_psi_learning_counter')", "=", "0" ] },
{ "u_learn_recipe": "practice_telepathic_mesmerize" },
{
"u_message": "Use of your powers has led to an insight. You could nudge someone's mind into a self-focused spiral, keeping them in a daze and unaware of the outside world, if you can figure out the proper technique.",
"popup": true
}
]
},
{
"type": "effect_on_condition",
"id": "EOC_TELEPATH_LEARNING_MORALE",
Expand Down
36 changes: 36 additions & 0 deletions data/mods/MindOverMatter/powers/telepathy.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,42 @@
},
"base_casting_time": { "math": [ "u_effect_intensity('effect_telepath_sense_minds') > -1 ? 10 : 500" ] }
},
{
"id": "telepathic_mesmerize",
"type": "SPELL",
"name": "[Ψ]Mesmerize",
"description": "Hypnotize a target, causing them to stand in a trance or wander around in a small area. Any damage taken will snap the target out of their trance. Some targets are more resistant to mesmerism than others.",
"message": "",
"teachable": false,
"valid_targets": [ "hostile", "ally" ],
"spell_class": "TELEPATH",
"skill": "metaphysics",
"flags": [ "PSIONIC", "CONCENTRATE", "SILENT", "NO_HANDS", "NO_LEGS", "RANDOM_DAMAGE", "NO_PROJECTILE", "IGNORE_WALLS" ],
"difficulty": 3,
"max_level": { "math": [ "int_to_level(1)" ] },
"effect": "effect_on_condition",
"effect_str": "EOC_TELEPATH_MESMERIZE",
"shape": "blast",
"min_range": {
"math": [
"min( (( (u_spell_level('telepathic_mesmerize') * 1.1) + 3) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling), 80)"
]
},
"max_range": 80,
"min_aoe": {
"math": [
"min( (( (u_spell_level('telepathic_mesmerize') * 0.15) + 0) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling), 4)"
]
},
"energy_source": "STAMINA",
"base_energy_cost": 3500,
"final_energy_cost": 750,
"energy_increment": -75,
"base_casting_time": 100,
"final_casting_time": 35,
"casting_time_increment": -5,
"ignored_monster_species": [ "ZOMBIE", "ROBOT", "ROBOT_FLYING", "NETHER_EMANATION", "LEECH_PLANT", "WORM", "FUNGUS", "SLIME", "PSI_NULL" ]
},
{
"id": "telepathic_morale",
"type": "SPELL",
Expand Down
129 changes: 128 additions & 1 deletion data/mods/MindOverMatter/powers/telepathy_eoc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,131 @@
[
{
"type": "effect_on_condition",
"id": "EOC_TELEPATH_MESMERIZE",
"condition": {
"and": [
{ "not": { "u_has_flag": "TEEP_IMMUNE" } },
{
"not": {
"and": [
{ "u_has_flag": "TEEPSHIELD" },
{ "math": [ "u_spell_level('telepathic_shield')", ">=", "n_spell_level('telepathic_mesmerize')" ] }
]
}
},
{ "not": { "and": [ { "u_has_flag": "TEEPSHIELD" }, { "u_has_worn_with_flag": "PORTAL_PROOF" } ] } }
]
},
"effect": [
{ "math": [ "u_telepathy_intelligence", "=", "( ( n_val('intelligence') + 10) / 20 )" ] },
{ "math": [ "u_telepathy_mesmer_power_level", "=", "n_spell_level('telepathic_mesmerize')" ] },
{ "math": [ "u_nether_attunement_telepathy_scaling", "=", "n_nether_attunement_power_scaling" ] },
{
"math": [
"u_telepath_mesmerism_duration",
"=",
"rng((( (u_telepathy_mesmer_power_level * 2) + 8) * u_telepathy_intelligence * u_nether_attunement_telepathy_scaling),(( (u_telepathy_mesmer_power_level * 5) + 20) * u_telepathy_intelligence * u_nether_attunement_telepathy_scaling))"
]
},
{
"run_eocs": [
{
"id": "EOC_TELEPATH_MESMERIZE_2",
"condition": "npc_is_character",
"//": "If you're not totally immune, there's always a chance mesmerism will work",
"effect": [
{
"if": {
"not": {
"x_in_y_chance": {
"x": { "math": [ "min((u_val('intelligence') + u_val('perception')), 30) + (rand(9) + 1) + (rand(9) + 1)" ] },
"y": 40
}
}
},
"then": [
{ "u_add_effect": "psi_stunned", "duration": { "math": [ "u_telepath_mesmerism_duration" ] } },
{
"u_add_effect": "effect_telepath_mesmerize_tracker",
"duration": { "math": [ "u_telepath_mesmerism_duration" ] }
},
{ "npc_message": "You mesmerize your target and they stand in a daze.", "type": "good" }
],
"else": { "npc_message": "Your target resists the mesmerism!", "type": "bad" }
}
],
"false_effect": [
{
"if": {
"and": [
{ "x_in_y_chance": { "x": 1, "y": 2 } },
{
"or": [ { "u_has_species": "MIGO" }, { "u_has_species": "NETHER" }, { "u_has_species": "PLANT" } ]
}
]
},
"then": [
{ "u_add_effect": "psi_stunned", "duration": { "math": [ "u_telepath_mesmerism_duration" ] } },
{
"u_add_effect": "effect_telepath_mesmerize_tracker",
"duration": { "math": [ "u_telepath_mesmerism_duration" ] }
},
{ "npc_message": "You mesmerize the alien creature and it stands in a daze.", "type": "good" }
],
"else": { "npc_message": "Your target resists the mesmerism!", "type": "bad" }
},
{
"if": { "and": [ { "x_in_y_chance": { "x": 19, "y": 20 } }, { "u_has_species": "FERAL" } ] },
"then": [
{ "u_add_effect": "psi_stunned", "duration": { "math": [ "u_telepath_mesmerism_duration" ] } },
{
"u_add_effect": "effect_telepath_mesmerize_tracker",
"duration": { "math": [ "u_telepath_mesmerism_duration" ] }
},
{ "npc_message": "You mesmerize the feral human and they stand in a daze.", "type": "good" }
],
"else": { "npc_message": "Your target resists the mesmerism!", "type": "bad" }
},
{
"if": {
"and": [
{ "not": { "u_has_species": "FERAL" } },
{ "not": { "u_has_species": "MIGO" } },
{ "not": { "u_has_species": "PLANT" } },
{ "not": { "u_has_species": "NETHER" } }
]
},
"then": [
{ "u_add_effect": "psi_stunned", "duration": { "math": [ "u_telepath_mesmerism_duration" ] } },
{
"u_add_effect": "effect_telepath_mesmerize_tracker",
"duration": { "math": [ "u_telepath_mesmerism_duration" ] }
},
{ "npc_message": "You mesmerize your target and they stand in a daze.", "type": "good" }
]
}
]
}
]
}
]
},
{
"type": "effect_on_condition",
"id": "EOC_TELEPATH_MESMERISM_REMOVAL_CHARACTER",
"eoc_type": "EVENT",
"required_event": "character_takes_damage",
"condition": { "and": [ { "u_has_effect": "psi_stunned" }, { "u_has_effect": "effect_telepath_mesmerize_tracker" } ] },
"effect": [ { "u_lose_effect": "effect_telepath_mesmerize_tracker" }, { "u_lose_effect": "psi_stunned" } ]
},
{
"type": "effect_on_condition",
"id": "EOC_TELEPATH_MESMERISM_REMOVAL_MONSTER",
"eoc_type": "EVENT",
"required_event": "monster_takes_damage",
"condition": { "and": [ { "u_has_effect": "psi_stunned" }, { "u_has_effect": "effect_telepath_mesmerize_tracker" } ] },
"effect": [ { "u_lose_effect": "effect_telepath_mesmerize_tracker" }, { "u_lose_effect": "psi_stunned" } ]
},
{
"type": "effect_on_condition",
"id": "EOC_TELEPATH_MORALE_INITIATE",
Expand Down Expand Up @@ -130,7 +257,7 @@
"not": {
"and": [
{ "u_has_flag": "TEEPSHIELD" },
{ "math": [ "n_spell_level('telepathic_shield')", ">=", "n_spell_level('telepathic_fear')" ] }
{ "math": [ "u_spell_level('telepathic_shield')", ">=", "n_spell_level('telepathic_fear')" ] }
]
}
},
Expand Down
83 changes: 83 additions & 0 deletions data/mods/MindOverMatter/recipes/practice/telepathy_practice.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"practice_telepathic_concentration",
"practice_telepathic_shield",
"practice_telepathic_mind_sense",
"practice_telepathic_mesmerize",
"practice_telepathic_morale",
"practice_telepathic_beastmaster",
"practice_telepathic_blast",
Expand Down Expand Up @@ -169,6 +170,88 @@
}
]
},
{
"type": "recipe",
"activity_level": "LIGHT_EXERCISE",
"name": "contemplation: mesmerize",
"id": "practice_telepathic_mesmerize",
"description": "Contemplate your powers and improve your mental strength to place your opponents into a trance.",
"category": "CC_*",
"subcategory": "CSC_*_NESTED",
"skill_used": "metaphysics",
"difficulty": 2,
"time": "0 s",
"autolearn": false,
"proficiencies": [ { "proficiency": "prof_contemplation_telepathy", "required": false } ],
"tools": [ [ [ "matrix_crystal_drained", -1 ], [ "black_nether_crystal_pseudo_tool", -1 ], [ "matrix_crystal_telepathy", -1 ] ] ],
"flags": [ "SECRET", "BLIND_EASY", "NO_MANIP", "AFFECTED_BY_PAIN", "NO_BENCH", "NO_ENCHANTMENT" ],
"result_eocs": [
{
"id": "EOC_PRACTICE_TELEPATHIC_MESMERIZE",
"condition": { "math": [ "u_spell_level('telepathic_mesmerize')", ">=", "1" ] },
"effect": [
{ "set_string_var": "telepathic_mesmerize", "target_var": { "u_val": "latest_studied_power_name" } },
{
"set_string_var": "prof_contemplation_telepathy",
"target_var": { "u_val": "latest_studied_power_proficiency" }
},
{ "math": [ "u_latest_studied_power_difficulty", "=", "3" ] },
{ "run_eocs": [ "EOC_PSI_STUDYING_POWER_BEGIN", "EOC_PSI_STUDYING_POWER_SIDE_EFFECTS" ] }
],
"false_effect": [
{ "set_string_var": "telepathic_mesmerize", "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" },
{
"queue_eocs": "EOC_PRACTICE_TELEPATHIC_MESMERIZE_LEARNING",
"time_in_future": [ { "math": [ "learn_new_power_lower_time_bound(2)" ] }, { "math": [ "learn_new_power_upper_time_bound(2)" ] } ]
}
]
}
]
},
{
"type": "effect_on_condition",
"id": "EOC_PRACTICE_TELEPATHIC_MESMERIZE_LEARNING",
"condition": {
"and": [
{ "compare_string": [ "telepathic_mesmerize", { "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_TELEPATHIC_MESMERIZE_LEARNING_2",
"condition": {
"roll_contested": { "math": [ "u_skill('metaphysics') + u_has_proficiency('prof_contemplation_telepathy')" ] },
"difficulty": 7
},
"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('telepathic_mesmerize')", "=", "1" ] },
{ "math": [ "u_vitamin('vitamin_psionic_drain')", "+=", "rng( 10,20 )" ] },
{ "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( 10,20 )" ] },
{ "u_lose_effect": "effect_psi_learning_new_power" }
]
}
]
}
]
},
{
"type": "recipe",
"activity_level": "LIGHT_EXERCISE",
Expand Down

0 comments on commit 6b7ded3

Please sign in to comment.