Winterbay's Helpful Automatic Monsterbasher (WHAM)

I've only experienced it on one-hit kills on suicidal mouse (BatBrain ASCII2 and ASCII3). Maybe one of the new BatBrain checks for death rounds is backwards or something similar, but it appears to be a BB bug, not a WHAM bug... unless undocumented functions were reversed. :)
 
The problem is that for some reason endscombat gets set and so BatBrain sets round to maxround + 1 leading to WHAM skipping all actions as being too risky.

Ok, so BatBrian sets endscombat if either the endscombat-flag in batfactors is true or fvars["dmg"] > monster_stat("hp"). fvars{"dmg"] is set to dmg_dealt(res.dmg) when an advevent is created. I do believe that when WHAM runs through the options it enqueues things and then resets the queue, however reset_queue does not reset the endscombat flag and so the previous memory of the queued up skills prevents the actual performance of the queue. Possibly...

ETA: Nope, that doe snot appear to be it because it seems to be fine in most cases. In the case I ran into the issue with the scritp enqueued two attacks and then failed to do anything else because endscombat had been set for the alst attack. The question is why endscombat had been set when the script thought it wasn't finished yet...
 
Last edited:
I think I have a way to get around this issue, I'm still not sure if it's a BatBrain error or an error in how WHAM was implementing BatBrain that ended up being wrong in the new BatBrain with endscombat, but it appears that WHAM and BatBrain not always agreed on when a skill actually ended combat leading to this kind of issue. The way my local copy currently does this is to exit the predictive loop if endscombat is set to true after an enqueue and rerun the prediction after execution. This seems to work but does sometime lead to an extra macro being submitted (and thus increased server hits) but I guess that's the way it is...

ETA: Now, if I could only figure out why all spells are valued to do 0 damage (or rather negative 3-400 damage)...

Edit again: Found it... And it's not my fault... In build_skillz fvars["spelldmg"] is set before the foreach and then, if you do have intrinsic spiciness, for each skill that isn't a sauceror spell, it will lower fvars["spelldmg"] by 10 but never restore it to its original value leading to that fvar to become lower and lower until it ends up on the negative side and making all spells completely pointless to use...

Edit the third: Verison 5.2 has been uploaded which should fix the aborts. The negative spell damage has been reported as a batbrain bug with a fix for everyone who feels like editing heir BatBrian posted in said BatBrain thread.
 
Last edited:
Got an error with the newest version.

Code:
[415] Greater-Than Sign
Encounter: lowercase B
Strategy: C:\7lMafia\ccs\xenthes.ccs [default]
Round 0: Xenthes loses initiative!
Invalid field name 'endscombat' (WHAM.ash, line 799)
Consult script 'WHAM.ash' not found.
You're on your own, partner.
Click here to continue in the relay browser.

currently level 8 doing a HC AoJ run.
 
With the new Big! challenge path WHAM consistently underestimates the length of a combat. WHAM almost always thinks that it can one-shot when it really requires two. As a result WHAM doesn't enqueue a stun and I'm taking more damage than I should. Here's a representative combat with verbosity set to 9:

Code:
[305] Haunted Library
Encounter: bookbat
Round 0: Arbos wins initiative!
Running ZLib version: r37 (current)
1 HP costs 0.921μ. ( 482 / 482 )
1 MP costs 17μ. ( 253 / 304 )
Running BatBrain version: 1.35 (current)
Running SmartStasis version: 3.19 (current)
Running WHAM version: 5.2 (current)
WHAM: We currently think that the round number is: 0 and that the turn number is 304.
WHAM: Checking to see if WHAM sould adjust the unknown_ml for Bookbat.
WHAM: No need to do anything with Bookbat.
WHAM: Setting up variables via BatBrain
tattered scrap of paper (30.0 @ +127.59674775249769): 1,683μ * 68.28% = 1,149.14
Value of stat gain: 627.19μ
tattered scrap of paper (30.0 @ +127.59674775249769): 1,683μ * 68.28% = 1,149.14
Value of stat gain: 627.19μ
ATT: 209 (94% × 14.04, death in 37)
DEF: 202 (100% × 128.37 (3) (8) (3) (48) (3), win in 2)
HP: 215, Value: 1,776.32 μ, RES: 0
Parsed round number: 1
Building options...
Options built! (50 actions)
WHAM: We currently think that the round number is: 1 and that the turn number is 304.
WHAM: Current MP = 253 out of 304.
WHAM: You have no profitable MP restoratives.
WHAM: Current HP = 482 out of 482.
WHAM: You have no profitable HP restoratives.
WHAM: You are fighting a Bookbat. Mafia considers that this monster has an attack of 209 or 211 when given a monster name.
WHAM: Mafia further considers that this monster has a defense value of 202 or 204 when given a monster name.
WHAM: Mafia further further considers that this monster has a HP value of 215 or 215 when given a monster name.
WHAM: Your current ML-adjustment is: 10.
WHAM: Monster HP is 215.0.
WHAM: WHAM added the following to BatRound: if pastround 27; 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; 
tattered scrap of paper (30.0 @ +127.59674775249769): 1,683μ * 68.28% = 1,149.14
Value of stat gain: 627.19μ
WHAM: Attack option chosen: attack (round 1, profit: -12.16)
WHAM: Running SmartStasis
Profit per round: ActionProfitDamageOtherbase (0μ)0μ--
Building custom WHAM actions...
Custom WHAM actions built! (0 actions)
Building custom actions...
Custom actions built! (0 actions)
WHAM: Stasis option chosen: skill 5021 (round 1, profit: -28.67)
tattered scrap of paper (30.0 @ +127.59674775249769): 1,683μ * 68.28% = 1,149.14
Value of stat gain: 627.19μ
WHAM: Attack option chosen: attack (round 1, profit: -12.16)
This monster is not your huckleberry.
Stasis loop complete.
WHAM: SmartStasis complete.
WHAM: Running SmartStasis took 1.39 seconds.
WHAM: SS did not finish the fight, continuing with script execution. 
WHAM: We currently think that the round number is: 1 and that the turn number is 304.
WHAM: Starting evaluation and performing of attack
WHAM: We currently think that the round number is: 1 and that the turn number is 304.
tattered scrap of paper (30.0 @ +127.59674775249769): 1,683μ * 68.28% = 1,149.14
Value of stat gain: 627.19μ
WHAM: Attack option chosen: attack (round 1, profit: -12.16)
WHAM: No need to stun this monster
Monster HP is 215 according to Mafia and 215.0 according to BatBrain.
Monster HP is 215 according to Mafia and 215.0 according to BatBrain (loop variable i = 0).
Queued: attack
Building options...
Options built! (50 actions)
tattered scrap of paper (30.0 @ +127.59674775249769): 1,683μ * 68.28% = 1,149.14
Value of stat gain: 627.19μ
WHAM: Attack option chosen: attack (round 2, profit: 0)
WHAM: Exiting the predictive loop at loop variable i = 1 to execute due to the endscombat flag being set.
Parsed round number: 1
Building options...
Options built! (50 actions)
WHAM: Evaluating the attack but not performing it took 1.71 seconds.
WHAM: We can't Saucesplash.
true, false, false, true, false
WHAM: Enqueueing attack with your weapon (macroid attack). Estimated damage: 193.37400000000002.
Queued: attack
Building options...
Options built! (50 actions)
WHAM: Successfully enqueued attack with your weapon.
WHAM: We are going to 1-shot with attack with your weapon.
Constructed macro: scrollwhendone; sub batround; if pastround 27; 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; attack; call batround; 
Round 1: Arbos executes a macro!
Round 1: Arbos attacks!
Round 2: bookbat takes 173 damage.
You lose 6 hit points
Happened: attack
Parsed round number: 2
Building options...
Options built! (50 actions)
WHAM: Evaluating the attack and performing it took 5.75 seconds.
WHAM: Current monster HP is calculated to 42.0
WHAM: We currently think that the round number is: 2 and that the turn number is 304.
WHAM: We currently think that the round number is: 2 and that the turn number is 304.
WHAM: Starting evaluation and performing of attack
WHAM: We currently think that the round number is: 2 and that the turn number is 304.
tattered scrap of paper (30.0 @ +127.59674775249769): 1,683μ * 68.28% = 1,149.14
Value of stat gain: 627.19μ
WHAM: Attack option chosen: attack (round 2, profit: 0)
WHAM: No need to stun this monster
Monster HP is 42 according to Mafia and 42.0 according to BatBrain.
Monster HP is 42 according to Mafia and 42.0 according to BatBrain (loop variable i = 0).
Queued: attack
Building options...
Options built! (50 actions)
WHAM: Exiting the predictive loop at loop variable i = 1 to execute due to the endscombat flag being set.
Happened: attack
Parsed round number: 2
Building options...
Options built! (50 actions)
WHAM: Evaluating the attack but not performing it took 2.05 seconds.
WHAM: We can't Saucesplash.
true, false, false, true, true
WHAM: Enqueueing attack with your weapon (macroid attack). Estimated damage: 42.0.
Queued: attack
Building options...
Options built! (50 actions)
WHAM: Successfully enqueued attack with your weapon.
WHAM: We are going to 1-shot with attack with your weapon.
Constructed macro: scrollwhendone; sub batround; if pastround 27; 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; attack; call batround; 
Round 2: Arbos executes a macro!
Round 2: Arbos attacks!
Round 3: bookbat takes 173 damage.
Round 3: Arbos wins the fight!
You gain 4 hit points
You gain 5 Muscularity Points
After Battle: Levon says, "It would appear your foe had an unhealthy obsession with material goods. Let us endeavor to help him rid himself of that obsession."
You acquire an item: tattered scrap of paper
You gain 37 Strengthliness
You gain 8 Mysteriousness
You gain 14 Chutzpah
Running ZLib version: r37 (current)
Happened: attack
Parsed round number: 0
Look! You found 1 tattered scrap of paper (1,683μ)!
WHAM: Evaluating the attack and performing it took 10.17 seconds.
WHAM: We currently think that the round number is: 31 and that the turn number is 305.
WHAM: We currently think that the round number is: 31 and that the turn number is 305.

Any thoughts?
 
Last edited:
That is very weird. BatBrain is reporting the monsters HP at 215 and WHAM reports that average damage for an attack is 193, but it wants to one shot anyway?
 
Problem is with WHAM and the interaction with endscombat I think. I added the current thing because the last batbrain stopped WHAM preemptively and it crashed. I should be able to remove that now that BatBrain allows three actions to be enqueued after endscombat has been set.
 
I just broke the prism in a Big! run and thought I'd explore the additions to The Sea. Why is WHAM insisting on using Candyblast while costing me hundreds of HP in the process? I thought I'd remove Candyblast as an option via WHAM don't use but then WHAM decides to use Clobber with the same end result. Sigh.

Here is representative combat with verbosity set to nine:

Code:
[1342] An Octopus's Garden
Encounter: stranglin' algae
Round 0: Arbos loses initiative!
You lose 29 hit points
Running ZLib version: r37 (current)
Running Character Info Toolbox version: 0.8.4
Running ZLib version: r37 (current)
1 HP costs 0.102μ. ( 403 / 1004 )
1 MP costs 4.154μ. ( 588 / 835 )
You have plastic pumpkin bucket equipped: (6.04) damage,
Running BatBrain version: 1.35 (current)
Running SmartStasis version: 3.19 (current)
Running WHAM version: 5.2 (current)
WHAM: We currently think that the round number is: 0 and that the turn number is 1341.
WHAM: Checking to see if WHAM sould adjust the unknown_ml for Stranglin' Algae.
WHAM: No need to do anything with Stranglin' Algae.
WHAM: Setting up variables via BatBrain
glob of green slime (30.0 @ +99.56683848755748): 774μ * 59.87% = 463.39
Value of stat gain: 1,062.5μ
glob of green slime (30.0 @ +99.56683848755748): 774μ * 59.87% = 463.39
Value of stat gain: 1,062.5μ
ATT: 401 (94% × 19.52, death in 22)
DEF: 401 (8.8% × 49.05, win in 59)
HP: 603, Value: 1,525.89 μ, RES: 0
Parsed round number: 1
Building options...
Options built! (279 actions)
WHAM: We currently think that the round number is: 1 and that the turn number is 1341.
WHAM: Current MP = 588 out of 835.
WHAM: You have no profitable MP restoratives.
WHAM: Current HP = 403 out of 1004.
WHAM: Your most profitable healing option is use 3809.
WHAM: Your most profitable healing option is use 3809.
WHAM: Your best HP restoring option available is: use 3809
WHAM: You are fighting a Stranglin' Algae. Mafia considers that this monster has an attack of 401 or 400 when given a monster name.
WHAM: Mafia further considers that this monster has a defense value of 401 or 405 when given a monster name.
WHAM: Mafia further further considers that this monster has a HP value of 603 or 600 when given a monster name.
WHAM: Your current ML-adjustment is: 0.
WHAM: Monster HP is 603.0.
WHAM: WHAM added the following to BatRound: if pastround 27; 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; 
glob of green slime (30.0 @ +99.56683848755748): 774μ * 59.87% = 463.39
Value of stat gain: 1,062.5μ
WHAM: Attack option chosen: skill 3022 (round 1, profit: 21.08)
WHAM: Running SmartStasis
Profit per round: ActionProfitDamageOtherbase; plastic pumpkin bucket (0μ)0μ(6.04) Actual: 6.04 (0 μ/dmg)
Building custom WHAM actions...
Custom WHAM actions built! (0 actions)
Building custom actions...
1/5 monsters drop goals here.
Custom actions built! (0 actions)
WHAM: Stasis option chosen: use 2678 (round 1, profit: 0.12)
glob of green slime (30.0 @ +99.56683848755748): 774μ * 59.87% = 463.39
Value of stat gain: 1,062.5μ
WHAM: Attack option chosen: skill 3022 (round 1, profit: 21.08)
This monster is not your huckleberry.
Stasis loop complete.
WHAM: SmartStasis complete.
WHAM: Running SmartStasis took 1.23 seconds.
WHAM: SS did not finish the fight, continuing with script execution. 
WHAM: We currently think that the round number is: 1 and that the turn number is 1341.
WHAM: Starting evaluation and performing of attack
WHAM: We currently think that the round number is: 1 and that the turn number is 1341.
glob of green slime (30.0 @ +99.56683848755748): 774μ * 59.87% = 463.39
Value of stat gain: 1,062.5μ
WHAM: Attack option chosen: skill 3022 (round 1, profit: 21.08)
WHAM: Stun option chosen: skill 3004 (round 1, profit: -12.46)
Monster HP is 603 according to Mafia and 603.0 according to BatBrain.
Queued: skill 3004
Building options...
Options built! (278 actions)
Monster HP is 603 according to Mafia and 596.9625 according to BatBrain (loop variable i = 1).
Queued: skill 3022
Building options...
Options built! (278 actions)
glob of green slime (30.0 @ +99.56683848755748): 774μ * 59.87% = 463.39
Value of stat gain: 1,062.5μ
WHAM: Attack option chosen: skill 3022 (round 3, profit: 21.08)
Monster HP is 603 according to Mafia and 548.925 according to BatBrain (loop variable i = 2).
Queued: skill 3022
Building options...
Options built! (278 actions)
glob of green slime (30.0 @ +99.56683848755748): 774μ * 59.87% = 463.39
Value of stat gain: 1,062.5μ
WHAM: Attack option chosen: skill 3022 (round 4, profit: 21.08)
Monster HP is 603 according to Mafia and 500.8875 according to BatBrain (loop variable i = 3).
Queued: skill 3022
Building options...
Options built! (278 actions)
glob of green slime (30.0 @ +99.56683848755748): 774μ * 59.87% = 463.39
Value of stat gain: 1,062.5μ
WHAM: Attack option chosen: skill 3022 (round 5, profit: 21.08)
Monster HP is 603 according to Mafia and 452.85 according to BatBrain (loop variable i = 4).
Queued: skill 3022
Building options...
Options built! (278 actions)
glob of green slime (30.0 @ +99.56683848755748): 774μ * 59.87% = 463.39
Value of stat gain: 1,062.5μ
WHAM: Attack option chosen: skill 3022 (round 6, profit: 21.08)
Monster HP is 603 according to Mafia and 404.8125 according to BatBrain (loop variable i = 5).
Queued: skill 3022
Building options...
Options built! (278 actions)
glob of green slime (30.0 @ +99.56683848755748): 774μ * 59.87% = 463.39
Value of stat gain: 1,062.5μ
WHAM: Attack option chosen: skill 3022 (round 7, profit: 21.08)
Monster HP is 603 according to Mafia and 356.775 according to BatBrain (loop variable i = 6).
Queued: skill 3022
Building options...
Options built! (278 actions)
glob of green slime (30.0 @ +99.56683848755748): 774μ * 59.87% = 463.39
Value of stat gain: 1,062.5μ
WHAM: Attack option chosen: skill 3022 (round 8, profit: 21.08)
Monster HP is 603 according to Mafia and 308.7375 according to BatBrain (loop variable i = 7).
Queued: skill 3022
Building options...
Options built! (278 actions)
glob of green slime (30.0 @ +99.56683848755748): 774μ * 59.87% = 463.39
Value of stat gain: 1,062.5μ
WHAM: Attack option chosen: skill 3022 (round 9, profit: 21.08)
Monster HP is 603 according to Mafia and 260.7 according to BatBrain (loop variable i = 8).
Queued: skill 3022
Building options...
Options built! (278 actions)
glob of green slime (30.0 @ +99.56683848755748): 774μ * 59.87% = 463.39
Value of stat gain: 1,062.5μ
WHAM: Attack option chosen: skill 3022 (round 10, profit: 21.08)
Monster HP is 603 according to Mafia and 212.66249999999997 according to BatBrain (loop variable i = 9).
Queued: skill 3022
Building options...
Options built! (278 actions)
glob of green slime (30.0 @ +99.56683848755748): 774μ * 59.87% = 463.39
Value of stat gain: 1,062.5μ
WHAM: Attack option chosen: skill 3022 (round 11, profit: 21.08)
Monster HP is 603 according to Mafia and 164.62499999999994 according to BatBrain (loop variable i = 10).
Queued: skill 3022
Building options...
Options built! (278 actions)
glob of green slime (30.0 @ +99.56683848755748): 774μ * 59.87% = 463.39
Value of stat gain: 1,062.5μ
WHAM: Attack option chosen: skill 3022 (round 12, profit: 21.08)
Monster HP is 603 according to Mafia and 116.58749999999992 according to BatBrain (loop variable i = 11).
Queued: skill 3022
Building options...
Options built! (278 actions)
glob of green slime (30.0 @ +99.56683848755748): 774μ * 59.87% = 463.39
Value of stat gain: 1,062.5μ
WHAM: Attack option chosen: skill 3022 (round 13, profit: 21.08)
Monster HP is 603 according to Mafia and 68.54999999999995 according to BatBrain (loop variable i = 12).
Queued: skill 3022
Building options...
Options built! (278 actions)
glob of green slime (30.0 @ +99.56683848755748): 774μ * 59.87% = 463.39
Value of stat gain: 1,062.5μ
WHAM: Attack option chosen: skill 3022 (round 14, profit: 21.08)
WHAM: Exiting the predictive loop at loop variable i = 13 to execute due to the endscombat flag being set.
Parsed round number: 1
Building options...
Options built! (279 actions)
WHAM: Evaluating the attack but not performing it took 11.39 seconds.
WHAM: Enqueuing a stun to help with the battle
Queued: skill 3004
Building options...
Options built! (278 actions)
WHAM: We can't Saucesplash.
true, false, false, true, false
WHAM: Enqueueing Candyblast (macroid skill 3022). Estimated damage: 42.0.
Queued: skill 3022
Building options...
Options built! (278 actions)
WHAM: Successfully enqueued Candyblast.
WHAM: We can't Saucesplash.
true, false, false, true, false
WHAM: Enqueueing Candyblast (macroid skill 3022). Estimated damage: 42.0.
Queued: skill 3022
Building options...
Options built! (278 actions)
WHAM: Successfully enqueued Candyblast.
WHAM: We can't Saucesplash.
true, false, false, true, false
WHAM: Enqueueing Candyblast (macroid skill 3022). Estimated damage: 42.0.
Queued: skill 3022
Building options...
Options built! (278 actions)
WHAM: Successfully enqueued Candyblast.
WHAM: We can't Saucesplash.
true, false, false, true, false
WHAM: Enqueueing Candyblast (macroid skill 3022). Estimated damage: 42.0.
Queued: skill 3022
Building options...
Options built! (278 actions)
WHAM: Successfully enqueued Candyblast.
WHAM: We can't Saucesplash.
true, false, false, true, false
WHAM: Enqueueing Candyblast (macroid skill 3022). Estimated damage: 42.0.
Queued: skill 3022
Building options...
Options built! (278 actions)
WHAM: Successfully enqueued Candyblast.
WHAM: We can't Saucesplash.
true, false, false, true, false
WHAM: Enqueueing Candyblast (macroid skill 3022). Estimated damage: 42.0.
Queued: skill 3022
Building options...
Options built! (278 actions)
WHAM: Successfully enqueued Candyblast.
WHAM: We can't Saucesplash.
true, false, false, true, false
WHAM: Enqueueing Candyblast (macroid skill 3022). Estimated damage: 42.0.
Queued: skill 3022
Building options...
Options built! (278 actions)
WHAM: Successfully enqueued Candyblast.
WHAM: We can't Saucesplash.
true, false, false, true, false
WHAM: Enqueueing Candyblast (macroid skill 3022). Estimated damage: 42.0.
Queued: skill 3022
Building options...
Options built! (278 actions)
WHAM: Successfully enqueued Candyblast.
WHAM: We can't Saucesplash.
true, false, false, true, false
WHAM: Enqueueing Candyblast (macroid skill 3022). Estimated damage: 42.0.
Queued: skill 3022
Building options...
Options built! (278 actions)
WHAM: Successfully enqueued Candyblast.
WHAM: We can't Saucesplash.
true, false, false, true, false
WHAM: Enqueueing Candyblast (macroid skill 3022). Estimated damage: 42.0.
Queued: skill 3022
Building options...
Options built! (278 actions)
WHAM: Successfully enqueued Candyblast.
WHAM: We can't Saucesplash.
true, false, false, true, false
WHAM: Enqueueing Candyblast (macroid skill 3022). Estimated damage: 42.0.
Queued: skill 3022
Building options...
Options built! (278 actions)
WHAM: Successfully enqueued Candyblast.
WHAM: We can't Saucesplash.
true, false, false, true, true
WHAM: Enqueueing Candyblast (macroid skill 3022). Estimated damage: 42.0.
Queued: skill 3022
Building options...
Options built! (278 actions)
WHAM: Successfully enqueued Candyblast.
WHAM: We are going to 13-shot with Entangling Noodles, Candyblast, Candyblast, Candyblast, Candyblast, Candyblast, Candyblast, Candyblast, Candyblast, Candyblast, Candyblast, Candyblast and Candyblast.
Constructed macro: scrollwhendone; sub batround; if pastround 27; 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; skill 3004; call batround; skill 3022; call batround; skill 3022; call batround; skill 3022; call batround; skill 3022; call batround; skill 3022; call batround; skill 3022; call batround; skill 3022; call batround; skill 3022; call batround; skill 3022; call batround; skill 3022; call batround; skill 3022; call batround; skill 3022; call batround; 
Round 1: Arbos executes a macro!
Round 1: Arbos casts ENTANGLING NOODLES!
Round 2: Phyllida ties its shoelaces together. It trips and takes 21 damage as it lands on its face.
Round 2: stranglin' algae takes 21 damage.
Round 2: Arbos casts CANDYBLAST!
Round 3: stranglin' algae takes 38 damage.
Round 3: Arbos casts CANDYBLAST!
Round 4: stranglin' algae takes 39 damage.
You acquire an item: Senior Mints
Round 4: Arbos casts CANDYBLAST!
Round 5: stranglin' algae takes 40 damage.
You acquire an item: Mr. Mediocrebar
Round 5: Phyllida rolls the plastic pumpkin bucket at it. It promptly trips over it and falls, taking 12 damage.
Round 5: stranglin' algae takes 12 damage.
Round 5: Arbos casts CANDYBLAST!
Round 6: stranglin' algae takes 42 damage.
Round 6: Phyllida rolls the plastic pumpkin bucket at it. It gets its foot caught in it and falls over, sustaining 22 damage.
Round 6: stranglin' algae takes 22 damage.
You lose 30 hit points
Round 6: Arbos casts CANDYBLAST!
Round 7: stranglin' algae takes 41 damage.
You acquire an item: Daffy Taffy
Round 7: Phyllida rolls the plastic pumpkin bucket at it. It gets its foot caught in it and falls over, sustaining 17 damage.
Round 7: stranglin' algae takes 17 damage.
You lose 29 hit points
Round 7: Arbos casts CANDYBLAST!
Round 8: stranglin' algae takes 46 damage.
Round 8: Phyllida rolls the plastic pumpkin bucket at it. It gets its foot caught in it and falls over, sustaining 12 damage.
Round 8: stranglin' algae takes 12 damage.
You lose 28 hit points
Round 8: Arbos casts CANDYBLAST!
Round 9: stranglin' algae takes 72 damage.
Round 9: Arbos casts CANDYBLAST!
Round 10: stranglin' algae takes 39 damage.
You lose 12 hit points
Round 10: Arbos casts CANDYBLAST!
Round 11: stranglin' algae takes 42 damage.
You acquire an item: Mr. Mediocrebar
Round 11: Phyllida rolls the plastic pumpkin bucket at it. It gets its foot caught in it and falls over, sustaining 20 damage.
Round 11: stranglin' algae takes 20 damage.
You lose 26 hit points
Round 11: Arbos casts CANDYBLAST!
Round 12: stranglin' algae takes 45 damage.
You acquire an item: Senior Mints
Round 12: Phyllida rolls the plastic pumpkin bucket at it. It promptly trips over it and falls, taking 22 damage.
Round 12: stranglin' algae takes 22 damage.
You lose 12 hit points
Round 12: Arbos casts CANDYBLAST!
Round 13: stranglin' algae takes 46 damage.
Round 13: Arbos wins the fight!
You acquire an item: CSA cheerfulness ration
After Battle: Phyllida shakes her dorsal fin, and her pectoral fins, to music only she can hear. If you were a fish, it'd probably be a little titillating, so thank goodness you're not a fish.Phyllida holds out the plastic pumpkin bucket, hoping for extra goodies.
You acquire an item: sea lace
You gain 59 Fortitude
You gain 23 Magicalness
You gain 24 Sarcasm
Running ZLib version: r37 (current)
Running Character Info Toolbox version: 0.8.4
Happened: skill 3004
Running ZLib version: r37 (current)
Happened: skill 3022
Running Character Info Toolbox version: 0.8.4
Happened: skill 3022
Happened: skill 3022
Happened: skill 3022
Happened: skill 3022
Happened: skill 3022
Happened: skill 3022
Happened: skill 3022
Happened: skill 3022
Happened: skill 3022
Happened: skill 3022
Parsed round number: 0
Look! You found 1 CSA cheerfulness ration (1,370μ)!
Look! You found 1 Daffy Taffy (30μ)!
Look! You found 2 Mr. Mediocrebar (100μ)!
Look! You found 1 sea lace (3,800μ)!
Look! You found 2 Senior Mints (100μ)!
Happened: crit
WHAM: Evaluating the attack and performing it took 35.29 seconds.
WHAM: We currently think that the round number is: 31 and that the turn number is 1342.
WHAM: We currently think that the round number is: 31 and that the turn number is 1342.
 
Last edited:
1) At least it didn't lose the fight :)
2) You lost ~140 HP which with your current meatperHP would cost you 14 meat to regenerate while Candyblast generated 130 meat worth of autosell candy which neatly balances that out. Now, why it would choose clobber instead when you removed candyblast I do not know.
 
Wild guess... another person who set UR to consider all inventory items as free. Which means that as long as you win the fight, the rest is basically irrelevant... if you have anything equipped that regenerates MP for any reason as combat continues, it will probably try to extend combat as much as possible regardless of what reality means.

Or maybe it's just really that cheap to heal, in which case... as Winterbay pointed out, you're making a profit. That's why. And healing is basically irrelevant as long as you win the fight.
 
I just broke the prism in a Big! run and thought I'd explore the additions to The Sea. Why is WHAM insisting on using Candyblast while costing me hundreds of HP in the process? I thought I'd remove Candyblast as an option via WHAM don't use but then WHAM decides to use Clobber with the same end result. Sigh.
WHAM tries to provide you as much value as possible. It believes the profit from casting Candyblast is 21 meat. This is a bit off, because Batbrain doesn't account of the odds of no candy dropping (known problem, hard to fix). Still, Candyblast is probably your best combat option. It's 100% hit and should provide more meat from candy then it costs to cast. If you can't use that and you can't always hit with attack, your next cheapest option is clobber. Sure it takes longer than other spells, but it is free or nearly free. As others have said, you won the fight and healing is cheap. With all that candy, you came out ahead. What do you think WHAM should have done instead? I'm pretty sure it would have been more costly.
 
Last edited:
What do you think WHAM should have done instead?

This is a veer but sometimes I want to run combat so that I have a guaranteed kill in the least number of rounds. It is suboptimal game play but when wall clock time is the most important factor I often find myself disabling WHAM just to get things done. I also note that anything WHAM or SmartStasis does on the basis of dropped items and mall prices can be delayed gratification. If I am in HC I can sell the items but it won't help me in run. On could therefore imagine WHAM_HC that ignored drops that had to be sold to provide any benefit or used autosell prices.

Just answering rhetorical questions. In no way is this a serious suggestion to modify WHAM.
 
I realized what WHAM was doing last night as I was falling asleep. :) It was a combination of different expectations and WHAM saving me from myself.

Winterbay: Your supposition was correct. The reason for clobber was two-fold: it was cheap and a guaranteed hit. I realized that my mainstat was low for what I was doing and if I manually adventured I was missing quite frequently.

Theraze: UR was not set to consider inventory items as free but, given the information available, was a good guess.

Frono: I've had the same wish more than once: A WHAM that was less profitable but killed things faster.
 
I'm all ears for that option, but I suck at coming up with sort-commands so if someone can come up with a good way of sorting opts to allow for that option I'd be happy to implement it.
 
Frono: I've had the same wish more than once: A WHAM that was less profitable but killed things faster.

The quick answer would be to disable stasis. The better answer would be to tweak the stasis values so stasis is only desirable if there is a combat familiar in play. Long term, I am reminded of Zarqon's One Click Wossname whereby certain strategic elements were determined by a file.

I can see a day when there are some Uber Settings for various WHAM behaviors. I can see several possibilities - Normal (or Default); Quick (kill monster ASAP without regard to cost or statsis); HC (values all items at Autosell for Stasis and Combat use); Delayed Gratification (uses mall prices even when mall is not available) and so on. I suspect most of these could be supported with the current WHAM. It would just be a case of collecting parameters and settings together.
 
This is a veer but sometimes I want to run combat so that I have a guaranteed kill in the least number of rounds. It is suboptimal game play but when wall clock time is the most important factor I often find myself disabling WHAM just to get things done.

I wondered if you would say that. Real life time certainly is of value. It's just hard to translate into meat.

I'm all ears for that option, but I suck at coming up with sort-commands so if someone can come up with a good way of sorting opts to allow for that option I'd be happy to implement it.

I actually really enjoy writing heuristics. Balancing meat spent vs rounds spent is an interesting idea. Since WHAM evaluates per round, I'm thinking maybe adding some value (meat) to higher damage skills might work. Maybe based on %HP damage. I'll have to think about it. I'm a bit distracted with my first BIG! run. I rarely care how many rounds WHAM takes, but sometimes it matters. Nothing like that 5 minutes to rollover rush.

The quick answer would be to disable stasis. The better answer would be to tweak the stasis values so stasis is only desirable if there is a combat familiar in play.

The problem here isn't stasis. It's that optimal killing (from a pure meat perspective) takes 25+ rounds and wastes real life time. I know that sounds like a subtle difference, but stasis vs killing are handled quite differently.
 
Last edited:
Here's my real reason for coming here this morning. . .

I had a strange combat in BIG! that resulted in an infinite non-server-hitting loop.
Code:
[578] Battlefield (Frat Uniform)
Encounter: War Hippy Sky Captain
Strategy: /home/scottk/.kolmafia/ccs/Destroy.ccs [default]
Round 0: Crowther wins initiative!
ATT: 310 (6% × (6.81), death in 474)
DEF: 310 (15.64% × 48.14 (11) (15), win in 21)
HP: 358, Value: 1,128.23 μ, RES: 0 (-1) (-1) (1)
WHAM: Monster HP is 358.0.
WHAM: Running SmartStasis
Profit per round: ActionProfitDamageOtherbase; Rogue Program (0μ)29.7μ3.71 (0 μ/dmg)MP: 3.71
Round 1: Crowther executes a macro!
Round 1: Crowther tries to steal an item!
You acquire an item: ferret bait
Round 2: war hippy sky captain takes 15 damage.
You gain 15 Mojo Points
You snatched a ferret bait (150μ)!
Revised monster value: 1,072.73
Round 2: Crowther executes a macro!
Round 2: Crowther uses the Rain-Doh indigo cup!
You gain 94 hit points
Round 3: Crowther executes a macro!
Round 3: Crowther casts STEALTH MISTLETOE!
KoLmafia thinks it is round 4 but KoL thinks it is round 3
Round 4: Crowther casts SUCKERPUNCH!
Round 5: war hippy sky captain takes 1 damage.
Round 5: war hippy sky captain drops 2 attack power.
Round 5: war hippy sky captain drops 2 defense.
Round 5: war hippy sky captain takes 12 damage.
You gain 12 Mojo Points
Round 5: Crowther casts SUCKERPUNCH!
Round 6: war hippy sky captain takes 1 damage.
Round 6: war hippy sky captain drops 2 attack power.
Round 6: war hippy sky captain drops 2 defense.
Round 6: Crowther casts SUCKERPUNCH!
Round 7: war hippy sky captain takes 1 damage.
Round 7: war hippy sky captain drops 2 attack power.
Round 7: war hippy sky captain drops 2 defense.
Round 7: Crowther casts SUCKERPUNCH!
Round 8: war hippy sky captain takes 1 damage.
Round 8: war hippy sky captain drops 2 attack power.
Round 8: war hippy sky captain drops 2 defense.
Round 8: war hippy sky captain takes 11 damage.
You gain 11 Mojo Points
Round 8: Crowther casts SUCKERPUNCH!
Round 9: war hippy sky captain takes 1 damage.
Round 9: war hippy sky captain drops 2 attack power.
Round 9: war hippy sky captain drops 2 defense.
Round 9: war hippy sky captain takes 7 damage.
You gain 7 Mojo Points
Round 9: Crowther casts SUCKERPUNCH!
Round 10: war hippy sky captain takes 1 damage.
Round 10: war hippy sky captain drops 2 attack power.
Round 10: war hippy sky captain drops 2 defense.
Round 10: Crowther casts SUCKERPUNCH!
Round 11: war hippy sky captain takes 1 damage.
Round 11: war hippy sky captain drops 2 attack power.
Round 11: war hippy sky captain drops 2 defense.
Round 11: Crowther casts SUCKERPUNCH!
Round 12: war hippy sky captain takes 1 damage.
Round 12: war hippy sky captain drops 2 attack power.
Round 12: war hippy sky captain drops 2 defense.
Round 12: war hippy sky captain takes 10 damage.
You gain 10 Mojo Points
Round 12: Crowther casts SUCKERPUNCH!
Round 13: war hippy sky captain takes 1 damage.
Round 13: war hippy sky captain drops 2 attack power.
Round 13: war hippy sky captain drops 2 defense.
Round 13: Crowther casts SUCKERPUNCH!
Round 14: war hippy sky captain takes 1 damage.
Round 14: war hippy sky captain drops 2 attack power.
Round 14: war hippy sky captain drops 2 defense.
Round 14: Crowther casts SUCKERPUNCH!
Round 15: war hippy sky captain takes 1 damage.
Round 15: war hippy sky captain drops 2 attack power.
Round 15: war hippy sky captain drops 2 defense.
Round 15: war hippy sky captain takes 14 damage.
You gain 14 Mojo Points
Round 15: Crowther casts SUCKERPUNCH!
Round 16: war hippy sky captain takes 1 damage.
Round 16: war hippy sky captain drops 2 attack power.
Round 16: war hippy sky captain drops 2 defense.
Round 16: Crowther casts SUCKERPUNCH!
Round 17: war hippy sky captain takes 1 damage.
Round 17: war hippy sky captain drops 2 attack power.
Round 17: war hippy sky captain drops 2 defense.
Round 17: Crowther casts SUCKERPUNCH!
Round 18: war hippy sky captain takes 1 damage.
Round 18: war hippy sky captain drops 2 attack power.
Round 18: war hippy sky captain drops 2 defense.
Round 18: Crowther casts SUCKERPUNCH!
Round 19: war hippy sky captain takes 1 damage.
Round 19: war hippy sky captain drops 2 attack power.
Round 19: war hippy sky captain drops 2 defense.
Round 19: Crowther casts SUCKERPUNCH!
Round 20: war hippy sky captain takes 1 damage.
Round 20: war hippy sky captain drops 2 attack power.
Round 20: war hippy sky captain drops 2 defense.
Round 20: Crowther casts SUCKERPUNCH!
Round 21: war hippy sky captain takes 1 damage.
Round 21: war hippy sky captain drops 2 attack power.
Round 21: war hippy sky captain drops 2 defense.
You lose 3 hit points
Round 21: Crowther executes a macro!
Round 21: Crowther uses the spectre scepter!
KoLmafia thinks it is round 22 but KoL thinks it is round 21
Round 22: war hippy sky captain takes 8 damage.
Round 22: Crowther uses the spectre scepter!
Round 23: war hippy sky captain drops 1 attack power.
Round 23: war hippy sky captain drops 1 defense.
WHAM: Starting evaluation and performing of attack
WHAM: We are going to 5-shot with Clobber, Clobber, Clobber, Clobber and Clobber.
Round 23: Crowther executes a macro!
Round 23: Crowther casts CLOBBER!
KoLmafia thinks it is round 24 but KoL thinks it is round 23
Round 24: war hippy sky captain takes 35 damage.
You lose 3 hit points
Round 24: Crowther casts CLOBBER!
Round 25: war hippy sky captain takes 33 damage.
Round 25: Crowther casts CLOBBER!
Round 26: war hippy sky captain takes 44 damage.
Round 26: Crowther casts CLOBBER!
Round 27: war hippy sky captain takes 43 damage.
Round 27: Crowther casts CLOBBER!
Round 28: war hippy sky captain takes 34 damage.
Round 28: war hippy sky captain takes 11 damage.
You gain 11 Mojo Points
WHAM: Current monster HP is calculated to 64.0
WHAM: Starting evaluation and performing of attack
WHAM: We are going to 1-shot with Rain-Doh blue balls.
Round 28: Crowther executes a macro!
Round 28: Crowther uses the Rain-Doh blue balls!
KoLmafia thinks it is round 29 but KoL thinks it is round 28
Round 29: war hippy sky captain takes 20 damage.
WHAM: Current monster HP is calculated to 44.0
WHAM: Starting evaluation and performing of attack
WHAM: We are going to 1-shot with Clobber.
Round 29: Crowther executes a macro!
Round 29: Crowther casts CLOBBER!
KoLmafia thinks it is round 30 but KoL thinks it is round 29
Round 30: war hippy sky captain takes 36 damage.
WHAM: Current monster HP is calculated to 8.0
WHAM: Starting evaluation and performing of attack
Auto-funk: merging 'use 2581' and 'use 2041'.
Auto-funk: merging 'use 819' and 'use 3020'.
Auto-funk: merging 'use 1907' and 'use 1958'.
At which point java was running at 100% CPU and I eventually hit escape. What's interesting is WHAM expected to 5-shot, then 1-shot, then 1-shot again, but failed all three times to kill. I'm guessing it BIG! related.

EDIT: I forgot to say, how awesome it was up until then. BIG! has lots of long drown out stasis like fights and WHAM did great. Once in a while I saw a slight over use of saucy salve, but it was only a handful of fights.

EDIT: Maybe it's not BIG! related, but end of combat related. I've had it happen two more times. Both at the final round of combat with 8 HP left on the monster as well.

EDIT: Just in case it matters.
Code:
zlib WHAM_AlwaysContinue = false
zlib WHAM_happymediumglow =
zlib WHAM_hitchance = 0.5
zlib WHAM_maxround = 50
zlib WHAM_noitemsplease = false
zlib WHAM_round_limit = 15
zlib WHAM_safetymargin = 0
 
Last edited:
The problem here isn't stasis. It's that optimal killing (from a pure meat perspective) takes 25+ rounds and wastes real life time. I know that sounds like a subtle difference, but stasis vs killing are handled quite differently.

You're right. I focus on stasis because historically it has been the source of my problems. As for heuristics, how about assigning a meat cost when moving to the next round? that would ratchet up the benefit of a kill...
 
Back
Top