# Min-Maxing Melee Damage

**URL:** <https://discourse.cataclysmdda.org/t/min-maxing-melee-damage/1161>\
**Category:** The Bunker\
**Created:** [May 9, 2013, 1:23am UTC](https://discourse.cataclysmdda.org/t/min-maxing-melee-damage/1161 "2013-05-09T01:23:01Z")\
**Posts on this page:** 13\
**Page:** 1

<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:** [May 9, 2013, 1:23am UTC](https://discourse.cataclysmdda.org/t/min-maxing-melee-damage/1161/1 "2013-05-09T01:23:01Z")

</div>

I took a look at Melee.cpp but I couldn’t make heads of tails of how bashing damage is capped by strength + skill, or how to math my around cutting weapons getting stuck.

Could I get an explanation how the variables bash\_cap and roll\_stuck\_penalty work?

The end result should be a character capable of wielding a sledgehammer and/or a katana to full potential.

---

<div class="post-metadata">

**Author:** ![Weyrling](https://avatars.discourse-cdn.com/v4/letter/w/7bcc69/32.png) [@Weyrling](https://discourse.cataclysmdda.org/u/Weyrling)\
**Post date:** [May 9, 2013, 2:51am UTC](https://discourse.cataclysmdda.org/t/min-maxing-melee-damage/1161/2 "2013-05-09T02:51:55Z")

</div>

roll\_stuck\_penalty, this is the number of turns you lose if the weapon gets stuck.  
For a katana you get 180 + 5_enemy bash armor + 4_enemy cut armor - d10\*CutSkill. This value cannot exceed 450 for a katana.  
If you have 5 cutting skill attacking an enemy with 2 of both armor types, you will lose between 148-193 moves.  
180+10+8-(Some number between 5 and 50, because there are 5 10-sided dice being rolled).  
Edit: I’m not sure whether you always get your weapon stuck, or what controls the probability.

[code]  
ret = weapon.damage\_cut() \* 4 + basharm \* 5 + cutarm \* 4 -  
dice(skillLevel(“cutting”), 10);

if (ret \>= weapon.damage\_cut() \* 10)  
return weapon.damage\_cut() \* 10;[/code]  
bash\_cap = 5 + Strength + Bashing.  
This ignores the weapon you are using.  
A sledgehammer does 40 bash, so if you have 0 skill and 8 strength you will deal 13 damage maximum normally, 26 on a critical (Criticals double bash\_cap).

---

<div class="post-metadata">

**Author:** ![Ferodaktyl](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/ferodaktyl/32/56_2.png) [@Ferodaktyl](https://discourse.cataclysmdda.org/u/Ferodaktyl)\
**Post date:** [May 9, 2013, 3:02am UTC](https://discourse.cataclysmdda.org/t/min-maxing-melee-damage/1161/3 "2013-05-09T03:02:28Z")

</div>

[quote=“Weyrling, post:2, topic:1161”]bash\_cap = 5 + Strength + Bashing.  
This ignores the weapon you are using.  
A sledgehammer does 40 bash, so if you have 0 skill and 8 strength you will deal 13 damage maximum normally, 26 on a critical (Criticals double bash\_cap).[/quote]

Please expand on this a little. Are you saying that the bash value of the weapon doesn’t matter? Or is it about the chance of having the weapon stuck only? (i’m totally inept at reading code, so use words 😃 )

---

<div class="post-metadata">

**Author:** ![Weyrling](https://avatars.discourse-cdn.com/v4/letter/w/7bcc69/32.png) [@Weyrling](https://discourse.cataclysmdda.org/u/Weyrling)\
**Post date:** [May 9, 2013, 3:13am UTC](https://discourse.cataclysmdda.org/t/min-maxing-melee-damage/1161/4 "2013-05-09T03:13:27Z")

</div>

> [@Ferodaktyl](#):
>
> Please expand on this a little. Are you saying that the bash value of the weapon doesn’t matter? Or is it about the chance of having the weapon stuck only? (i’m totally inept at reading code, so use words 😃 )

The bash cap is a limit on how much damage you can do with a bashing weapon, meaning that a weakling deals significantly less than 40 damage with a sledgehammer, despite its massive potential.  
If you have 4 Str 0 Bashing skill, you could deal a max of (5+4+0=)9 damage with a sledgehammer. However if you had 24 Str (Hydraulic muscles) and 0 skill, you could deal (5+24+0=)29 damage with the sledgehammer.  
With 28 Str and 7 bash skill, you’d have a bash\_cap of (5+28+7=)40, giving you full potential wielding the sledgehammer.  
Note that all above values are only maximum damage, you might deal significantly less than this in practice.  
AFAIK bashing weapons don’t ever get stuck, thats for stabbing/cutting weapons only.

---

<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:** [May 9, 2013, 3:30am UTC](https://discourse.cataclysmdda.org/t/min-maxing-melee-damage/1161/5 "2013-05-09T03:30:09Z")

</div>

Thank you very much. I understand how bashing works now.

As for cutting, with such a wide range in armor types, it seems to me the most effective way to get more damage from cutting would be to decrease the probability of getting stuck in the first place. You’d need to use a steak knife (2 bash, 10 cut) against an unarmored opponent to get stuck times to a reasonable level, but the second you try stabbing a zombie soldier (8 bash armor, 16 cut armor) you’re stuck all over again.

40 + 0 + 0 - 5 through 50 = Okay to get stuck

40 + 40 + 64 - 5 through 50 = Lose a turn when you get stuck.

And that’s a steak knife.

---

<div class="post-metadata">

**Author:** ![Weyrling](https://avatars.discourse-cdn.com/v4/letter/w/7bcc69/32.png) [@Weyrling](https://discourse.cataclysmdda.org/u/Weyrling)\
**Post date:** [May 9, 2013, 3:41am UTC](https://discourse.cataclysmdda.org/t/min-maxing-melee-damage/1161/6 "2013-05-09T03:41:04Z")

</div>

[quote=“krAbhandz, post:5, topic:1161”]Thank you very much. I understand how bashing works now.

As for cutting, with such a wide range in armor types, it seems to me the most effective way to get more damage from cutting would be to decrease the probability of getting stuck in the first place. You’d need to use a steak knife (2 bash, 10 cut) against an unarmored opponent to get stuck times to a reasonable level, but the second you try stabbing a zombie soldier (8 bash armor, 16 cut armor) you’re stuck all over again.

40 + 0 + 0 - 5 through 50 = Okay to get stuck

40 + 40 + 64 - 5 through 50 = Lose a turn when you get stuck.

And that’s a steak knife.[/quote]  
The good thing about using a low moves/attack and low cut damage weapon is that the maximum time stuck is 10\*CuttingDamage. It allows you to both hit+run most common zombies, as well as have an easy recovery if the weapon misses or gets stuck. In comparison, the katana is best if you immediately kill everything you swing at in a single blow.

I seem to remember (from somewhere) that there’s a lower chance of getting a cutting weapon stuck with higher strength, so obviously the best way to use a katana is to first get Hydraulic Muscles, but I rarely if ever find both of them in the same game.

---

<div class="post-metadata">

**Author:** ![Ferodaktyl](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/ferodaktyl/32/56_2.png) [@Ferodaktyl](https://discourse.cataclysmdda.org/u/Ferodaktyl)\
**Post date:** [May 9, 2013, 3:45am UTC](https://discourse.cataclysmdda.org/t/min-maxing-melee-damage/1161/7 "2013-05-09T03:45:43Z")

</div>

I kinda get it (at least i think so). So a weapon’s damage is not the damage inflicted, but the maximum damage a weapon can inflict, depending on the formula used for the specific type of damage, right?  
If so, the only way to do extra damage is to have a critical roll ? and increasing skill helps only to a certain limit, depending on the weapon’s max damage, but it helps also critting more often then not?  
Also, is it a fixed amount of damage, or does it have a variable ?

---

<div class="post-metadata">

**Author:** ![Weyrling](https://avatars.discourse-cdn.com/v4/letter/w/7bcc69/32.png) [@Weyrling](https://discourse.cataclysmdda.org/u/Weyrling)\
**Post date:** [May 9, 2013, 4:14am UTC](https://discourse.cataclysmdda.org/t/min-maxing-melee-damage/1161/8 "2013-05-09T04:14:15Z")

</div>

[quote=“Ferodaktyl, post:7, topic:1161”]I kinda get it (at least i think so). So a weapon’s damage is not the damage inflicted, but the maximum damage a weapon can inflict, depending on the formula used for the specific type of damage, right?  
If so, the only way to do extra damage is to have a critical roll ? and increasing skill helps only to a certain limit, depending on the weapon’s max damage, but it helps also critting more often then not?  
Also, is it a fixed amount of damage, or does it have a variable ?[/quote]  
Bash damage is half your strength + weapon bashing damage. The Maximum it can be is 5+Str+Skill.  
A critical increases damage by 50% flat, then adds skill, half of strength, and halves the effective enemy bash armor. It also doubles bash\_cap.  
Minimum bashing damage is (weapon bashing+half strength) divided by 4. Another minimum is that your bash\_dam can’t be less than your skill+half strength.  
So at 8 Strength 0 Skill, wielding a sledgehammer, your minimum damage is 11, max damage is 13. Crit and you do between 20-26 damage.

For Cutting damage, base is weapon cut damage minus enemy cut armor, then modified by skill:

`// 80%, 88%, 96%, 104%, 112%, 116%, 120%, 124%, 128%, 132%
 if (skillLevel("cutting") <= 5)
  ret *= double( 0.8 + 0.08 * skillLevel("cutting") );
 else
  ret *= double( 0.92 + 0.04 * skillLevel("cutting") );`  
Cutting criticals are apparently uncapped, but it takes 12 skill levels to reach 200% damage.

` if (crit)
  ret *= double( 1.0 + double(skillLevel("cutting") / 12) );`

For Stabbing damage enemy armor is first reduced by 3\*Stabbing Skill. Then it gets a bonus against fast monsters, which is capped at potentially double damage. Stabbing criticals are maxed at 250% damage at skill level 8.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/cataclysmdda/original/1X/21b5d044e8473b25d0bf905d60477e25f6fbe0cf.png) [@system](https://discourse.cataclysmdda.org/u/system)\
**Post date:** [May 9, 2013, 8:40am UTC](https://discourse.cataclysmdda.org/t/min-maxing-melee-damage/1161/9 "2013-05-09T08:40:45Z")

</div>

I am wielding a steel chain at the moment, just for fun.  
It has the “+Grab” perk and sometiems the battlog says:  
“You wrap your steel chain around the zombie, inflicting X damage!”  
"You whack the zombie for X damage!"  
It’s like a double attack, I guess. But I wonder how the damage is calculated for those special attacks.

---

<div class="post-metadata">

**Author:** ![Iosyn](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/iosyn/32/35_2.png) [@Iosyn](https://discourse.cataclysmdda.org/u/Iosyn)\
**Post date:** [May 9, 2013, 9:22am UTC](https://discourse.cataclysmdda.org/t/min-maxing-melee-damage/1161/10 "2013-05-09T09:22:07Z")

</div>

[quote=“Rookie, post:9, topic:1161”]I am wielding a steel chain at the moment, just for fun.  
It has the “+Grab” perk and sometiems the battlog says:  
“You wrap your steel chain around the zombie, inflicting X damage!”  
"You whack the zombie for X damage!"  
It’s like a double attack, I guess. But I wonder how the damage is calculated for those special attacks.[/quote]  
AFAIK the second attack is an unarmed one. I’ve been noticing my unarmed skill rising when using a chain too, so I guess it’s true and for my piddly 8 STR guy I suppose it’s not the best weapon. Then again, the +Grab is +God tier. Maybe I should just make a martial artist, find a chain and some hydraulic muscles. Could be pretty freaking OP.

GET OVER HERE…

---

<div class="post-metadata">

**Author:** ![Dalgul](https://avatars.discourse-cdn.com/v4/letter/d/c89c15/32.png) [@Dalgul](https://discourse.cataclysmdda.org/u/Dalgul)\
**Post date:** [May 9, 2013, 9:40am UTC](https://discourse.cataclysmdda.org/t/min-maxing-melee-damage/1161/11 "2013-05-09T09:40:36Z")

</div>

From my experience a sledge hammer is useless against multiple enemies.

---

<div class="post-metadata">

**Author:** ![Iosyn](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/iosyn/32/35_2.png) [@Iosyn](https://discourse.cataclysmdda.org/u/Iosyn)\
**Post date:** [May 9, 2013, 9:45am UTC](https://discourse.cataclysmdda.org/t/min-maxing-melee-damage/1161/12 "2013-05-09T09:45:51Z")

</div>

[quote=“Dalgul, post:11, topic:1161”]From my experience a sledge hammer is useless against multiple enemies.[/quote] well yeah. Shame you can’t dual-wield combat knives for extra slicy goodness. I’ve never used a sledge purely because my chars don’t have the strength and generally the moves per attack is so damn high.

---

<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:** [May 9, 2013, 12:49pm UTC](https://discourse.cataclysmdda.org/t/min-maxing-melee-damage/1161/13 "2013-05-09T12:49:00Z")

</div>

I’ve really been trying hard to make a character that could use a sledge. 20 strength illiterate savants are not easy to play. Even with 20 strength, I’d still need 15 bash to make the sledge fully effective.
