Winterbay's Helpful Automatic Monsterbasher (WHAM)

Interesting. My quite possibly faulty memory seems to remember stunning him once and having it fail, which would be why I added that, but it could be that 1) Victor has that relatively new "chance to shrug stuns" mechanic (which BatBrain has no support for presently), or b) I am wrong and that didn't happen at all.

We are unable to see conclusively whether Victor was successfully stunned with Noodles because it also looks like bcc got lucky with a critical spell (which BatBrain also doesn't know anything about).
 
We are unable to see conclusively whether Victor was successfully stunned with Noodles because it also looks like bcc got lucky with a critical spell (which BatBrain also doesn't know anything about).
If Victor was not stunned, BCC should have been hit twice. Once after the failed noodle and once after the critical saucegeyser. Unless Victor missed, but that's only a 6% chance each time.
 
That makes sense, but something else confuses me.

BCC doesn't have Mafia's damage reporting turned on (grrrrr), but his manual kill was noodles, saucegeyser, salsaball.
Code:
WHAM: Monster HP is 125.0.
WHAM: Saucegeyser: 61.05 potential damage (raw damage: 61.05) and a hitchance of 100.00%.
WHAM: Salsaball: 7.50 potential damage (raw damage: 7.50) and a hitchance of 100.00%.
So, how did he manage the kill? Angry young man deleveling?
Also, WHAM would not have cast noodles, because batfactors lists Victor as nomultistun. It looks like BCC likely did stun him with noodles, because Victor would have had to miss twice, which was almost impossible (6%*6%). The wiki doesn't list Victor as being immune to stunning, so it's likely batfactors is wrong there.

For the benefit of future reporting, how do I turn on this damage reporting you mentioned?
 
I think that won't help. You need to turn on ,afia logging of monster health. Somewhere in the logging options in preferences.
 
Preferences/Session Logs

There's no good reason to not check every one of the bottom seven settings that say "Session log records xxx". The one in question is "Session log records monster health changes". That is on by default. You must have turned it off, for some reason.

I don't use "Session log records player status on login", but you might like that one.
 
Last edited:
WHAM is having trouble when I have a plastic pumpkin bucket equipped. If I modify the line for ppb to replace 'perfect' with an element it works fine. May also be an issue for the moveable feast.

Code:
[18979] The     Haunted Library
Encounter: bookbat
Strategy:     /Users/Rinn/Library/Application Support/KoLmafia/ccs/[COLOR=#2cae33]epicgamer[/COLOR]-farming.ccs     [default]
Round 0: [COLOR=#2cae33]Epicgamer[/COLOR] wins     initiative!
[COLOR=black]Updating batfactors.txt to     '2013-09-20T12:32:37-05:00'...[/COLOR]
[COLOR=black]...batfactors.txt     updated.[/COLOR]
[COLOR=red]Expression syntax errors for     'modifier_eval()':
Expected end, found perfect (zlib.ash, line 176)[/COLOR]
[COLOR=red]You're     on your own, partner.[/COLOR]
[URL="http://kolmafia.us/main.php"]Click     here to continue in the relay browser.[/URL]


[COLOR=olive]>     zlib verbosity = 10[/COLOR]

Previous value of verbosity: 3
Changed     to 10.

[COLOR=olive]> ash run_combat()[/COLOR]

[COLOR=#880000]1     HP costs 0.044μ. ( 891 / 1270 )[/COLOR]
[COLOR=#000088]1 MP     costs 1.653μ. ( 508 / 1829 )[/COLOR]
[COLOR=purple]WHAM: We     currently think that the round number is: 0 and that the turn number is     18978.[/COLOR]
[COLOR=purple]WHAM: Checking to see if WHAM sould     adjust the unknown_ml for bookbat.[/COLOR]
[COLOR=purple]WHAM: No     need to do anything with bookbat.[/COLOR]
[COLOR=purple]WHAM:     Setting up variables via BatBrain[/COLOR]
[COLOR=black]Setting     monster to bookbat...[/COLOR]
[COLOR=black]Loading batfactors...[/COLOR]
[COLOR=black]Evaluating     '0.35*40.0*0.75 perfect'...[/COLOR]
[COLOR=red]Expression syntax     errors for 'modifier_eval()':
Expected end, found perfect (zlib.ash,     line 176)[/COLOR]
[COLOR=red]You're on your own, partner.[/COLOR]
[URL="http://kolmafia.us/main.php"]Click     here to continue in the relay browser.[/URL]


[COLOR=olive]>     zlib verbosity = 3[/COLOR]

Previous value of verbosity: 10
Changed     to 3.
 
WHAM is having trouble when I have a plastic pumpkin bucket equipped. If I modify the line for ppb to replace 'perfect' with an element it works fine. May also be an issue for the moveable feast.

Code:
[18979] The     Haunted Library
Encounter: bookbat
Strategy:     /Users/Rinn/Library/Application Support/KoLmafia/ccs/[COLOR=#2cae33]epicgamer[/COLOR]-farming.ccs     [default]
Round 0: [COLOR=#2cae33]Epicgamer[/COLOR] wins     initiative!
[COLOR=black]Updating batfactors.txt to     '2013-09-20T12:32:37-05:00'...[/COLOR]
[COLOR=black]...batfactors.txt     updated.[/COLOR]
[COLOR=red]Expression syntax errors for     'modifier_eval()':
Expected end, found perfect (zlib.ash, line 176)[/COLOR]
[COLOR=red]You're     on your own, partner.[/COLOR]
[URL="http://kolmafia.us/main.php"]Click     here to continue in the relay browser.[/URL]


[COLOR=olive]>     zlib verbosity = 10[/COLOR]

Previous value of verbosity: 3
Changed     to 10.

[COLOR=olive]> ash run_combat()[/COLOR]

[COLOR=#880000]1     HP costs 0.044μ. ( 891 / 1270 )[/COLOR]
[COLOR=#000088]1 MP     costs 1.653μ. ( 508 / 1829 )[/COLOR]
[COLOR=purple]WHAM: We     currently think that the round number is: 0 and that the turn number is     18978.[/COLOR]
[COLOR=purple]WHAM: Checking to see if WHAM sould     adjust the unknown_ml for bookbat.[/COLOR]
[COLOR=purple]WHAM: No     need to do anything with bookbat.[/COLOR]
[COLOR=purple]WHAM:     Setting up variables via BatBrain[/COLOR]
[COLOR=black]Setting     monster to bookbat...[/COLOR]
[COLOR=black]Loading batfactors...[/COLOR]
[COLOR=black]Evaluating     '0.35*40.0*0.75 perfect'...[/COLOR]
[COLOR=red]Expression syntax     errors for 'modifier_eval()':
Expected end, found perfect (zlib.ash,     line 176)[/COLOR]
[COLOR=red]You're on your own, partner.[/COLOR]
[URL="http://kolmafia.us/main.php"]Click     here to continue in the relay browser.[/URL]


[COLOR=olive]>     zlib verbosity = 3[/COLOR]

Previous value of verbosity: 10
Changed     to 3.


Just posting to concur with this post: I am getting this same error and it went away when I unequipped the pumpkin bucket.
 
You could probably just copy the batfactors line for the pumpkin bucket to a different cheaper familiar item you have.
 
Ok, that wasn't as hard as it could've been...

BatBrain starts by calling set_monster() which in turn calls a lot of functions. First load_factors(), nothing problematic there. The it calls fxngear() which tries to print how much damage your equipment and effects do. Only it can't do that for the "perfect" stuff since that doesn't get interpreted for another 31 lines in parse_factors().
I'm not sure if the correct solution is to move parse_factors() up or fxngear() down but one of them is needed.
I'll go report that in the BatBrain thread.
 
For what it's worth, I was regularly losing of fights in KoLHS, while running lots of ML. I bumped up WHAM_roundcost_ronin slowly to 50 and I stopped losing fights, but the additional meat costs were noticeable. This is probably due to me running way too much ML (death chucks even), but WHAM shouldn't lose fights unless the fight isn't worth winning. I'd love to tear apart some of those lost fights, but I've got fishier fish to fry.
 
I'm fighting in WOTSF, and WHAM regulatly uses drunken baby then attack. But I'm out-moxieing them but only hitting for 1 damage, so my DBS would just have killed them at the cost of 0MP.

Code:
[794] The Oasis
Encounter: blur
Strategy: /home/andreas/Dropbox/KoLMafia/ccs/WHAM.ccs [default]
Round 0: bumcheekcity wins initiative!
ATT: 149 (6% × 4.93, death in 175)
DEF: 131 (8.8% × 51 (3) (3) (3) (36) (3), win in 13)
HP: 151, Value: 1,276.48 μ, RES: 0
WHAM: Monster HP is 151.0.
WHAM: Running SmartStasis
Profit per round: ActionProfitDamageOtherbase (0μ)0μ--
Round 1: bumcheekcity executes a macro!
Round 1: bumcheekcity tries to steal an item!
You acquire an item: hot date
You snatched a hot date (65μ)!
Revised monster value: 1,270.8
WHAM: Starting evaluation and performing of attack
You snatched a hot date (65μ)!
Revised monster value: 1,270.8
WHAM: We are going to 2-shot with Drunken Baby Style and attack with your weapon.
Round 2: bumcheekcity executes a macro!
Round 2: bumcheekcity casts DRUNKEN BABY STYLE!
Round 3: blur takes 141 damage.
Round 3: bumcheekcity attacks!
Round 4: blur takes 1 damage.
WHAM: Current monster HP is calculated to 9.0
WHAM: Starting evaluation and performing of attack
WHAM: We are going to 1-shot with attack with your weapon.
Round 4: bumcheekcity executes a macro!
Round 4: bumcheekcity attacks!
Round 5: blur takes 1 damage.
WHAM: Current monster HP is calculated to 8.0
WHAM: Starting evaluation and performing of attack
WHAM: We are going to 1-shot with attack with your weapon.
Round 5: bumcheekcity executes a macro!
Round 5: bumcheekcity attacks!
Round 6: blur takes 1 damage.
WHAM: Current monster HP is calculated to 7.0
WHAM: Starting evaluation and performing of attack
WHAM: We are going to 1-shot with attack with your weapon.
Round 6: bumcheekcity executes a macro!
Round 6: bumcheekcity attacks!
Round 7: blur takes 1 damage.
WHAM: Current monster HP is calculated to 6.0
WHAM: Starting evaluation and performing of attack
WHAM: We are going to 1-shot with attack with your weapon.
Round 7: bumcheekcity executes a macro!
KoLmafia declares world peace.
Round 7: bumcheekcity attacks!
Round 8: blur takes 1 damage.
You're on your own, partner.
Click here to continue in the relay browser.


Round 8: bumcheekcity attacks!

[794] The Palindome
Round 9: blur takes 1 damage.
Round 9: bumcheekcity attacks!
Round 10: blur takes 1 damage.
Round 10: bumcheekcity attacks!
Round 11: blur takes 1 damage.
Round 11: bumcheekcity attacks!
Round 12: blur takes 1 damage.
Round 12: bumcheekcity attacks!
Round 13: blur takes 1 damage.
Round 13: bumcheekcity wins the fight!
You gain 16 Meat
You acquire an item: Hugo's Weaving Manual
You acquire an item: palm frond
After Battle: Gonald greams happily, baring a mouthful of scarpy teeth.
You gain 10 Fortitude
You gain 15 Enchantedness
You gain 21 Cheek
 
Could you run one fight at verbosity 10 (or 11) and see what it thinks the attack should do?
I might be reading this wrong, but from BCC's log:
Code:
DEF: 131 (8.8% × 51 (3) (3) (3) (36) (3), win in 13)
HP: 151, Value: 1,276.48 μ, RES: 0
I believe "win in 13" is computed based on attack with weapon. So at 151/13 implies doing over 11 damage (which is higher than 8.8% of 51 due to glancing blows, etc).

This next section deals with verifying glancing blows, which worked correctly as best as I could tell, so you might want to skip it:
-=-=-=-=-=-=-=-=-=-
I looked at BatFactor's code for glancing blows:
Code:
      opts[0] = merge(opts[0],to_event("",to_spread(max(1,0.075*get_power(equipped_item($slot[weapon]))),   // glancing blows
         1.0-hitchance("attack")-fumble_chance()),to_spread(0),""));
To only get one damage with the formula, BCC would have had to be using a weapon with under 13 power which seems unlikely. I can't find much information on what glancing blows should do. Jick said,
All regular attacks that would have missed are now glancing blows. They deal half the weapon's normal damage, and do not apply any of your bonus damage.
On the wiki I see
The game would calculate damage by rolling for a number between 10% and 20% of the weapon's power.
So 15%/2 is the .075 in BatFactor's formula. I decided to test this and lowered my muscle to 1. With a teflon spatula (power 200) I did 15 and 16 damage, which is exactly what this formula predicted. WHAM said,
WHAM: Attack with your weapon: 17.36 potential damage (raw damage: 17.36) and a hitchance of 13.68%.

So I'm kind of stuck here. BCC only did 1 damage. It would take a weapon with a very low power, say 13 or less to only get one damage on a glancing blow. So, I decided to try a smaller weapon, a white whip at 10 power. WHAM says,
WHAM: Attack with your weapon: 1.15 potential damage (raw damage: 1.15) and a hitchance of 13.68%.
KoL says,
You throw the white whip at it, but since it's not really meant to be thrown, it only deals 1 damage.
How about something higher, a hippo whip. WHAM says
WHAM: Attack with your weapon: 1.81 potential damage (raw damage: 1.81) and a hitchance of 13.68%.
KoL says
You only manage to hit it for 2 damage. Y'know, you're more Moxious than you are strong -- maybe you should play to your strengths. Like, I dunno, a musical instrument, or a crossbow or something.
My moxie is also 1, by the way.
-=-=-=-=-=-=-=-=-=-

So, it looks like glancing blows are handled correctly for me. I'm still not sure why WHAM thought it could one shot, if BCC really was using a low power weapon, which is actually damage seems to imply. The wiki and monsters.txt lists nothing special about the blur.
 
Unless it has a new physical resistance or BCC had something that turned all attack damage to a resisted element... fire damage if it were fire resistant or aligned, for example... but... is that a feature of salamander?
 
Back
Top