# Free arm block and leg blocks without martial arts and skills

**URL:** https://discourse.cataclysmdda.org/t/free-arm-block-and-leg-blocks-without-martial-arts-and-skills/8713
**Category:** The Garage
**Created:** [January 22, 2015, 8:34pm UTC](https://discourse.cataclysmdda.org/t/free-arm-block-and-leg-blocks-without-martial-arts-and-skills/8713 "2015-01-22T20:34:17Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![aierce](https://avatars.discourse-cdn.com/v4/letter/a/b487fb/32.png) [@aierce](https://discourse.cataclysmdda.org/u/aierce)
#### Post date: [January 22, 2015, 8:34pm UTC](https://discourse.cataclysmdda.org/t/free-arm-block-and-leg-blocks-without-martial-arts-and-skills/8713/1 "2015-01-22T20:34:17Z")

</div>

Started a new game, with tiger style (no blocks) and 0 melee and unarmed skill, but i’m still doing arm and leg blocks when fighting zombies

---

<div class="post-metadata">

### Author: ![KA101](https://avatars.discourse-cdn.com/v4/letter/k/278dde/32.png) [@KA101](https://discourse.cataclysmdda.org/u/KA101)
#### Post date: [January 22, 2015, 11:25pm UTC](https://discourse.cataclysmdda.org/t/free-arm-block-and-leg-blocks-without-martial-arts-and-skills/8713/2 "2015-01-22T23:25:20Z")

</div>

Likely a check not happening. Thanks for reporting.

---

<div class="post-metadata">

### Author: ![AllisonW](https://avatars.discourse-cdn.com/v4/letter/a/919ad9/32.png) [@AllisonW](https://discourse.cataclysmdda.org/u/AllisonW)
#### Post date: [January 22, 2015, 11:46pm UTC](https://discourse.cataclysmdda.org/t/free-arm-block-and-leg-blocks-without-martial-arts-and-skills/8713/3 "2015-01-22T23:46:44Z")

</div>

I’ve found this with unarmed combat in general, including characters that are using no unarmed style at all, like those who haven’t even learned Brawling yet.

---

<div class="post-metadata">

### Author: ![aierce](https://avatars.discourse-cdn.com/v4/letter/a/b487fb/32.png) [@aierce](https://discourse.cataclysmdda.org/u/aierce)
#### Post date: [January 25, 2015, 8:57am UTC](https://discourse.cataclysmdda.org/t/free-arm-block-and-leg-blocks-without-martial-arts-and-skills/8713/4 "2015-01-25T08:57:21Z")

</div>

Very rusty programming, but i might have found the bug? game checks if unarmed skill is higher than the integer ma.arm\_block or ma.leg\_block, but the value of arm\_block and leg\_block is always -1. This is from src/martialarts.cpp

martialart::martialart()  
{  
leg\_block = -1;  
arm\_block = -1;  
}

…

ma.leg\_block = jo.get\_int(“leg\_block”, -1);  
ma.arm\_block = jo.get\_int(“arm\_block”, -1);

…

if( unarmed\_skill \>= ma.arm\_block ) {  
return true;

---

<div class="post-metadata">

### Author: ![aierce](https://avatars.discourse-cdn.com/v4/letter/a/b487fb/32.png) [@aierce](https://discourse.cataclysmdda.org/u/aierce)
#### Post date: [January 25, 2015, 9:21am UTC](https://discourse.cataclysmdda.org/t/free-arm-block-and-leg-blocks-without-martial-arts-and-skills/8713/5 "2015-01-25T09:21:42Z")

</div>

OK did a little more testing, if character has NO martial arts with with blocking, character will always know arm and leg block, but if character has style with arm block, or arm+leg block, character will only use those blocks when unarmed skill meets the requirement.

I believe it’s because in martialarts.json styles without block (or no style) doesn’t give a value to arm\_block and leg\_block therefore they default to the -1 which will always make the check fuction return true

(or is -1 a special number or something?)

anyways the suggested fix is to assign a large arm\_block and leg\_block value to all the martial arts styles (and no style) in martialarts.json , like 100 or so

OK submitted a pull request on git

---

<div class="post-metadata">

### Author: ![KA101](https://avatars.discourse-cdn.com/v4/letter/k/278dde/32.png) [@KA101](https://discourse.cataclysmdda.org/u/KA101)
#### Post date: [January 26, 2015, 1:10am UTC](https://discourse.cataclysmdda.org/t/free-arm-block-and-leg-blocks-without-martial-arts-and-skills/8713/6 "2015-01-26T01:10:35Z")

</div>

Was supposed to be a special number, but probably wasn’t working. Thanks for reporting & PRing, though I’d ask that you check your PR, as it had a few formatting issues when I last looked at it.
