Bug - Waiting for Info "Not enough mana to cast"…

I don't know if this is a bug, but it's inexplicable behavior (at least, I can find no reason for it).

I'm in extended aftercore, enjoying the new dungeon, so I start every day pretty much the same way. For example, casting some buffs. I type in "cast x y", and mafia handles the rest. Except, not today.

I'm using r12453 (well, I was using r12456, but I went back to the build I used yesterday, to check if that was the issue).

Yesterday, among other buffs, I typed "cast 40 oce", and mafia gave me:

Code:
cast 11 Singer's Faithful Ocelot
You acquire an effect: Singer's Faithful Ocelot (duration: 110 Adventures)

use 13 magical mystery juice
You gain 579 Muscularity Points

cast 29 Singer's Faithful Ocelot
You acquire an effect: Singer's Faithful Ocelot (duration: 290 Adventures)

Today, I typed "cast 40 oce", and mafia gives me:

Code:
Casting Singer's Faithful Ocelot 6 times...
Loading character status...
[COLOR="#FF0000"]Not enough mana to cast Singer's Faithful Ocelot.[/COLOR]

I double–checked my mana restoration settings, and my stock of MMJs, and that's not the issue, so beyond that, I've run out of things I know to check (and besides, I didn't change any settings between yesterday and today). Maybe it's something that should be painfully obvious, but either way, I'm at a loss.
 

Veracity

Developer
Staff member
I double–checked my mana restoration settings ... and that's not the issue.
How much MP did you have available when it failed like that? KoLmafia thought it had enough to cast the skill 6 times without replenishing MP, but the "Loading character status" and subsequent message about not enough mana occurs after it tried to cast the skill and KoL returned a message containing "You don't have enough". So, it was wrong, either in its idea of the amount of available MP, or in how much MP it took to cast the skill 6 times.

Do you have any items or effects that cause the MP cost for skills to be increased?

What effects and items do you have - and what do you get when you do this in the gCLI

> ash mp_cost( $skill[ Singer's Faithful Ocelot ] )
 

Darzil

Developer
It's particularly common if you were adventuring in Dreadsylvania in an area where cold monsters aren't banished and there are three or more kisses of difficulty (2 elemental banishes or higher), as you get an debuff that increases MP cost.
 

Veracity

Developer
Staff member
Right. The "Chilled to the Bone" status effect is listed in modifiers.txt as "Mana Cost: +3", but if you have more than one element banished, the mana cost is higher.

There is nothing we can do to tell how much mana cost is increased, other than parsing the skills dropdown or something before casting. I don't see that happening.
 

Theraze

Active member
Should it maybe be set to the maximum +cost and then people might end up with a bit more mana left at the end, but at least mafia would never end up stuck and unable to cast?
 

Winterbay

Active member
That's a bit expensive to assume all the time I'd say... :)

Edit: Although it would've been interesting to combine that with a Jarlsberg run...
 
Last edited:
Ah, I did have a few turns of "Chilled to the Bone", from yesterday's adventuring. Now I know what to look out for—thanks!
 
Last edited:

Theraze

Active member
So... this is something where mafia is just stuck? Or is our best case choice here noting when casting fails and we have chilled to the bone that, rather than repeatedly hitting the server trying to cast something which will keep failing, we need a single server hit to check for the proper +mod. Or even just aborting with a message regarding Chilled to the Bone being problematic or something...
 

Darzil

Developer
I guess the modifier is given in the effect description, but you can't assume it won't change. If someone banishes another element in that zone, or closes and reopens Dreadsylvania, or you adventure elsewhere, or you change clan, it'll change. So it'd be check it every turn to be certain (maybe more often for the edge case of someone banishing element mid fight).
 

lostcalpolydude

Developer
Staff member
Can it really change mid-combat? I thought you had to lose and regain the effect for it to change, but I don't know if I had a good reason for thinking that.
 

Darzil

Developer
Shouldn't be too hard to check, I think you may be right about only recalculating when you get new turns though. I did look at that when spading the monsters, I just can't remember what I saw - bad spade!
 

mstieler

Member
That's a good question; if you have adventures of Chilled, and then someone ups the difficulty of the zone, does your Chilled update automatically, or just when you next get Chilled?
 

xKiv

Active member
In that case, we could probably store the modifier based on how many turns of the effects have been "acquired" at once. Is that something that would be acceptable for mafia?
 

Fluxxdog

Active member
Given that mafia now tracks area kisses, can this be improved? Having chilled still only registers as +3 MP.
 

Bale

Minion
Not just Chilled to the Bone. There are a number of effects whose effect is strengthened by the level at which they are acquired. We would need a number of preferences to store the level at which they were last acquired.
 

Arashmin

New member
Could we have an option put in that would not stop automation if buff balancing fails? It might be slightly inelegant, but it would at least ensure continuous automation if Chilled is present.
 
Top