Bug - Fixed Libram summon predicted cast count differs from number of actual casts performed

In either breakfast (with the appropriate preference set) or using maxcast with a libram summons (summon dice in this case), the calculated number of casts to be performed is displayed, and then less than that number is actually completed.

Example, starting with no previous summons for the day: "Casting Summon Dice 349 times...", but only 200 casts are performed. Trying again immediately, maxcast says it will do 76, then does - well, 76. But that falls short of what it can do based on available MP (which should have been the remaining 149 it missed originally). Another maxcast says 36, does 36, for 312 total. Again: 18 for 18, 330 total. Then 9, 5, 2, 1 - and finally, another 1, at which point the next cast costs more than MP remaining. For 348 total, not 349.

I have -2 MP from Shakespeare's Sister's Accordion equipped, if that has anything to do with it - ?
 
It seems (something) is limiting the number of casts to 200. I need to verify if it's KoL tomorrow.

So what happens is that mafia thinks that the original requested number of casts was successful, so it has calculated the cost of the next cast based on that, but the real cost was for 200. Since mafia apparently does not check the skills page for the mp cost, the cost for all subsequent casts are offset by whatever that difference in actual number of casts was.
 
It's KoL that limits the number of casts. With full MP at 8306102 and no prior casts today, right-clicked the summon dice skill in the relay browser, entered 999, pressed "Cast". Got 200 dice (recorded by mafia), reduced MP by 1333103 (correct for 200 casts with -2 MP per cast). However, mafia debug log says MP: -8,305,579 , which is the cost for 368 casts.

In the Skill Casting pane, mafia shows the cost of the next cast as 67895 (for cast number 369), while KoL shows 20099 (for cast number 201). Using "set libramSummons = 200" sets things right.

So, um, yeah - niche thing, and I'm talking to myself. Done here.
 

Theraze

Active member
Summary: The mafia bug is that it does not know that KoL will not process more than 200 casts of a libram skill at once, and both logs the incorrect MP value as well as sets libram casts based on that incorrect assumption.
 
Last edited:

Darzil

Developer
Try r16054, which should cap KoLmafia at 200 too.

It doesn't iterate through til it runs out of mana, it just stops at 200.

If someone finds that an issue, feel free to address in code !

Barely tested, as I've never cast anything like that many times.
 
Top