Skip to content

Commit

Permalink
Add conditionals to martial art techniques and audit techs to use them (
Browse files Browse the repository at this point in the history
CleverRaven#66034)

* First

Conditions, in-repo tech conditioning, documentation

lint

Update src/item.cpp

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Tests

* Test, Clang

* Clang, material test failure

* Clangg

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
Venera3 and github-actions[bot] authored Jun 9, 2023
1 parent 2d1c24c commit f9dc830
Show file tree
Hide file tree
Showing 26 changed files with 1,765 additions and 80 deletions.
7 changes: 7 additions & 0 deletions data/json/effects.json
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,13 @@
"//": "Exposes certain weakpoints",
"desc": [ "You feel exposed -and pretty buggy- without your shell." ]
},
{
"type": "effect_type",
"id": "maimed_arm",
"name": [ "Broken Arm" ],
"//": "Disables base grabs and scratches",
"desc": [ "Your arms are broken. Your imaginary monster arms, so this is probably a bug." ]
},
{
"type": "effect_type",
"id": "maimed_mandible",
Expand Down
12 changes: 10 additions & 2 deletions data/json/martialarts_fictional.json
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,8 @@
"unarmed_weapons_allowed": false,
"weighting": 2,
"crit_ok": true,
"condition": { "not": { "npc_has_effect": "downed" } },
"condition_desc": "* Only works on a <info>non-downed</info> target",
"down_dur": 2,
"attack_vectors": [ "FOOT" ]
},
Expand Down Expand Up @@ -528,7 +530,8 @@
"messages": [ "You beat %s down with a powerful Viper Tail", "<npcname> beats %s down with a powerful Viper Tail" ],
"skill_requirements": [ { "name": "unarmed", "level": 3 } ],
"unarmed_allowed": true,
"stunned_target": true,
"condition": { "npc_has_effect": "stunned" },
"condition_desc": "Requires a stunned target",
"weighting": 2,
"mult_bonuses": [ { "stat": "damage", "type": "bash", "scale": 1.5 } ],
"attack_vectors": [ "HAND" ]
Expand All @@ -540,7 +543,8 @@
"messages": [ "You devastate %s with a spectacular Viper Strike", "<npcname> devastates %s with a spectacular Viper Strike" ],
"skill_requirements": [ { "name": "unarmed", "level": 4 } ],
"unarmed_allowed": true,
"stunned_target": true,
"condition": { "npc_has_effect": "stunned" },
"condition_desc": "Requires a stunned target",
"weighting": 2,
"crit_tec": true,
"mult_bonuses": [ { "stat": "damage", "type": "bash", "scale": 2.0 } ],
Expand Down Expand Up @@ -613,6 +617,8 @@
"unarmed_allowed": true,
"required_buffs_all": [ "buff_toad_ongethit" ],
"crit_ok": true,
"condition": { "not": { "npc_has_effect": "downed" } },
"condition_desc": "* Only works on a <info>non-downed</info> target",
"down_dur": 2,
"mult_bonuses": [ { "stat": "movecost", "scale": 0.5 } ],
"attack_vectors": [ "HAND" ]
Expand Down Expand Up @@ -649,6 +655,8 @@
"skill_requirements": [ { "name": "unarmed", "level": 2 } ],
"unarmed_allowed": true,
"crit_tec": true,
"condition": { "not": { "npc_has_effect": "downed" } },
"condition_desc": "* Only works on a <info>non-downed</info> target",
"down_dur": 1,
"mult_bonuses": [ { "stat": "movecost", "scale": 0.5 } ],
"attack_vectors": [ "PALM" ]
Expand Down
6 changes: 3 additions & 3 deletions data/json/monster_special_attacks/monster_attacks.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"grab": true,
"grab_data": { "grab_effect": "grabbed" },
"//": "grab_strength preferentially set in the monster definition for clarity",
"condition": { "not": { "u_has_flag": "GRAB_FILTER" } },
"condition": { "and": [ { "not": { "u_has_flag": "GRAB_FILTER" } }, { "not": { "u_has_effect": "maimed_arm" } } ] },
"hit_dmg_u": "%1$s grabs your %2$s!",
"hit_dmg_npc": "%1$s grabs <npcname>'s %2$s!",
"miss_msg_u": "%s tries to grab you, but you dodge!",
Expand Down Expand Up @@ -100,7 +100,7 @@
"hitsize_min": 1,
"range": 5,
"grab": true,
"condition": { "not": { "u_has_flag": "GRAB_FILTER" } },
"condition": { "and": [ { "not": { "u_has_flag": "GRAB_FILTER" } }, { "not": { "u_has_effect": "maimed_arm" } } ] },
"damage_max_instance": [ { "damage_type": "bash", "amount": 0 } ],
"grab_data": { "pull_chance": 100, "pull_weight_ratio": 0.75 },
"no_dmg_msg_u": "",
Expand Down Expand Up @@ -369,7 +369,7 @@
"cooldown": 20,
"move_cost": 150,
"damage_max_instance": [ { "damage_type": "cut", "amount": 8 } ],
"condition": { "not": { "u_has_flag": "GRAB_FILTER" } },
"condition": { "and": [ { "not": { "u_has_flag": "GRAB_FILTER" } }, { "not": { "u_has_effect": "maimed_arm" } } ] },
"hit_dmg_u": "%1$s claws at your %2$s!",
"hit_dmg_npc": "%1$s claws at <npcname>!",
"miss_msg_u": "%1$s claws at you, but you dodge!",
Expand Down
Loading

0 comments on commit f9dc830

Please sign in to comment.