Skip to content

Commit

Permalink
Add concentration infrastructure
Browse files Browse the repository at this point in the history
  • Loading branch information
Standing-Storm committed Jun 3, 2024
1 parent 3d931e5 commit f27ccf8
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 6 deletions.
40 changes: 40 additions & 0 deletions data/mods/Aftershock/EOC/esper_eoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,45 @@
},
{ "math": [ "u_vitamin('vitamin_afs_maintained_powers')", "=", "0" ] }
]
},
{
"type": "effect_on_condition",
"id": "EOC_CONCENTRATION_SUCCESS_PROFICIENCY",
"condition": {
"and": [
{ "not": { "u_has_proficiency": "prof_concentration_basic" } },
{ "math": [ "u_vitamin('vitamin_maintained_powers')", ">", "0" ] }
]
},
"effect": [ { "math": [ "u_proficiency('prof_concentration_basic', 'format': 'percent')", "+=", "rand(4) / 24" ] } ],
"//": "adds 0% - 0.16% experience per run",
"false_effect": {
"run_eocs": [
{
"id": "EOC_CONCENTRATION_SUCCESS_PROFICIENCY_INT",
"condition": {
"and": [
{ "not": { "u_has_proficiency": "prof_concentration_intermediate" } },
{ "math": [ "u_vitamin('vitamin_maintained_powers')", ">", "0" ] }
]
},
"effect": [ { "math": [ "u_proficiency('prof_concentration_intermediate', 'format': 'percent')", "+=", "rand(4) / 48" ] } ],
"false_effect": {
"run_eocs": [
{
"id": "EOC_CONCENTRATION_SUCCESS_PROFICIENCY_MASTER",
"condition": {
"and": [
{ "not": { "u_has_proficiency": "prof_concentration_master" } },
{ "math": [ "u_vitamin('vitamin_maintained_powers')", ">", "0" ] }
]
},
"effect": [ { "math": [ "u_proficiency('prof_concentration_master', 'format': 'percent')", "+=", "rand(4) / 96" ] } ]
}
]
}
}
]
}
}
]
11 changes: 5 additions & 6 deletions data/mods/Aftershock/player/professions.json
Original file line number Diff line number Diff line change
Expand Up @@ -643,28 +643,27 @@
"description": "You are a telepath, able to sense minds and influence thoughts. You aren't entirely sure how you got your powers, but you seem to have an instinctive sense of how to use them. That's not sinister at all, right?",
"traits": [ "AFS_TELEPATH" ],
"flags": [ "SCEN_ONLY" ],
"skills": [ { "level": 3, "name": "metaphysics" } ],
"skills": [ { "level": 4, "name": "metaphysics" } ],
"spells": [
{ "id": "afs_telepathic_shield", "level": 8 },
{ "id": "afs_telepathic_mind_sense", "level": 6 },
{ "id": "afs_telepathic_suggestion", "level": 6 },
{ "id": "afs_telepathic_confusion", "level": 5 },
{ "id": "afs_telepathic_blast", "level": 3 }
],
"proficiencies": [ "prof_concentration_basic" ],
"items": {
"both": {
"entries": [
{ "item": "spacer_jumpsuit" },
{ "item": "spacer_cap" },
{ "item": "socks" },
{ "item": "boots" },
{ "item": "duct_tape" },
{ "item": "screwdriver" },
{ "item": "wristwatch" },
{ "item": "hat_hard", "variant": "orange_hat_hard" },
{ "item": "wrench", "container-item": "tool_belt" },
{ "item": "cream_prot_cold" },
{ "item": "cream_prot_cold" }
{ "item": "cream_prot_cold" },
{ "group": "charged_smart_phone" },
{ "item": "afs_40g_plasma_civ", "ammo-item": "afs_shydrogen", "charges": 40 }
]
},
"male": { "entries": [ { "item": "briefs" } ] },
Expand Down
41 changes: 41 additions & 0 deletions data/mods/Aftershock/player/proficiencies.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,46 @@
"name": { "str": "Armament License" },
"can_learn": false,
"description": "You have a license to own and operate military grade weaponry and can legally purchase such items without any difficulty."
},
{
"type": "proficiency_category",
"id": "prof_concentration",
"name": "Concentration",
"description": "Proficiencies that help with maintaining concentration even in the face of distractions."
},
{
"type": "proficiency",
"id": "prof_concentration_basic",
"category": "prof_concentration",
"name": { "str": "Concentration (Beginner)" },
"description": "You are capable of holding the same thing in mind even when sitting in an uncomfortable position or after skipping a meal.",
"can_learn": true,
"time_to_learn": "16 h",
"default_time_multiplier": 2,
"default_skill_penalty": 0.2
},
{
"type": "proficiency",
"id": "prof_concentration_intermediate",
"category": "prof_concentration",
"name": { "str": "Concentration (Expert)" },
"description": "You can maintain your concentration even if outside in winter without a coat or while in combat with a zombie.",
"can_learn": true,
"time_to_learn": "32 h",
"default_time_multiplier": 2.5,
"default_skill_penalty": 0.25,
"required_proficiencies": [ "prof_concentration_basic" ]
},
{
"type": "proficiency",
"id": "prof_concentration_master",
"category": "prof_concentration",
"name": { "str": "Concentration (Master)" },
"description": "You can maintain your concentration even when suffering crippling injuries or while on mind-altering substances.",
"can_learn": true,
"time_to_learn": "64 h",
"default_time_multiplier": 3,
"default_skill_penalty": 0.3,
"required_proficiencies": [ "prof_concentration_intermediate" ]
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"condition": { "u_has_effect": "effect_telepathic_psi_armor" },
"effect": [
{ "math": [ "u_spell_exp('afs_telepathic_shield')", "+=", "(maintenance_exp_factor(u_val('focus')))" ] },
{ "run_eocs": "EOC_CONCENTRATION_SUCCESS_PROFICIENCY" },
{
"queue_eocs": "EOC_AFS_TELEPATH_SHIELD_MAINTENANCE",
"time_in_future": [
Expand Down Expand Up @@ -75,6 +76,7 @@
"condition": { "u_has_effect": "effect_telepath_sense_minds" },
"effect": [
{ "math": [ "u_spell_exp('afs_telepathic_mind_sense')", "+=", "(maintenance_exp_factor(u_val('focus')))" ] },
{ "run_eocs": "EOC_CONCENTRATION_SUCCESS_PROFICIENCY" },
{
"queue_eocs": "EOC_AFS_TELEPATH_SENSE_MINDS_MAINTENANCE",
"time_in_future": [
Expand Down Expand Up @@ -121,6 +123,7 @@
"condition": { "u_has_effect": "effect_telepathic_suggestion" },
"effect": [
{ "math": [ "u_spell_exp('afs_telepathic_suggestion')", "+=", "(maintenance_exp_factor(u_val('focus')))" ] },
{ "run_eocs": "EOC_CONCENTRATION_SUCCESS_PROFICIENCY" },
{
"queue_eocs": "EOC_AFS_TELEPATH_SUGGESTION_MAINTENANCE",
"time_in_future": [
Expand Down

0 comments on commit f27ccf8

Please sign in to comment.