# \[0.8-2191-g67bcb46\] Weapon blocks don't work

**URL:** <https://discourse.cataclysmdda.org/t/0-8-2191-g67bcb46-weapon-blocks-dont-work/3784>\
**Category:** The Garage\
**Created:** [November 2, 2013, 5:49pm UTC](https://discourse.cataclysmdda.org/t/0-8-2191-g67bcb46-weapon-blocks-dont-work/3784 "2013-11-02T17:49:33Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Let\_it\_end\_in\_hellfi](https://avatars.discourse-cdn.com/v4/letter/l/a183cd/32.png) [@Let\_it\_end\_in\_hellfi](https://discourse.cataclysmdda.org/u/Let_it_end_in_hellfi)\
**Post date:** [November 2, 2013, 5:49pm UTC](https://discourse.cataclysmdda.org/t/0-8-2191-g67bcb46-weapon-blocks-dont-work/3784/1 "2013-11-02T17:49:33Z")

</div>

…unless you have a blocking martial arts style because player::can\_arm\_block() assumes the player is unarmed.

Unless it is intended that you need, say, karate training in order to block with a weapon. I assume what is intended is that the player can block if they have a weapon with one of the WBLOCK tags or they have a blocking style (I guess? though blocking with a paper wrapper is silly regardless).

---

<div class="post-metadata">

**Author:** ![i2amroy](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/i2amroy/32/909_2.png) [@i2amroy](https://discourse.cataclysmdda.org/u/i2amroy)\
**Post date:** [November 2, 2013, 10:12pm UTC](https://discourse.cataclysmdda.org/t/0-8-2191-g67bcb46-weapon-blocks-dont-work/3784/2 "2013-11-02T22:12:33Z")

</div>

It’s (sorta) currently working as intended, though we will probably want to look at potentially making players able to block with weapons once they reach a certain level of the respective combat skill, regardless of whether or not they know martial arts.

---

<div class="post-metadata">

**Author:** ![Natures\_Witness](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/natures_witness/32/165_2.png) [@Natures\_Witness](https://discourse.cataclysmdda.org/u/Natures_Witness)\
**Post date:** [November 3, 2013, 5:46pm UTC](https://discourse.cataclysmdda.org/t/0-8-2191-g67bcb46-weapon-blocks-dont-work/3784/3 "2013-11-03T17:46:06Z")

</div>

Can we create a default “melee weapons” skill that all characters start with that handles this?

---

<div class="post-metadata">

**Author:** ![i2amroy](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/i2amroy/32/909_2.png) [@i2amroy](https://discourse.cataclysmdda.org/u/i2amroy)\
**Post date:** [November 3, 2013, 7:23pm UTC](https://discourse.cataclysmdda.org/t/0-8-2191-g67bcb46-weapon-blocks-dont-work/3784/4 "2013-11-03T19:23:50Z")

</div>

> [@Natures Witness](#):
>
> Can we create a default “melee weapons” skill that all characters start with that handles this?

Personally I think it might be better to just tie it into bashing/cutting/piercing weapon skills.

---

<div class="post-metadata">

**Author:** ![Natures\_Witness](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/natures_witness/32/165_2.png) [@Natures\_Witness](https://discourse.cataclysmdda.org/u/Natures_Witness)\
**Post date:** [November 3, 2013, 8:00pm UTC](https://discourse.cataclysmdda.org/t/0-8-2191-g67bcb46-weapon-blocks-dont-work/3784/5 "2013-11-03T20:00:03Z")

</div>

That sounds perfect, while we’re at it maybe we can fix the WIDE tag too, apparently that doesn’t work either.

---

<div class="post-metadata">

**Author:** ![krAbhandz](https://avatars.discourse-cdn.com/v4/letter/k/c77e96/32.png) [@krAbhandz](https://discourse.cataclysmdda.org/u/krAbhandz)\
**Post date:** [November 3, 2013, 8:08pm UTC](https://discourse.cataclysmdda.org/t/0-8-2191-g67bcb46-weapon-blocks-dont-work/3784/6 "2013-11-03T20:08:30Z")

</div>

On the bright side it swings twice as fast

---

<div class="post-metadata">

**Author:** ![kevin.granade](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/kevin.granade/32/1316_2.png) [@kevin.granade](https://discourse.cataclysmdda.org/u/kevin.granade)\
**Post date:** [November 4, 2013, 7:47pm UTC](https://discourse.cataclysmdda.org/t/0-8-2191-g67bcb46-weapon-blocks-dont-work/3784/7 "2013-11-04T19:47:13Z")

</div>

wha? Weapons with the block tags _should_ allow blocking without a martial art. Success rate should be tied to an appropriate skill (probably melee). I mean BLOCK3 is a shield, you don’t need anything special to use that!

---

<div class="post-metadata">

**Author:** ![Natures\_Witness](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/natures_witness/32/165_2.png) [@Natures\_Witness](https://discourse.cataclysmdda.org/u/Natures_Witness)\
**Post date:** [November 4, 2013, 11:22pm UTC](https://discourse.cataclysmdda.org/t/0-8-2191-g67bcb46-weapon-blocks-dont-work/3784/8 "2013-11-04T23:22:58Z")

</div>

I think the problem is in melee.cpp, line 944. This line  
if (!unarmed\_attack() && can\_arm\_block()) {  
Seems to me to say the code for weapon blocking only gets checked if the character has can\_arm\_block. Do we just need to separate the weapon block code from the arm block code?

---

<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:** [November 5, 2013, 2:18am UTC](https://discourse.cataclysmdda.org/t/0-8-2191-g67bcb46-weapon-blocks-dont-work/3784/9 "2013-11-05T02:18:59Z")

</div>

Unarmed (=arm/leg block) code appears to be below that? I’m in the melee code right now trying to find the old stuff from Crane Style (if someone wants to find that…help me help yunz unblock 0.9?) and can take out the check for arm-blocking.

Will file and see if that helps people?

[hr]  
Bwtween NaturesWitness, i2amroy, and Kevin, we finally managed to get a fix in and merged.
