Skip to content

Commit

Permalink
[MoM] Add Apportation teleportation power (CleverRaven#79454)
Browse files Browse the repository at this point in the history
* Initial implementation

* Learning etc

* Message tweak

* Add eoc_learn_recipes check
  • Loading branch information
Standing-Storm authored Feb 1, 2025
1 parent 043c17c commit d83e9c6
Show file tree
Hide file tree
Showing 8 changed files with 304 additions and 42 deletions.
12 changes: 11 additions & 1 deletion data/mods/MindOverMatter/PowerDescriptionSpoilers.md
Original file line number Diff line number Diff line change
Expand Up @@ -1333,6 +1333,16 @@ Powers causing telepathic damage have a 5% chance to down the target, a 33% chan
*Effects*: Shorten relative distances nearby, allowing the psions to travel faster than their stride would indicate. Reduces move cost by 5% plus 2% per power level to a maximum of 60% reduced move cost.<br />
*Prerequisites*: Phase 4, Stutterstep 6<br />
</details>
<summary><h3>Apportation</h3></summary>

*Difficulty*: 3<br />
*Target*: One held item of 2L or less volume, plus 2.5L per power level<br />
*Duration*: Instant<br />
*Stamina Cost*: 2500, minus 65 per level to a minimum of 1250<br />
*Channeling Time*: 150 moves, minus 7.5 moves per level to a minimum of 75<br />
*Effects*: Transport an item in your hands to a nearby location, up to 2 squares plus 1.25 square per power level away. The item cannot be teleported into a solid object.<br />
*Prerequisites*: Blink 4, Stutterstep 4<br />
</details>
<details>
<summary><h3>Transposition</h3></summary>

Expand All @@ -1353,7 +1363,7 @@ Powers causing telepathic damage have a 5% chance to down the target, a 33% chan
*Stamina Cost*: 4000, minus 65 per level to a minimum of 1750<br />
*Channeling Time*: 95 moves, minus 4 moves per level to a minimum of 25<br />
*Effects*: Touch a single target and teleport them through the Nether, sending them anywhere within 5 to 15 squares with a variance of 1 to 5 squares from that point (the same as Blink).<br />
*Prerequisites*: Stutterstep 10, Phase 5 <br />
*Prerequisites*: Stutterstep 10, Apportation 5 <br />
</details>
<details>
<summary><h3>Reactive Displacement (C)</h3></summary>
Expand Down
10 changes: 10 additions & 0 deletions data/mods/MindOverMatter/effectoncondition/eoc_learn_recipes.json
Original file line number Diff line number Diff line change
Expand Up @@ -902,10 +902,14 @@
"EOC_CHECK_GAMEBEGIN_TELEPORTER_RECIPE_BLINK",
"EOC_CHECK_GAMEBEGIN_TELEPORTER_RECIPE_SLOW",
"EOC_CHECK_GAMEBEGIN_TELEPORTER_RECIPE_PHASE",
"EOC_CHECK_GAMEBEGIN_TELEPORTER_RECIPE_ITEM_TELEPORT",
"EOC_CHECK_GAMEBEGIN_TELEPORTER_RECIPE_STRIDE",
"EOC_CHECK_GAMEBEGIN_TELEPORTER_RECIPE_TRANSPOSE",
"EOC_CHECK_GAMEBEGIN_TELEPORTER_RECIPE_DISPLACEMENT",
"EOC_CHECK_GAMEBEGIN_TELEPORTER_RECIPE_REACTIVE_DISPLACEMENT",
"EOC_CHECK_GAMEBEGIN_TELEPORTER_RECIPE_COLLAPSE",
"EOC_CHECK_GAMEBEGIN_TELEPORTER_RECIPE_LOCI_ESTABLISHMENT",
"EOC_CHECK_GAMEBEGIN_TELEPORTER_RECIPE_LOCI_TECHNIQUE",
"EOC_CHECK_GAMEBEGIN_TELEPORTER_RECIPE_FARSTEP",
"EOC_CHECK_GAMEBEGIN_TELEPORTER_RECIPE_BANISH",
"EOC_CHECK_GAMEBEGIN_TELEPORTER_RECIPE_GATEWAY",
Expand Down Expand Up @@ -933,6 +937,12 @@
"condition": { "and": [ { "u_has_trait": "TELEPORTER" }, { "math": [ "u_spell_level('teleport_phase') >= 0" ] } ] },
"effect": [ { "u_learn_recipe": "practice_teleport_phase" } ]
},
{
"type": "effect_on_condition",
"id": "EOC_CHECK_GAMEBEGIN_TELEPORTER_RECIPE_ITEM_TELEPORT",
"condition": { "and": [ { "u_has_trait": "TELEPORTER" }, { "math": [ "u_spell_level('teleport_item_apport') >= 0" ] } ] },
"effect": [ { "u_learn_recipe": "practice_teleport_item_apport" } ]
},
{
"type": "effect_on_condition",
"id": "EOC_CHECK_GAMEBEGIN_TELEPORTER_RECIPE_STRIDE",
Expand Down
2 changes: 2 additions & 0 deletions data/mods/MindOverMatter/hobbies.json
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@
"spells": [
{ "id": "teleport_blink", "level": 7 },
{ "id": "teleport_slow", "level": 10 },
{ "id": "teleport_item_apport", "level": 5 },
{ "id": "teleport_displacement", "level": 5 },
{ "id": "teleport_stride", "level": 8 },
{ "id": "teleport_phase", "level": 11 },
Expand All @@ -440,6 +441,7 @@
"spells": [
{ "id": "teleport_blink", "level": 11 },
{ "id": "teleport_slow", "level": 12 },
{ "id": "teleport_item_apport", "level": 9 },
{ "id": "teleport_displacement", "level": 10 },
{ "id": "teleport_reactive_displacement", "level": 5 },
{ "id": "teleport_stride", "level": 12 },
Expand Down
36 changes: 35 additions & 1 deletion data/mods/MindOverMatter/powers/learning_eocs/teleportation.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,40 @@
}
]
},
{
"type": "effect_on_condition",
"id": "EOC_TELEPORT_LEARNING_ITEM_APPORT",
"recurrence": [
{ "math": [ "jmath_teleportation_learning_eocs_modifiers(global_tier_one_power_learning_time_low)" ] },
{ "math": [ "jmath_teleportation_learning_eocs_modifiers(global_tier_one_power_learning_time_high)" ] }
],
"condition": {
"and": [
{ "u_has_trait": "TELEPORTER" },
{ "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('teleport_blink') >= 4" ] }, { "math": [ "u_spell_level('teleport_slow') >= 4" ] } ]
}
]
},
{ "test_eoc": "EOC_PSI_LEARNING_BANNED_EFFECTS" },
{ "math": [ "u_spell_level('teleport_item_apport') <= 0" ] },
{ "not": { "u_know_recipe": "practice_teleport_item_apport" } }
]
},
"deactivate_condition": { "or": [ { "not": { "u_has_trait": "TELEPORTER" } }, { "math": [ "u_spell_level('teleport_item_apport') >= 1" ] } ] },
"effect": [
{ "math": [ "u_vitamin('vitamin_psi_learning_counter') = 0" ] },
{ "u_learn_recipe": "practice_teleport_item_apport" },
{
"u_message": "Use of your powers has led to an insight. Rather than traveling to a new location yourself, you could send an item you were holding there, if you can figure out the proper technique.",
"popup": true
}
]
},
{
"type": "effect_on_condition",
"id": "EOC_TELEPORT_LEARNING_STRIDE",
Expand Down Expand Up @@ -153,7 +187,7 @@
"or": [
{ "test_eoc": "EOC_CONDITION_ODDS_OF_RANDOM_TIER_TWO_POWER_INSIGHT" },
{
"and": [ { "math": [ "u_spell_level('teleport_phase') >= 5" ] }, { "math": [ "u_spell_level('teleport_slow') >= 10" ] } ]
"and": [ { "math": [ "u_spell_level('teleport_item_apport') >= 5" ] }, { "math": [ "u_spell_level('teleport_slow') >= 10" ] } ]
}
]
},
Expand Down
76 changes: 53 additions & 23 deletions data/mods/MindOverMatter/powers/teleportation.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,41 +102,34 @@
"casting_time_increment": -3
},
{
"id": "teleport_ephemeral_walk",
"id": "teleport_item_apport",
"type": "SPELL",
"name": "[Ψ]Ephemeral Walk (C)",
"description": "By moving slightly into the void between dimensions, you can exist in a state that allows effortless travel through obstacles.",
"name": "[Ψ]Apportation",
"description": "Rather than teleporting yourself, you could teleport an item you're holding somewhere nearby without having to follow it to its destination.\n\nItems that are <color_yellow>too large</color> cannot be apported.",
"message": "",
"teachable": false,
"valid_targets": [ "self" ],
"spell_class": "TELEPORTER",
"magic_type": "mom_psionics",
"skill": "metaphysics",
"flags": [ "PSIONIC", "CONCENTRATE", "SILENT", "NO_HANDS", "NO_LEGS", "RANDOM_DURATION", "NO_EXPLOSION_SFX" ],
"difficulty": 6,
"flags": [ "PSIONIC", "CONCENTRATE", "SILENT", "NO_HANDS", "NO_LEGS", "TARGET_TELEPORT", "IGNORE_WALLS" ],
"difficulty": 3,
"max_level": { "math": [ "int_to_level(1)" ] },
"effect": "effect_on_condition",
"effect_str": "EOC_TELEPORT_EPHEMERAL_WALK_INITIATE",
"effect_str": "EOC_TELEPORT_ITEM_APPORT",
"shape": "blast",
"min_duration": {
"math": [
"( (u_spell_level('teleport_ephemeral_walk') * 1000) + 3000) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
]
},
"max_duration": {
"math": [
"( (u_spell_level('teleport_ephemeral_walk') * 3000) + 30000) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
]
},
"base_energy_cost": {
"min_range": {
"math": [
"u_effect_intensity('effect_teleport_ephemeral_walk') > -1 ? 0 : max((6500 - (u_spell_level('teleport_ephemeral_walk') * 225)), 2000)"
"min( (( (u_spell_level('teleport_item_appport') * 1.25) + 2) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling), 80)"
]
},
"base_casting_time": {
"math": [
"u_effect_intensity('effect_teleport_ephemeral_walk') > -1 ? 10 : max((85 -(u_spell_level('teleport_ephemeral_walk') * 7)), 25)"
]
}
"max_range": 80,
"base_energy_cost": 2500,
"final_energy_cost": 1250,
"energy_increment": -65,
"base_casting_time": 150,
"final_casting_time": 75,
"casting_time_increment": -7.5
},
{
"id": "teleport_stride",
Expand Down Expand Up @@ -593,6 +586,43 @@
]
}
},
{
"id": "teleport_ephemeral_walk",
"type": "SPELL",
"name": "[Ψ]Ephemeral Walk (C)",
"description": "By moving slightly into the void between dimensions, you can exist in a state that allows effortless travel through obstacles.",
"teachable": false,
"valid_targets": [ "self" ],
"spell_class": "TELEPORTER",
"magic_type": "mom_psionics",
"skill": "metaphysics",
"flags": [ "PSIONIC", "CONCENTRATE", "SILENT", "NO_HANDS", "NO_LEGS", "RANDOM_DURATION", "NO_EXPLOSION_SFX" ],
"difficulty": 6,
"max_level": { "math": [ "int_to_level(1)" ] },
"effect": "effect_on_condition",
"effect_str": "EOC_TELEPORT_EPHEMERAL_WALK_INITIATE",
"shape": "blast",
"min_duration": {
"math": [
"( (u_spell_level('teleport_ephemeral_walk') * 1000) + 3000) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
]
},
"max_duration": {
"math": [
"( (u_spell_level('teleport_ephemeral_walk') * 3000) + 30000) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
]
},
"base_energy_cost": {
"math": [
"u_effect_intensity('effect_teleport_ephemeral_walk') > -1 ? 0 : max((6500 - (u_spell_level('teleport_ephemeral_walk') * 225)), 2000)"
]
},
"base_casting_time": {
"math": [
"u_effect_intensity('effect_teleport_ephemeral_walk') > -1 ? 10 : max((85 -(u_spell_level('teleport_ephemeral_walk') * 7)), 25)"
]
}
},
{
"id": "teleport_farstep",
"type": "SPELL",
Expand Down
84 changes: 84 additions & 0 deletions data/mods/MindOverMatter/powers/teleportation_eoc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,88 @@
[
{
"type": "effect_on_condition",
"id": "EOC_TELEPORT_ITEM_APPORT",
"effect": [
{
"u_run_inv_eocs": "all",
"search_data": [ { "wielded_only": true, "condition": { "math": [ "n_volume() > 0" ] } } ],
"true_eocs": [
{
"id": "EOC_TELEPORT_ITEM_APPORT_NEXT",
"effect": [
{
"u_run_inv_eocs": "all",
"search_data": [
{
"wielded_only": true,
"condition": {
"and": [
{
"math": [
"n_volume() <= ((u_spell_level('teleport_item_apport') * 2500) + 2000) * scaling_factor(u_val('intelligence')) * u_nether_attunement_power_scaling"
]
},
{ "math": [ "n_volume() > 0" ] }
]
}
}
],
"true_eocs": [
{
"id": "EOC_TELEPORT_ITEM_APPORT_ITEM_QUALIFIES",
"effect": [
{
"if": {
"u_query_tile": "line_of_sight",
"target_var": { "global_val": "teleporter_item_apport_location" },
"range": {
"math": [
"min( ( ( (u_spell_level('teleport_item_apport') * 1.25) + 2) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling), 80)"
]
},
"z_level": true,
"message": "Select apport location."
},
"then": {
"if": {
"or": [
{ "map_terrain_with_flag": "WALL", "loc": { "global_val": "teleporter_item_apport_location" } },
{
"map_terrain_with_flag": "DOOR",
"loc": { "global_val": "teleporter_item_apport_location" }
}
]
},
"then": { "u_message": "You cannot apport an item inside a solid object.", "type": "bad" },
"else": [
{ "npc_teleport": { "global_val": "teleporter_item_apport_location" } },
{
"u_message": "The item in your hands grows freezing cold for a moment before vanishing.",
"type": "neutral"
}
]
},
"else": { "u_message": "Canceled" }
}
]
}
],
"false_eocs": [
{
"id": "EOC_TELEPORT_ITEM_APPORT_ITEM_DOES_NOT_QUALIFY",
"effect": [ { "u_message": "The air around the item wavers, but nothing happens. The item is too large." } ]
}
]
}
]
}
],
"false_eocs": [
{ "id": "EOC_TELEPORT_ITEM_APPORT_FAIL", "effect": [ { "u_message": "You must be holding something to apport it." } ] }
]
}
]
},
{
"type": "effect_on_condition",
"id": "EOC_TELEPORT_SPACIAL_VORTEX",
Expand Down
1 change: 1 addition & 0 deletions data/mods/MindOverMatter/professions.json
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@
"spells": [
{ "id": "teleport_blink", "level": 7 },
{ "id": "teleport_slow", "level": 10 },
{ "id": "teleport_item_apport", "level": 7 },
{ "id": "teleport_displacement", "level": 5 },
{ "id": "teleport_stride", "level": 8 },
{ "id": "teleport_phase", "level": 11 },
Expand Down
Loading

0 comments on commit d83e9c6

Please sign in to comment.