Winterbay's Helpful Automatic Monsterbasher (WHAM)

I've uploaded v1.4 which sets the unknown_ml to specific values for the Cyrpt-monsters that Mafia (and the wiki) have no data for meaning it will hopefully not abort as much for those even if you have your unknown_ml set to values more relevant for higher level monsters. And yes, it resets the value afterwards :)
 
I'm sure you're aware, but since you don't have the resetting of unknown_ml put into a try/finally loop, if WHAM can't finish the combat for any reason and it aborts (or if the user manually aborts), their unknown_ml value stays set to your override instead of getting put back to the user's request...
 
Hmmm true. Didn't think of that. Shouldn't be too common though, but I'll keep it in mind for my next update.
 
Depends mostly if you add more monsters. Long as you keep it limited, you'll probably be fine. :) Expand it to the alcove where people might abort more often as they notice they're done with shysters or other bits, and...
 
As far as I'm aware all the monsters in the alcove have stats in Mafia already (I did a check for monsters with hp = 0 and found the four cyrpt-monsters I added and some level 11-12 monsters and a lot of holiday monsters).
However, I've fixed the issue locally so next update will fix the potential problem.
 
Version 1.5 uploaded. This fixes a number of things and should hopefully not abort as often if you need to kill the monster quickly.
Entangling noodles-support is still slightly broken.
 
Version 1.5 uploaded. This fixes a number of things and should hopefully not abort as often if you need to kill the monster quickly.
Entangling noodles-support is still slightly broken.

Script attached to the first post thinks it is 1.4 ;-)
 
Version 1.6 uploaded with some minor changes for Avatar of Boris as well as fixes for a) sloppy programming and b) the new upcoming version of BatBrain.
 
r10774
latest BB, SS, WHAM, batfactors.txt deleted

Code:
[1122] South of the Border
Encounter: mariachi calavera
Strategy: /home/fit/.kolmafia/ccs/boris.ccs [default]
Round 0: morgad wins initiative!
WHAM: Running SmartStasis
WHAM: Starting evaluation and performing of attack
WHAM: Monster is weak. We are just going to bash its head in. It'll take 2 rounds.
Macro called on empty queue!
WHAM: Empty macro generated. Please check, aborting.
You're on your own, partner.
Click here to continue in the relay browser.

have I forgotton to do something?


edit, Zarqons instructions miss one crucial step - your note about deleting the batfactors line in zversions.txt

now it works :)
Code:
[1125] South of the Border
Updating batfactors.txt from '' to '2012-03-11T12:31:20-05:00'...
...batfactors.txt updated.
WHAM: Running SmartStasis
WHAM: Starting evaluation and performing of attack
WHAM: Monster is weak. We are just going to bash its head in. It'll take 2 rounds.
Round 1: morgad executes a macro!
Round 1: morgad casts MIGHTY AXING!
Round 2: mind flayer takes 542 damage.
Round 2: morgad wins the fight!
You acquire an item: mind flayer corpse
You acquire an item: cornuthaum
You gain 14 Fortitude
You gain 4 Mysteriousness
You gain 2 Cheek

best regards
Dave
 
Last edited:
Yeah, well his instructions works if you do it before running any batbrain-script for the day, but yeah I found that out as well...
 
1.7 uploaded which fixes an annoying bug which made the script not attack even though it should and also makes sure to use Mighty Axing instead of Attack if an Avatar of Boris.
 
What about Boris versus the NS/Bonerdagon - would attack be better here than axing (not blocked)?

best regards
Dave
 
What about Boris versus the NS/Bonerdagon - would attack be better here than axing (not blocked)?

best regards
Dave

Good point. I'll have to look at that I think.

What does a bad monster value "" mean?

It means that Mafia, for some reason, has failed to parse the monster name. It happens from time to time to me as well, but I have never been able to pinpoint any specific reasons for it.
 
Version 1.8 updated. It'll now no longer default to Mighty Axing against skill-blocking enemies such as the NS and the Bonerdagon, it is also compatible with the upcoming version of BatBrain (special link is included in the first post). The special copy of BatBrain is required until zarqon updates the main branch of BatBrain.
 
Alas the version posted in the first post does not work. It fails the verify command because there is at least one extra ")" circa line 216. The other errors could be because I am confused as to which versions of BatBrain and SmartStasis I am supposed to have. Variables macro and stuncount (or something like that) are referenced, for example, but not defined depending on how I max and match BB and SS versions.
 
Oops. Sorry. That's what I get for doing last minute changes after I've logged out. The version in the first post should be working now, as long as you have the "experimental" version of BatBrain linked to at the top of it.
 
Oops. Sorry. That's what I get for doing last minute changes after I've logged out. The version in the first post should be working now, as long as you have the "experimental" version of BatBrain linked to at the top of it.

Thanks. Will test when characters are not drunk. Test/Compile before post is a lesson most people learn the hard way so I've "Been There, Done That" too.
 
I'm trying the updated WHAM, BatBrain, and SmartStasis during a Boris run and everything is okay so far with one exception: fighting the individual subzone bosses in the Crypt.

This is with r10849 and a CCS that consists of a single line: the call to WHAM.ash.

Here's what the gCLI shows:

Code:
[332] Defiled Cranny
Encounter: huge ghuol
Strategy: L:\software\Kol\ccs\default.ccs [default]
Round 0: Arbos wins initiative!
WHAM: Running SmartStasis
Round 1: Arbos executes a macro!
Round 1: Arbos uses the can of Ghuol-B-Gone™!
Round 2: huge ghuol takes 77 damage.
Round 2: huge ghuol takes 17 damage.
You lose 28 hit points
Round 2: Arbos uses the can of Ghuol-B-Gone™!
Round 3: huge ghuol takes 63 damage.
Round 3: Arbos wins the fight!
After Battle: As the last breath (which, in case you were wondering, was foul-smelling and went on for a really long time) escapes the huge ghuol, your Evilometer beeps once, very loudly.
You gain 457 Meat
You acquire an item: ghuol egg
You gain 21 Muscleboundness
You gain 21 Enchantedness
You gain 16 Roguishness
WHAM: Monster is weak. We are just going to bash its head in. It'll take 2 rounds.
WHAM: Empty macro generated. Please check, aborting.
You're on your own, partner.

This only happens for the sub bosses.

Here's a sub boss combat with zlib verbosity set to 9

Code:
Request 18 of 30 (Cyrpt: Defiled Alcove) in progress...

[350] Defiled Alcove
Encounter: conjoined zmombie
Strategy: L:\software\Kol\ccs\default.ccs [default]
Round 0: Arbos loses initiative!
Round 1: conjoined zmombie takes 19 damage.
You lose 26 hit points
You acquire an effect: Half-Eaten Brain (duration: 10 Adventures)
Running ZLib version: r35 (current)
1 HP costs 6.667μ. ( 167 / 193 )
1 MP costs 17μ. ( 37 / 37 )
Factoring in double-ice cap: (15) damage, stun 1.0, retal
Running BatBrain version: 1.18 (current)
Running SmartStasis version: 3.12 (current)
Running WHAM version: 1.8 (current)
WHAM: We currently think that the round number is: 0
WHAM: No need to do anything with this monster.
cranberries (29.0 @ +97.62019): 29μ * 57.30986% = 16.61986
cranberries (8.0 @ +97.62019): 29μ * 15.809615% = 4.5847883
loose teeth (8.0 @ +97.62019): 17μ * 15.809615% = 2.6876345
Value of stat gain: 236.41μ
cranberries (29.0 @ +97.62019): 29μ * 57.30986% = 16.61986
cranberries (8.0 @ +97.62019): 29μ * 15.809615% = 4.5847883
loose teeth (8.0 @ +97.62019): 17μ * 15.809615% = 2.6876345
Value of stat gain: 236.41μ
ATT: 89 (94% × 39.2, death in 5)
DEF: 73 (95.45% × 132.42 (10), win in 1160000)
HP: 111, Value: 737.0 μ
Parsed round number: 1
Building options...
Options built! (12 actions)
WHAM: We currently think that the round number is: 1
WHAM: You have no profitable MP restoratives.
WHAM: You have no profitable HP restoratives.
WHAM: You are fighting a Conjoined Zmombie. Mafia considers that this monster has an attack of 89 or 89 when given a monster name.
WHAM: Mafia further considers that this monster has a defense value of 73 or 73 when given a monster name.
WHAM: Mafia further further considers that this monster has a HP value of 111 or 130 when given a monster name.
WHAM: Your current ML-adjustment is: 10.
WHAM: Setting up variables via BatBrain
WHAM: Monster HP is 111.0.
if pastround 49; abort "Stopping fight because it has gone on for too long (set WHAM_maxround to a higher value if you think this was in error)"; endif; 
WHAM: Running SmartStasis
SmartStasis starting.
Profit per round: ActionProfitDamageOtherbase (0μ)0μ--
Building custom actions...
Custom actions built! (0 actions)
Custom action: use 2562 (no stun)
Queued: use 2562
Building options...
Options built! (12 actions)
Custom action: use 2562 (no stun)
Queued: use 2562
Building options...
Options built! (12 actions)
Constructed macro: scrollwhendone; sub batround; if haseffect 8 || haseffect 264 || haseffect 282 || haseffect 283 || haseffect 284; abort "BatBrain abort: poisoned"; endif; if pastround 49; abort "Stopping fight because it has gone on for too long (set WHAM_maxround to a higher value if you think this was in error)"; endif; endsub; use 2562; call batround; use 2562; call batround; 
Round 1: Arbos executes a macro!
Round 1: Arbos uses the half-rotten brain!
Round 2: conjoined zmombie takes 63 damage.
Round 2: Arbos uses the half-rotten brain!
Round 3: conjoined zmombie takes 75 damage.
Round 3: Arbos wins the fight!
After Battle: As you end the conjoined zmombies' conjoined lives for the second times, your Evilometer emits a loud beep.
You gain 479 Meat
You acquire an item: cranberries
You acquire an item: cranberries
You gain 29 Fortitude
You gain a Muscle point!
You gain 15 Enchantedness
You gain a Mysticality point!
You gain 15 Cheek
Happened: use 2562
Happened: use 2562
Parsed round number: 3
Look! You found 2 cranberries (58μ)!
Building options...
Options built! (8 actions)
Stasis action chosen: attack (profit: -1.45)
loose teeth (8.0 @ +97.62019): 17μ * 15.809615% = 2.6876345
Value of stat gain: 236.41μ
Attack action chosen: attack
This monster is not your huckleberry.
Stasis loop complete.
This monster is not your huckleberry.
SmartStasis complete.
WHAM: Running SmartStasis took 2.545 seconds.
WHAM: We currently think that the round number is: 3
WHAM: Starting evaluation and performing of attack
WHAM: We currently think that the round number is: 3
WHAM: You will kill the monster in 2 rounds with your basic attack.
WHAM: The monster will take 5 rounds to kill you.
rounds_to_kill: 2, round_limit: 10, maxround: 30, die_rounds(): 5, hitchance("attack"): 0.95454544
WHAM: Expected received damage per round: 36.84964, Rounds to kill: 2, Expected damage: 130.0, Hit chance: 1.0
WHAM: Monster is weak. We are just going to bash its head in. It'll take 2 rounds.
Unable to enqueue empty action.
WHAM: Empty macro generated. Please check, aborting.
You're on your own, partner.
 
Last edited:
Back
Top