Skip to content

Commit

Permalink
New Mod: Martial Mastery (#76278)
Browse files Browse the repository at this point in the history
* Martial Mastery

* Update data/mods/Perk_melee/techniques/techniques.json

* Spacing
  • Loading branch information
John-Candlebury authored Sep 10, 2024
1 parent c73e4c6 commit 43dd78a
Show file tree
Hide file tree
Showing 13 changed files with 1,390 additions and 0 deletions.
8 changes: 8 additions & 0 deletions data/mods/Perk_melee/EOC/_reusable_conditions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[
{
"type": "effect_on_condition",
"id": "EOC_CONDITION_has_mind",
"condition": { "or": [ { "u_has_flag": "HAS_MIND" }, { "u_has_flag": "HUMAN" }, "u_is_character" ] },
"effect": [ ]
}
]
21 changes: 21 additions & 0 deletions data/mods/Perk_melee/EOC/eoc_clears.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[
{
"id": "EOC_CLEAR_BUFFS",
"type": "effect_on_condition",
"effect": [
{ "u_lose_effect": "mabuff:buff_perk_tempo" },
{ "u_lose_effect": "mabuff:buff_perk_momentum" },
{ "u_lose_effect": "perk_dex_bonus" }
]
},
{
"id": "EOC_CLEAR_COMBAT_TEMPO",
"type": "effect_on_condition",
"effect": [ { "u_lose_effect": "mabuff:buff_perk_tempo" } ]
},
{
"id": "EOC_CLEAR_MOMENTUM",
"type": "effect_on_condition",
"effect": [ { "u_lose_effect": "mabuff:buff_perk_momentum" }, { "u_lose_effect": "perk_dex_bonus" } ]
}
]
57 changes: 57 additions & 0 deletions data/mods/Perk_melee/EOC/leveling.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
[
{
"type": "effect_on_condition",
"id": "EOC_perk_ma_open_perk_menu",
"effect": [ { "open_dialogue": { "topic": "TALK_MA_PERK_MENU_MAIN" } } ]
},
{
"type": "effect_on_condition",
"id": "EOC_perk_ma_level_up",
"condition": { "math": [ "u_ma_available_exp", ">", "u_ma_exp_to_perk" ] },
"effect": [
{ "u_message": "Your experience with martial arts has increased!" },
{ "run_eocs": "EOC_give_ma_perk_point" },
{ "math": [ "u_ma_used_exp", "+=", "u_ma_exp_to_perk" ] },
{ "math": [ "u_ma_available_exp", "=", "u_val('exp') - u_ma_used_exp" ] },
{ "math": [ "u_ma_exp_to_perk", "+=", "u_ma_exp_per_level" ] },
{ "math": [ "u_ma_current_level", "+=", "1" ] }
]
},
{
"type": "effect_on_condition",
"id": "EOC_perk_ma_level_up_notification",
"condition": { "math": [ "u_no_notifications", "!=", "1" ] },
"effect": [ { "open_dialogue": { "topic": "TALK_PERK_MENU_MAIN" } } ]
},
{
"type": "effect_on_condition",
"id": "EOC_perk_ma_kill_check_exp",
"eoc_type": "EVENT",
"required_event": "character_kills_monster",
"effect": [ { "math": [ "u_ma_available_exp", "=", "u_val('exp') - u_ma_used_exp" ] }, { "run_eocs": "EOC_perk_ma_level_up" } ]
},
{
"type": "effect_on_condition",
"id": "EOC_perk_ma_initialize",
"eoc_type": "EVENT",
"required_event": "game_begin",
"condition": { "and": [ { "not": { "u_has_trait": "perk_ma_perk_menu" } } ] },
"effect": [
{
"u_message": "Martial Mastery mod is active. Interact with the \"Practice Martial Arts\" trait from the mutation menu to learn new techniques and perks."
},
{ "math": [ "u_ma_perks", "=", "0" ] },
{ "math": [ "u_ma_exp_to_perk", "=", "100" ] },
{ "math": [ "u_ma_exp_per_level", "=", "300" ] },
{ "math": [ "u_ma_available_exp", "=", "0" ] },
{ "math": [ "u_ma_current_level", "=", "0" ] },
{ "math": [ "u_num_ma_perks", "=", "0" ] },
{ "u_add_trait": "perk_ma_perk_menu" }
]
},
{
"type": "effect_on_condition",
"id": "EOC_give_ma_perk_point",
"effect": [ { "math": [ "u_num_ma_perks", "++" ] } ]
}
]
93 changes: 93 additions & 0 deletions data/mods/Perk_melee/EOC/shared_eocs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
[
{
"id": "EOC_UPDATE_WEAPON_STATS",
"type": "effect_on_condition",
"eoc_type": "EVENT",
"required_event": "character_wields_item",
"effect": [
{
"u_run_inv_eocs": "all",
"search_data": [ { "wielded_only": true } ],
"true_eocs": [ { "id": "_EOC_STATS", "effect": [ { "math": [ "u_perk_mymelee", "=", "n_melee_damage('ALL')" ] } ] } ]
}
]
},
{
"id": "EOC_EXECUTION_EXTA_EFFECTS",
"type": "effect_on_condition",
"effect": [
{ "math": [ "u_val('stamina')", "+=", "1200" ] },
{
"run_eocs": [
{
"id": "_EOC_EXECUTION_BRUTALITY",
"condition": { "u_has_flag": "MELEE_PERK_BRUTALITY" },
"effect": {
"u_run_monster_eocs": [
{
"id": "brutality_stun",
"condition": { "test_eoc": "EOC_CONDITION_has_mind" },
"effect": [ { "u_add_effect": "stunned", "duration": "2 seconds" } ]
}
],
"monster_range": 60,
"monster_must_see": true
}
}
]
}
]
},
{
"id": "EOC_PERK_DODGE_RETREAT_MANUAL",
"type": "effect_on_condition",
"condition": { "and": [ { "u_has_flag": "MELEE_PERK_MOVING_DODGE" } ] },
"effect": [
{
"run_eoc_until": "EOC_PERK_TRY_RETREAT",
"condition": { "math": [ "u_monsters_nearby('radius': 1)", ">", "0" ] },
"iteration": 10
}
]
},
{
"id": "EOC_PERK_TEMPO_MANUAL",
"type": "effect_on_condition",
"condition": { "u_has_trait": "MELEE_PERK_TEMPO" },
"effect": { "u_add_effect": "mabuff:buff_perk_tempo", "duration": "2 seconds" }
},
{
"id": "EOC_PERK_MOMENTUM_MANUAL",
"type": "effect_on_condition",
"condition": { "u_has_trait": "MELEE_PERK_MOMENTUM" },
"effect": { "u_add_effect": "mabuff:buff_perk_momentum", "duration": "2 seconds" }
},
{
"id": "EOC_PERK_MOMENTUM_2",
"type": "effect_on_condition",
"condition": { "u_has_trait": "MELEE_PERK_MOMENTUM_2" },
"effect": { "u_add_effect": "perk_dex_bonus", "duration": "2 seconds" }
},
{
"id": "EOC_PERK_TRY_RETREAT",
"type": "effect_on_condition",
"effect": [
{ "u_location_variable": { "context_val": "original_pos" }, "min_radius": 0, "max_radius": 0 },
{ "u_location_variable": { "context_val": "attempt" }, "min_radius": 1, "max_radius": 1 },
{ "u_teleport": { "context_val": "attempt" } },
{
"run_eocs": [
{
"id": "_VALID_RETREAT",
"condition": { "math": [ "u_monsters_nearby('radius': 1)", "==", "0" ] },
"effect": [
{ "u_add_effect": "mabuff:buff_perk_momentum", "duration": 2 },
{ "run_eocs": [ "EOC_PERK_MOMENTUM_2", "EOC_PERK_MOMENTUM_MANUAL" ] }
],
"false_effect": [ { "u_teleport": { "context_val": "original_pos" } } ]
}
]
}
]
}
]
96 changes: 96 additions & 0 deletions data/mods/Perk_melee/martial_arts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
[
{
"type": "martial_art",
"id": "style_none",
"//": "It all depends on this override, fighting with other styles will make perks useless.",
"name": { "str": "Fighting Style" },
"description": "Fight in accordance with your training or lack thereof.",
"initiate": [ "You focus on your training.", "%s remembers their training." ],
"arm_block": 1,
"leg_block": 99,
"allow_all_weapons": true,
"onmove_buffs": [
{
"id": "buff_perk_momentum",
"name": "Momentum",
"description": "Strike with the momentum of your previous movement.",
"max_stacks": 6,
"buff_duration": 2,
"unarmed_allowed": true,
"melee_allowed": true,
"required_char_flags": [ "MELEE_PERK_MOMENTUM" ],
"flat_bonuses": [
{ "stat": "damage", "type": "cut", "scaling-stat": "dex", "scale": 0.2 },
{ "stat": "damage", "type": "stab", "scaling-stat": "dex", "scale": 0.2 }
]
}
],
"onattack_buffs": [
{
"id": "buff_perk_tempo",
"name": "Tempo",
"description": "The rhythm of combat is in your favor.",
"max_stacks": 3,
"buff_duration": 2,
"unarmed_allowed": true,
"melee_allowed": true,
"required_char_flags": [ "MELEE_PERK_TEMPO" ],
"flat_bonuses": [
{ "stat": "damage", "type": "bash", "scaling-stat": "str", "scale": 0.2 },
{ "stat": "damage", "type": "stab", "scaling-stat": "str", "scale": 0.2 }
]
}
],
"onblock_buffs": [
{
"id": "buff_perk_block",
"name": "Parry",
"description": "Successful blocking has left you in a favorable position.",
"melee_allowed": true,
"buff_duration": 2,
"flat_bonuses": [ { "stat": "hit", "scale": 1.0 } ]
}
],
"onmove_eocs": [ "EOC_PERK_MOMENTUM_2" ],
"ondodge_eocs": [
{
"id": "EOC_PERK_DODGE_RETREAT",
"condition": {
"and": [ { "u_has_flag": "MELEE_PERK_MOVING_DODGE" }, { "not": { "u_has_flag": "MELEE_PERK_KNIFE_COUNTER_DODGE" } } ]
},
"effect": [
{
"run_eoc_until": "EOC_PERK_TRY_RETREAT",
"condition": { "math": [ "u_monsters_nearby('radius': 1)", ">", "0" ] },
"iteration": 10
}
]
}
],
"onblock_eocs": [ ],
"onpause_eocs": [
{
"id": "EOC_PERK_CAREFREE_STANCE",
"condition": { "u_has_flag": "MELEE_PERK_CAREFREE_STANCE" },
"effect": { "run_eocs": "EOC_CLEAR_BUFFS" }
}
],
"techniques": [
"tec_perk_stagger_strike",
"tec_perk_feint",
"tec_perk_fore",
"tec_perk_fore_stunned",
"tec_perk_execution_sword",
"tec_perk_execution_axe",
"tec_perk_execution_hammer",
"tec_perk_shoulder_tackle",
"tec_perk_vulgar_opening",
"tec_perk_coiling_strike",
"tec_perk_knife_counter_dodge",
"tec_perk_knife_finisher",
"tec_perk_make_way",
"tec_perk_estocada",
"tec_perk_staff_kick"
]
}
]
Loading

0 comments on commit 43dd78a

Please sign in to comment.