Winterbay's Helpful Automatic Monsterbasher (WHAM)

Revision 34 of WHAM_beta and 37 of WHAM now correctly does not attempt to throw Battlefield stuff at the Trendy Bugbear Chef. WHAM_beta also contains some new code to semi-intelligently use Disco Dances to build Disco Momentum if a) you can build momentum, b) you have the skill that staggers the monster when building disco momentum, c) you gain +item from it and d) the monster can be staggered.
It's not optimal in any way, but it is at least better than never getting any momentum. The clear non-optimality of it is why it is just added to the beta-version...
If people have better suggestions I'm all ears :)
 
Last edited:
Here's an issue I'm having occasionally. I'm trying to Kung Fu fight as a moxie class, so my muscle is low, but WHAM is trying to attack an awful lot when my hit percentage is low. Why isn't it finishing off with spells? I've got the MP for it.

Code:
[220] The Defiled Nook
Encounter: spiny skelelton
Round 0: chef_rannos wins initiative!
ATT: 232 (6% × (11.35), death in 335)
DEF: 228 (8.59% × 98 (45) (25), win in 17)
HP: 229, Value: 865.24 μ, RES: 0 (-1) (1) (-1)
WHAM: Monster HP is 229.0.
WHAM: Running SmartStasis
Profit per round: ActionProfitDamageOtherbase (0μ)0μ--
Round 1: chef_rannos executes a macro!
Round 1: chef_rannos tries to steal an item!
You acquire an item: smart skull
You snatched a smart skull (125μ)!
Revised monster value: 740.24
WHAM: Starting evaluation and performing of attack
You snatched a smart skull (125μ)!
Revised monster value: 740.24
WHAM: We are going to 1-shot with Saucestorm.
Round 2: chef_rannos executes a macro!
Round 2: chef_rannos casts SAUCESTORM!
Round 3: spiny skelelton takes 55 damage.
Round 3: spiny skelelton takes 110 damage.
WHAM: Current monster HP is calculated to 64.0
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 3: chef_rannos executes a macro!
Round 3: chef_rannos attacks!
Round 4: spiny skelelton takes 1 damage.
Round 4: chef_rannos attacks!
Round 5: spiny skelelton takes 1 damage.
Round 5: chef_rannos attacks!
Round 6: spiny skelelton takes 1 damage.
Round 6: chef_rannos attacks!
Round 7: spiny skelelton takes 1 damage.
Round 7: chef_rannos attacks!
Round 8: spiny skelelton takes 1 damage.
WHAM: Current monster HP is calculated to 59.0
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 seal tooth.
Round 8: chef_rannos executes a macro!
Round 8: chef_rannos attacks!
Round 9: spiny skelelton takes 1 damage.
Round 9: chef_rannos attacks!
Round 10: spiny skelelton takes 1 damage.
Round 10: chef_rannos attacks!
Round 11: spiny skelelton takes 1 damage.
Round 11: chef_rannos attacks!
Round 12: spiny skelelton takes 1 damage.
Round 12: chef_rannos uses the seal tooth!
Round 13: spiny skelelton takes 1 damage.
WHAM: Current monster HP is calculated to 54.0
WHAM: Starting evaluation and performing of attack
WHAM: We are going to 4-shot with attack with your weapon, attack with your weapon, attack with your weapon and attack with your weapon.
Round 13: chef_rannos executes a macro!
Round 13: chef_rannos attacks!
Round 14: spiny skelelton takes 1 damage.
Round 14: chef_rannos attacks!
Round 15: spiny skelelton takes 1 damage.
Round 15: chef_rannos attacks!
Round 16: spiny skelelton takes 1 damage.
You lose 1 hit point
Round 16: chef_rannos attacks!
Round 17: spiny skelelton takes 1 damage.
You lose 1 hit point
WHAM: Current monster HP is calculated to 50.0
WHAM: Starting evaluation and performing of attack
WHAM: We are going to 4-shot with attack with your weapon, attack with your weapon, attack with your weapon and attack with your weapon.
Round 17: chef_rannos executes a macro!
Round 17: chef_rannos attacks!
Round 18: spiny skelelton takes 1 damage.
Round 18: chef_rannos attacks!
Round 19: spiny skelelton takes 1 damage.
Round 19: chef_rannos attacks!
Round 20: spiny skelelton takes 1 damage.
Round 20: chef_rannos attacks!
Round 21: spiny skelelton takes 1 damage.
WHAM: Current monster HP is calculated to 46.0
WHAM: Starting evaluation and performing of attack
WHAM: We are going to 4-shot with attack with your weapon, attack with your weapon, attack with your weapon and attack with your weapon.
Round 21: chef_rannos executes a macro!
Round 21: chef_rannos attacks!
Round 22: spiny skelelton takes 1 damage.
Round 22: chef_rannos attacks!
Round 23: spiny skelelton takes 1 damage.
Round 23: chef_rannos attacks!
Round 24: spiny skelelton takes 1 damage.
Round 24: chef_rannos attacks!
Round 25: spiny skelelton takes 1 damage.
WHAM: Current monster HP is calculated to 42.0
WHAM: Starting evaluation and performing of attack
WHAM: We are going to 3-shot with attack with your weapon, attack with your weapon and attack with your weapon.
Round 25: chef_rannos executes a macro!
Round 25: chef_rannos attacks!
Round 26: spiny skelelton takes 1 damage.
Round 26: chef_rannos attacks!
Round 27: spiny skelelton takes 1 damage.
Round 27: chef_rannos attacks!
Round 28: spiny skelelton takes 1 damage.
WHAM: Current monster HP is calculated to 39.0
WHAM: Starting evaluation and performing of attack
WHAM: We are going to 3-shot with attack with your weapon, attack with your weapon and attack with your weapon.
Round 28: chef_rannos executes a macro!
Round 28: chef_rannos attacks!
Round 29: spiny skelelton takes 1 damage.
Round 29: chef_rannos attacks!
Round 30: spiny skelelton takes 1 damage.
WHAM: Current monster HP is calculated to 37.0
Round 30: chef_rannos executes a macro!
KoLmafia thinks it is round 31 but KoL thinks it is round 30
WHAM: The fight has gone on for longer than your WHAM_maxround setting. Reverting power to manual.
You're on your own, partner.

Round 31: chef_rannos casts CONJURE RELAXING CAMPFIRE!
KoLmafia thinks it is round 32 but KoL thinks it is round 31
Round 32: spiny skelelton takes 156 damage.
Round 32: chef_rannos wins the fight!
After Battle: Your Evilometer emits a single beep. The air in this part of the crypt smells slightly less evil...
Your familiar gains a pound: Cry Baby, the 8 lb. Jumpsuited Hound Dog
You gain 5 hit points
You gain 5 Mojo Points
After Battle: Cry Baby does a couple of karate moves, then swivels his hips and gyrates his pelvis.
You acquire an item: skeleton bone
You acquire an item: spiked femur
You acquire an item: evil eye
You gain 15 Strongness
You gain 18 Mysteriousness
You gain 35 Roguishness
 
I've also been running into this a lot lately, where I'm opening up the pantry and my rogue program isn't used to it's full potential. Instead, it's wasting MP by throwing spells when I have WAY more moxie than I need for the zone.

HC BIG! DB:

Code:
[99] The Haunted Pantry
Encounter: fiendish can of asparagus
Round 0: chef_rannos wins initiative!
You have hot plate equipped: (3) damage, retal
ATT: 162 (6% × (10.55), death in 271)
DEF: 160 (95.45% × 107.48 (3), win in 2)
HP: 161, Value: 682.08 μ, RES: 0 (-1) (-1) (1)
WHAM: Monster HP is 161.0.
WHAM: Running SmartStasis
Profit per round: ActionProfitDamageOtherbase; Rogue Program (0μ)105.19μ6.19 (0 μ/dmg)MP: 6.19
Round 1: chef_rannos executes a macro!
Round 1: chef_rannos tries to steal an item!
You acquire an item: razor-sharp can lid
You snatched a razor-sharp can lid (5μ)!
Revised monster value: 678.38
WHAM: Starting evaluation and performing of attack
You snatched a razor-sharp can lid (5μ)!
Revised monster value: 678.38
WHAM: We are going to 1-shot with Saucestorm.
Round 2: chef_rannos executes a macro!
Round 2: chef_rannos casts SAUCESTORM!
Round 3: fiendish can of asparagus takes 110 damage.
Round 3: fiendish can of asparagus takes 110 damage.
Round 3: MP-Gamer bounces his disc off of it for 20 damage, and it ricochets into you, giving you quite a shock.
Round 3: fiendish can of asparagus takes 20 damage.
You gain 20 Mojo Points
Round 3: chef_rannos wins the fight!
You gain 12 Meat
You acquire an item: stalk of asparagus
You gain 17 Strongness
You gain 8 Magicalness
You gain 17 Cheek
Look! You found 1 stalk of asparagus (140μ)!



EDIT: It's also happening with some of the spooky woods monsters.

They've got plenty of HP to be converted to MP for building up buff durations...so I'm glad I've got a combat macro that pickpockets and then mass spams a seal tooth use.
 
Last edited:
I tried fighting my shadow with WHAM, and I get this...any ideas? (Yes, that means I was trying to be *really* lazy)

Code:
[956] Sorceress Tower: Shadow Fight
Encounter: Shadow Pastamancer
Round 0: chef_rannos wins initiative!
ATT: 150 (100% × 177, death in 2)
DEF: 89,999 (15.27% × 83.05, win in 32)
HP: 395, Value: 328.13 μ, RES: 0
Expression syntax errors for 'modifier_eval()':
Expected end, found ,none (zlib.ash, line 185)
You're on your own, partner.
 
If you want to find out what caused it you can run the fight with verbosity at 10 which should print out all the formulas it goes through and so the one with the problem is either the last one it prints out or the one after that.
 
In AOSP runs, could the script only pickpocket if the monster holds an item that's in goals? Usually you want love because it helps with olfaction. Alternatively, a setting for mug/pickpocket?
 
Alternatively, a setting for mug/pickpocket?

The script can check my_audience() and assume that you want to make it more strongly whatever it currently might be, thus it will pickpocket freely if my_audience() is negative while if it is positive, it will only pickpocket to complete goals. Similiarly it will choose to Mug for the Camera whenever my_audience is positive.

This is a SmartStasis feature though, not WHAM.
 
In AOSP runs, could the script only pickpocket if the monster holds an item that's in goals? Usually you want love because it helps with olfaction. Alternatively, a setting for mug/pickpocket?

I may be wrong but I think that the pickpocketing is handled by SS, need to look at that. But if so WHAM can't really do much about it (except possibly force a mug if available and the item is not a goal item).
 
I just handle pickpocket vs mugging in my CCS. One script for each and I switch scripts when I want to switch directions. The problem I have is KoLmafia often refuses to pickpocket and even "pickpocket" (with the quotes) doesn't seem to work any more. I started digging into that and got sidetracked. It was only a problem for the astral unlock before.
 
Mafia has an option for that: "Custom Combat" tab -> right-click in the field marked "Special" -> uncheck "Skip pickpocketing when no useful results or too dangerous"
 
Mafia has an option for that: "Custom Combat" tab -> right-click in the field marked "Special" -> uncheck "Skip pickpocketing when no useful results or too dangerous"
I swear I unchecked that, but nope, it was checked. Problem solved.
 
Does WHAM (or something else I have forgotten) have a simulated/speculative combat mode?

Given a set of gear and a goal, I want to know which combat actions are expected to cause the most damage. My use case is for a combat that I intend to run manually because WHAM/BB don't quite get things right by themselves.
 
WHAM, but might be BatBrain.

In Video Dungeon
Unsupported boss attribute: Elemental Reistance

Is the lack of support deliberate or an omission.

Is the misspelling of Reistance a KoLmafia feature or somewhere else?
 
session/GameproManager.java:143

Code:
		else if ( responseText.contains( "elemental alignment is totally neutral, so" ) )
		{
			bossPower = "Elemental Reistance";
		}
Hard to see how a "typo" could be construed as a "feature"...
 
Does WHAM (or something else I have forgotten) have a simulated/speculative combat mode?

Given a set of gear and a goal, I want to know which combat actions are expected to cause the most damage. My use case is for a combat that I intend to run manually because WHAM/BB don't quite get things right by themselves.

Well, you can enter a fight and run WHAM with verbosity 10 which will print out tje believed damage done by skills and also create a debug file in the data folder which, unless I have done something wrong, should include what WHAM thinks it should do to kill the monster.
You can also copy the html of a fight page and run wham outside of combat and use the copied html as input for the script.
 
WHAM, but might be BatBrain.

In Video Dungeon


Is the lack of support deliberate or an omission.

Is the misspelling of Reistance a KoLmafia feature or somewhere else?

That's because that code ia not yet supported. It's more of an informative message letting you know that it currently does not know how to handle that.
No comment on the spelling though.
 
Back
Top