Skip to content

Commit

Permalink
[MoM] Oubliette works on NPCs now (#72876)
Browse files Browse the repository at this point in the history
* Add NO_PROJECTILE

* Initial commit

* Messaging fixes

* Update spoiler documentation

* Further clarifications

* Kick tests
  • Loading branch information
Standing-Storm authored Apr 8, 2024
1 parent f557194 commit ea8f34c
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 4 deletions.
2 changes: 1 addition & 1 deletion data/mods/MindOverMatter/PowerDescriptionSpoilers.md
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,7 @@ Powers causing telepathic damage have a 5% chance to down the target, a 33% chan
*Duration*: Instant<br />
*Stamina Cost*: 7500, minus 170 per level to a minimum of 4600<br />
*Channeling Time*: 150 moves, minus 5.5 moves per level to a minimum of 75<br />
*Effects*: Teleports a single monster somewhere *else*, removing them and anything they might drop. The monster must have HP lower than 15 to 350, plus 15 to 35 per power level, randomly determined when the power is used. Oubliette cannot currently affect NPCs.<br />
*Effects*: Teleports a single target somewhere *else*, removing them and anything they might drop. The target must have HP lower than 15 to 350, plus 15 to 35 per power level, randomly determined when the power is used. For this purpose, NPC health is calculated as the sum total of their limb health, divided by 3.<br />
*Prerequisites*: Displacement 10, Farstep 6 *or* Transposition 8 *or * Spacial Vortex 8<br />

## Gateway
Expand Down
2 changes: 1 addition & 1 deletion data/mods/MindOverMatter/powers/telekinesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"valid_targets": [ "ground" ],
"spell_class": "TELEKINETIC",
"skill": "metaphysics",
"flags": [ "PSIONIC", "CONCENTRATE", "RANDOM_DAMAGE", "NO_HANDS", "NO_LEGS", "NO_EXPLOSION_SFX" ],
"flags": [ "PSIONIC", "CONCENTRATE", "RANDOM_DAMAGE", "NO_PROJECTILE", "NO_HANDS", "NO_LEGS", "NO_EXPLOSION_SFX" ],
"difficulty": 2,
"max_level": { "math": [ "int_to_level(1)" ] },
"effect": "noise",
Expand Down
23 changes: 21 additions & 2 deletions data/mods/MindOverMatter/powers/teleportation.json
Original file line number Diff line number Diff line change
Expand Up @@ -535,15 +535,16 @@
"type": "SPELL",
"name": "[Ψ]Oubliette",
"description": "Teleport the target through the nether to some other dimension. They are technically not dead, but they are no longer your concern. Oubliette will occasionally fail when used against very powerful enemies, or succeed but cause damage to the teleporter.",
"message": "With a tremendous mental exertion, you hurl your target to another dimension!",
"message": "",
"teachable": false,
"valid_targets": [ "hostile" ],
"spell_class": "TELEPORTER",
"skill": "metaphysics",
"flags": [ "PSIONIC", "CONCENTRATE", "SILENT", "RANDOM_DAMAGE", "NO_HANDS", "NO_LEGS", "NO_EXPLOSION_SFX" ],
"difficulty": 7,
"max_level": { "math": [ "int_to_level(1)" ] },
"effect": "banishment",
"effect": "effect_on_condition",
"effect_str": "EOC_TELEPORTER_OUBLIETTE_HANDLING",
"shape": "blast",
"min_damage": {
"math": [
Expand All @@ -570,6 +571,24 @@
"casting_time_increment": -5.5,
"ignored_monster_species": [ "PSI_NULL" ]
},
{
"id": "teleport_banish_self_target",
"type": "SPELL",
"name": "Oubliette Self",
"description": "This is the banishment that the target casts on themselves.",
"valid_targets": [ "self" ],
"skill": "metaphysics",
"flags": [ "PSIONC", "SILENT", "RANDOM_DAMAGE" ],
"effect": "banishment",
"shape": "blast",
"spell_class": "TELEPORTER",
"teachable": false,
"min_damage": { "math": [ "u_psi_teleporter_damage" ] },
"max_damage": { "math": [ "u_psi_teleporter_damage" ] },
"min_range": 0,
"max_range": 0,
"ignored_monster_species": [ "PSI_NULL" ]
},
{
"id": "teleport_gateway",
"type": "SPELL",
Expand Down
64 changes: 64 additions & 0 deletions data/mods/MindOverMatter/powers/teleportation_eoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,70 @@
}
]
},
{
"type": "effect_on_condition",
"id": "EOC_TELEPORTER_OUBLIETTE_HANDLING",
"condition": {
"and": [
{ "not": { "u_has_flag": "TELESTOP" } },
{ "not": { "u_has_flag": "TELEPORT_IMMUNE" } },
{ "not": { "u_has_worn_with_flag": "DIMENSIONAL_ANCHOR" } }
]
},
"effect": [ { "run_eocs": "EOC_TELEPORTER_OUBLIETTE_HANDLING_2" } ],
"false_effect": [ { "npc_message": "Your target wavers for a moment, but nothing happens." } ]
},
{
"type": "effect_on_condition",
"id": "EOC_TELEPORTER_OUBLIETTE_HANDLING_2",
"condition": { "not": "u_is_npc" },
"effect": [
{
"math": [
"u_psi_teleporter_damage",
"=",
"rng(((15 + (n_spell_level('teleport_banish') * 15)) * ( ( n_val('intelligence') + 10) / 20 ) * n_nether_attunement_power_scaling),((350 + (n_spell_level('teleport_banish') * 35)) * ( ( n_val('intelligence') + 10) / 20 ) * n_nether_attunement_power_scaling))"
]
},
{ "math": [ "u_health_comparison", "=", "u_hp('ALL')" ] },
{
"if": { "math": [ "u_psi_teleporter_damage", ">", "u_health_comparison" ] },
"then": [
{ "u_cast_spell": { "id": "teleport_banish_self_target", "message": "" } },
{ "npc_message": "With a tremendous mental exertion, you hurl your target to another dimension!" }
]
}
],
"false_effect": [
{
"math": [
"u_psi_teleporter_damage",
"=",
"rng(((15 + (n_spell_level('teleport_banish') * 15)) * ( ( n_val('intelligence') + 10) / 20 ) * n_nether_attunement_power_scaling),((350 + (n_spell_level('teleport_banish') * 35)) * ( ( n_val('intelligence') + 10) / 20 ) * n_nether_attunement_power_scaling))"
]
},
{
"math": [
"u_health_comparison",
"=",
"(u_hp('arm_l') + u_hp('arm_r') + u_hp('leg_l') + u_hp('leg_r') + u_hp('torso') + u_hp('head')) / 3"
]
},
{
"if": { "math": [ "u_psi_teleporter_damage", ">", "u_health_comparison" ] },
"then": [
"u_die",
{ "npc_message": "With a tremendous mental exertion, you hurl your target to another dimension!" },
{
"u_map_run_item_eocs": "all",
"min_radius": 0,
"max_radius": 0,
"true_eocs": [ { "id": "EOC_TELEPORTER_OUBLIETTE_HANDLING_DELETE_NPC_ITEMS", "effect": [ "npc_die" ] } ]
}
]
}
]
},
{
"type": "effect_on_condition",
"id": "EOC_TELEPORT_SUMMON",
Expand Down

0 comments on commit ea8f34c

Please sign in to comment.