Winterbay's Helpful Automatic Monsterbasher (WHAM)

Winterbay

Active member
Hmm... Looking at your copy/paste it appears to actually only do damage once, but it's not like twiddling your thumbs since your familiar still acts. So in that way it is a perfect stasis skill that does 0 damage for 1 horde. But I guess updating batbrain to have "once" fo rS&G may not be a bad idea actually since the thing it does it only does once.

Edit: I've updated batfactors so as soon as people gets that update it should stop doing that.
 
Last edited:

EdFox

Member
Using the latest version, my Medium has stopped siphoning again. Here's a 9 combat:

Code:
[170] Dark Neck of the Woods
Encounter: P imp
Strategy:      C:\Users\eszetela\Dropbox\KoLmafia\ccs\WHAM.ccs [default]
Round 0:      edfox loses initiative!
You lose 6 hit points
[COLOR=gray]Running      ZLib version: r37 (current)[/COLOR]
[COLOR=#880000]1 HP costs      6.667μ. ( 25 / 128 )[/COLOR]
[COLOR=#000088]1 MP costs 17μ.      ( 20 / 35 )[/COLOR]
[COLOR=gray]Running BatBrain version: 1.26      (current)[/COLOR]
[COLOR=gray]Running SmartStasis version: 3.15      (current)[/COLOR]
[COLOR=gray]Running WHAM version: 3.9.3      (current)[/COLOR]
[COLOR=purple]WHAM: We currently think that the      round number is: 0 and that the turn number is 169.[/COLOR]
[COLOR=purple]WHAM:      Checking to see if WHAM sould adjust the unknown_ml for P Imp.[/COLOR]
[COLOR=purple]WHAM:      No need to do anything with P Imp.[/COLOR]
[COLOR=purple]WHAM:      Setting up variables via BatBrain[/COLOR]
[COLOR=black]Imp Ale      (30.0 @ +0.0): 25μ * 30% = 7.5[/COLOR]
[COLOR=black]hot wing      (30.0 @ +0.0): 32μ * 30% = 9.6[/COLOR]
[COLOR=black]diamond-studded      cane (5.0 @ +0.0): 95μ * 5% = 4.75[/COLOR]
Value of stat gain:      44.49μ
[COLOR=black]Imp Ale (30.0 @ +0.0): 25μ * 30% = 7.5[/COLOR]
[COLOR=black]hot      wing (30.0 @ +0.0): 32μ * 30% = 9.6[/COLOR]
[COLOR=black]diamond-studded      cane (5.0 @ +0.0): 95μ * 5% = 4.75[/COLOR]
Value of stat gain:      44.49μ
ATT: [B]52[/B] (94% × 6.82, death in 4)
DEF: [B]47[/B]      (100% × 84.07[B] [COLOR=red](15)[/COLOR] [COLOR=gray](15)[/COLOR][/B],      win in 1)
HP: [B]53.6[/B], Value: [B][COLOR=green]96.34 μ[/COLOR][/B]
[COLOR=black]Parsed      round number: 1[/COLOR]
[COLOR=black]Building options...[/COLOR]
[COLOR=black]Options      built! (9 actions)[/COLOR]
[COLOR=purple]WHAM: We currently think      that the round number is: 1 and that the turn number is 169.[/COLOR]
[COLOR=purple]WHAM:      Current MP = 20 out of 35.[/COLOR]
[COLOR=purple]WHAM: You have      no profitable MP restoratives.[/COLOR]
[COLOR=purple]WHAM:      Current HP = 25 out of 128.[/COLOR]
[COLOR=purple]WHAM: Your most      profitable healing option is use 5678.[/COLOR]
[COLOR=purple]WHAM:      Your most profitable healing option is use 5678.[/COLOR]
[COLOR=purple]WHAM:      Your best HP restoring option available is: use 5678[/COLOR]
[COLOR=purple]WHAM:      You are fighting a P Imp. Mafia considers that this monster has an attack      of 52 or 52 when given a monster name.[/COLOR]
[COLOR=purple]WHAM:      Mafia further considers that this monster has a defense value of 47 or 47      when given a monster name.[/COLOR]
[COLOR=purple]WHAM: Mafia      further further considers that this monster has a HP value of 51 or 52      when given a monster name.[/COLOR]
[COLOR=purple]WHAM: Your      current ML-adjustment is: 10.[/COLOR]
[COLOR=purple]WHAM: Monster      HP is 53.6.[/COLOR]
[COLOR=black]WHAM: WHAM added the following      to BatRound: if pastround 29; 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; if happymediumglow red; skill siphon spirit; endif; [/COLOR]
[COLOR=purple]WHAM:      Running SmartStasis[/COLOR]
Profit per round:       [TABLE="width: 100%"]
[TR]
[TH]           Action[/TH]
[TH]           Profit[/TH]
[TH]           Damage[/TH]
[TH]           Other[/TH]
[/TR]
[TR]
[TD="align: left"]           base (0μ)[/TD]
[TD="align: right"]           [B]0μ[/B][/TD]
[TD="align: center"]           --[/TD]
[TD="align: center"][/TD]
[/TR]
[/TABLE]
     
    [COLOR=black]Building custom actions...[/COLOR]
[COLOR=red]WHAM:      This monster does not drop a goal item[/COLOR]
[COLOR=black]Custom      actions built! (0 actions)[/COLOR]
[COLOR=black]Stasis option      chosen: attack (round 1, profit: 0)[/COLOR]
[COLOR=black]Imp Ale      (30.0 @ +0.0): 25μ * 30% = 7.5[/COLOR]
[COLOR=black]hot wing      (30.0 @ +0.0): 32μ * 30% = 9.6[/COLOR]
[COLOR=black]diamond-studded      cane (5.0 @ +0.0): 95μ * 5% = 4.75[/COLOR]
Value of stat gain:      44.49μ
[COLOR=purple]WHAM: Attack option chosen: attack      (round 1, profit: 0)[/COLOR]
[COLOR=black]This monster is not      your huckleberry.[/COLOR]
[COLOR=black]Stasis loop complete.[/COLOR]
[COLOR=purple]WHAM:      SmartStasis complete.[/COLOR]
[COLOR=purple]WHAM: Running      SmartStasis took 0.11 seconds.[/COLOR]
[COLOR=purple]WHAM: We      currently think that the round number is: 1 and that the turn number is      169.[/COLOR]
[COLOR=purple]WHAM: SS did not finish the fight,      continuing with script execution. [/COLOR]
[COLOR=purple]WHAM:      Starting evaluation and performing of attack[/COLOR]
[COLOR=purple]WHAM:      We currently think that the round number is: 1 and that the turn number is      169.[/COLOR]
[COLOR=black]Imp Ale (30.0 @ +0.0): 25μ * 30% = 7.5[/COLOR]
[COLOR=black]hot      wing (30.0 @ +0.0): 32μ * 30% = 9.6[/COLOR]
[COLOR=black]diamond-studded      cane (5.0 @ +0.0): 95μ * 5% = 4.75[/COLOR]
Value of stat gain:      44.49μ
[COLOR=purple]WHAM: Attack option chosen: attack      (round 1, profit: 0)[/COLOR]
[COLOR=purple]WHAM: No need to stun      this monster[/COLOR]
[COLOR=black]Queued: attack[/COLOR]
[COLOR=black]Building      options...[/COLOR]
[COLOR=black]Options built! (9 actions)[/COLOR]
[COLOR=black]Parsed      round number: 1[/COLOR]
[COLOR=black]Building options...[/COLOR]
[COLOR=black]Options      built! (9 actions)[/COLOR]
[COLOR=purple]WHAM: Evaluating the      attack but not performing it took 0.11 seconds.[/COLOR]
[COLOR=red]WHAM:      We can't Saucesplash.[/COLOR]
[COLOR=red]true, true, true, true,      false[/COLOR]
[COLOR=purple]WHAM: Enqueueing attack with your      weapon (macroid attack).[/COLOR]
[COLOR=black]Queued: attack[/COLOR]
[COLOR=black]Building      options...[/COLOR]
[COLOR=black]Options built! (9 actions)[/COLOR]
[COLOR=purple]WHAM:      Successfully enqueued attack with your weapon.[/COLOR]
[COLOR=purple]WHAM:      We are going to 1-shot with attack with your weapon.[/COLOR]
[COLOR=black]Constructed      macro: scrollwhendone; sub batround; if pastround 29; 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; if happymediumglow red;      skill siphon spirit; endif; endsub; attack; call batround; [/COLOR]
Round      1: edfox executes a macro!
Round 1: edfox attacks!
Round 2: p imp      takes 115 damage.
Round 2: edfox wins the fight!
You gain 32 Meat
After      Battle: Moon Unit studies the lines on your shoulder. "I see that you are      a karmic hero, destined to live again and again to set right the wrongs of      this land. That's so cool!" She smiles kindly at you, eyes twinkling.
You      gain 10 Muscleboundness
You gain 4 Magicalness
You gain 5 Sarcasm
[COLOR=black]Happened:      attack[/COLOR]
[COLOR=black]Parsed round number: 0[/COLOR]
[COLOR=black]Happened:      crit[/COLOR]
[COLOR=purple]WHAM: Evaluating the attack and      performing it took 0.72 seconds.[/COLOR]
[COLOR=purple]WHAM: We      currently think that the round number is: 31 and that the turn number is      170.[/COLOR]
[COLOR=purple]WHAM: We currently think that the      round number is: 31 and that the turn number is 170.[/COLOR]
 

Winterbay

Active member
Well, it will not stasis for glows, I guess it could be added to the reason for stasising but it isn't at the moment meaning that if you kill the monster in one round it'll never get much chance to use the skill.
 

BleedingFingers

New member
Hi,

I'm hoping someone cleverer than me can help with this... I've been using WHAM along with BumCheekAscend for the past 5 or so ascensions with no problem. This morning, while adventuring in the Hole in the Sky, I got an error from WHAM: Failed to enqueue frigid ninja stars. There's more detailed information in the gCLI.

Why is WHAM trying to use Frigid Ninja Stars and how do I correct this?

Code:
I set verbosity to 9 and here is the output:

Validating adventure sequence...

Running ZLib version: r37 (current)
Running Best Between Battle Script Ever version: 2.6 (current)
You don't have any spooky putty monsters.

Visit to Beanstalk: Hole in the Sky in progress...

[959] Hole in the Sky
Encounter: The Family Jewels
Strategy: H:\KoL\ccs\pc.ccs [default]
Round 0: papercut wins initiative!
Running ZLib version: r37 (current)
1 HP costs 2.4μ. ( 123 / 123 )
1 MP costs 8μ. ( 94 / 139 )
Running BatBrain version: 1.26 (current)
Running SmartStasis version: 3.15 (current)
Running WHAM version: 3.9.3 (current)
WHAM: We currently think that the round number is: 0 and that the turn number is 958.
WHAM: Checking to see if WHAM sould adjust the unknown_ml for Family Jewels.
WHAM: No need to do anything with Family Jewels.
WHAM: Setting up variables via BatBrain
star (30.0 @ +114.24349662087931): 50μ * 64.27% = 32.14
star (30.0 @ +114.24349662087931): 50μ * 64.27% = 32.14
star (30.0 @ +114.24349662087931): 50μ * 64.27% = 32.14
Value of stat gain: 487.5μ
star (30.0 @ +114.24349662087931): 50μ * 64.27% = 32.14
star (30.0 @ +114.24349662087931): 50μ * 64.27% = 32.14
star (30.0 @ +114.24349662087931): 50μ * 64.27% = 32.14
Value of stat gain: 487.5μ
ATT: 156 (6% × 13.26, death in 155)
DEF: 141 (97.73% × 5.6, win in 29)
HP: 155, Value: 583.91 μ
Parsed round number: 1
Building options...
Options built! (28 actions)
WHAM: We currently think that the round number is: 1 and that the turn number is 958.
WHAM: Current MP = 94 out of 139.
WHAM: You have no profitable MP restoratives.
WHAM: Current HP = 123 out of 123.
WHAM: You have no profitable HP restoratives.
WHAM: You are fighting a Family Jewels. Mafia considers that this monster has an attack of 156 or 156 when given a monster name.
WHAM: Mafia further considers that this monster has a defense value of 141 or 141 when given a monster name.
WHAM: Mafia further further considers that this monster has a HP value of 150 or 150 when given a monster name.
WHAM: Your current ML-adjustment is: 0.
WHAM: Monster HP is 155.0.
WHAM: WHAM added the following to BatRound: 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
Profit per round: ActionProfitDamageOtherbase (0μ)0μ--
Building custom actions...
Queued: pickpocket
Building options...
Options built! (28 actions)
WHAM: This monster does not drop a goal item
Custom actions built! (0 actions)
Constructed macro: scrollwhendone; sub batround; 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; pickpocket; call batround; 
Round 1: papercut executes a macro!
Round 1: papercut tries to steal an item!
You acquire an item: star
Happened: pickpocket
Parsed round number: 2
You snatched a star (50μ)!
star (30.0 @ +114.24349662087931): 50μ * 64.27% = 32.14
star (30.0 @ +114.24349662087931): 50μ * 64.27% = 32.14
Value of stat gain: 487.5μ
Revised monster value: 551.77
Happened: stolen
Building options...
Options built! (28 actions)
Stasis option chosen: skill 5021 (round 2, profit: 0.01)
star (30.0 @ +114.24349662087931): 50μ * 64.27% = 32.14
star (30.0 @ +114.24349662087931): 50μ * 64.27% = 32.14
Value of stat gain: 487.5μ
WHAM: Attack option chosen: use 353 (round 2, profit: -67)
This monster is not your huckleberry.
Stasis loop complete.
WHAM: SmartStasis complete.
WHAM: Running SmartStasis took 1.65 seconds.
WHAM: We currently think that the round number is: 2 and that the turn number is 958.
WHAM: SS did not finish the fight, continuing with script execution. 
WHAM: Starting evaluation and performing of attack
WHAM: We currently think that the round number is: 2 and that the turn number is 958.
star (30.0 @ +114.24349662087931): 50μ * 64.27% = 32.14
star (30.0 @ +114.24349662087931): 50μ * 64.27% = 32.14
Value of stat gain: 487.5μ
WHAM: Attack option chosen: use 353 (round 2, profit: -67)
WHAM: No profitable stun option
Queued: use 353
Building options...
Options built! (27 actions)
star (30.0 @ +114.24349662087931): 50μ * 64.27% = 32.14
star (30.0 @ +114.24349662087931): 50μ * 64.27% = 32.14
Value of stat gain: 487.5μ
WHAM: Item option chosen: use 353 (round 3, profit: -67)
Queued: use 353
Building options...
Options built! (27 actions)
star (30.0 @ +114.24349662087931): 50μ * 64.27% = 32.14
star (30.0 @ +114.24349662087931): 50μ * 64.27% = 32.14
Value of stat gain: 487.5μ
WHAM: Attack option chosen: attack (round 4, profit: 0)
Queued: attack
Building options...
Options built! (27 actions)
star (30.0 @ +114.24349662087931): 50μ * 64.27% = 32.14
star (30.0 @ +114.24349662087931): 50μ * 64.27% = 32.14
Value of stat gain: 487.5μ
WHAM: Attack option chosen: attack (round 5, profit: 0)
Queued: attack
Building options...
Options built! (27 actions)
star (30.0 @ +114.24349662087931): 50μ * 64.27% = 32.14
star (30.0 @ +114.24349662087931): 50μ * 64.27% = 32.14
Value of stat gain: 487.5μ
WHAM: Attack option chosen: attack (round 6, profit: 0)
Queued: attack
Building options...
Options built! (27 actions)
star (30.0 @ +114.24349662087931): 50μ * 64.27% = 32.14
star (30.0 @ +114.24349662087931): 50μ * 64.27% = 32.14
Value of stat gain: 487.5μ
WHAM: Attack option chosen: attack (round 7, profit: 0)
Queued: attack
Building options...
Options built! (27 actions)
star (30.0 @ +114.24349662087931): 50μ * 64.27% = 32.14
star (30.0 @ +114.24349662087931): 50μ * 64.27% = 32.14
Value of stat gain: 487.5μ
WHAM: Attack option chosen: attack (round 8, profit: 0)
Queued: attack
Building options...
Options built! (27 actions)
star (30.0 @ +114.24349662087931): 50μ * 64.27% = 32.14
star (30.0 @ +114.24349662087931): 50μ * 64.27% = 32.14
Value of stat gain: 487.5μ
WHAM: Attack option chosen: attack (round 9, profit: -2.29)
Queued: attack
Building options...
Options built! (27 actions)
star (30.0 @ +114.24349662087931): 50μ * 64.27% = 32.14
star (30.0 @ +114.24349662087931): 50μ * 64.27% = 32.14
Value of stat gain: 487.5μ
WHAM: Attack option chosen: attack (round 10, profit: -2.29)
Queued: attack
Building options...
Options built! (27 actions)
star (30.0 @ +114.24349662087931): 50μ * 64.27% = 32.14
star (30.0 @ +114.24349662087931): 50μ * 64.27% = 32.14
Value of stat gain: 487.5μ
WHAM: Attack option chosen: attack (round 11, profit: -2.29)
Queued: attack
Building options...
Options built! (27 actions)
star (30.0 @ +114.24349662087931): 50μ * 64.27% = 32.14
star (30.0 @ +114.24349662087931): 50μ * 64.27% = 32.14
Value of stat gain: 487.5μ
WHAM: Attack option chosen: attack (round 12, profit: -2.29)
Happened: pickpocket
Parsed round number: 2
You snatched a star (50μ)!
star (30.0 @ +114.24349662087931): 50μ * 64.27% = 32.14
Value of stat gain: 487.5μ
Revised monster value: 519.64
Happened: stolen
Building options...
Options built! (28 actions)
WHAM: Reached WHAM_round_limit while looking for a way to kill the monster. Executing the current strategy and continuing from there.
WHAM: We can't Saucesplash.
true, true, false, true, false
WHAM: Enqueueing frigid ninja stars (macroid use 353).
Queued: use 353
Building options...
Options built! (27 actions)
WHAM: Successfully enqueued frigid ninja stars.
WHAM: We can't Saucesplash.
true, true, false, true, false
WHAM: Enqueueing frigid ninja stars (macroid use 353).
Unable to enqueue empty action.
WHAM: Failed to enqueue frigid ninja stars (entry 2 in the strategy).
WHAM: The following combat strategy was attempted: 
frigid ninja stars
frigid ninja stars
attack with your weapon
attack with your weapon
attack with your weapon
attack with your weapon
attack with your weapon
attack with your weapon
attack with your weapon
attack with your weapon
Round 2: papercut executes a macro!
KoLmafia thinks it is round 3 but KoL thinks it is round 2
WHAM: Failed to enqueue frigid ninja stars. There's more detailed information in the gCLI.
You're on your own, partner.
 
Last edited by a moderator:

Winterbay

Active member
How many ninja stars do you have? 1 or 2 or more? Please check your relay browser inventory in case Mafia has got out of sync with reality.
 

Winterbay

Active member
BatBrain in the first post has been updated to version 1.27 while keeping the Bear Arms modifications that are not in the official version, and also some spooky level 9 monsters.
 

Terragon

New member
I've been beaten up a couple of times recently when WHAM was stuck in a loop doing plague claws over and over - interrupting and calling run_combat() breaks the cycle again. This was mostly with gremlins at the junkyard - I ended up doing them manually, since I wasn't certain that it would have cut in and used the magnet appropriately.
 

Catch-22

Active member
I'm guessing BatBrain doesn't fully support the stress ball, because I went through about 2000 rounds of WHAM attempting to use it.

Something I thought of is; couldn't WHAM parse the results of the combat request and manually add a particular skill to the "don't use" map for the remainder of the combat if KoL tells us that it's not available?

You don't have or can't use skill #7113, macro aborted.

That's what the message looks like.
 

Winterbay

Active member
Yeah, the problem here is twofold: It's not marked as once only in batfactors (since it can only be used once per combat) and it's only usable 5 times per day. Is that usage tracked by Mafia in any way?

The first problem can be easily solved by changing batfactors and the second is best solved by Mafia tracking its usage, but something like that is probably a good thing anyway.

Edit: _stressBallSqueezes seems to be the correct property. I'll add that in later today probably.
 

Terragon

New member
Something I thought of is; couldn't WHAM parse the results of the combat request and manually add a particular skill to the "don't use" map for the remainder of the combat if KoL tells us that it's not available?

You don't have or can't use skill #7113, macro aborted.

The problem with "can't use" is that it may become available - I can't think of a skill off the top of my head, but I know some familiars charge up and the skill then becomes usable. So banning it for the remainder of combat may be unhelpful. It could just do the next action in the list though, and recalc skill order the following round again
 

slyz

Developer
I think BatBrain already parses fight.php for available skills each time it is loaded, so what Catch-22 is suggesting probably already exists, in a way.

That declaration is based on a vague memory of a very old version of BatBrain.
 

Catch-22

Active member
I think BatBrain already parses fight.php for available skills each time it is loaded, so what Catch-22 is suggesting probably already exists, in a way.

Unfortunately still lacking time to play, but I am guessing a failed macro attempt doesn't refresh the whole page, so the skills list being parsed would be out of date.
 

Donavin69

Member
A few times today, with the latest version, WHAM has failed to kill a monster due to not biting it prior to plague clawing it:

PHP:
954] Giant's Castle
Encounter: Procrastination Giant
Strategy: C:\kolmafia\ccs\BCA.ccs [default]
Round 0: smeagol69 wins initiative!
WHAM: Running SmartStasis
WHAM: Starting evaluation and performing of attack
Round 1: smeagol69 executes a macro!
Round 1: smeagol69 casts KODIAK MOMENT!
Round 2: procrastination giant takes 124 damage.
You lose 51 hit points
WHAM: Starting evaluation and performing of attack
Round 2: smeagol69 executes a macro!
Round 2: smeagol69 casts PLAGUE CLAWS!
.
.
.
Round 26: smeagol69 casts PLAGUE CLAWS!
Round 27: procrastination giant drops 6 attack power.
Round 27: procrastination giant drops 9 defense.
You lose 12 hit points
WHAM: Starting evaluation and performing of attack
WHAM: Unable to delevel until you can kill the monster without it killing you. Try it yourself.
WHAM: Unable to determine a valid combat strategy. For your benefit here are the numbers for you combat skills.
WHAM: Infectious Bite: 11.00 potential damage (raw damage: 11.00) and a hitchance of 100.00%.
WHAM: Plague Claws: 11.00 potential damage (raw damage: 11.00) and a hitchance of 100.00%.
WHAM: Smash & Graaagh: 10.00 potential damage (raw damage: 10.00) and a hitchance of 100.00%.
WHAM: I Can Bearly Hear You Over the Applause: 0.00 potential damage (raw damage: 0.00) and a hitchance of 100.00%.
WHAM: Devour Minions: 0.00 potential damage (raw damage: 0.00) and a hitchance of 100.00%.
WHAM: You now have the knowledge needed to go forward and be victorious
Round 27: smeagol69 executes a macro!
KoLmafia thinks it is round 28 but KoL thinks it is round 27
WHAM: Unable to figure out a combat strategy. Helpful information regarding your skills have been printed to the CLI
You're on your own, partner.
 

Winterbay

Active member
Yeah, the problem is that it does not yet understand that those two have any kind of synergy. I guess if it decides to throw plague claws it may do worse than to throw in a bite first if the monster won't kill you in one to two rounds.
 

Donavin69

Member
The other issue I'm seeing frequently is something that I can get around by having another attack method after WHAM
PHP:
WHAM: Running SmartStasis
Expression syntax errors for 'modifier_eval()':
Expected end, found !! zombify (zlib.ash, line 162)
 
I'm not sure if this is a wham issue or not, but I'm getting an infinite loop when I run out of MP and it tries to cast candyblast.

Here's verbosity 9:
PHP:
Top of the stasis loop.
Unable to enqueue 'skill 3022': insufficient MP.
Stasis option chosen: skill 3022 (round 5, profit: 46)
filet of tangy gnat ("fotelif") (40.0 @ +70.0): 933μ * 68% = 634.44
gnatwing (40.0 @ +70.0): 118μ * 68% = 80.24
Value of stat gain: 481.25μ
filet of tangy gnat ("fotelif") (40.0 @ +70.0): 933μ * 68% = 634.44
gnatwing (40.0 @ +70.0): 118μ * 68% = 80.24
Value of stat gain: 481.25μ
WHAM: Attack option chosen: attack (round 5, profit: 0)
Top of the stasis loop.
Unable to enqueue 'skill 3022': insufficient MP.
Stasis option chosen: skill 3022 (round 5, profit: 46)
filet of tangy gnat ("fotelif") (40.0 @ +70.0): 933μ * 68% = 634.44
gnatwing (40.0 @ +70.0): 118μ * 68% = 80.24
Value of stat gain: 481.25μ
filet of tangy gnat ("fotelif") (40.0 @ +70.0): 933μ * 68% = 634.44
gnatwing (40.0 @ +70.0): 118μ * 68% = 80.24
Value of stat gain: 481.25μ
WHAM: Attack option chosen: attack (round 5, profit: 0)
Top of the stasis loop.
Unable to enqueue 'skill 3022': insufficient MP.
Stasis option chosen: skill 3022 (round 5, profit: 46)
filet of tangy gnat ("fotelif") (40.0 @ +70.0): 933μ * 68% = 634.44
gnatwing (40.0 @ +70.0): 118μ * 68% = 80.24
Value of stat gain: 481.25μ
filet of tangy gnat ("fotelif") (40.0 @ +70.0): 933μ * 68% = 634.44
gnatwing (40.0 @ +70.0): 118μ * 68% = 80.24
Value of stat gain: 481.25μ
WHAM: Attack option chosen: attack (round 5, profit: 0)
Top of the stasis loop.
Unable to enqueue 'skill 3022': insufficient MP.
Stasis option chosen: skill 3022 (round 5, profit: 46)
KoLmafia declares world peace.
You're on your own, partner.
Click here to continue in the relay browser.
 

Winterbay

Active member
The other issue I'm seeing frequently is something that I can get around by having another attack method after WHAM
PHP:
WHAM: Running SmartStasis
Expression syntax errors for 'modifier_eval()':
Expected end, found !! zombify (zlib.ash, line 162)

Try doing a search and replace in BatBrain for "!! zombify" and replace it with ", zombify" and see if that helps with that?

I'm not sure if this is a wham issue or not, but I'm getting an infinite loop when I run out of MP and it tries to cast candyblast.

Here's verbosity 9:
PHP:
Top of the stasis loop.
Unable to enqueue 'skill 3022': insufficient MP.
Stasis option chosen: skill 3022 (round 5, profit: 46)
filet of tangy gnat ("fotelif") (40.0 @ +70.0): 933μ * 68% = 634.44
gnatwing (40.0 @ +70.0): 118μ * 68% = 80.24
Value of stat gain: 481.25μ
filet of tangy gnat ("fotelif") (40.0 @ +70.0): 933μ * 68% = 634.44
gnatwing (40.0 @ +70.0): 118μ * 68% = 80.24
Value of stat gain: 481.25μ
WHAM: Attack option chosen: attack (round 5, profit: 0)
Top of the stasis loop.
Unable to enqueue 'skill 3022': insufficient MP.
Stasis option chosen: skill 3022 (round 5, profit: 46)
filet of tangy gnat ("fotelif") (40.0 @ +70.0): 933μ * 68% = 634.44
gnatwing (40.0 @ +70.0): 118μ * 68% = 80.24
Value of stat gain: 481.25μ
filet of tangy gnat ("fotelif") (40.0 @ +70.0): 933μ * 68% = 634.44
gnatwing (40.0 @ +70.0): 118μ * 68% = 80.24
Value of stat gain: 481.25μ
WHAM: Attack option chosen: attack (round 5, profit: 0)
Top of the stasis loop.
Unable to enqueue 'skill 3022': insufficient MP.
Stasis option chosen: skill 3022 (round 5, profit: 46)
filet of tangy gnat ("fotelif") (40.0 @ +70.0): 933μ * 68% = 634.44
gnatwing (40.0 @ +70.0): 118μ * 68% = 80.24
Value of stat gain: 481.25μ
filet of tangy gnat ("fotelif") (40.0 @ +70.0): 933μ * 68% = 634.44
gnatwing (40.0 @ +70.0): 118μ * 68% = 80.24
Value of stat gain: 481.25μ
WHAM: Attack option chosen: attack (round 5, profit: 0)
Top of the stasis loop.
Unable to enqueue 'skill 3022': insufficient MP.
Stasis option chosen: skill 3022 (round 5, profit: 46)
KoLmafia declares world peace.
You're on your own, partner.
Click here to continue in the relay browser.

I've added a check for skipping stasis options if you cannot cast it. I'll upload a version in a few hours so you can test that.
 

Theraze

Active member
Irregularly, I find WHAM running 29 rounds of stasis since it 'knows' I can kill the monster in one hit. Problem is, if I fumble, I end up with nothing... I'd rather not have 10 wasted rounds of stasis regenerating the mp I used for those 10 rounds, so I always add an extra 10 round buffer into my copy of SmartStasis. Since it's all in WHAM now though, it's a bit more complicated... and yet, more simple. Since if I can convince you to add a preference for it to WHAM, I don't need to keep mucking about with it every time it updates. Or not, if other people don't end up having stupid plagues of locust stasis for 29 rounds because of their NPZRs, Cocoabos, or the like.

Anyways, I currently modify:
Code:
advevent stasis_option() {  // returns most profitable lowest-damage option
	boolean ignoredelevel = (smacks.id != "" && kill_rounds(smacks.dmg) == 1);
	sort myoptions by -(to_profit(value)*min(kill_rounds(value),max(0,maxround - round - 15)));
last line, changed -5 to -15.
Code:
string stasis_repeat_WHAM(int turns) {       // the string of repeat conditions for stasising
   int expskill() { int res; foreach s in $skills[] if (s.combat && have_skill(s)) res = max(res,mp_cost(s)); return res; }
   return "!hpbelow "+my_stat("hp")+                                                        // hp
      (my_stat("hp") < my_maxhp() ? " && hpbelow "+my_maxhp() : "")+
      " && !mpbelow "+my_stat("mp")+                                                        // mp
      (my_stat("mp") < min(expskill(),my_maxmp()) ? " && mpbelow "+min(expskill(),my_maxmp()) : "")+
      " && !pastround "+(turns == 0 ? floor(maxround - 13 - kill_rounds(smack)) : (turns + round - 10)) +     // time to kill
Last line, changed -3 to -13 and added a -10 to the "continuing combat" section.
Code:
string stasis_WHAM() {
	int turns;
	if ($monsters[naughty sorority nurse, naughty sorceress, naughty sorceress (2), pufferfish, bonerdagon] contains m)
		return page;    // never stasis these monsters
	if (m == $monster[quantum mechanic] && m_hit_chance() > 0.1)
		return page;  // avoid teleportitis
	stasis_option();
	attack_option();
	while ((to_profit(plink) > to_float(vars["BatMan_profitforstasis"]) || is_our_huckleberry()) &&
	  (round < maxround - 13 - kill_rounds(smacks) && die_rounds() > kill_rounds(smacks))) {
Last line, changed -3 to -13.

If a configurable variable were set, those 3 lines (and 4 places) would be where I think it would need to go to enable slightly shorter stasis.
 
Top