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

…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).

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.

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.

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

On the bright side it swings twice as fast

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!

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?

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.