Caves of Qud

Caves of Qud

Not enough ratings
Cleave Bugfix
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
55.114 KB
16 Dec, 2024 @ 7:43pm
16 Dec, 2024 @ 7:43pm
2 Change Notes ( view )

Subscribe to download
Cleave Bugfix

In 1 collection by Gravenwitch
The Witches Cauldron
23 items
Description
Changes the axe cleave skill to work as described in the skill entry.

What was Wrong?
Skill Description:
"Whenever you hit an opponent with an axe, there's a 75% chance you cleave their armor, giving them a -1 penalty to their AV. This penalty can stack a number of times up to half your strength modifier, rounded up, +1 on a critical hit."
Vanilla Behavior:
Each cleave applied a -2 AV penalty, instead of a -1 penalty. This fix was commenting out 1-2 lines in a harmony prefix.

Note: the +1 cleave on crit does not cleave 2 armor in a single attack, it raises the maximum cleave penalty by 1 and can only occur once per enemy.

Why Should I Care?
You shouldn't. I made this mod because it bothered me personally.

2 Comments
Gravenwitch  [author] 24 Jan @ 9:47pm 
@Tyrir thanks for the info. To be honest I have no clue how transpiler patches work but I should learn, I greatly appreciate having a reference to work from!

I should double check but I believe getcleaveamount events worked properly in my testing and increasing i from 0 to 1 caused the double cleave amount behavior to return. That said I could be misremembering

Classes have resumed so any update will likely be a few weeks
Tyrir 21 Jan @ 12:35am 
The fix hardcodes the AV penalty to 1 (or 2 if crit), which ignores the GetCleaveAmountEvent. That means GameObjects that have bonuses to cleave don't have their effect applied.

A fix that wouldn't have this issue is to change

for (int i = 0; i < @for; i++)

to

for (int i = 1; i < @for; i++) // Bug: 0 -> 1


You can do this by changing one load instruction in a harmony transpiler, rather than copying the entire method into a harmony prefix to change this tiny bit of the method. This approach will make your mod more compatible with other mods that patch the cleave behavior, such as a shotgun mod I'm working on atm.