Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Martial Mastery: Defensive Perks #77405

Merged
merged 4 commits into from
Nov 17, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions data/mods/Perk_melee/EOC/shrug_off.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
[
{
"id": "EOC_PERK_SHRUG_OFF",
"type": "effect_on_condition",
"condition": { "u_using_martial_art": "style_none" },
"deactivate_condition": { "not": { "u_has_flag": "MELEE_PERK_SHRUG_OFF" } },
"recurrence": "15 seconds",
"effect": [ { "math": [ "u_shrug_off_ready", "=", "1" ] } ]
},
{
"type": "enchantment",
"id": "melee_perk_ench_shrug_off",
"condition": { "math": [ "u_shrug_off_ready", "==", "1" ] },
"name": { "str": "Shrug it off" },
"description": "You will completely negate the next attack that hits you.",
"values": [ { "value": "FORCEFIELD", "add": 1 } ],
"hit_me_effect": [
{
"id": "sp_shrug_off_hit",
"hit_self": true,
"message": "You shruf off the attack.",
John-Candlebury marked this conversation as resolved.
Show resolved Hide resolved
"npc_message": "%1$s's no sells the incoming attack."
}
]
},
{
"id": "sp_shrug_off_hit",
"type": "SPELL",
"name": { "str": "Shrug Off Trigger" },
"description": { "str": "Shrug off trigger", "//~": "NO_I18N" },
"valid_targets": [ "self" ],
"flags": [ "SILENT", "NO_EXPLOSION_SFX" ],
"shape": "blast",
"min_range": 1,
"max_range": 1,
"message": "",
"effect": "effect_on_condition",
"effect_str": "EOC_PERK_SHRUG_OFF_TRIGGER"
},
{
"id": "EOC_PERK_SHRUG_OFF_TRIGGER",
"type": "effect_on_condition",
"effect": [ { "math": [ "u_shrug_off_ready", "=", "0" ] } ]
}
]
71 changes: 71 additions & 0 deletions data/mods/Perk_melee/PERKS/insight.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
[
{
"type": "mutation",
"id": "MELEE_PERK_INSIGHT",
"copy-from": "MELEE_PERK_BASE",
"name": { "str": "Insight I" },
"description": "You passively accumulate up to 20 insight stacks while near enemies. Each insight stack increases all damage dealt by 1 until your next attack. Insight greatly favors perceptive warriors.",
"flags": "MELEE_PERK_INSIGHT",
"enchantments": [ "melee_perk_ench_insight" ]
},
{
"type": "mutation",
"id": "MELEE_PERK_INSIGHT_DODGE",
"copy-from": "MELEE_PERK_BASE",
"name": { "str": "Like Water" },
"description": "You gain a +25 dodge chance if you have at least 10 insight stacks.",
"flags": "MELEE_PERK_LIKE_WATER",
Night-Pryanik marked this conversation as resolved.
Show resolved Hide resolved
"enchantments": [ "melee_perk_ench_insight_dodge" ]
},
{
"type": "mutation",
"id": "MELEE_PERK_SIXTH_SENSE",
"copy-from": "MELEE_PERK_BASE",
"name": { "str": "Sixth Sense" },
"description": "You accumulate up to 20 insight stacks even from enemies you can't see. You can perceive unseen enemies within 10 tiles if you have at least 10 insight stacks.",
"flags": "MELEE_PERK_SIXTH_SENSE",
"enchantments": [ "melee_perk_ench_six_sense" ]
},
{
"type": "mutation",
"id": "MELEE_PERK_INSIGHT_INFINITE",
"copy-from": "MELEE_PERK_BASE",
"name": { "str": "The psychic sea" },
John-Candlebury marked this conversation as resolved.
Show resolved Hide resolved
"description": "You can accumulate an infinite number of insight stacks.",
"flags": "MELEE_PERK_INSIGHT_INFINITE"
},
{
"type": "mutation",
"id": "MELEE_PERK_TWILIGHT_FORM",
"copy-from": "MELEE_PERK_BASE",
"name": { "str": "Twilight Form" },
"description": "Whenever you kill an enemy in melee, you retain 50% of your insight stacks.",
"flags": "MELEE_PERK_TWILIGHT_FORM"
},
{
"type": "mutation",
"id": "MELEE_PERK_BLIND_CALCULUS",
"copy-from": "MELEE_PERK_BASE",
"name": { "str": "Blind Calculus" },
"description": "If you have been blind for at least 15 turns, every time you would gain an insight stack you instead gain 5.",
"flags": "MELEE_PERK_BLIND_CALCULUS"
},
{
"type": "mutation",
"id": "MELEE_PERK_MYSTIC_SHOT",
"copy-from": "MELEE_PERK_BASE",
"name": { "str": "Mystic Shot I" },
"description": "Insight stacks also increase the accuracy of ranged bow and crossbow attacks by 2% per stack. Ranged attacks will consume insight stacks.",
"flags": "MELEE_PERK_MYSTIC_SHOT",
"enchantments": [ "melee_perk_ench_insight_mystic_shot" ]
},
{
"type": "mutation",
"id": "MELEE_PERK_MYSTIC_SHOT_2",
"copy-from": "MELEE_PERK_BASE",
"name": { "str": "Mystic Shot II" },
"description": "Insight stacks also increase the damage of ranged bow and crossbow attacks by 1% per stack.",
"flags": "MELEE_PERK_MYSTIC_SHOT_2",
"enchantments": [ "melee_perk_ench_insight_mystic_shot_2" ]
}
]
28 changes: 28 additions & 0 deletions data/mods/Perk_melee/PERKS/momentum.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[
{
"type": "mutation",
"id": "MELEE_PERK_MOMENTUM",
"copy-from": "MELEE_PERK_BASE",
"name": { "str": "Momentum I" },
"description": "Rapid movement generates momentum stacks. Momentum greatly favors dextrous warriors.",
"changes_to": [ "MELEE_PERK_MOMENTUM_2" ],
"flags": "MELEE_PERK_MOMENTUM"
},
{
"type": "mutation",
"id": "MELEE_PERK_MOMENTUM_2",
"copy-from": "MELEE_PERK_BASE",
"name": { "str": "Momentum II" },
"description": "Rapid movement generates momentum stacks. As long as momentum is active your attacks gain extra physical damage equal to 10% of your dexterity. You gain a point of dexterity for every 2 momentum stacks.",
"flags": "MELEE_PERK_MOMENTUM"
},
{
"type": "mutation",
"id": "MELEE_PERK_MOMENTUM_BULLET_DODGE",
"copy-from": "MELEE_PERK_BASE",
"name": { "str": "Ballistic Evasion" },
"description": "If you have at least 4 momentum stacks, gain a 5% chance to dodge any ranged attack for every point of dexterity you have. If you have less than 4 momentum stacks, gain a 1% chance to dodge any ranged attack for every point of dexterity you have.",

Check failure on line 24 in data/mods/Perk_melee/PERKS/momentum.json

View workflow job for this annotation

GitHub Actions / Basic Build and Test (Clang 10, Ubuntu, Curses)

(all_mods)=> insufficient spaces at this location. 2 required, but only 1 found. Suggested fix: insert " " At the following position (marked with caret) "copy-from": "MELEE_PERK_BASE", "name": { "str": "Ballistic Evasion" }, "description": "If you have at least 4 momentum stacks, gain a 5% chance to dodge any ranged attack for every point of dexterity you have. If you have less than 4 momentum stacks, gain a 1% chance to dodge any ranged attack for every point of dexterity you have.", ▲▲▲ "flags": "MELEE_PERK_MOMENTUM_BULLET_DODGE", "enchantments": [ "melee_perk_ench_momentum_bullet_dodge" ]
John-Candlebury marked this conversation as resolved.
Show resolved Hide resolved
"flags": "MELEE_PERK_MOMENTUM_BULLET_DODGE",
"enchantments": [ "melee_perk_ench_momentum_bullet_dodge" ]
}
]
76 changes: 76 additions & 0 deletions data/mods/Perk_melee/PERKS/perks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
[
{
"type": "mutation_type",
"id": "perk"
},
Night-Pryanik marked this conversation as resolved.
Show resolved Hide resolved
{
"type": "mutation",
"id": "perk_ma_perk_menu",
"name": { "str": "Practice Martial Arts" },
"points": 0,
"purifiable": false,
"description": "Learn new martial arts techniques and perks.",
"active": true,
"activated_eocs": [ "EOC_open_ma_perk_menu" ]
},
{
"type": "mutation",
"id": "MELEE_PERK_BASE",
"name": { "str": "Melee Perk" },
"points": 0,
"description": "We copy from this one.",
"valid": false,
"purifiable": false
},
{
"type": "mutation",
"id": "MELEE_PERK_CAREFREE_STANCE",
"copy-from": "MELEE_PERK_BASE",
"name": { "str": "Carefree Stance" },
"description": "You aren't even trying.\nYou clear all combat buffs whenever you wait.",
"flags": "MELEE_PERK_CAREFREE_STANCE"
},
{
"type": "mutation",
"id": "MELEE_PERK_MOVING_DODGE",
"copy-from": "MELEE_PERK_BASE",
"name": { "str": "Flowing retreat" },
John-Candlebury marked this conversation as resolved.
Show resolved Hide resolved
"description": "You'll attempt to move away from your attackers when you successfully dodge an attack. You'll gain a momentum stack if you can normally gain them.",
"flags": "MELEE_PERK_MOVING_DODGE"
},
{
"type": "mutation",
"id": "MELEE_PERK_RIPOSTE",
"copy-from": "MELEE_PERK_BASE",
"name": { "str": "Counter strikes" },
John-Candlebury marked this conversation as resolved.
Show resolved Hide resolved
"description": "You gain +1 accuracy for two turns after a successful block.",
"flags": "MELEE_PERK_RIPOSTE"
},
{
"type": "mutation",
"id": "MELEE_PERK_BLOCK",
"copy-from": "MELEE_PERK_BASE",
"name": { "str": "Stalwart" },
"description": "You have an extra block attempt per turn.",
"flags": "MELEE_PERK_BLOCK",
"enchantments": [ { "values": [ { "value": "BONUS_BLOCK", "add": 1 } ] } ]
},
{
"type": "mutation",
"id": "MELEE_PERK_SHRUG_OFF",
"copy-from": "MELEE_PERK_BASE",
"name": { "str": "Shrug it off" },
"description": "Automatically block the first attack that hits you every 15 turns.",
"flags": "MELEE_PERK_SHRUG_OFF",
"enchantments": [ "melee_perk_ench_shrug_off" ]
},
{
"type": "mutation",
"id": "MELEE_PERK_DODGE",
"copy-from": "MELEE_PERK_BASE",
"name": { "str": "Spry footwork" },
"description": "You have an extra dodge attempt per turn.",
"flags": "MELEE_PERK_DODGE",
"enchantments": [ { "values": [ { "value": "BONUS_DODGE", "add": 1 } ] } ]
}
]
35 changes: 35 additions & 0 deletions data/mods/Perk_melee/PERKS/tempo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[
{
"type": "mutation",
"id": "MELEE_PERK_COMBAT_TEMPO",
"copy-from": "MELEE_PERK_BASE",
"name": { "str": "Combat Tempo I" },
"description": "Perfect. Now do it again.\nAttacks generate stacks of combat tempo. Tempo greatly favors the strong.",
"flags": "MELEE_PERK_TEMPO"
},
{
"type": "mutation",
"id": "MELEE_PERK_TEMPO_SHIFT",
"copy-from": "MELEE_PERK_BASE",
"name": { "str": "Tempo Shift" },
"description": "Gain a stack of combat tempo whenever you successfully block an attack.",
"flags": "MELEE_PERK_TEMPO_SHIFT"
},
{
"type": "mutation",
"id": "MELEE_PERK_TEMPO_THROW",
"copy-from": "MELEE_PERK_BASE",
"name": { "str": "Measured throws" },
John-Candlebury marked this conversation as resolved.
Show resolved Hide resolved
"description": "Your throwing attacks deal 100% more damage for every combat tempo stack you have.",
"enchantments": [
{
"values": [
{
"value": "THROW_DAMAGE",
"multiply": { "math": [ "u_effect_intensity('mabuff:buff_perk_tempo') > 0 ? u_effect_intensity('mabuff:buff_perk_tempo') : 0" ] }
}
]
}
]
}
]
19 changes: 19 additions & 0 deletions data/mods/Perk_melee/enchantments.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@
"condition": { "math": [ "u_effect_intensity('perk_insight')", ">", "9" ] },
"values": [ { "value": "MOTION_VISION_RANGE", "add": 10 } ]
},
{
"type": "enchantment",
"id": "melee_perk_ench_insight_dodge",
"condition": { "math": [ "u_effect_intensity('perk_insight')", ">", "9" ] },
"values": [ { "value": "DODGE_CHANCE", "add": 25 } ]
},
{
"type": "enchantment",
"id": "melee_perk_ench_insight_mystic_shot",
Expand All @@ -39,5 +45,18 @@
"id": "melee_perk_ench_insight_mystic_shot_2",
"condition": { "and": [ { "u_has_wielded_with_flag": "PRIMITIVE_RANGED_WEAPON" }, { "u_has_effect": "perk_insight" } ] },
"values": [ { "value": "RANGED_DAMAGE", "multiply": { "math": [ "u_effect_intensity('perk_insight')* 0.01" ] } } ]
},
{
"type": "enchantment",
"id": "melee_perk_ench_momentum_bullet_dodge",
"condition": { "math": [ "u_effect_intensity('perk_insight')", ">", "9" ] },
"values": [
{
"value": "RANGE_DODGE",
"add": {
"math": [ "u_effect_intensity('mabuff:buff_perk_momentum') > 4 ? u_val('dexterity') * 0.05 : u_val('dexterity') * 0.01" ]
John-Candlebury marked this conversation as resolved.
Show resolved Hide resolved
}
}
]
}
]
60 changes: 60 additions & 0 deletions data/mods/Perk_melee/menu.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,28 @@
],
"topic": "TALK_MA_PERK_MENU_SELECT"
},
{
"condition": { "not": { "u_has_trait": "MELEE_PERK_MOMENTUM_BULLET_DODGE" } },
"text": "Learn [<trait_name:MELEE_PERK_MOMENTUM_BULLET_DODGE>]",
"effect": [
{ "set_string_var": "<trait_name:MELEE_PERK_MOMENTUM_BULLET_DODGE>", "target_var": { "context_val": "trait_name" } },
{
"set_string_var": "<trait_description:MELEE_PERK_MOMENTUM_BULLET_DODGE>",
"target_var": { "context_val": "trait_description" }
},
{ "set_string_var": "MELEE_PERK_MOMENTUM_BULLET_DODGE", "target_var": { "context_val": "trait_id" } },
{
"set_string_var": "Requires Momentum I and Spry Footwork",
"target_var": { "context_val": "trait_requirement_description" },
"i18n": true
},
{
"set_condition": "perk_condition",
"condition": { "and": [ { "u_has_trait": "MELEE_PERK_MOMENTUM" }, { "u_has_trait": "MELEE_PERK_DODGE" } ] }
}
],
"topic": "TALK_MA_PERK_MENU_SELECT"
},
{
"condition": { "not": { "u_has_trait": "MELEE_PERK_COILING_STRIKE" } },
"text": "Learn [<trait_name:MELEE_PERK_COILING_STRIKE>]",
Expand Down Expand Up @@ -287,6 +309,25 @@
],
"topic": "TALK_MA_PERK_MENU_SELECT"
},
{
"condition": { "not": { "u_has_trait": "MELEE_PERK_INSIGHT_DODGE" } },
"text": "Learn [<trait_name:MELEE_PERK_INSIGHT_DODGE>]",
"effect": [
{ "set_string_var": "<trait_name:MELEE_PERK_INSIGHT_DODGE>", "target_var": { "context_val": "trait_name" } },
{
"set_string_var": "<trait_description:MELEE_PERK_INSIGHT_DODGE>",
"target_var": { "context_val": "trait_description" }
},
{ "set_string_var": "MELEE_PERK_INSIGHT_DODGE", "target_var": { "context_val": "trait_id" } },
{
"set_string_var": "Requires Insight I",
"target_var": { "context_val": "trait_requirement_description" },
"i18n": true
},
{ "set_condition": "perk_condition", "condition": { "u_has_trait": "MELEE_PERK_INSIGHT" } }
],
"topic": "TALK_MA_PERK_MENU_SELECT"
},
{
"condition": { "not": { "u_has_trait": "MELEE_PERK_MYSTIC_SHOT" } },
"text": "Learn [<trait_name:MELEE_PERK_MYSTIC_SHOT>]",
Expand Down Expand Up @@ -410,6 +451,25 @@
],
"topic": "TALK_MA_PERK_MENU_SELECT"
},
{
"condition": { "not": { "u_has_trait": "MELEE_PERK_SHRUG_OFF" } },
"text": "Learn [<trait_name:MELEE_PERK_SHRUG_OFF>]",
"effect": [
{ "set_string_var": "<trait_name:MELEE_PERK_SHRUG_OFF>", "target_var": { "context_val": "trait_name" } },
{
"set_string_var": "<trait_description:MELEE_PERK_SHRUG_OFF>",
"target_var": { "context_val": "trait_description" }
},
{ "set_string_var": "MELEE_PERK_SHRUG_OFF", "target_var": { "context_val": "trait_id" } },
{
"set_string_var": "No Requirements",
"target_var": { "context_val": "trait_requirement_description" },
"i18n": true
},
{ "set_condition": "perk_condition", "condition": { "math": [ "0", "==", "0" ] } }
],
"topic": "TALK_MA_PERK_MENU_SELECT"
},
{
"condition": { "not": { "u_has_trait": "MELEE_PERK_RIPOSTE" } },
"text": "Learn [<trait_name:MELEE_PERK_RIPOSTE>]",
Expand Down
Loading
Loading