Winterbay's Helpful Automatic Monsterbasher (WHAM)

Rinn

Developer
Code:
[218] eXtreme SlopeEncounter: eXtreme Orcish snowboarder
Round 0: Epicgamer wins initiative!
 > Running ZLib version: r37 (current)
 > 1 HP costs 6.667μ. ( 203 / 203 )
 > 1 MP costs 17μ. ( 68 / 109 )
 > Running BatBrain version: 1.31.1 (current)
 > Running SmartStasis version: 3.18 (current)
 > Checking for updates (running WHAM ver. 4.5)...
 > Running WHAM version: 4.5 (current)
 > WHAM: We currently think that the round number is: 0 and that the turn number is 217.
 > WHAM: Checking to see if WHAM sould adjust the unknown_ml for eXtreme Orcish Snowboarder.
 > WHAM: No need to do anything with eXtreme Orcish Snowboarder.
 > WHAM: Setting up variables via BatBrain
 > Mountain Stream soda (30.0 @ +109.84289527554463): 58μ * 62.95% = 36.51
 > snowboarder pants (10.0 @ +109.84289527554463): 110μ * 20.98% = 23.08
 > Mountain Stream soda (30.0 @ +109.84289527554463): 58μ * 62.95% = 36.51
 > snowboarder pants (10.0 @ +109.84289527554463): 110μ * 20.98% = 23.08
 > Parsed round number: 1
 > Building options...
 > Options built! (32 actions)
 > WHAM: We currently think that the round number is: 1 and that the turn number is 217.
 > WHAM: Current MP = 68 out of 109.
 > WHAM: You have no profitable MP restoratives.
 > WHAM: Current HP = 203 out of 203.
 > WHAM: You have no profitable HP restoratives.
 > WHAM: You are fighting a eXtreme Orcish Snowboarder. Mafia considers that this monster has an attack of 119 or 119 when given a monster name.
 > WHAM: Mafia further considers that this monster has a defense value of 112 or 111 when given a monster name.
 > WHAM: Mafia further further considers that this monster has a HP value of 107 or 110 when given a monster name.
 > WHAM: Your current ML-adjustment is: 45.
 > WHAM: Monster HP is 107.0.
 > WHAM: WHAM added the following to BatRound:  if pastround 28; 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
 > Building custom actions...
 > WHAM: This monster does not drop a goal item
 > Custom actions built! (0 actions)
 > Stasis option chosen: skill 7061 (round 1, profit: 255)
 > Mountain Stream soda (30.0 @ +109.84289527554463): 58μ * 62.95% = 36.51
 > snowboarder pants (10.0 @ +109.84289527554463): 110μ * 20.98% = 23.08
 > WHAM: Attack option chosen: skill 2023 (round 1, profit: 0)
 > Top of the stasis loop.
 > Queued: skill 7061
 > Building options...
 > Options built! (32 actions)
 > Constructed macro: scrollwhendone; sub batround;  if pastround 28; 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; sub finito; skill 7061; call batround; endsub; call finito; repeat hasskill 7061 && (!hpbelow 203.0 && !mpbelow 68.0 && !pastround 20)
Round 1: Epicgamer executes a macro!
Round 1: Epicgamer casts SPRING RAINDROP ATTACK!
You gain 21 hit points
You gain 20 Muscularity Points
You lose 8 hit points
 > Happened: skill 7061
 > Parsed round number: 2
 > Building options...
 > Options built! (28 actions)
 > Stasis option chosen: skill 7061 (round 2, profit: 255)
 > Mountain Stream soda (30.0 @ +109.84289527554463): 58μ * 62.95% = 36.51
 > snowboarder pants (10.0 @ +109.84289527554463): 110μ * 20.98% = 23.08
 > WHAM: Attack option chosen: skill 2023 (round 2, profit: 0)
 > Top of the stasis loop.
 > Queued: skill 7061
 > Building options...
 > Options built! (28 actions)
 > Constructed macro: scrollwhendone; sub batround;  if pastround 28; 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; sub finito; skill 7061; call batround; endsub; call finito; repeat hasskill 7061 && (!hpbelow 203.0 && !mpbelow 88.0 && !pastround 20)
Round 2: Epicgamer executes a macro!
 > Parsed round number: 2
 > Building options...
 > Options built! (28 actions)
 > Stasis option chosen: skill 7061 (round 2, profit: 255)
 > Mountain Stream soda (30.0 @ +109.84289527554463): 58μ * 62.95% = 36.51
 > snowboarder pants (10.0 @ +109.84289527554463): 110μ * 20.98% = 23.08
 > WHAM: Attack option chosen: skill 2023 (round 2, profit: 0)
 > Top of the stasis loop.
 > Queued: skill 7061
 > Building options...
 > Options built! (28 actions)
 > Constructed macro: scrollwhendone; sub batround;  if pastround 28; 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; sub finito; skill 7061; call batround; endsub; call finito; repeat hasskill 7061 && (!hpbelow 203.0 && !mpbelow 88.0 && !pastround 20)
Round 3: Epicgamer executes a macro!
 > Parsed round number: 2
 > Building options...
 > Options built! (28 actions)
 > Stasis option chosen: skill 7061 (round 2, profit: 255)
 > Mountain Stream soda (30.0 @ +109.84289527554463): 58μ * 62.95% = 36.51
 > snowboarder pants (10.0 @ +109.84289527554463): 110μ * 20.98% = 23.08
 > WHAM: Attack option chosen: skill 2023 (round 2, profit: 0)
 > Top of the stasis loop.
 > Queued: skill 7061
 > Building options...
 > Options built! (28 actions)
 > Constructed macro: scrollwhendone; sub batround;  if pastround 28; 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; sub finito; skill 7061; call batround; endsub; call finito; repeat hasskill 7061 && (!hpbelow 203.0 && !mpbelow 88.0 && !pastround 20)
Round 4: Epicgamer executes a macro!
 > Parsed round number: 2
 > Building options...
 > Options built! (28 actions)
 > Stasis option chosen: skill 7061 (round 2, profit: 255)
 > Mountain Stream soda (30.0 @ +109.84289527554463): 58μ * 62.95% = 36.51
 > snowboarder pants (10.0 @ +109.84289527554463): 110μ * 20.98% = 23.08
 > WHAM: Attack option chosen: skill 2023 (round 2, profit: 0)
 > Top of the stasis loop.
 > Queued: skill 7061
 > Building options...
 > Options built! (28 actions)
 > Constructed macro: scrollwhendone; sub batround;  if pastround 28; 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; sub finito; skill 7061; call batround; endsub; call finito; repeat hasskill 7061 && (!hpbelow 203.0 && !mpbelow 88.0 && !pastround 20)
Round 5: Epicgamer executes a macro!
 > Parsed round number: 2
 > Building options...
 > Options built! (28 actions)
 > Stasis option chosen: skill 7061 (round 2, profit: 255)
 > Mountain Stream soda (30.0 @ +109.84289527554463): 58μ * 62.95% = 36.51
 > snowboarder pants (10.0 @ +109.84289527554463): 110μ * 20.98% = 23.08
 > WHAM: Attack option chosen: skill 2023 (round 2, profit: 0)
 > Top of the stasis loop.
 > Queued: skill 7061
 > Building options...
 > Options built! (28 actions)
 > Constructed macro: scrollwhendone; sub batround;  if pastround 28; 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; sub finito; skill 7061; call batround; endsub; call finito; repeat hasskill 7061 && (!hpbelow 203.0 && !mpbelow 88.0 && !pastround 20)
Round 6: Epicgamer executes a macro!
 > Parsed round number: 2
 > Building options...
 > Options built! (28 actions)
 > Stasis option chosen: skill 7061 (round 2, profit: 255)
 > Mountain Stream soda (30.0 @ +109.84289527554463): 58μ * 62.95% = 36.51
 > snowboarder pants (10.0 @ +109.84289527554463): 110μ * 20.98% = 23.08
 > WHAM: Attack option chosen: skill 2023 (round 2, profit: 0)
 > Top of the stasis loop.
 > Queued: skill 7061
 > Building options...
 > Options built! (28 actions)
 > Constructed macro: scrollwhendone; sub batround;  if pastround 28; 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; sub finito; skill 7061; call batround; endsub; call finito; repeat hasskill 7061 && (!hpbelow 203.0 && !mpbelow 88.0 && !pastround 20)
Round 7: Epicgamer executes a macro!
 > Parsed round number: 2
 > Building options...
 > Options built! (28 actions)
 > Stasis option chosen: skill 7061 (round 2, profit: 255)
 > Mountain Stream soda (30.0 @ +109.84289527554463): 58μ * 62.95% = 36.51
 > snowboarder pants (10.0 @ +109.84289527554463): 110μ * 20.98% = 23.08
 > WHAM: Attack option chosen: skill 2023 (round 2, profit: 0)
 > Top of the stasis loop.
 > Queued: skill 7061
 > Building options...
 > Options built! (28 actions)
 > Constructed macro: scrollwhendone; sub batround;  if pastround 28; 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; sub finito; skill 7061; call batround; endsub; call finito; repeat hasskill 7061 && (!hpbelow 203.0 && !mpbelow 88.0 && !pastround 20)
Round 8: Epicgamer executes a macro!
 > Parsed round number: 2
 > Building options...
 > Options built! (28 actions)
 > Stasis option chosen: skill 7061 (round 2, profit: 255)
 > Mountain Stream soda (30.0 @ +109.84289527554463): 58μ * 62.95% = 36.51
 > snowboarder pants (10.0 @ +109.84289527554463): 110μ * 20.98% = 23.08
 > WHAM: Attack option chosen: skill 2023 (round 2, profit: 0)
 > Top of the stasis loop.
 > Queued: skill 7061
 > Building options...
 > Options built! (28 actions)
 > Constructed macro: scrollwhendone; sub batround;  if pastround 28; 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; sub finito; skill 7061; call batround; endsub; call finito; repeat hasskill 7061 && (!hpbelow 203.0 && !mpbelow 88.0 && !pastround 20)
Round 9: Epicgamer executes a macro!
 > Parsed round number: 2
 > Building options...
 > Options built! (28 actions)
 > Stasis option chosen: skill 7061 (round 2, profit: 255)
 > Mountain Stream soda (30.0 @ +109.84289527554463): 58μ * 62.95% = 36.51
 > snowboarder pants (10.0 @ +109.84289527554463): 110μ * 20.98% = 23.08
 > WHAM: Attack option chosen: skill 2023 (round 2, profit: 0)
 > Top of the stasis loop.
 > Queued: skill 7061
 > Building options...
 > Options built! (28 actions)
 > Constructed macro: scrollwhendone; sub batround;  if pastround 28; 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; sub finito; skill 7061; call batround; endsub; call finito; repeat hasskill 7061 && (!hpbelow 203.0 && !mpbelow 88.0 && !pastround 20)

It continued looping until I hammered escape to halt the script.
 

Winterbay

Active member
Could you confirm that it was working before this version? (because I did a change in that function and even though I have no idea why it would lead to this result, that would be a very probable cause then...)

Edit: Actually the problem is that the skill is not marked as "once" in BatFactors and so it will be retried over and over again. Well, it should be marked with "num of haiku katana swords" I guess...

Edit, edit: Try this one?
 
Last edited:

Winterbay

Active member
Well, I am going to assume that since I've heard nothing it is working as intended. Version 4.6 uploaded which implements this and another small bug with Burrowgrub (well rather the usage of non-damaging items as killer-action). Also removed some of the copied SS-code so it should break less if SS changes now :)
 

Rinn

Developer
Oh I was busy all weekend, looks like it fixed the spring raindrop issue but it still got in a loop for when it tried to use Falling Leaf Whirlwind. :)

I'll try the one you just released, but I'm pretty far into this run I may not be able to reproduce the combat situation.
 
Last edited:

Winterbay

Active member
Oh I was busy all weekend, looks like it fixed the spring raindrop issue but it still got in a loop for when it tried to use Falling Leaf Whirlwind. :)

I'll try the one you just released, but I'm pretty far into this run I may not be able to reproduce the combat situation.

No, you're probably right. 4.6.1 should handle all the Haiku Katana skills in the same way.
 
Woah...WHAM just wasted me a fax stassising a lobsterfrogman. :( I've since changed my CCS to entangle and LTS those for now, but is there anything else you would need about it?

I was using a Rogue Program to get the spleen drops (in a SC HCO run) and had +64ML going at the time (frigid ass club, ur-kel's, MCD, and a few other items).


Code:
[807] photocopied monster
Encounter: lobsterfrogman
Round 0: chef_rannos wins initiative!
Checking for updates (running ZLib ver. r37)...
Running ZLib version: r37 (current)
You have the latest batfactors.txt. Will not check again today.
Checking for updates (running BatBrain ver. 1.31.1)...
Running BatBrain version: 1.31.1 (current)
Checking for updates (running SmartStasis ver. 3.18)...
Running SmartStasis version: 3.18 (current)
Checking for updates (running WHAM ver. 4.6.1)...
Running WHAM version: 4.6.1 (current)
You have the latest pluralMonsters.txt. Will not check again today.
WHAM: Running SmartStasis
Round 1: chef_rannos executes a macro!
Round 1: chef_rannos uses the mossy stone sphere!
You gain 4 hit points
Round 2: MP-Gamer tosses his identity disc at him for 19 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 2: lobsterfrogman takes 19 damage.
You gain 19 Muscularity Points
Round 2: chef_rannos uses the mossy stone sphere!
You gain 5 hit points
You lose 68 hit points
Round 3: chef_rannos executes a macro!
Round 3: chef_rannos uses the mossy stone sphere!
You gain 5 hit points
You lose 68 hit points
Round 4: chef_rannos executes a macro!
Round 4: chef_rannos uses the mossy stone sphere!
You gain 5 hit points
You lose 69 hit points
Round 5: chef_rannos executes a macro!
Round 5: chef_rannos uses the mossy stone sphere!
You gain 5 hit points
You lose 68 hit points
Round 6: chef_rannos executes a macro!
Round 6: chef_rannos uses the mossy stone sphere!
You gain 5 hit points
You lose 68 hit points
Round 7: chef_rannos executes a macro!
Round 7: chef_rannos uses the mossy stone sphere!
You gain 4 hit points
You lose 68 hit points
WHAM: Starting evaluation and performing of attack
Round 8: chef_rannos executes a macro!
Round 8: chef_rannos casts THRUST-SMACK!
Round 9: lobsterfrogman takes 184 damage.
Round 9: MP-Gamer tosses his identity disc at him for 23 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 9: lobsterfrogman takes 23 damage.
You gain 23 Muscularity Points
You lose 69 hit points
 

Winterbay

Active member
Would've been interesting to see that with a higher verbosity but I am going to guess that since you had a MP-regening/attacking familiar it thought that it was a great idea to stasis. Is there a safe moxie for LFMs (or do they always hit just like the gremlins)?
 

Palinathas

New member
Mentioned this in SS thread (since I was half-asleep and saw Winterbay talking about SS in WHAM so I thought it was this thread) anyway the issue I am noticing is multiple jiggle attempts. Turned verbosity up to 7 to see if I could catch a skill or item ID for jiggling, so I could add it to dontuse. I went ahead and grabbed a copy of a combat in case that is useful in fixing. In looking at it, it looks more like WHAM is restarting after the first bunch of actions, and loses track that it had already run a jiggle. May not be an SS/WHAM problem.

Code:
[1132] Battlefield (Hippy Uniform)
Encounter: Sorority Nurse
Strategy: K:\Documents\ccs\custom.ccs [default]
Round 0: zemie wins initiative!
1 HP costs 0.737μ. ( 133 / 210 )
1 MP costs 3.538μ. ( 279 / 397 )
ATT: 170 (94% × (16.72), death in 17)
DEF: 157 (8.59% × 2.18 (10) (15), win in 52)
HP: 205, Value: 881.23 μ, RES: 0 (-1) (1) (-1)
WHAM: You have no profitable MP restoratives.
WHAM: You have no profitable HP restoratives.
WHAM: Monster HP is 205.0.
WHAM: Running SmartStasis
Profit per round: ActionProfitDamageOtherbase (0μ)0μ--
WHAM: SmartStasis complete.
WHAM: SS did not finish the fight, continuing with script execution. 
WHAM: Starting evaluation and performing of attack
happened(chefstaff): false, happened(jiggle): true
happened(chefstaff): false, happened(jiggle): true
happened(chefstaff): false, happened(jiggle): true
WHAM: Enqueuing a stun to help with the battle
WHAM: Enqueueing jiggle your chefstaff (macroid jiggle).
WHAM: Enqueueing Ravioli Shurikens (macroid skill 3003).
WHAM: Enqueueing Ravioli Shurikens (macroid skill 3003).
WHAM: Enqueueing Ravioli Shurikens (macroid skill 3003).
WHAM: We are going to 5-shot with Entangling Noodles, jiggle your chefstaff, Ravioli Shurikens, Ravioli Shurikens and Ravioli Shurikens.
Round 1: zemie executes a macro!
Round 1: zemie casts ENTANGLING NOODLES!
Round 2: zemie jiggles the Staff of the Well-Tempered Cauldron
Round 3: sorority nurse takes 32 damage.
Round 3: zemie casts RAVIOLI SHURIKENS!
Round 4: sorority nurse takes 57 damage.
You lose 12 hit points
Round 4: zemie casts RAVIOLI SHURIKENS!
Round 5: sorority nurse takes 49 damage.
You lose 16 hit points
Round 5: zemie casts RAVIOLI SHURIKENS!
Round 6: sorority nurse takes 52 damage.
You lose 16 hit points
WHAM: Current monster HP is calculated to 15.0
WHAM: SS did not finish the fight, continuing with script execution. 
WHAM: Starting evaluation and performing of attack
WHAM: Enqueueing jiggle your chefstaff (macroid jiggle).
Round 6: zemie executes a macro!
KoLmafia thinks it is round 7 but KoL thinks it is round 6
WHAM: Failed to enqueue jiggle your chefstaff. Aborting to let you figure this out.
You're on your own, partner.
Click here to continue in the relay browser.
 

Theraze

Active member
This has happened a few times this run:
Round 1: Theraze executes a macro!
Round 1: Theraze uses the seal tooth!
Round 2: protagonist takes 1 damage.
Round 2: Grog shouts "Yarrrr!" and battens your opponent's hatches for him. Violently. For 39 damage.
Round 2: protagonist takes 39 damage.
You lose 5 hit points
You acquire an effect: Temporary Amnesia (duration: 5 Adventures)
Round 2: Theraze executes a macro!
KoLmafia thinks it is round 3 but KoL thinks it is round 2
Round 3: Theraze executes a macro!
KoLmafia thinks it is round 4 but KoL thinks it is round 2
Round 4: Theraze executes a macro!
KoLmafia thinks it is round 5 but KoL thinks it is round 2
Round 5: Theraze executes a macro!
KoLmafia thinks it is round 6 but KoL thinks it is round 2
Round 6: Theraze executes a macro!
KoLmafia thinks it is round 7 but KoL thinks it is round 2
Round 7: Theraze executes a macro!
KoLmafia thinks it is round 8 but KoL thinks it is round 2
Round 8: Theraze executes a macro!
KoLmafia thinks it is round 9 but KoL thinks it is round 2
Basically, I get Temporary Amnesia and WHAM doesn't know it, so it keeps trying to use skills over and over again. Probably needs to clear the skill/action list and start over if it gets Temporary Amnesia?
 

Bale

Minion
It clears the skill/action list right before every time it says "executes a macro." The problem is that all your skills are still in the list when you have Temporary Amnesia and KoL is quite willing to allow you to chose them, they just don't work when you try to use them.
 

Winterbay

Active member
It will ignore skills if you have amnesia, but if it builds a macro and then submits it it does not do anything about it. If you are fighting a protagonist BatBrain is supposed to abort if you get amnesia:
Code:
      if (m == $monster[protagonist] && contains_text(o.id,"skill "))
         r.append("if haseffect 297; abort \"Amnesiacs can't do... whatever you were about to do next.\"; endif; ");
(from get_macro())

Since it didn't there seem to be a problem with that code... Also, what was it trying to do that started with a seal tooth?
 

Theraze

Active member
Stasising due to my NZPR. Almost always 10 rounds of stasis, but hey... I'll take the extra 120k meat per ascension. :)
 

Winterbay

Active member
Stasising due to my NZPR. Almost always 10 rounds of stasis, but hey... I'll take the extra 120k meat per ascension. :)

Hmm... So that would mean it happened during the stasis-operation. I think the version I'm working on now should solve that issue (and clean up some code on the way).
 
Top