Bug - Fixed _witchessFights incorrectly stuck at 4 after fighting 5 Witchess pieces

Erich

Member
r16892

This is a follow up on my previous mention of this bug. Here's all the info I can give as of this morning:

I fight the 5 Witchess pieces manually, using only the "script" button. When I'm through, _witchessFights returns 4 instead of 5. It hasn't been consistent (it doesn't happen every day), but it's happened across numerous versions of mafia. I finally nabbed a debug log this morning:

View attachment DEBUG_20160415.txt

Here's the gcli output of that:

Code:
[230] Your Witchess Set
Encounter: Play against the Witchess Pieces
Encounter: Witchess Bishop
Round 0: erichwanh wins initiative!
Round 1: erichwanh executes a macro!
Round 1: erichwanh casts SUMMON LOVE GNATS!
Round 2: Number BC starts scratching at the ground, and doesn't stop until he's found a nice cache of meat.
You gain 201 Meat.
Round 2: erichwanh casts SUMMON LOVE STINKBUG!
Round 3: Witchess Bishop takes 16 damage.
Round 3: erichwanh casts SUMMON LOVE MOSQUITO!
Round 4: Witchess Bishop takes 17 damage.
Round 4: You gain 17 hit points
Round 4: Witchess Bishop takes 17 damage.
Round 4: erichwanh attacks!
Round 5: Witchess Bishop takes 7 damage.
Round 5: Number BC viciously pecks your opponent until he can barely stand, staggering him and doing 64 damage.
Round 5: Witchess Bishop takes 64 damage.
Round 5: Witchess Bishop takes 16 damage.
Round 5: erichwanh attacks!
Round 6: Witchess Bishop takes 8 damage.
Round 6: Witchess Bishop takes 17 damage.
Round 6: erichwanh attacks!
Round 7: Witchess Bishop takes 8 damage.
Round 7: Witchess Bishop takes 17 damage.
Round 7: erichwanh attacks!
Round 8: You lose 9 hit points
Round 8: Number BC viciously wattle-whips your opponent until he looks dizzy and out-of-sorts, doing 57 damage.
Round 8: Witchess Bishop takes 57 damage.
Round 8: Witchess Bishop takes 16 damage.
Round 8: erichwanh wins the fight!
After Battle: Number BC does the Funky Turkey, which is like the Funky Chicken, but more violent.
You acquire an item: Sacramento wine
After Battle: You gain 40 Muscleboundness
After Battle: You gain 24 Mysteriousness
After Battle: You gain 23 Chutzpah

[230] Your Witchess Set
Encounter: Play against the Witchess Pieces
Encounter: Witchess Bishop
Round 0: erichwanh wins initiative!
Round 1: erichwanh executes a macro!
Round 1: erichwanh casts SUMMON LOVE GNATS!
Round 2: Number BC scratches the ground, notices he has a little meat caught between his talons, and gives it to you.
You gain 100 Meat.
Round 2: erichwanh casts SUMMON LOVE STINKBUG!
Round 3: Witchess Bishop takes 18 damage.
Round 3: erichwanh casts SUMMON LOVE MOSQUITO!
Round 4: Witchess Bishop takes 17 damage.
Round 4: You gain 17 hit points
Round 4: Number BC kicks your opponent with its creepy dinosaur talons for 59 damage.
Round 4: Witchess Bishop takes 59 damage.
Round 4: Witchess Bishop takes 18 damage.
Round 4: erichwanh attacks!
Round 5: Witchess Bishop takes 8 damage.
Round 5: Witchess Bishop takes 16 damage.
Round 5: erichwanh attacks!
Round 6: Witchess Bishop takes 5 damage.
Round 6: Number BC wattle-whips your opponent for 66 damage.
Round 6: Witchess Bishop takes 66 damage.
Round 6: Witchess Bishop takes 16 damage.
Round 6: erichwanh wins the fight!
After Battle: Number BC cranks up some of its favorite jive music and dances along in the straw.
You acquire an item: Sacramento wine
After Battle: You gain 40 Strongness
You gain a Muscle point!
After Battle: You gain 23 Wizardliness
You gain a Mysticality point!
After Battle: You gain 24 Chutzpah
You gain 7 Adventures
You gain 33 Muscleboundness
You gain 17 Enchantedness
You gain 25 Chutzpah
You can now equip a bonedanna (and possibly other things).
You gain a Moxie point!
You acquire an effect: Sacré Mental (50)
You gain 1 Drunkenness
You lose an effect: Ode to Booze (-1)

[230] Your Witchess Set
Encounter: Play against the Witchess Pieces
Encounter: Witchess Bishop
Round 0: erichwanh wins initiative!
Round 1: erichwanh executes a macro!
Round 1: erichwanh casts SUMMON LOVE GNATS!
Round 2: Number BC starts scratching at the ground, and doesn't stop until he's found a nice cache of meat.
You gain 234 Meat.
Round 2: erichwanh casts SUMMON LOVE STINKBUG!
Round 3: Witchess Bishop takes 17 damage.
Round 3: erichwanh casts SUMMON LOVE MOSQUITO!
Round 4: Witchess Bishop takes 17 damage.
Round 4: You gain 17 hit points
Round 4: Witchess Bishop takes 16 damage.
Round 4: erichwanh attacks!
Round 5: Witchess Bishop takes 8 damage.
Round 5: Witchess Bishop takes 16 damage.
Round 5: erichwanh attacks!
Round 6: Witchess Bishop takes 8 damage.
Round 6: Number BC viciously wattle-whips your opponent until he looks dizzy and out-of-sorts, doing 47 damage.
Round 6: Witchess Bishop takes 47 damage.
Round 6: Witchess Bishop takes 17 damage.
Round 6: erichwanh attacks!
Round 7: Witchess Bishop takes 5 damage.
Round 7: Witchess Bishop takes 16 damage.
Round 7: erichwanh attacks!
Round 8: Witchess Bishop takes 9 damage.
Round 8: Witchess Bishop takes 17 damage.
Round 8: erichwanh attacks!
Round 9: Witchess Bishop takes 8 damage.
Round 9: Witchess Bishop takes 17 damage.
Round 9: erichwanh wins the fight!
After Battle: Number BC cranks up some of its favorite jive music and dances along in the straw.
You acquire an item: Sacramento wine
After Battle: Number BC squawks, drops into a squat, and stands up with a bottle of booze under its wing. Don't ask where it came from.
You acquire an item: Ambitious Turkey
After Battle: You gain 43 Muscleboundness
After Battle: You gain 24 Magicalness
After Battle: You gain 20 Sarcasm

[230] Your Witchess Set
Encounter: Play against the Witchess Pieces
Encounter: Witchess Bishop
Round 0: erichwanh wins initiative!
Round 1: erichwanh executes a macro!
Round 1: erichwanh casts SUMMON LOVE GNATS!
Round 2: Number BC gobbles at you. You feel like he's saying something incredibly profound, if only you spoke turkey.
Round 2: You gain 37 Magicalness
You can now equip a cuddly teddy bear (and possibly other things).
Round 2: erichwanh casts SUMMON LOVE STINKBUG!
Round 3: Witchess Bishop takes 16 damage.
Round 3: erichwanh casts SUMMON LOVE MOSQUITO!
Round 4: Witchess Bishop takes 17 damage.
Round 4: You gain 17 hit points
Round 4: Witchess Bishop takes 18 damage.
Round 4: erichwanh attacks!
Round 5: Witchess Bishop takes 8 damage.
Round 5: Number BC beak-slams your opponent for 60 damage.
Round 5: Witchess Bishop takes 60 damage.
Round 5: Witchess Bishop takes 17 damage.
Round 5: erichwanh attacks!
Round 6: Witchess Bishop takes 9 damage.
Round 6: Witchess Bishop takes 17 damage.
Round 6: erichwanh attacks!
Round 7: Witchess Bishop takes 68 damage.
Round 7: Witchess Bishop takes 16 damage.
Round 7: erichwanh wins the fight!
After Battle: Number BC cranks up some hardcore punk music and slam-dances in the straw.
You acquire an item: Sacramento wine
After Battle: You gain 33 Strengthliness
After Battle: You gain 39 Wizardliness
After Battle: You gain 17 Roguishness

[230] Your Witchess Set
Encounter: Play against the Witchess Pieces
Encounter: Witchess Bishop
Round 0: erichwanh wins initiative!
Round 1: erichwanh executes a macro!
Round 1: erichwanh casts SUMMON LOVE GNATS!
Round 2: Number BC scratches at the ground. When you look down, you see he's accidentally scratched a deeply mystical rune.
Round 2: You gain 44 Wizardliness
Round 2: erichwanh casts SUMMON LOVE STINKBUG!
Round 3: Witchess Bishop takes 17 damage.
Round 3: erichwanh casts SUMMON LOVE MOSQUITO!
Round 4: Witchess Bishop takes 17 damage.
Round 4: You gain 17 hit points
Round 4: Witchess Bishop takes 16 damage.
Round 4: erichwanh attacks!
Round 5: Witchess Bishop takes 8 damage.
Round 5: Number BC beak-slams your opponent for 56 damage.
Round 5: Witchess Bishop takes 56 damage.
Round 5: Witchess Bishop takes 16 damage.
Round 5: erichwanh attacks!
Round 6: Witchess Bishop takes 5 damage.
Round 6: Witchess Bishop takes 17 damage.
Round 6: erichwanh attacks!
Round 7: Witchess Bishop takes 8 damage.
Round 7: Witchess Bishop takes 18 damage.
Round 7: erichwanh attacks!
Round 8: Witchess Bishop takes 9 damage.
Round 8: Witchess Bishop takes 16 damage.
Round 8: erichwanh attacks!
Round 9: Witchess Bishop takes 5 damage.
Round 9: Witchess Bishop takes 16 damage.
Round 9: erichwanh wins the fight!
Your familiar gains a pound: Number BC, the 11 lb. Fist Turkey
After Battle: Number BC flaps his wings and does an aggressive territorial turkey dance.
You acquire an item: Sacramento wine
After Battle: You gain 44 Fortitude
You gain a Muscle point!
After Battle: You gain 27 Wizardliness
You gain a Mysticality point!
After Battle: You gain 16 Smarm

[230] Your Witchess Set

> get _witchessFights

4

Anything else I can provide, feel free to ask. Thanks.
 

Erich

Member
This happened again today (r16905), and unfortunately I wasn't able to provide a debug log (RL stuffs made me forget, I only noticed after my scripts mentioned it). However, I wanted to throw in a humble feature request on top of this (I hope you don't mind me not starting a new thread):

If "Examine the shrink ray" isn't present when you go to campground.php?action=witchess, auto set _witchessFights = 5

There's no other reason for the shrink ray not to be there, so... yeah, that's all I got.

Cheers,
~E
 

lostcalpolydude

Developer
Staff member
As frustrating as it may be, I feel like this is a case where knowing that it happens isn't enough to try to fix it. Turning on debug logging every day for the witchess fights just in case it happens is probably a good starting point.
 
I have it happen every day on a farming script but I also track my own witchess combats because of it. I have mafia set to output whenever settings are changed and can see that it doesn't not trigger on the first fight. I've assumed that the ordering of events may be the issue (it does not seem to be a problem in my ascension script which does the combat at a different point). My initial suspicion was that having a X-32-F fight beforehand caused the problem but I have not had the time to actually test that.

Code:
Truncated log:
Setting> _witchessFights: 0
> You have the latest use_for_items.txt.  Will not check again today.


[212859] The X-32-F Combat Training Snowman
Encounter: the X-32-F Combat Training Snowman
Setting> _lastCombatStarted: 20160428043654
Setting> _pantsgivingCount: 15
Setting> turtleBlessingTurns: 165897
After Battle: You gain 13 Muscularity Points
After Battle: Paul surveys the scene from your back and sighs.
After Battle: You gain 19 Beefiness
After Battle: You gain 11 Mysteriousness
After Battle: You gain 4 Cheek
Setting> _snojoFreeFights: 10
Setting> snojoMoxieWins: 120

use 1 Deck of Every Card
Setting> nextAdventure: None

[212859] Deck of Every Card
Setting> _deckCardsDrawn: 4
play Ancestral Recall (40)
Setting> lastEncounter: Ancestral Recall
Encounter: Ancestral Recall
Setting> _deckCardsDrawn: 5
You acquire an item: blue mana

use 1 Deck of Every Card

[212859] Deck of Every Card
Setting> _deckCardsDrawn: 9
play Island (35)
Setting> lastEncounter: Island
Encounter: Island
Setting> _deckCardsDrawn: 10
You acquire an item: blue mana

use 1 Deck of Every Card

[212859] Deck of Every Card
Setting> _deckCardsDrawn: 14
play 1952 Mickey Mantle (58)
Setting> lastEncounter: 1952 Mickey Mantle
Encounter: 1952 Mickey Mantle
Setting> _deckCardsDrawn: 15
You acquire an item: 1952 Mickey Mantle card

cast 1 Ancestral Recall
You gain 3 Adventures
Setting> _ancestralRecallCasts: 1

cast 1 Ancestral Recall
You gain 3 Adventures
Setting> _ancestralRecallCasts: 2

Worshiping at the Shrine to the Barrel God
Took choice 1100/4: Happiness
choice.php?whichchoice=1100&pwd&option=4
You acquire an effect: Barrel of Laughs (50)
Setting> _barrelPrayer: true

[212859] Rest in your dwelling
You acquire an effect: Snow Fortified (10)
You gain 204 hit points
You gain 205 Muscularity Points
Setting> timesRested: 1
Setting> restUsingChateau: true
Setting> cc_witchessBattles: 0
Setting> cc_witchessBattleDay: 511
Setting> cc_witchessBattles: 1
Setting> nextAdventure: Noob Cave
Setting> cc_priorLocation: Noob Cave
> Pre Adventure at Noob Cave done, beep.
> About to start a combat indirectly at Noob Cave... (3) accesses required.

[212859] Your Witchess Set
Took choice 1181/1: Examine the shrink ray
Setting> lastEncounter: Play against the Witchess Pieces
Encounter: Play against the Witchess Pieces
Took choice 1182/1: Play against the Witchess pieces
Setting> lastEncounter: Witchess Knight
Encounter: Witchess Knight
Setting> _lastCombatStarted: 20160428043841
Setting> _pantsgivingCount: 16
Setting> turtleBlessingTurns: 165898
Round 0: wins initiative!
Setting> nextAdventure: The X-32-F Combat Training Snowman
Setting> nextAdventure: None
Adjusted combat item count: dinner roll
Setting> nextAdventure: Noob Cave
> cc_combatHandler: 0
Setting> cc_diag_round: 0
Setting> lastAdventure: Noob Cave

[212859] Noob Cave
After Battle: Paul surveys the scene from your back and sighs.
You acquire an item: jumping horseradish
After Battle: You gain 76 Muscleboundness
After Battle: You gain 36 Wizardliness
After Battle: You gain 31 Roguishness
Setting> _pantsgivingFullness: 1
Pantsgiving increases max fullness by one to 16.
Setting> lastAdventure: The X-32-F Combat Training Snowman
outfit Vile Vagrant Vestments

cast 1 Summon BRICKOs
You acquire BRICKO brick (3)
Setting> libramSummons: 26

cast 1 Summon BRICKOs
You acquire BRICKO brick (3)
Setting> libramSummons: 27
custom outfit Backup
> Post Adventure done, beep.
Setting> cc_witchessBattles: 2
> Pre Adventure at Noob Cave done, beep.
> About to start a combat indirectly at Noob Cave... (3) accesses required.

[212859] Your Witchess Set
Took choice 1181/1: Examine the shrink ray
Setting> lastEncounter: Play against the Witchess Pieces
Encounter: Play against the Witchess Pieces
Took choice 1182/1: Play against the Witchess pieces
Setting> lastEncounter: Witchess Knight
Encounter: Witchess Knight
Setting> _lastCombatStarted: 20160428043900
Setting> _pantsgivingCount: 17
Setting> turtleBlessingTurns: 165899
Setting> _witchessFights: 1
Round 0: wins initiative!
Setting> nextAdventure: The X-32-F Combat Training Snowman
Setting> nextAdventure: None
Setting> nextAdventure: Noob Cave
> cc_combatHandler: 0
Setting> lastAdventure: Noob Cave

[212859] Noob Cave
After Battle: Paul surveys the scene from your back and sighs.
You acquire an item: jumping horseradish
After Battle: You gain 81 Strongness
After Battle: You gain 30 Wizardliness
After Battle: You gain 32 Roguishness
Setting> lastAdventure: The X-32-F Combat Training Snowman

I have not eliminated the possibly that this is due a side-effect of how I initiate the Witchess Combat. You can see in the second Your Witchess Set event, _witchessFights is set to 1 after turtleBlessingTurns (before initiative win is detected). The first Your Witchess Set event does not cause this. I can consistently generate this situation.
 
Last edited:

Darzil

Developer
In my last 12 or so ascensions I've manually fought Witchess in Relay Browser running Guide three times per ascension, and the count has worked every time. I suspect most were after manually doing Snojo. (I do either Snojo-Witchess-Machine Elf or Witchess-Snojo-Machine Elf)
 
Last edited:

heeheehee

Developer
Staff member
I don't think it has anything to do with snojo before witchess -- for the past month, my multi's been using
Code:
    for i from to_int(get_property("_snojoFreeFights")) upto 9 {
        visit_url("adventure.php?snarfblat=460");
    }
    for i from to_int(get_property("_witchessFights")) upto 4 {
        visit_url("campground.php?action=witchess");
        run_choice(1);
        visit_url("choice.php?option=1&pwd=" + my_hash() + "&whichchoice=1182&piece=1936", false);
    }
and hasn't seen any issues with tracking. (combat is handled by autoattack macro)
 

Magus_Prime

Well-known member
My normal routine is to get the free fights out of the way first thing and all are played through the relay browser. I see the problem more often than not but it's not consistent. The order varies.
 

Erich

Member
As frustrating as it may be, I feel like this is a case where knowing that it happens isn't enough to try to fix it. Turning on debug logging every day for the witchess fights just in case it happens is probably a good starting point.

Hi! You're completely right here. 100%. And I honestly feel bad because I keep bringing it up only because I just want it acknowledged. At that point, I'll do what I can to it debug it to the best of my ability. Like you said, that means trying to remember to turn on the debug log every time I do my witchess fights every day. I'm ok with that.

I just wanted to bring it to light, because now other folks can say "yeah... ok, I have the same problem and that's weird... let's see how we can fix this". And I like seeing things fixed. I know you do too. <3
 

Crowther

Active member
And I honestly feel bad because I keep bringing it up only because I just want it acknowledged.
Your feelings make sense. Not only do I hear you, but I understand why you feel the way you do. You are not bad or wrong or crazy for feeling the way you do.

<3
 

lostcalpolydude

Developer
Staff member
I tracked down the cause. Using the Deck of Every Card tells mafia to ignore special monsters for the next fight, since it could result in one. For many people, it often/never results in a fight, so that is left there for the next fight.

I'm not sure how to fix it yet. The problem actually has nothing to do with witchess fights, that's just where the symptom has been showing up most clearly.
 

Veracity

Developer
Staff member
It sets EncounterManager.ignoreSpecialMonsters to true. If the deck does not redirect to a fight, it should set it back to false. Presumably in ChoiceManager somewhere.
 

lostcalpolydude

Developer
Staff member
Yeah, it just comes down to where to do that, since setting it back to false just before going to a fight isn't right either.
 

lostcalpolydude

Developer
Staff member
The debug log mostly just prompted me to look into it further. I don't think there was anything useful in there, other than confirming that the monster name showed up as expected to rule out the obvious (and already-excluded) explanation of text-altering stuff.
 

Crowther

Active member
The debug log mostly just prompted me to look into it further. I don't think there was anything useful in there, other than confirming that the monster name showed up as expected to rule out the obvious (and already-excluded) explanation of text-altering stuff.
Oh, then I'm even more impressed.
 
Top