Winterbay's Helpful Automatic Monsterbasher (WHAM)

Terragon

New member
I turned the dial to 11...

I also added various bits of debug and discovered that Shieldbutt and similar skills were being reported as "not ok" despite the fact I had a shield equipped.

In the WHAM.ash ok() function (line 284), the offhand shield check is:

Code:
if (item_type(equipped_item($slot[off-hand]))!='shield') return false;

Which makes sense.. but if you have a shield equipped, that does not return - and it drops through into the next block of the switch statement which is the "Ask Richard" skills... which has "return false;" first.

This suggests that shieldbutt will never show as OK.

Replacing the shield check with the following makes it all ok again:

Code:
return (item_type(equipped_item($slot[off-hand]))=='shield');

Although that's not the whole story since shieldbutt doesn't work with a ranged weapon equipped, so it really needs to be:

Code:
if(weapon_type(equipped_item($slot[weapon])) == $stat[Moxie]) return false;
return (item_type(equipped_item($slot[off-hand]))=='shield');

How's that?
 

Winterbay

Active member
Ahh yes, the wonders of switch-case statements without breaks in them. I've never really liked that because it makes my non-programmer brain very confused :)

I've changed that one to:
Code:
return (item_type(equipped_item($slot[off-hand])) == "shield" && weapon_type(equipped_item($slot[weapon])) != $stat[Moxie] && no_cunctatitis() && no_teleportitis())

Since I think the reason in the beginning for falling through was to get to the check for concatitis and teleportitis. I've also changed the check for other TT and SC skills/combos to use a similar return.
 

Terragon

New member
Shieldbutt is still usable with cunctatitis surely? It just has a failure rate, the same as any other skill use. And AFAIK teleportitis has no effect during a fight.

Good otherwise
 

Winterbay

Active member
Yes, but so far the script tries to avoid acquiring those effects as well since it may screw you over in the upcoming fights, especially if you are in run and cannot access cheap removal options.
 

Crowther

Active member
Something is a bit off with the evaluation of the profit from Candyblast (after SmartStasis has finished).

I'm playing a classy pastamancer and losing way too much meat to that spell. So I did some debugging and for a fairly simple combat, there were four skills that could one-hit the monster. Costs varied from 0 MP (spaghetti spear) to 6 MP (Candyblast). For three of the skills, profit when down as MP costs went up (good), but for Candyblast, the most expensive, profits were highest. Now, Candyblast does return some items, but I was level 6 and using MMJ, so I don't think those items are worth the cost (_meatpermp = 7.14). I couldn't find how that was evaluated, so I just removed the items from batfactors.txt and Candyblast became the most expensive one-hit option and spaghetti spear was chosen instead. This worked much better.

I don't see where the probability of those items dropping is evaluated. I guess that's in BatBrain?

Actually, it looks like BatBrain assumes one of those items drops every time Candyblast is cast. . .
Code:
      case "item": string[int] its = split_string(bittles.group(2),"; "); float v;
         foreach n,it in its {
            if (contains_text(id,"enthroned") && $ints[3450,4469,1445,1446,1447,1448] contains to_int(to_item(it)) && stolen contains to_item(it)) { v=0; break; }
            v += item_val(to_item(it));
         } res.meat += v/count(its); break;

That would be worth (50+30)/5 = 16 meat. Still doesn't offset the 7.14*6 = 42.84 meat cost.

Anyway, I can't entirely explain it, but I've got my workaround. Often when I do that other people find similar problems, so "heads up!"

EDIT: More BatBrain info. It turns out that items worth 0 meat are valued at 50 meat. So Candyblast is treated as yielding (50+50+50+30+50)/5 = 46 meat. Which perfectly explains why it's preferred over more optimal choices.

I'll post this over on the BatBrain thread.
 
Last edited:

Winterbay

Active member
Version 4.3.5 uploaded with the fix for TT-skills above as well as fixing the detection of unknown monsters. ALso updated BatBrain to 1.30 in accordance with the latest version of that script (changes to original are some bear-skills, some zombify-skills and an addition of Groar's cold resistance).

Edit: Also, that does indeed feel slightly odd.
 

fronobulax

Developer
Staff member
Have you forked BatBrain? Which version are we supposed to use and what are the consequences of using the other with WHAM? Should we visit zarqon bearing bats and implore him to incorporate and adopt your changes?
 

Winterbay

Active member
Well, yes and no. This version of batbrain is only really useful if in a zombierun and preferably using bear arms, otherwise the original version is just fine. SOme of the bear skills isn't in the original version for reasons of zarqon not thinking that the implementation was good enough. I did post on the Groar issue in the batbrain thread though and that's not made it in yet but probably should.
 
So Winterbay, is this a WHAM problem?

Code:
[504] A-Boo Peak
Encounter: Space Tourist Explorer Ghost
Strategy: /~/.kolmafia/ccs/WHAM.ccs [default]
Round 0: chef_rannos wins initiative!
BCC: Monster HP is 50
BCC: We are under the effect of Spirit of Peppermint
BCC: These are the figures for Cannelloni Cannon: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: We are under the effect of Spirit of Peppermint
BCC: I expect 77 damage from Cannelloni Cannon
BCC: These are the figures for Fearful Fettucini: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: I expect 174 damage from Fearful Fettucini
BCC: These are the figures for Ravioli Shurikens: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: We are under the effect of Spirit of Peppermint
BCC: I expect 45 damage from Ravioli Shurikens
BCC: These are the figures for Salsaball: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: I expect 8 damage from Salsaball
BCC: These are the figures for Saucegeyser: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: I expect 106 damage from Saucegeyser
BCC: These are the figures for Saucestorm: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: I expect 63 damage from Saucestorm
BCC: These are the figures for Spaghetti Spear: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: We are under the effect of Spirit of Peppermint
BCC: I expect 8 damage from Spaghetti Spear
BCC: These are the figures for Stream of Sauce: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: I expect 31 damage from Stream of Sauce
BCC: These are the figures for Stuffed Mortar Shell: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: We are under the effect of Spirit of Peppermint
BCC: I expect 151 damage from Stuffed Mortar Shell
BCC: These are the figures for Surge of Icing: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: I expect 63 damage from Surge of Icing
BCC: These are the figures for Wave of Sauce: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: I expect 93 damage from Wave of Sauce
BCC: These are the figures for Weapon of the Pastalord: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: We are under the effect of Spirit of Peppermint
BCC: I expect 174 damage from Weapon of the Pastalord
BCC: We are going to one-shot with Cannelloni Cannon
Round 1: chef_rannos casts CANNELLONI CANNON!
Round 2: space tourist explorer ghost takes 1 damage.
BCC: Monster HP is 49
BCC: We are under the effect of Spirit of Peppermint
BCC: These are the figures for Cannelloni Cannon: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: We are under the effect of Spirit of Peppermint
BCC: I expect 77 damage from Cannelloni Cannon
BCC: These are the figures for Fearful Fettucini: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: I expect 174 damage from Fearful Fettucini
BCC: These are the figures for Ravioli Shurikens: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: We are under the effect of Spirit of Peppermint
BCC: I expect 45 damage from Ravioli Shurikens
BCC: These are the figures for Salsaball: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: I expect 8 damage from Salsaball
BCC: These are the figures for Saucegeyser: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: I expect 106 damage from Saucegeyser
BCC: These are the figures for Saucestorm: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: I expect 63 damage from Saucestorm
BCC: These are the figures for Spaghetti Spear: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: We are under the effect of Spirit of Peppermint
BCC: I expect 8 damage from Spaghetti Spear
BCC: These are the figures for Stream of Sauce: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: I expect 31 damage from Stream of Sauce
BCC: These are the figures for Stuffed Mortar Shell: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: We are under the effect of Spirit of Peppermint
BCC: I expect 151 damage from Stuffed Mortar Shell
BCC: These are the figures for Surge of Icing: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: I expect 63 damage from Surge of Icing
BCC: These are the figures for Wave of Sauce: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: I expect 93 damage from Wave of Sauce
BCC: These are the figures for Weapon of the Pastalord: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: We are under the effect of Spirit of Peppermint
BCC: I expect 174 damage from Weapon of the Pastalord
BCC: We are going to one-shot with Cannelloni Cannon
Round 2: chef_rannos casts CANNELLONI CANNON!
Round 3: space tourist explorer ghost takes 1 damage.
BCC: Monster HP is 48
BCC: We are under the effect of Spirit of Peppermint
BCC: These are the figures for Cannelloni Cannon: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: We are under the effect of Spirit of Peppermint
BCC: I expect 77 damage from Cannelloni Cannon
BCC: These are the figures for Fearful Fettucini: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: I expect 174 damage from Fearful Fettucini
BCC: These are the figures for Ravioli Shurikens: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: We are under the effect of Spirit of Peppermint
BCC: I expect 45 damage from Ravioli Shurikens
BCC: These are the figures for Salsaball: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: I expect 8 damage from Salsaball
BCC: These are the figures for Saucegeyser: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: I expect 106 damage from Saucegeyser
BCC: These are the figures for Saucestorm: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: I expect 63 damage from Saucestorm
BCC: These are the figures for Spaghetti Spear: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: We are under the effect of Spirit of Peppermint
BCC: I expect 8 damage from Spaghetti Spear
BCC: These are the figures for Stream of Sauce: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: I expect 31 damage from Stream of Sauce
BCC: These are the figures for Stuffed Mortar Shell: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: We are under the effect of Spirit of Peppermint
BCC: I expect 151 damage from Stuffed Mortar Shell
BCC: These are the figures for Surge of Icing: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: I expect 63 damage from Surge of Icing
BCC: These are the figures for Wave of Sauce: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: I expect 93 damage from Wave of Sauce
BCC: These are the figures for Weapon of the Pastalord: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: We are under the effect of Spirit of Peppermint
BCC: I expect 174 damage from Weapon of the Pastalord
BCC: We are going to one-shot with Cannelloni Cannon
Round 3: chef_rannos casts CANNELLONI CANNON!
Round 4: space tourist explorer ghost takes 1 damage.
You lose 12 hit points
BCC: Monster HP is 47
BCC: We are under the effect of Spirit of Peppermint
BCC: These are the figures for Cannelloni Cannon: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: We are under the effect of Spirit of Peppermint
BCC: I expect 77 damage from Cannelloni Cannon
BCC: These are the figures for Fearful Fettucini: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: I expect 174 damage from Fearful Fettucini
BCC: These are the figures for Ravioli Shurikens: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: We are under the effect of Spirit of Peppermint
BCC: I expect 45 damage from Ravioli Shurikens
BCC: These are the figures for Salsaball: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: I expect 8 damage from Salsaball
BCC: These are the figures for Saucegeyser: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: I expect 106 damage from Saucegeyser
BCC: These are the figures for Saucestorm: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: I expect 63 damage from Saucestorm
BCC: These are the figures for Spaghetti Spear: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: We are under the effect of Spirit of Peppermint
BCC: I expect 8 damage from Spaghetti Spear
BCC: These are the figures for Stream of Sauce: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: I expect 31 damage from Stream of Sauce
BCC: These are the figures for Stuffed Mortar Shell: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: We are under the effect of Spirit of Peppermint
BCC: I expect 151 damage from Stuffed Mortar Shell
BCC: These are the figures for Surge of Icing: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: I expect 63 damage from Surge of Icing
BCC: These are the figures for Wave of Sauce: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: I expect 93 damage from Wave of Sauce
BCC: These are the figures for Weapon of the Pastalord: Bonus: 69.0 and 1.2%//0.0/5.0/0.0/0.0/0.0/El: 5.0/Myst: 103.0
BCC: We are under the effect of Spirit of Peppermint
BCC: I expect 174 damage from Weapon of the Pastalord
BCC: We are going to one-shot with Cannelloni Cannon
Round 4: chef_rannos casts CANNELLONI CANNON!
KoLmafia declares world peace.
Round 5: space tourist explorer ghost takes 1 damage.
You lose 10 hit points
Click here to continue in the relay browser.

??? Why would it use skills that do 1 damage? I have everything permed for lvl 1-15 skills for all classes, so there is plenty to choose from. ;)
 

Winterbay

Active member
That would be a BCAscend problem (as clarified by the loads of BCC rather than WHAM in the printout). If you are running BCA as a myst-class and want it to use your CCS you need to set the appropriate setting in the relay.-script, otherwise it uses the built-in myst-consult-part which, while being what WHAM started from isn't really very good :)

Also, seeing as you are under the effect of "Spirit of Peppermint" it's interesting that the spooky/phys resistant monster takes 1 damage from the Cannon. I assume you were a sauceror then?
 
Don't untuned pasta spells have a continual chance for physical damage? So this was just bad luck?

It wouldn't matter...every time I tried to remove "Spirit of Peppermint" the darn script added it back to the mood.

I really don't want to learn this new zone LOL.
 
That would be a BCAscend problem (as clarified by the loads of BCC rather than WHAM in the printout). If you are running BCA as a myst-class and want it to use your CCS you need to set the appropriate setting in the relay.-script, otherwise it uses the built-in myst-consult-part which, while being what WHAM started from isn't really very good :)

Also, seeing as you are under the effect of "Spirit of Peppermint" it's interesting that the spooky/phys resistant monster takes 1 damage from the Cannon. I assume you were a sauceror then?


Nope, HCNP Pastamancer...and changed the CCS setting. I normally do muscle or moxie runs with the script so completely forgot about that. :)


It was really annoying that I could do LTS with the electric crutch twice and it'd kill the baddie, yet the script wasn't figuring out that it sucked at combat in the zone. :D
 
OK *this* looks like a WHAM problem. lol

Code:
[605] A-Boo Peak
Encounter: Claybender Sorcerer Ghost
Strategy: /~/.kolmafia/ccs/WHAM.ccs [default]
Round 0: chef_rannos wins initiative!
WHAM: Running SmartStasis
5/5 monsters drop goals here.
This monster is the best source of goals (0)!
WHAM: Starting evaluation and performing of attack
Round 1: chef_rannos executes a macro!
Round 1: chef_rannos casts CANNELLONI CANNON!
Round 2: claybender sorcerer ghost takes 1 damage.
You lose 13 hit points
WHAM: Starting evaluation and performing of attack
Round 2: chef_rannos executes a macro!
Round 2: chef_rannos casts CANNELLONI CANNON!
Round 3: claybender sorcerer ghost takes 1 damage.
You lose 12 hit points
WHAM: Starting evaluation and performing of attack
Round 3: chef_rannos executes a macro!
Round 3: chef_rannos casts CANNELLONI CANNON!
Round 4: claybender sorcerer ghost takes 1 damage.
You lose 13 hit points
WHAM: Starting evaluation and performing of attack
Round 4: chef_rannos executes a macro!
Round 4: chef_rannos casts CANNELLONI CANNON!
Round 5: claybender sorcerer ghost takes 1 damage.
You lose 12 hit points
WHAM: Starting evaluation and performing of attack
Round 5: chef_rannos executes a macro!
Round 5: chef_rannos casts CANNELLONI CANNON!
Round 6: claybender sorcerer ghost takes 1 damage.
You lose 12 hit points
WHAM: Starting evaluation and performing of attack
Round 6: chef_rannos executes a macro!
Round 6: chef_rannos casts CANNELLONI CANNON!
Round 7: claybender sorcerer ghost takes 1 damage.
You lose 14 hit points
WHAM: Starting evaluation and performing of attack
Round 7: chef_rannos executes a macro!
Round 7: chef_rannos casts CANNELLONI CANNON!
Round 8: claybender sorcerer ghost takes 1 damage.
You lose 14 hit points
Round 8: chef_rannos attacks!
Round 9: claybender sorcerer ghost takes 42 damage.
You lose 12 hit points

You've had the crap beaten out of you... attempting to find some more crap.
 
Yeah...I ended up equipping an extreme meat crossbow, using offensive joke (nice delevel and damage woohoo) and then I'd fire off one bolt from the crossbow to finish off the monster.
 

xKiv

Active member
If I didn't trust wiki completely and unconditionally [1], I would think those ghost are also immune to cold damage, not just spooky and physical ...

[1] what, did you think I do?
 

Winterbay

Active member
That would definitely explain the problem as a pastamancer running BCA since that uses spirit of peppermint for all combats. I need to fix that to be at least somewhat dependent on zone going in to...
 

Bale

Minion
That would definitely explain the problem as a pastamancer running BCA since that uses spirit of peppermint for all combats. I need to fix that to be at least somewhat dependent on zone going in to...

I'll equip bejeweled cufflinks to check it out.

You're fighting a Dusken Raider Ghost

Fire your bounty-hunting rifle, you do. Hit for 1 (+6) (+3) (+6) (+1) (+3) damage, you have.

You're fighting a Space Tourist Explorer Ghost

You fire a few blasts from your bounty-hunting rifle. PEW PEW! You hit for 1 (+6) (+3) (+6) (+1) (+3) damage.

Definitely not a problem with spirit of peppermint. I've already used my rhino to banish the Claybender Ghost today, so I cannot verify if it is the same, but odds are that it also is simply spooky aligned and physically immune. No problem with spirit of peppermint at all.
 
Last edited:

Alhifar

Member
And just to be sure, I tested against the Claybender Ghost with Spirit of Peppermint, using cannon.
CRITICAL HIT! You summon a massive cannelloni cannon and fire it at your opponent. It blasts it with freon, dealing 60 damage.
 
Top