Bug Mafia Gets confused about TT Skills in Aftercore post new Ascension?

Tokoeka

Member
using r26333, but has been occuring since at least 17/03/2022, not sure which version I was using then beyond downloading the latest build each day at around 8am GMT.

I Loop, and generally spend most days doing "Turtle Tamer Aftercore, Pastamancer CS Ascension, CS Aftercore, Turtle Tamer Casual"

I have noticed that during my CS Aftercore, when running garbo, it regularly (1/day) breaks with the following error message:

Skill Blessing of the War Snapper: 10 turns of Blessing of the War Snapper: 0.48 efficiency
Casting Blessing of the War Snapper 1 times...
You acquire an effect: Disdain of the War Snapper (10)
Blessing of the War Snapper was successfully cast.
Loading character status...
Mafia bug: Skill Blessing of the War Snapper: 10 turns of Blessing of the War Snapper did not gain any turns.
Stack trace:
at ModifierUpkeepEffects (gain.ash:657)
at main (gain.ash:891)

My understanding of this is that it thinks Blessing of the War Snapper should still gives me the effect Blessing of the War Snapper (as opposed to Disdain), despite not being a turtle tamer. Rerunning stuff resolves the issue, whilst closing down and restarting mafia at some point between ascending into the pastamancer CS run and running garbo ensure the issue does not occur.

Am assuming is a mafia bug due to the "Mafia Bug" statement, if it is not, apologies.
 

Veracity

Developer
Staff member
What is "garbo"? A script, I assume.
It looks like it is calling another script named "gain".
The script reports this:

Skill Blessing of the War Snapper: 10 turns of Blessing of the War Snapper: 0.48 efficiency

That is the script; KoLmafia does not do calculations on the "efficiency" of skills, whatever that means.

It then calls KoLmafia to cast the skill. It reports this:

Casting Blessing of the War Snapper 1 times...
You acquire an effect: Disdain of the War Snapper (10)
Blessing of the War Snapper was successfully cast.

The script then checks to see if it got 10 turns of Blessing of the War Snapper.
It did not, so it reported "Mafia bug".

My understanding of this is that it thinks Blessing of the War Snapper should still gives me the effect Blessing of the War Snapper (as opposed to Disdain), despite not being a turtle tamer.
Reasonable. The question is: what do you mean by "it"? The script obviously thinks that.

Looking at statuseffects.txt, I see this:

Code:
1416    Blessing of the War Snapper    warsnapper.gif    a4f41cbc762014a973b3f4136d1ac71e    good    nohookah    cast 1 blessing of the war snapper
1425    Disdain of the War Snapper    warsnapper.gif    93b24d449fa590fe8c9f6977a7ceeb14    good    none    cast 1 blessing of the war snapper

Those are both correct: the way to get one or the other status effect is to use that skill.
There is nothing in that file which says what the conditions are that will lead to which effect.

The script knows you have that skill. It "knows" - somehow - that you get such-and-such an effect from using that skill. It decided that you'd get effect #1, but instead, it got effect #2. And that, aparently, is a "Mafia bug".

How did the script "decide" that?
 

Veracity

Developer
Staff member
Another observation. More TT status effects:

Code:
1432    Avatar of the War Snapper    warsnapper.gif    d7b0d7a56d0042e1580ca2ff6552bd76    good    nohookah    cast 1 Turtle Power
1433    Avatar of She-Who-Was    shewhowas.gif    68262434e21355f4b543a125ed49271d    good    nohookah    cast 1 Turtle Power
1434    Avatar of the Storm Tortoise    stormtort.gif    a21d9d0069c6a5fd027e48cf928dea65    good    nohookah    cast 1 Turtle Power
1435    Boon of the War Snapper    warsnapper.gif    f8a9c0246239721f7d2c8dfd15a78a06    good    none    cast 1 Spirit Boon
1436    Boon of She-Who-Was    shewhowas.gif    6d96a6c7101b7996eecb51d68cfff305    good    none    cast 1 Spirit Boon
1437    Boon of the Storm Tortoise    stormtort.gif    3c2bc7d4cf1847ab2d309c175e6ed14e    good    none    cast 1 Spirit Boon

I have essentially no experience with Turtle Tamers, but here are two skills which, depending on ... something ... will each give you one of three different status effects. The player presumably knows what the preconditions are. And any script which hopes to use those skills will obviously need to know as well.

Regarding "Gain", turns out we know about that; it's mentioned in our svnrepo.json. Here is Ezandora's source: https://github.com/Ezandora/Gain/blob/Release/scripts/gain.ash
 

heeheehee

Developer
Staff member
A potential way this could be a "mafia bug" is if the script uses something like cli_execute("up boon of the war snapper") or adds it to a mood despite not meeting tho correct preconditions. (Both cases should be relevant here)

Since this doesn't seem to be the case (the script is actually parsing statuseffects.txt), this doesn't seem like a Mafia bug.
 

Veracity

Developer
Staff member
I'm not reading the script to figure out why it thinks what it thinks, but you could try throwing a "refresh all" somewhere after you hit aftercore.
I did look at gain.

Code:
if (my_class() == $class[turtle tamer])
{
    foreach s in $skills[Blessing of the Storm Tortoise,Blessing of She-Who-Was,Blessing of the War Snapper]
        __modify_blocked_skills[s] = true;
}
else if (my_class() == $class[pastamancer])
{
    foreach t in $thralls[]
        __modify_blocked_skills[t.skill] = true;
}
It looks like it is blocking TT and PA skills which have good effects if you are in the appropriate class and lesser effects if you are not.

Unfortunately, it is doing that only if you ARE of the appropriate class, not if you ARE NOT of the appropriate class.

This looks like a bug in gain.ash
 
Top