Skip to content

Commit

Permalink
Focus handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Standing-Storm committed Jun 3, 2024
1 parent 3ce7abc commit 1710bcb
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 10 deletions.
16 changes: 16 additions & 0 deletions data/mods/Aftershock/EOC/esper_eoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,22 @@
"condition": { "math": [ "u_val('focus')", ">=", "30" ] },
"effect": [ { "math": [ "u_val('focus')", "-=", "5" ] } ]
},
{
"type": "effect_on_condition",
"id": "EOC_AFS_ESPER_CHANNEL_COSTS_FOCUS",
"eoc_type": "EVENT",
"required_event": "spellcasting_finish",
"condition": { "and": [ { "test_eoc": "EOC_CONDITION_ESPER_TRAIT_AND_SCHOOL_LIST" }, { "math": [ "u_val('focus')", ">=", "15" ] } ] },
"effect": [ { "math": [ "u_val('focus')", "-=", "1" ] } ]
},
{
"type": "effect_on_condition",
"id": "EOC_AFS_CONCENTRATION_COSTS_FOCUS",
"condition": {
"and": [ { "math": [ "u_vitamin('vitamin_afs_maintained_powers')", ">", "0" ] }, { "math": [ "u_val('focus')", ">=", "15" ] } ]
},
"effect": [ { "math": [ "u_val('focus')", "-=", "1" ] } ]
},
{
"type": "effect_on_condition",
"id": "EOC_AFS_ESPER_CONSEQUENCES_VALUE_INCREASER",
Expand Down
19 changes: 14 additions & 5 deletions data/mods/Aftershock/effects_esper.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,19 @@
"max_duration": "30 seconds",
"base_mods": { "health_min": [ -1 ], "health_chance": [ 2 ] }
},
{
"type": "effect_type",
"id": "psi_stunned",
"//": "Separate ID to allow telepaths and telepathy-immune monsters to defend against it.",
"name": [ "Stunned" ],
"desc": [ "Your mind is reeling." ],
"apply_message": "You're stunned!",
"rating": "bad",
"show_in_info": true,
"limb_score_mods": [ { "limb_score": "balance", "modifier": 0.2 }, { "limb_score": "reaction", "modifier": 0.0 } ],
"immune_flags": [ "TEEPSHIELD", "TEEP_IMMUNE" ],
"flags": [ "DISABLE_FLIGHT", "EFFECT_LIMB_SCORE_MOD", "NO_SPELLCASTING", "NO_PSIONICS" ]
},
{
"type": "effect_type",
"id": "effect_telepath_sense_minds",
Expand All @@ -79,11 +92,7 @@
"values": [
{
"value": "SIGHT_RANGE_MINDS",
"add": {
"math": [
"( ( u_spell_level('telepathic_mind_sense') * 2) * (scaling_factor(u_val('intelligence') ) ) ) * u_nether_attunement_power_scaling"
]
}
"add": { "math": [ "( ( u_spell_level('afs_telepathic_mind_sense') * 2) * (scaling_factor(u_val('intelligence') ) ) )" ] }
}
]
}
Expand Down
13 changes: 13 additions & 0 deletions data/mods/Aftershock/effects_on_condition.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,18 @@
},
"u_die"
]
},
{
"type": "effect_on_condition",
"id": "EOC_ESPER_SCENARIO_SETUP",
"eoc_type": "SCENARIO_SPECIFIC",
"effect": [
{ "math": [ "u_hp('head')", "-=", "rand(5)" ] },
{ "math": [ "u_hp('torso')", "-=", "rand(5)" ] },
{ "math": [ "u_hp('arm_r')", "-=", "rand(5)" ] },
{ "math": [ "u_hp('arm_l')", "-=", "rand(5)" ] },
{ "math": [ "u_hp('leg_l')", "-=", "rand(5)" ] },
{ "math": [ "u_hp('leg_r')", "-=", "rand(5)" ] }
]
}
]
5 changes: 3 additions & 2 deletions data/mods/Aftershock/scenarios.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,11 +213,12 @@
"id": "afs_esper_start",
"name": "Esper",
"points": 1,
"description": "There are stories that before the Discontinuity, scientists had developed treatments to unlock the powers of the human mind. To read thoughts, move objects at a distance, control computers by the power of will alone, and even stranger things. Just one more lost secret of the Golden Age.\n\nOr so you thought, but recently you had heard some tantalizing rumors about espers, centered on a backwater planet on the edge of known civilization. You remember buying passage to the Salus system, arriving at Port Augustmoon and buying supplies, and descending to the surface, and after that…things get hazy. You're not entirely sure where you are, but somehow you've rediscovered that lost secret. Now you just need to make it back alive.",
"description": "There are stories that before the Discontinuity, scientists had developed treatments to unlock the powers of the human mind. To read thoughts, move objects at a distance, control computers by the power of will alone, and even stranger things. Just one more lost secret of the Golden Age.\n\nOr so you thought, but recently you had heard some tantalizing rumors about espers, centered on a backwater planet on the edge of known civilization. You remember buying passage to the Salus system, arriving at Port Augustmoon and buying supplies, and descending to the surface, and after that…things get hazy. You're not entirely sure where you are, and you've clearly been through it, but somehow you've rediscovered that lost secret. Now you just need to make it back alive.",
"forced_traits": [ "ESPER" ],
"allowed_locs": [ "sloc_afs_glacial_tunnels" ],
"professions": [ "afs_esper_telepath" ],
"flags": [ "LONE_START" ],
"start_name": "Lost on the Surface"
"start_name": "Lost on the Surface",
"eoc": [ "EOC_ESPER_SCENARIO_SETUP" ]
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,13 @@
"effect": [
{ "math": [ "u_spell_exp('afs_telepathic_shield')", "+=", "(maintenance_exp_factor(u_val('focus')))" ] },
{ "math": [ "u_latest_channeled_power_difficulty", "=", "2" ] },
{ "run_eocs": [ "EOC_CONCENTRATION_SUCCESS_PROFICIENCY", "EOC_AFS_PSI_SKILL_INCREASE_ON_USE_FINALIZE" ] },
{
"run_eocs": [
"EOC_CONCENTRATION_SUCCESS_PROFICIENCY",
"EOC_AFS_PSI_SKILL_INCREASE_ON_USE_FINALIZE",
"EOC_AFS_CONCENTRATION_COSTS_FOCUS"
]
},
{
"queue_eocs": "EOC_AFS_TELEPATH_SHIELD_MAINTENANCE",
"time_in_future": [
Expand Down Expand Up @@ -78,7 +84,13 @@
"effect": [
{ "math": [ "u_spell_exp('afs_telepathic_mind_sense')", "+=", "(maintenance_exp_factor(u_val('focus')))" ] },
{ "math": [ "u_latest_channeled_power_difficulty", "=", "3" ] },
{ "run_eocs": [ "EOC_CONCENTRATION_SUCCESS_PROFICIENCY", "EOC_AFS_PSI_SKILL_INCREASE_ON_USE_FINALIZE" ] },
{
"run_eocs": [
"EOC_CONCENTRATION_SUCCESS_PROFICIENCY",
"EOC_AFS_PSI_SKILL_INCREASE_ON_USE_FINALIZE",
"EOC_AFS_CONCENTRATION_COSTS_FOCUS"
]
},
{
"queue_eocs": "EOC_AFS_TELEPATH_SENSE_MINDS_MAINTENANCE",
"time_in_future": [
Expand Down Expand Up @@ -126,7 +138,13 @@
"effect": [
{ "math": [ "u_spell_exp('afs_telepathic_suggestion')", "+=", "(maintenance_exp_factor(u_val('focus')))" ] },
{ "math": [ "u_latest_channeled_power_difficulty", "=", "4" ] },
{ "run_eocs": [ "EOC_CONCENTRATION_SUCCESS_PROFICIENCY", "EOC_AFS_PSI_SKILL_INCREASE_ON_USE_FINALIZE" ] },
{
"run_eocs": [
"EOC_CONCENTRATION_SUCCESS_PROFICIENCY",
"EOC_AFS_PSI_SKILL_INCREASE_ON_USE_FINALIZE",
"EOC_AFS_CONCENTRATION_COSTS_FOCUS"
]
},
{
"queue_eocs": "EOC_AFS_TELEPATH_SUGGESTION_MAINTENANCE",
"time_in_future": [
Expand Down

0 comments on commit 1710bcb

Please sign in to comment.