Skip to content

Commit

Permalink
Merge pull request #73485 from Venera3/ma_remove_uwa
Browse files Browse the repository at this point in the history
Remove redundant `unarmed_weapons_allowed` variable from martial art techs
  • Loading branch information
Maleclypse authored May 4, 2024
2 parents 7dd8b1b + db81750 commit cad7474
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 30 deletions.
6 changes: 0 additions & 6 deletions data/json/martialarts.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
"name": "Aikido Stance",
"description": "By disregarding offense in favor of defense, you are better at protecting yourself.\n\nBlocked damage reduced by 100% of Dexterity, +2 blocking effectiveness, +1.0 Dodging skill.",
"unarmed_allowed": true,
"unarmed_weapons_allowed": false,
"melee_allowed": true,
"flat_bonuses": [
{ "stat": "block", "scaling-stat": "dex", "scale": 1.0 },
Expand All @@ -52,7 +51,6 @@
"name": "Intermediate Aikido",
"description": "An intermediate Aikido practitioner can protect themselves against multiple opponents.\n\nBlocked damage reduced by 100% of Dexterity, +1 blocking effectiveness, +1 block attempt, +1 dodge attempt.",
"unarmed_allowed": true,
"unarmed_weapons_allowed": false,
"melee_allowed": true,
"skill_requirements": [ { "name": "unarmed", "level": 3 } ],
"bonus_dodges": 1,
Expand All @@ -64,7 +62,6 @@
"name": "Advanced Aikido",
"description": "An advanced Aikido practitioner can protect themselves against even more opponents than normal.\n\n+1 blocking effectiveness, +1 block attempt, +1 dodge attempt.",
"unarmed_allowed": true,
"unarmed_weapons_allowed": false,
"melee_allowed": true,
"skill_requirements": [ { "name": "unarmed", "level": 5 } ],
"bonus_dodges": 1,
Expand All @@ -79,7 +76,6 @@
"description": "After a smooth block, you prepare to counter your foe.\n\n-10% move cost.\nLasts 1 turn.",
"skill_requirements": [ { "name": "unarmed", "level": 1 } ],
"unarmed_allowed": true,
"unarmed_weapons_allowed": false,
"melee_allowed": true,
"buff_duration": 1,
"mult_bonuses": [ { "stat": "movecost", "scale": 0.9 } ]
Expand All @@ -91,7 +87,6 @@
"name": "Fluid Dodging",
"description": "After a smooth dodge, you prepare to counter your foe.\n\n-10% move cost.\nLasts 1 turn.",
"unarmed_allowed": true,
"unarmed_weapons_allowed": false,
"melee_allowed": true,
"buff_duration": 1,
"mult_bonuses": [ { "stat": "movecost", "scale": 0.9 } ]
Expand Down Expand Up @@ -685,7 +680,6 @@
"description": "Your knowledge of grappling allows you to recover from knockdown effects instantly. In addition, you can counter grabs and takedown attacks with a judo throw.",
"unarmed_allowed": true,
"melee_allowed": true,
"unarmed_weapons_allowed": false,
"flags": [ "DOWNED_RECOVERY" ]
}
],
Expand Down
2 changes: 0 additions & 2 deletions data/json/martialarts_fictional.json
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,6 @@
"name": "Measured Strike (unarmed)",
"messages": [ "You make an efficient strike against %s!", "<npcname> makes an efficient strike against %s!" ],
"unarmed_allowed": true,
"unarmed_weapons_allowed": false,
"crit_ok": true,
"mult_bonuses": [ { "stat": "movecost", "scale": 0.8 } ],
"attack_vectors": [ "HAND" ]
Expand Down Expand Up @@ -425,7 +424,6 @@
"messages": [ "You kick and slam %s to the ground!", "<npcname> kicks and slams %s to the ground!" ],
"skill_requirements": [ { "name": "unarmed", "level": 2 } ],
"unarmed_allowed": true,
"unarmed_weapons_allowed": false,
"weighting": 2,
"crit_ok": true,
"condition": { "not": { "npc_has_effect": "downed" } },
Expand Down
9 changes: 0 additions & 9 deletions data/json/techniques.json
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,6 @@
"skill_requirements": [ { "name": "unarmed", "level": 2 } ],
"unarmed_allowed": true,
"melee_allowed": true,
"unarmed_weapons_allowed": false,
"required_buffs_all": [ "buff_aikido_onblock" ],
"crit_ok": true,
"//condition": "Humanoids of similar size and no flying",
Expand Down Expand Up @@ -375,7 +374,6 @@
"messages": [ "You smoothly throw %s", "<npcname> dodges and smoothly throws %s!" ],
"unarmed_allowed": true,
"melee_allowed": true,
"unarmed_weapons_allowed": false,
"required_buffs_all": [ "buff_aikido_ondodge" ],
"crit_ok": true,
"//condition": "Humanoids of similar size and no flying",
Expand Down Expand Up @@ -418,7 +416,6 @@
"skill_requirements": [ { "name": "unarmed", "level": 4 } ],
"unarmed_allowed": true,
"melee_allowed": true,
"unarmed_weapons_allowed": false,
"required_buffs_all": [ "buff_aikido_onblock" ],
"crit_ok": true,
"disarms": true,
Expand Down Expand Up @@ -471,7 +468,6 @@
"skill_requirements": [ { "name": "unarmed", "level": 4 } ],
"unarmed_allowed": true,
"melee_allowed": true,
"unarmed_weapons_allowed": false,
"required_buffs_all": [ "buff_aikido_ondodge" ],
"crit_ok": true,
"disarms": true,
Expand Down Expand Up @@ -527,7 +523,6 @@
"skill_requirements": [ { "name": "unarmed", "level": 3 } ],
"unarmed_allowed": true,
"melee_allowed": true,
"unarmed_weapons_allowed": false,
"defensive": true,
"grab_break": true
},
Expand Down Expand Up @@ -1435,7 +1430,6 @@
"messages": [ "You throw %s to the ground", "<npcname> throws %s to the ground!" ],
"unarmed_allowed": true,
"melee_allowed": true,
"unarmed_weapons_allowed": false,
"crit_ok": true,
"condition": {
"and": [
Expand All @@ -1459,7 +1453,6 @@
"skill_requirements": [ { "name": "unarmed", "level": 3 } ],
"unarmed_allowed": true,
"melee_allowed": true,
"unarmed_weapons_allowed": false,
"disarms": true,
"tech_effects": [
{
Expand Down Expand Up @@ -1492,7 +1485,6 @@
"skill_requirements": [ { "name": "unarmed", "level": 2 } ],
"unarmed_allowed": true,
"melee_allowed": true,
"unarmed_weapons_allowed": false,
"crit_tec": true,
"side_switch": true,
"condition": {
Expand Down Expand Up @@ -3439,7 +3431,6 @@
"id": "tec_debug_slow",
"name": "slow strike",
"unarmed_allowed": true,
"unarmed_weapons_allowed": false,
"skill_requirements": [ { "name": "unarmed", "level": 3 } ],
"mult_bonuses": [
{ "stat": "damage", "type": "bash", "scale": 3.0 },
Expand Down
2 changes: 0 additions & 2 deletions doc/MARTIALART_JSON.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@
"attack_vectors": [ "WEAPON", "HAND" ] // What attack vector would be used for this technique; this field is order dependend, meaning in this example the game will try to use WEAPON first, and, if not possible, reject it and will use HAND instead; For more info see Attack vectors below
"attack_vectors_random": [ "FOOT", "HEAD", "TORSO", "HEAD", "HEAD" ] // same as attack_vectors, but has no priority, and pick random vector from the list; it is used only if all choises from attack_vectors are rejected
"unarmed_allowed": true, // Can an unarmed character use this technique
"unarmed_weapons_allowed": true, // Does this technique require the character to be actually unarmed or does it allow unarmed weapons
"weapon_categories_allowed": [ "BLADES", "KNIVES" ], // Restrict technique to only these categories of weapons. If omitted, all weapon categories are allowed.
"melee_allowed": true, // Means that ANY melee weapon can be used, NOT just the martial art's weapons
"powerful_knockback": true, //
Expand Down Expand Up @@ -173,7 +172,6 @@ List of attack vectors is currently hardcoded, and contain:
"persists": false, // Allow buff to remain when changing to a new style
"unarmed_allowed": true, // Effect is applied when you have no weapon equipped
"melee_allowed": true, // Effect is applied when you have some melee weapon equipped
"unarmed_weapons_allowed": true, // Does this buff require the character to be actually unarmed. If true, allows unarmed weapons (brass knuckles, punch daggers)
"strictly_unarmed": true, // Effect is applied only when you have no weapon whatsoever, even unarmed weapon
"wall_adjacent": true, // Effect is applied when you stand near the wall
"weapon_categories_allowed": [ "BLADES", "KNIVES" ], // Restrict buff to only these categories of weapons. If omitted, all weapon categories are allowed.
Expand Down
9 changes: 0 additions & 9 deletions src/martialarts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ void ma_requirements::load( const JsonObject &jo, const std::string_view )
{
optional( jo, was_loaded, "unarmed_allowed", unarmed_allowed, false );
optional( jo, was_loaded, "melee_allowed", melee_allowed, false );
optional( jo, was_loaded, "unarmed_weapons_allowed", unarmed_weapons_allowed, true );
if( jo.has_string( "weapon_categories_allowed" ) ) {
weapon_category_id tmp_id;
mandatory( jo, was_loaded, "weapon_categories_allowed", tmp_id );
Expand Down Expand Up @@ -808,17 +807,9 @@ std::string ma_requirements::get_description( bool buff ) const
if( unarmed_allowed && melee_allowed ) {
dump += string_format( _( "* Can %s while <info>armed</info> or <info>unarmed</info>" ),
type ) + "\n";
if( unarmed_weapons_allowed ) {
dump += string_format( _( "* Can %s while using <info>any unarmed weapon</info>" ),
type ) + "\n";
}
} else if( unarmed_allowed ) {
dump += string_format( _( "* Can <info>only</info> %s while <info>unarmed</info>" ),
type ) + "\n";
if( unarmed_weapons_allowed ) {
dump += string_format( _( "* Can %s while using <info>any unarmed weapon</info>" ),
type ) + "\n";
}
} else if( melee_allowed ) {
dump += string_format( _( "* Can <info>only</info> %s while <info>armed</info>" ),
type ) + "\n";
Expand Down
2 changes: 0 additions & 2 deletions src/martialarts.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ struct ma_requirements {

bool unarmed_allowed; // does this bonus work when unarmed?
bool melee_allowed; // what about with a melee weapon?
bool unarmed_weapons_allowed; // If unarmed, what about unarmed weapons?
bool strictly_unarmed; // Ignore force_unarmed?
bool wall_adjacent; // Does it only work near a wall?

Expand Down Expand Up @@ -99,7 +98,6 @@ struct ma_requirements {
ma_requirements() {
unarmed_allowed = false;
melee_allowed = false;
unarmed_weapons_allowed = true;
strictly_unarmed = false;
wall_adjacent = false;
}
Expand Down

0 comments on commit cad7474

Please sign in to comment.