Caves of Qud

Caves of Qud

评价数不足
Cleave Bugfix
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
更新日期
55.114 KB
2024 年 12 月 16 日 下午 7:43
2024 年 12 月 16 日 下午 7:43
2 项改动说明 ( 查看 )

订阅以下载
Cleave Bugfix

在 Gravenwitch 的 1 个合集中
The Witches Cauldron
23 件物品
描述
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 条留言
Gravenwitch  [作者] 1 月 24 日 下午 9:47 
@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 1 月 21 日 上午 12:35 
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.