Winterbay's Helpful Automatic Monsterbasher (WHAM)

It looks like SmartStasis checks whether autoSphereID is true. Frono: in the Adventure -> Custom Combat panel, right-click the "special" box and make sure to check "Identify bang potions" and "Identify stone spheres".
 
OK. I will check to the scrolls and conditions and run verbosely. If it works I'll try to figure out whether BCC Ascend is not setting things as expected or something else I am doing hoses things. I can't check the spheres but I'll watch closely the next time. Maybe it is so busy trying to stasis that it forgets ;-) Ditto for bang potions. With all the interlocking pieces it is hard to know where to look to figure something out and then, on top of that, picking the wrong culprit and using some poorly chosen words justifiably brings down the Wrath of the Gods and Goddesses.
 
BatBrain should be removing skills and items with the code-word "once" in their descirption in batfactors. For some reason this appears to not work (I've had reports of Swirl Cloak also being overused). I've added a removal in WHAM as well in my local copy but I'm not sure if this'll work since it is basically using the same check as batbrain.

I was having the same problem as Catch-22, when I had vampire fangs equipped WHAM would try to enqueue feed multiple times, then abort.
I hacked my version specifically for that skill, without bothering with all the other "once" skills.
Today I updated WHAM and saw you had added a more general fix, so I happily replaced mine. Unfortunately the new fix doesn't work.

In attack_option() you check if opt.note contains "once", but batbrain doesn't add that to notes.
The to_event() function in batbrain only adds text following "!!" to the notes section when building the opts map, but in batfactors it's stored as ", once" without exlamation marks.
As far as I can see, there's no way to use the advevents to tell if something is once only. Inside Batbrain zarqon checks for it from the batfactors map instead e.g.

Code:
void build_skillz() {
   ...
   foreach sk,fields in factors["skill"] {
      ...
      if (contains_text(fields.special,"once") && happened("skill "+sk)) continue;
      ...
   }
}

I'll leave it up to more intelligent people than me to decide the best way to fix it.
 
I ran with a scroll goal and WHAM/SS did the adding machine as expected so my guess is that BCCAscend didn't set the conditions right or something else cleared them at the wrong time. I'll watch for that (and the stones and potions) on the next ascension.
 
I also seem to recall WHAM had a problem against something (ghost?) that was immune to physical damage and picked Weapon of the Pastalord which was just plinking when Saucegeyser could two hit. This may actually be because of one of the element forms being in effect and not considered rather than something else.

I'm experiencing this still - Pastalord is doing 1 damage, while Geyser is OHK for the ghost. I've just added the ghost as a separate element in my CCS, which does, but thought I'd post since I can't see why it's doing that!
 
The more I use WHAM, the more I expect of it and the more confused I get when it doesn't live up to expectations.

vs. Dr. Awkward
Code:
[1708] Palindome
Encounter: Dr. Awkward
Encounter: Dr. Awkward
Strategy: C:\KoLMafia\dist\ccs\CafeBabe.ccs [default]
Round 0: cafebabe wins initiative!
Round 1: Quackers flaps her wings, and tendrils of noodly force materialize around your opponent, entangling their limbs and slowing them down.
Round 1: dr. awkward drops 5 attack power.
Round 1: dr. awkward drops 5 defense.
WHAM: Running SmartStasis
WHAM: Starting evaluation and performing of attack
WHAM: Enqueuing a stun to help with the battle
Round 1: cafebabe executes a macro!
Round 1: cafebabe casts ENTANGLING NOODLES!
Round 2: cafebabe attacks!
Round 3: cafebabe attacks!
You lose 11 hit points
WHAM: Starting evaluation and performing of attack
Round 4: cafebabe executes a macro!
Round 4: cafebabe attacks!
Round 5: Quackers quacks loudly, and a bolt of enriched wheat energy tears through your opponent for 45 damage, then arcs toward you, energizing your nervous system.
Round 5: dr. awkward takes 45 damage.
You gain 45 Mana Points
You lose 63 hit points
Round 5: cafebabe attacks!
Round 6: Quackers quacks loudly, and a bolt of enriched wheat energy tears through your opponent for 45 damage, then arcs toward you, energizing your nervous system.
Round 6: dr. awkward takes 45 damage.
You gain 45 Mana Points
You lose 61 hit points
Round 6: cafebabe attacks!
You lose 5 hit points
Round 7: Quackers quacks loudly, and a bolt of enriched wheat energy tears through your opponent for 35 damage, then arcs toward you, energizing your nervous system.
Round 7: dr. awkward takes 35 damage.
You gain 35 Mana Points
You lose 61 hit points

manually after recovering
Code:
[1709] Palindome
Encounter: Dr. Awkward
Encounter: Dr. Awkward
Round 0: cafebabe wins initiative!
Round 1: cafebabe casts ENTANGLING NOODLES!
Round 2: cafebabe casts WEAPON OF THE PASTALORD!
Round 3: dr. awkward takes 136 damage.
Round 3: cafebabe casts WEAPON OF THE PASTALORD!
Round 4: dr. awkward takes 146 damage.
Round 4: Quackers quacks loudly, and a bolt of enriched wheat energy tears through your opponent for 31 damage, then arcs toward you, energizing your nervous system.
Round 4: dr. awkward takes 31 damage.
You gain 31 Mana Points
Round 4: cafebabe wins the fight!

My question is obviously why is it attacking with weapon when it can two hit, or thereabouts with a spell? Does BatBrain need to know more about Dr. Awkward? Is there some reason to Stasis that I'm just not getting, but might lead to a feature request to Never Stasis against bosses and perhaps certain other monsters? Am I expecting "finished" behavior from something that is still "beta"?

I figure what needs to change are my expectations so I am just looking for information.

Maybe you should start collecting something.
 
1) What is your hitchance variable set to?
2) What class are you? (not that it should matter, but anyway)
3) It is not stasising, it believed that attacking with your weapon was the cheapest way of killing the monster without being killed. It was obviously wrong since you failed to hit every time...

I've had a few odd run-ins as well lately but nothing like that. It may be class related I guess (I generally go as a Sauceror so spells are mostly the cheapest option).
 
Pastamancer. Hardcore Bugbear run. Lots of good stuff permed. Macaroni duck as familiar. Not sure what the weapon is. BCCAscend probably picked it.

WHAM_AlwaysContinue false
WHAM_hitchance 0.5
WHAM_maxround 50
WHAM_noitemsplease false
WHAM_round_limit 10

which I think are the defaults. Perhaps if I have enough spells hitchance should be higher which would bias towards them?

Thanks.
 
Dr. Awkward is special in that he can make you fumble even when you should have no problem hitting him, and that only applies to normal attacks. I'm pretty sure mafia doesn't provide that info, and I have no idea if that might be indicated somewhere in this script or BatBrain.
 
Dr. Awkward is special in that he can make you fumble even when you should have no problem hitting him, and that only applies to normal attacks. I'm pretty sure mafia doesn't provide that info, and I have no idea if that might be indicated somewhere in this script or BatBrain.

BatBrain does not calculate the increased chance of fumbling.
 
It does however notice that never fumble will fail against him, but not the increased fumble chance which seems to be unspaded.

ETA:
Do we think that adding something like this to wham may be helpful in a case like this?
Code:
if(m == $monster[dr. awkward])
     hitlimit = min(1, hitlimit + 0.25);

I.e. for the specific case of dr. awkward increase the users wished hitchance by 0.25 in order to make hitting slightly more probable?
 
Last edited:
It's easier to make WHAM handle special cases but I could accept writing my own CCS for various monsters so long as I knew I had to do it.
 
I'm not sure if anyone else has seen this, but I'm on a 100% familiar run (Rogue Program) and WHAM decided to stasis against the island war boss. :(

Code:
Encounter: The Big Wisniewski
Round 0: chef_rannos wins initiative!
KoLmafia thinks it is round 2 but KoL thinks it is round 1
BCC: Run_Combat() being used normally.
WHAM: Running SmartStasis
Round 2: chef_rannos executes a macro!
Round 2: chef_rannos tries to steal an item!
KoLmafia thinks it is round 3 but KoL thinks it is round 2
Round 3: chef_rannos uses the spectre scepter!
You gain 4 hit points
Round 4: chef_rannos executes a macro!
Round 4: chef_rannos uses the spectre scepter!
KoLmafia thinks it is round 5 but KoL thinks it is round 4
You gain 5 hit points
Round 5: chef_rannos executes a macro!
Round 5: chef_rannos uses the spectre scepter!
KoLmafia thinks it is round 6 but KoL thinks it is round 5
Round 6: the big wisniewski takes 10 damage.
Round 6: MP-Gamer tosses his identity disc at him for 32 damage, then invites you to drink some glowing blue liquid out of the disc. The whole thing's a little more intimate than you're comfortable with, but it's still refreshing.
Round 6: the big wisniewski takes 32 damage.
You gain 32 Mojo Points
Round 6: chef_rannos uses the spectre scepter!
You gain 5 hit points
Round 7: chef_rannos uses the spectre scepter!
You gain 4 hit points
Round 8: MP-Gamer bounces his disc off of him for 43 damage, and it ricochets into you, giving you quite a shock.
Round 8: the big wisniewski takes 43 damage.
You gain 43 Mojo Points
Round 8: MP-Gamer drives a square around him, trapping him in a glowing orange box. That's a good deal, that orange box!
Round 8: chef_rannos uses the spectre scepter!
Round 9: the big wisniewski takes 8 damage.
Round 9: MP-Gamer de-rezzes him for 40 damage, then offers you a drink out of his identity disc. It's a little too intimate for your comfort, but it's still refreshing.
Round 9: the big wisniewski takes 40 damage.
You gain 40 Mojo Points
Round 9: MP-Gamer drives a square around him, trapping him in a glowing orange box. That's a good deal, that orange box!
Round 9: chef_rannos uses the spectre scepter!
Round 10: the big wisniewski takes 8 damage.
Round 10: MP-Gamer bounces his disc off of him for 27 damage, and it ricochets into you, giving you quite a shock.
Round 10: the big wisniewski takes 27 damage.
You gain 27 Mojo Points
Round 10: MP-Gamer drives a square around him, trapping him in a glowing orange box. That's a good deal, that orange box!
Round 10: chef_rannos uses the spectre scepter!
You gain 4 hit points
Round 11: chef_rannos uses the spectre scepter!
You gain 4 hit points
Round 12: MP-Gamer drives a square around him, trapping him in a glowing orange box. That's a good deal, that orange box!
Round 12: chef_rannos uses the spectre scepter!
Round 13: the big wisniewski takes 10 damage.
Round 13: MP-Gamer drives a square around him, trapping him in a glowing orange box. That's a good deal, that orange box!
Round 13: chef_rannos uses the spectre scepter!
Round 14: the big wisniewski takes 9 damage.
Round 14: MP-Gamer bounces his disc off of him for 22 damage, and it ricochets into you, giving you quite a shock.
Round 14: the big wisniewski takes 22 damage.
You gain 22 Mojo Points
Round 14: MP-Gamer drives a square around him, trapping him in a glowing orange box. That's a good deal, that orange box!
Round 14: chef_rannos uses the spectre scepter!
Round 15: the big wisniewski takes 8 damage.
Round 15: MP-Gamer's bells jingle merrily.
Round 15: MP-Gamer tosses his identity disc at him for 42 damage, then invites you to drink some glowing blue liquid out of the disc. The whole thing's a little more intimate than you're comfortable with, but it's still refreshing.
Round 15: the big wisniewski takes 42 damage.
You gain 42 Mojo Points
Round 15: MP-Gamer drives a square around him, trapping him in a glowing orange box. That's a good deal, that orange box!
Round 15: chef_rannos uses the spectre scepter!
Round 16: the big wisniewski takes 9 damage.
Round 16: MP-Gamer tosses his identity disc at him for 41 damage, then invites you to drink some glowing blue liquid out of the disc. The whole thing's a little more intimate than you're comfortable with, but it's still refreshing.
Round 16: the big wisniewski takes 41 damage.
You gain 41 Mojo Points
Round 16: chef_rannos uses the spectre scepter!
Round 17: the big wisniewski drops 1 attack power.
Round 17: the big wisniewski drops 2 defense.
Round 17: MP-Gamer tosses his identity disc at him for 28 damage, then invites you to drink some glowing blue liquid out of the disc. The whole thing's a little more intimate than you're comfortable with, but it's still refreshing.
Round 17: the big wisniewski takes 28 damage.
You gain 28 Mojo Points
Round 17: chef_rannos uses the spectre scepter!
Round 18: the big wisniewski takes 9 damage.
Round 18: MP-Gamer drives a square around him, trapping him in a glowing orange box. That's a good deal, that orange box!
Round 18: chef_rannos uses the spectre scepter!
Round 19: the big wisniewski takes 10 damage.
Round 19: MP-Gamer bounces his disc off of him for 40 damage, and it ricochets into you, giving you quite a shock.
Round 19: the big wisniewski takes 40 damage.
You gain 40 Mojo Points
Round 19: chef_rannos uses the spectre scepter!
You gain 4 hit points
Round 20: MP-Gamer drives a square around him, trapping him in a glowing orange box. That's a good deal, that orange box!
Round 20: chef_rannos uses the spectre scepter!
Round 21: the big wisniewski drops 3 attack power.
Round 21: the big wisniewski drops 2 defense.
Round 21: MP-Gamer drives a square around him, trapping him in a glowing orange box. That's a good deal, that orange box!
Round 21: chef_rannos uses the spectre scepter!
You gain 5 hit points
Round 22: MP-Gamer bounces his disc off of him for 41 damage, and it ricochets into you, giving you quite a shock.
Round 22: the big wisniewski takes 41 damage.
You gain 41 Mojo Points
Round 22: chef_rannos uses the spectre scepter!
Round 23: the big wisniewski takes 8 damage.
Round 23: chef_rannos uses the spectre scepter!
Round 24: the big wisniewski takes 8 damage.
Round 24: MP-Gamer drives a square around him, trapping him in a glowing orange box. That's a good deal, that orange box!
Round 24: chef_rannos uses the spectre scepter!
You gain 5 hit points
Round 25: MP-Gamer drives a square around him, trapping him in a glowing orange box. That's a good deal, that orange box!
Round 25: chef_rannos uses the spectre scepter!
Round 26: the big wisniewski drops 3 attack power.
Round 26: the big wisniewski drops 1 defense.
Round 26: MP-Gamer bounces his disc off of him for 31 damage, and it ricochets into you, giving you quite a shock.
Round 26: the big wisniewski takes 31 damage.
You gain 31 Mojo Points
Round 26: MP-Gamer drives a square around him, trapping him in a glowing orange box. That's a good deal, that orange box!
Round 26: chef_rannos uses the spectre scepter!
Round 27: the big wisniewski drops 2 attack power.
Round 27: the big wisniewski drops 1 defense.
Round 27: MP-Gamer drives a square around him, trapping him in a glowing orange box. That's a good deal, that orange box!
Round 27: chef_rannos uses the spectre scepter!
Round 28: the big wisniewski drops 3 attack power.
Round 28: the big wisniewski drops 3 defense.
Round 28: MP-Gamer's bells jingle merrily.
Round 28: MP-Gamer de-rezzes him for 30 damage, then offers you a drink out of his identity disc. It's a little too intimate for your comfort, but it's still refreshing.
Round 28: the big wisniewski takes 30 damage.
You gain 30 Mojo Points
Round 28: chef_rannos uses the spectre scepter!
Round 29: the big wisniewski takes 9 damage.
Round 29: MP-Gamer drives a square around him, trapping him in a glowing orange box. That's a good deal, that orange box!
Round 29: chef_rannos uses the spectre scepter!
Round 30: the big wisniewski takes 10 damage.
Round 30: MP-Gamer drives a square around him, trapping him in a glowing orange box. That's a good deal, that orange box!
Round 30: chef_rannos uses the spectre scepter!
Round 31: the big wisniewski takes 9 damage.
WHAM: Starting evaluation and performing of attack
WHAM: Unable to delevel until you can kill the monster without it killing you. Try it yourself.
WHAM: Unable to determine a valid combat strategy. For your benefit here are the numbers for you combat skills.
WHAM: Attack with your weapon: 254.80 potential damage (raw damage: 236.21) and a hitchance of 97.73%.
WHAM: Moxious Maneuver: 227.70 potential damage (raw damage: 227.70) and a hitchance of 100.00%.
WHAM: PADL Phone: 175.00 potential damage (raw damage: 175.00) and a hitchance of 100.00%.
WHAM: Saucegeyser: 147.45 potential damage (raw damage: 98.30) and a hitchance of 100.00%.
WHAM: Fearful Fettucini: 96.30 potential damage (raw damage: 96.30) and a hitchance of 100.00%.
WHAM: Wave of Sauce: 93.00 potential damage (raw damage: 62.00) and a hitchance of 100.00%.
WHAM: tequila grenade: 87.00 potential damage (raw damage: 87.00) and a hitchance of 100.00%.
WHAM: Saucestorm: 76.50 potential damage (raw damage: 51.00) and a hitchance of 100.00%.
WHAM: molotov cocktail cocktail: 72.00 potential damage (raw damage: 72.00) and a hitchance of 100.00%.
WHAM: water pipe bomb: 65.00 potential damage (raw damage: 65.00) and a hitchance of 100.00%.
WHAM: beer bomb: 65.00 potential damage (raw damage: 65.00) and a hitchance of 100.00%.
WHAM: Spectral Snapper: 56.00 potential damage (raw damage: 56.00) and a hitchance of 100.00%.
WHAM: rocky raccoon: 55.00 potential damage (raw damage: 55.00) and a hitchance of 100.00%.
WHAM: bus pass: 47.00 potential damage (raw damage: 47.00) and a hitchance of 100.00%.
WHAM: frigid ninja stars: 44.00 potential damage (raw damage: 22.00) and a hitchance of 100.00%.
WHAM: photoprotoneutron torpedo: 40.00 potential damage (raw damage: 40.00) and a hitchance of 100.00%.
WHAM: Cannelloni Cannon: 38.33 potential damage (raw damage: 32.00) and a hitchance of 100.00%.
WHAM: Stream of Sauce: 35.25 potential damage (raw damage: 23.50) and a hitchance of 100.00%.
WHAM: cocktail napkin: 35.00 potential damage (raw damage: 35.00) and a hitchance of 100.00%.
WHAM: Chronic Indigestion: 22.50 potential damage (raw damage: 22.50) and a hitchance of 100.00%.
WHAM: flaregun: 19.80 potential damage (raw damage: 19.80) and a hitchance of 100.00%.
WHAM: Ravioli Shurikens: 18.69 potential damage (raw damage: 15.16) and a hitchance of 100.00%.
WHAM: Disco Face Stab: 16.50 potential damage (raw damage: 16.50) and a hitchance of 100.00%.
WHAM: Tango of Terror: 16.50 potential damage (raw damage: 16.50) and a hitchance of 100.00%.
WHAM: Disco Dance II: Electric Boogaloo: 9.00 potential damage (raw damage: 9.00) and a hitchance of 100.00%.
WHAM: ancient poisoned dart: 8.00 potential damage (raw damage: 8.00) and a hitchance of 100.00%.
WHAM: Salsaball: 7.50 potential damage (raw damage: 7.50) and a hitchance of 100.00%.
WHAM: Disco Dance of Doom: 7.00 potential damage (raw damage: 7.00) and a hitchance of 100.00%.
WHAM: spectre scepter: 4.25 potential damage (raw damage: 4.25) and a hitchance of 100.00%.
WHAM: Knob Goblin firecracker: 3.00 potential damage (raw damage: 3.00) and a hitchance of 100.00%.
WHAM: Sing: 2.50 potential damage (raw damage: 2.50) and a hitchance of 100.00%.
WHAM: razor-sharp can lid: 2.50 potential damage (raw damage: 2.50) and a hitchance of 100.00%.
WHAM: Disco Eye-Poke: 2.00 potential damage (raw damage: 2.00) and a hitchance of 100.00%.
WHAM: seal tooth: 1.00 potential damage (raw damage: 1.00) and a hitchance of 100.00%.
WHAM: You now have the knowledge needed to go forward and be victorious
Round 31: chef_rannos executes a macro!
KoLmafia thinks it is round 32 but KoL thinks it is round 30
WHAM: Unable to figure out a combat strategy. Helpful information regarding your skills have been printed to the CLI
You're on your own, partner.
Click here to continue in the relay browser.


Can you add it in to not stasis against the 2 war bosses? I've modified my CCS already for some bugbears so I can add those in if it's not something you'd like to do.


EDIT: I did beat him on round 44, but...still that's a bit ridiculous. I had full MP fairly early on, and not like I needed the MP for spell slinging because it was using the scepter.
 
Last edited:
That's SS, not WHAM. Notice the part where it says "Running SmartStasis" up at the top?

And sometimes Stasising against them is good. Especially since you get 50 rounds against them instead of 30. The real bug you've noticed is that WHAM doesn't know you get 20 extra rounds to kill him, but SS does. :) So SS does its stasis thing for as long as is actually profitable, then WHAM thinks it's already failed. Poor confused WHAM. :(
 
Ok...so it's smart stasis being stupid when I had full MP and it was still going? It seems like it should stop at some point if I have full MP...even if it does think deleveling was profitable.

Honestly I had over 1000 rounds of almost every seal clubber, turtle tamer, sauceror, pastamancer, and DB buff and 1000 turns of phat loot and madigral...it really didn't need to delevel *anyone*. LOL
 
Delevelling does still make them do less damage on a crit hit... :)

Edit: Maybe WHAM_maxround should work as WHAM_roundsleft or something similar, so it doesn't abort early on war bosses and the like?
 
Last edited:
That's SS, not WHAM. Notice the part where it says "Running SmartStasis" up at the top?

And sometimes Stasising against them is good. Especially since you get 50 rounds against them instead of 30. The real bug you've noticed is that WHAM doesn't know you get 20 extra rounds to kill him, but SS does. :) So SS does its stasis thing for as long as is actually profitable, then WHAM thinks it's already failed. Poor confused WHAM. :(

Actually WHAM is fully aware of that. The problem is that the enqueueing function isn't fully aware of the fact that the options-searching functions ignores things which can't kill the monster before either maxround (i.e. 50 here) or WHAM_maxround and when you're very close to your WHAM_maxround setting it is likely to fail to find a valid strategy.

It is, I guess, another example of SS and WHAM not cooperating perfectly due to the first being imported by the second and run as is. Possibly it could be set up to use WHAM_maxround as "amount of rounds after SS has finished fooling around" I guess.
 
Version 3.3 has been uploaded with a bunch of minor fixes such as:
Remove cludge to reset your hitchance for debug printing purposes by overloading allMyOptions instead (thanks Bale)
Increase the hitchance limit by 0.25 when fighting Dr. Awkward since he makes you fumble
Make sure we abort if the unknown_ml-value is set to 0 (as is intended)
Fix bug with dont_use-items where it never used an item you accepted usage of above a certain limit
Redefine WHAM_maxround as number of turns to use after SS has finished

Refactor some code
 
Back
Top