Caves of Qud

Caves of Qud

Cleave Bugfix
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.