Winterbay's Helpful Automatic Monsterbasher (WHAM)

The r50 update to Batbrain breaks WHAM. I'm working my way through trying to accommodate the changes in Batbrain. So far I've had to make two changes:

Change line 500 to
Code:
if (my_path() == "Zombie Slayer" && monster_stat("howmany") > 1 && no_bears()) return true;

Change line 1086 to
Code:
if(have_skill($skill[Disco State of Mind]) && have_skill($skill[Disco Greed]) && have_skill($skill[Flashy Dancer]) && monster_stat("nostagger") < 1) {

THanks for the report. I've updated the script with those changes. I do not have much time to play at the moment so any report like this is much appreciated.
 
THanks for the report. I've updated the script with those changes. I do not have much time to play at the moment so any report like this is much appreciated.

I have one small report, you can't use communications windchimes against a storm cow in the battlefield. I'll try to have a poke through the code to see if i can give you a fix too.
 
Are storm cows inherent to the battlefield in Heavy Rain or are they wandering monsters? Non-regular monsters at the battlefield should already not be allowed the use of windchimes or pdal phones courtesy of BatBrain:
Code:
         case 2065: if (my_location() != $location[the battlefield (frat uniform)] || get_counters("PADL Phone",0,10) != "" ||  // PADL phone
            string_modifier("Outfit") != "Frat Warrior Fatigues" || appearance_rates(my_location())[last_monster()] > 0) continue;
         case 2354: if (to_float(my_stat("hp"))/my_maxhp() < 0.25) fields.pdmg = "-275";      // windchimes
             else if (to_float(my_stat("mp"))/max(1,my_maxmp()) < 0.25) fields.special = "mp 175";
              else fields.dmg = "175";
            if (to_item(it) == $item[PADL phone]) break;
            if (my_location() != $location[the battlefield (hippy uniform)] || get_counters("Communications Windchimes",0,10) != "" ||
                string_modifier("Outfit") != "War Hippy Fatigues" || appearance_rates(my_location())[last_monster()] > 0) continue; break;
 
appearance_rates(my_location())[last_monster()] > 0
That looks like it should actually be <= 0, and that BatBrain currently only allows PADL phones and windchimes to be used against wandering monsters and such that happen to show up on the battlefield.
 
Yesterday WHAM was losing every single fight at the Secret Government Laboratory. When fighting manually, I didn't find the fights hard and didn't see anything out of the ordinary. Is there something going on there that BatBrain, WHAM, or mafia doesn't yet know? I didn't see anything on the wiki, but that's no surprise. Oh, and I have Manuel, so it wouldn't be stats that are the issue.
 
WHAM took too long to make the kill, so I got beaten up. I just hit them harder. I didn't check to see if die rounds was right. I was in a hurry. Hopefully, I can finish this run today and recreate the problem tonight or tomorrow, if I'm not too high level then.

Code:
[178] The Secret Government Laboratory
Encounter: super-sized Cola Wars soldier
Round 0: Crowther wins initiative!
You lose 6 hit points
Round 1: Crowther tries to steal an item!
You lose 90 hit points
> WHAM: Monster HP is 219.0.
> WHAM: Running SmartStasis
> WHAM: Throwing some pocket crumbs at yoru opponent
> Custom action: skill 7170 (stun first with use 5560)
Round 2: Crowther executes a macro!
Round 2: Crowther uses the Rain-Doh blue balls!
Round 3: super-sized Cola Wars soldier takes 17 damage.
Round 3: Crowther casts POCKET CRUMBS!
Round 4: super-sized Cola Wars soldier drops 32 attack power.
Round 4: super-sized Cola Wars soldier drops 37 defense.
> WHAM: Starting evaluation and performing of attack
> WHAM: We are going to 5-shot with attack with your weapon, attack with your weapon, attack with your weapon, attack with your weapon and attack with your weapon.
Round 4: Crowther executes a macro!
Round 4: Crowther attacks!
You lose 6 hit points
Round 5: Crowther attacks!
Round 6: super-sized Cola Wars soldier takes 51 damage.
You lose 76 hit points
Round 6: Crowther attacks!
Round 7: super-sized Cola Wars soldier takes 72 damage.
You lose 73 hit points
> You've had the crap beaten out of you... attempting to find some more crap.
Sorry, that from my log and lacks lots of info
 
Last edited:
Crowther: I noticed similar behavior a few days ago but it didn't happen again. What I saw was WHAM aborting after the combat was complete with the classic "You're on your own..." message.
 
Last edited:
I had a hound dog up...so can someone tell me why this combat was extended? I can't think of a reason to waste tons of MP on saucey salve fighting a snowman.

It aborted part way through so I used MMJ and hit the script button, but I think next time I'm just going to cast something huge. ;)


Code:
[161] The Sleazy Back Alley
KoLmafia thinks it is round 3 but KoL thinks it is round 1
WHAM: Failed to enqueue Saucestorm. There's more detailed information in the gCLI.
You're on your own, partner.
Round 3: chef_rannos uses the magical mystery juice!
KoLmafia thinks it is round 4 but KoL thinks it is round 2
You gain 27 Mojo Points
You lose 42 hit points
Base round: damage, player damage, 0 meat
ATT: 300 (100% × (50.57), death in 7)
DEF: 283 (95.45% × 23.9, win in 7)
HP: 150, Value: 2,044 μ, RES: 0 (1) (-1) (-1)
WHAM: Monster HP is 150.0.
WHAM: Running SmartStasis
Profit per round: ActionProfitDamageOtherbase (0μ)0μ--
Custom action: skill 4014 (no stun)
Round 4: chef_rannos executes a macro!
Round 4: chef_rannos casts SAUCY SALVE!
KoLmafia thinks it is round 5 but KoL thinks it is round 2
You gain 11 hit points
Round 5: chef_rannos casts CADENZA!
Round 6: ninja snowman assassin takes 1 damage.
You gain 4 hit points
You gain 4 Mojo Points
Round 6: chef_rannos executes a macro!
Round 6: chef_rannos casts SAUCY SALVE!
KoLmafia thinks it is round 7 but KoL thinks it is round 3
You gain 11 hit points
Round 7: chef_rannos executes a macro!
Round 7: chef_rannos casts SAUCY SALVE!
KoLmafia thinks it is round 8 but KoL thinks it is round 4
You gain 14 hit points
You lose 46 hit points
Round 8: chef_rannos executes a macro!
Round 8: chef_rannos casts SAUCY SALVE!
KoLmafia thinks it is round 9 but KoL thinks it is round 4
You gain 10 hit points
Round 9: chef_rannos executes a macro!
Round 9: chef_rannos casts SAUCY SALVE!
KoLmafia thinks it is round 10 but KoL thinks it is round 4
You gain 10 hit points
Round 10: chef_rannos executes a macro!
Round 10: chef_rannos casts SAUCY SALVE!
KoLmafia thinks it is round 11 but KoL thinks it is round 5
You gain 15 hit points
You lose 45 hit points
Round 11: chef_rannos executes a macro!
Round 11: chef_rannos casts SAUCY SALVE!
KoLmafia thinks it is round 12 but KoL thinks it is round 6
You gain 15 hit points
You lose 43 hit points
Round 12: chef_rannos executes a macro!
Round 12: chef_rannos casts SAUCY SALVE!
KoLmafia thinks it is round 13 but KoL thinks it is round 7
You gain 11 hit points
You lose 46 hit points
Round 13: chef_rannos executes a macro!
Round 13: chef_rannos casts SAUCY SALVE!
KoLmafia thinks it is round 14 but KoL thinks it is round 7
You gain 26 hit points
Round 14: chef_rannos executes a macro!
Round 14: chef_rannos casts SAUCY SALVE!
KoLmafia thinks it is round 15 but KoL thinks it is round 7
You gain 26 hit points
Round 15: chef_rannos executes a macro!
Round 15: chef_rannos casts SAUCY SALVE!
KoLmafia thinks it is round 16 but KoL thinks it is round 8
You gain 26 hit points
You lose 43 hit points
Round 16: chef_rannos executes a macro!
Round 16: chef_rannos casts SAUCY SALVE!
KoLmafia thinks it is round 17 but KoL thinks it is round 9
You gain 11 hit points
You lose 50 hit points
Round 17: chef_rannos executes a macro!
Round 17: chef_rannos casts SAUCY SALVE!
KoLmafia thinks it is round 18 but KoL thinks it is round 10
You gain 14 hit points
You lose 41 hit points
Round 18: chef_rannos executes a macro!
Round 18: chef_rannos casts SAUCY SALVE!
KoLmafia thinks it is round 19 but KoL thinks it is round 11
You gain 10 hit points
You lose 43 hit points
Round 19: chef_rannos executes a macro!
Round 19: chef_rannos casts SAUCY SALVE!
KoLmafia thinks it is round 20 but KoL thinks it is round 12
You gain 14 hit points
You lose 42 hit points
Round 20: chef_rannos executes a macro!
Round 20: chef_rannos casts SAUCY SALVE!
KoLmafia thinks it is round 21 but KoL thinks it is round 13
You gain 10 hit points
You lose 47 hit points
WHAM: Starting evaluation and performing of attack
WHAM: Enqueuing a stun to help with the battle
WHAM: We are going to 5-shot with Accordion Bash, Stream of Sauce, Stream of Sauce, attack with your weapon and attack with your weapon.
Round 21: chef_rannos executes a macro!
Round 21: chef_rannos casts ACCORDION BASH!
KoLmafia thinks it is round 22 but KoL thinks it is round 14
Round 22: chef_rannos casts STREAM OF SAUCE!
Round 23: ninja snowman assassin takes 56 damage.
Round 23: chef_rannos casts STREAM OF SAUCE!
Round 24: ninja snowman assassin takes 56 damage.
Round 24: chef_rannos attacks!
Round 25: ninja snowman assassin takes 85 damage.
Round 25: chef_rannos wins the fight!
After Battle: Cry Baby does a couple of karate moves, then swivels his hips and gyrates his pelvis.
You acquire an item: ninja rope
You gain 23 Strongness
You gain 23 Magicalness
You gain 35 Roguishness
Look! You found 1 ninja rope (200μ)!
 
I had a hound dog up...so can someone tell me why this combat was extended? I can't think of a reason to waste tons of MP on saucey salve fighting a snowman.
SmartStatis extended combat. Why, I don't know. Maybe something in your outfit gives a drop during combat? WHAM did a cheap kill starting with accordion bash.
 
That's part of the "problem" I'm trying to address in the SmartStasis thread.

You can start by commenting out the section labeled "safe salve" in build_custom() or blacklisting Saucy.

What we need is a "smarter stasis" that doesn't do any extra actions if you're taking damage every round. I still want it to do flyers, gremlins, siphons, stomps, copies, etc but all these extra rounds of stasising for mp or waiting for bjorn/crown drops is not helpful for certain values of +ML.
 
I'm posting this primarily to remind me to run a debug combat next time but if anyone has an idea of why WHAM is so far off on damage calculations it would be appreciated.

During the last two HR runs I let WHAM decide how to kill the Big Wisnaqua and both times it output the following to the gCLI:

Code:
WHAM: Running SmartStasis
WHAM: Starting evaluation and performing of attack
WHAM: Reached WHAM_round_limit while looking for a way to kill the monster. Executing the current strategy and continuing from there.
WHAM: We are going to 15-shot with Saucestorm, Saucestorm, Saucestorm, Saucestorm, Saucestorm, Saucestorm, Saucestorm, Saucestorm, Saucestorm, Saucestorm, Saucestorm, Saucestorm, Cadenza, Saucestorm and Saucestorm.

WHAM then proceeded to kill the monster in 13 rounds.
 
That's probably just you getting some decent hits in, and isn't really a major issue. If you have a specific "it said that it should do 300 damage and it actually did 18" case, that's something to log... for BatBrain... but taking 13 of your 15 rounds and saving some MP? Almost certainly not a bug.
 
Since the 13th action was Cadenza: Any chance that did more damage than expected? Also, you could've had more than the expected share of critical spells.
 
All possibilities. If it had only happened once I wouldn't have given it any further thought but the same thing happened with the same monster during back-to-back ascensions so it made me curious. I'll start a new HC HR run after a few more days of Conspiracy Island and see what happens.
 
I've been through and through the code and I just can't figure out why WHAM is attacking. My hitchance is set to the default .5, but I tried other settings. WHAM properly sees I have a 38% chance to hit with attack. It even correctly flags it in red on high debug settings. Yes, it often attacks until I get beaten up. As best as I can tell, attack is being removed properly, but obviously it isn't.
Code:
> adv 1 dr we

Restoring HP! Currently at 2159 of 15501 HP, 10083 of 28634 MP, current meat: 117228340 ... Target HP = 14726.
Using 1 scroll of drastic healing...
Finished using 1 scroll of drastic healing.

Visit to Conspiracy Island: The Mansion of Dr. Weirdeaux in progress...

[885551] The Mansion of Dr. Weirdeaux
Encounter: one of Doctor Weirdeaux's creations
Strategy: farm.ccs [default]
Round 0: WhimOrClutters wins initiative!
Factoring in Jalapeño Saucesphere: 3 damage, retal
You have navel ring of navel gazing equipped: 0 damage, stun 0.5
Base round: 0 damage, 0 (4650.3) player damage, 0.9 stun, 0 meat
ATT: 2445 (0.62% × (67.7), death in 14560)
DEF: 2006 (38.18% × 18543.25 (10) (25), win in 1)
HP: 3504, Value: 45 μ, RES: 0 (0.5) (1) (1) (1) (0.5)
WHAM: Monster HP is 3504.0.
WHAM: Running SmartStasis
Profit per round: ActionProfitDamageOtherbase; navel ring of navel gazing; Levitating Potato; companion Mariachi Chihuahua (0μ)-71.67μ--89.63% stun chance HP: 0 (4650.3)
WHAM: Starting evaluation and performing of attack
WHAM: We are going to 1-shot with attack with your weapon.
Round 2: WhimOrClutters executes a macro!
Round 2: WhimOrClutters attacks!
You lose 834 hit points
WHAM: Current monster HP is calculated to 3504.0
WHAM: Starting evaluation and performing of attack
WHAM: We are going to 1-shot with attack with your weapon.
Round 3: WhimOrClutters executes a macro!
Round 3: WhimOrClutters attacks!
You lose 924 hit points
WHAM: Current monster HP is calculated to 3504.0
WHAM: Starting evaluation and performing of attack
WHAM: We are going to 1-shot with attack with your weapon.
Round 4: WhimOrClutters executes a macro!
Round 4: WhimOrClutters attacks!
You lose 819 hit points
WHAM: Current monster HP is calculated to 3504.0
WHAM: Starting evaluation and performing of attack
WHAM: We are going to 1-shot with attack with your weapon.
Round 5: WhimOrClutters executes a macro!
Round 5: WhimOrClutters attacks!
You lose 957 hit points
WHAM: Current monster HP is calculated to 3504.0
WHAM: Starting evaluation and performing of attack
WHAM: We are going to 1-shot with attack with your weapon.
Round 6: WhimOrClutters executes a macro!
Round 6: WhimOrClutters attacks!
You lose 927 hit points
WHAM: Current monster HP is calculated to 3504.0
WHAM: Starting evaluation and performing of attack
WHAM: We are going to 1-shot with attack with your weapon.
Round 7: WhimOrClutters executes a macro!
Round 7: WhimOrClutters attacks!
You lose 833 hit points
WHAM: Current monster HP is calculated to 3504.0
WHAM: Starting evaluation and performing of attack
WHAM: We are going to 1-shot with attack with your weapon.
Round 8: WhimOrClutters executes a macro!
Round 8: WhimOrClutters attacks!
You lose 859 hit points
WHAM: Current monster HP is calculated to 3504.0
WHAM: Starting evaluation and performing of attack
WHAM: We are going to 1-shot with attack with your weapon.
Round 9: WhimOrClutters executes a macro!
Round 9: WhimOrClutters attacks!
You lose 988 hit points
WHAM: Current monster HP is calculated to 3504.0
WHAM: Starting evaluation and performing of attack
WHAM: We are going to 1-shot with attack with your weapon.
Round 10: WhimOrClutters executes a macro!
Round 10: WhimOrClutters attacks!
You lose 953 hit points
WHAM: Current monster HP is calculated to 3504.0
WHAM: Starting evaluation and performing of attack
WHAM: We are going to 1-shot with attack with your weapon.
Round 11: WhimOrClutters executes a macro!
Round 11: WhimOrClutters attacks!
You lose 961 hit points
WHAM: Current monster HP is calculated to 3504.0
Round 12: WhimOrClutters executes a macro!
KoLmafia thinks it is round 13 but KoL thinks it is round 12
WHAM: The fight has gone on for longer than your WHAM_maxround setting. Reverting power to manual.
You're on your own, partner.
Click here to continue in the relay browser.

EDIT: Ignore the elephant thing. That was just me learning to use BatRelay.
 
Last edited:
Back
Top