Winterbay's Helpful Automatic Monsterbasher (WHAM)

Filthworms, always. Even if you die. :)

Besides them... I think 'goal and survive' basically covers it. Maybe throw in 'item drop chance with current modifiers is under 50%' or something, but...
 
Filthworms, always. Even if you die. :)

LoL! Yeah, even if I cannot survive a hit from a filthworm I'd want to smash & graaagh.

Though if the goal's drop chance is greater than or equial to ceil(100 * (100.0/(100 + item_drop_modifier()))) then it is guaranteed, so you might as well skip the pickpocketing.
 
I just got Ravenous Pounce, and it seemed trivial to implement the "hunger" factor

Code:
skill    12010    Ravenous Pounce    hunger*{6,7,8}    0    regular !!An attack that deals more damage the hungrier you are and always hits

Added to batfactors:

Code:
fvars["hunger"] = fullness_limit() - my_fullness();

And a bit to ensure hitchance = 100%


Where did you add the fvars line?
 
Right. Version 3.5 uploaded which should use smash&graagh in a safe and useful manner (unless you are fighting filthworms in which case it will only use it in a useful manner).
 
Forgot to add that I adapted the unkown_ml check to not abort at unknown_ml = 0 if your Monster Manuel gives you the stats of the, for Mafia, unknown monster.
 
Forgot to add that I adapted the unkown_ml check to not abort at unknown_ml = 0 if your Monster Manuel gives you the stats of the, for Mafia, unknown monster.

I'm not understanding something. If Manuel gives stats for the monster, then Mafia automatically takes the stats from Manuel. So the monster's stats are simply not unknown. What did you have to change?
 
I can't really remember but it failed to not abort for some reason even though Mafia picked up on the stats. It was obviously some wonderful aspect of how I had coded the way to set unknown_ml that made it not 100% compatible.

Edit: Looking at it now I had it to abort if monster_hp($monster) was 0, which it still is if the monster is not in Mafia's database, even though monster_hp() for the current fight is set to the correct value due to Manuel so now I check if monster_hp() is 0 instead.
 
Last edited:
It aborted trying to kill a ghost miner...but Kodiak Moment one hit...

Code:
[185] Knob Shaft
Encounter: ghost miner
Strategy: /home/bhanes/.kolmafia/ccs/WHAM.ccs [default]
Round 0: chef_rannos wins initiative!
WHAM: Running SmartStasis
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: Bear Hug: 1.00 potential damage (raw damage: 25.00) and a hitchance of 100.00%.
WHAM: Kodiak Moment: 1.00 potential damage (raw damage: 223.34) and a hitchance of 100.00%.
WHAM: Grizzly Scene: 1.00 potential damage (raw damage: 16.28) and a hitchance of 100.00%.
WHAM: Attack with your weapon: 1.00 potential damage (raw damage: 213.19) and a hitchance of 95.45%.
WHAM: razor-sharp can lid: 1.00 potential damage (raw damage: 2.50) and a hitchance of 100.00%.
WHAM: Knob Goblin firecracker: 1.00 potential damage (raw damage: 3.00) and a hitchance of 100.00%.
WHAM: Bear-Backrub: 0.00 potential damage (raw damage: 0.00) and a hitchance of 100.00%.
WHAM: Bear-ly Legal: 0.00 potential damage (raw damage: 0.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: Meat Shields: 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 1: chef_rannos executes a macro!
KoLmafia thinks it is round 2 but KoL thinks it is round 1
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.
Click here to continue in the relay browser.


BCC: You aborted, so so am I. This abort may have been caused by a rogue condition not being met. If this is unexpected, please paste the CLI output, as well as the results of typing 'condition check' without the quotes, into the mafia CLI window now.
Round 2: chef_rannos casts KODIAK MOMENT!
KoLmafia thinks it is round 3 but KoL thinks it is round 2
Round 3: ghost miner takes 71 damage.
Round 3: chef_rannos wins the fight!
You gain 3 hit points
You acquire an item: styrofoam ore
After Battle: Toothy rants a little about all the changes he'll make when he rules the world. You refrain from asking how he intends to do that without any arms.
You gain 6 Strongness
You gain a Muscle point!
You gain 2 Magicalness
You gain 3 Chutzpah

Do I need to tweak a data file? It looks like it saw kodiak moment would do tons of damage, but maybe it's not typed to elemental right?
 
Huh, what type of damage did kodiak moment do? The wiki seems to claim that it's just an auto-hit which doesn't make sense if you can beat a physically resistant monster for 73 damage with it...
 
In Zombie, each of the bear arms skills are slightly different. Kodiak Moment does spooky and stench damage for example.
 
Thanks, and there's your problem then. There is no support for that difference in batbrain and so it will do odd things like this. You could edit your batfactors datafile to say "spooky, stench" I guess, but then it would only work for zombies. It'll need to be added as special cases in batbrain I think.
 
So, I played around some more with bear- and zombie-skills and ended up with following versions of batbrain, batfactors and wham. Anyone willing to try them out?

This does not take the auto-crit of Kodiak Moment into account, but should adapt the damage type when in a zombie run.
 
Last edited:
Ehhmm... Apparently there was one thing missing in the data file so it didn't work. This should work.
 
Last edited:
Basement diving. Failing to enque shard of double ice. 90+ in inventory.

gCLI with verbosity 7 below

Code:
[1792] Fernswarthy's Basement (Level 158)
Encounter: The Beast with 2,396 Ears
Round 0: cafebabe loses initiative!
You lose 563 hit points
1 HP costs 0.047μ. ( 1,959 / 2522 )
1 MP costs 2.891μ. ( 288 / 500 )
ATT: 2,396 (94% × 567.26, death in 4)
DEF: 2,157 (26.39% × 34.29, win in 226)
HP: 2,041, Value: 8,428.04 μ
WHAM: You have no profitable MP restoratives.
WHAM: You have no profitable HP restoratives.
WHAM: Monster HP is 2041.0.
WHAM: Running SmartStasis
Profit per round: ActionProfitDamageOtherbase (0μ)0μ--
WHAM: SmartStasis complete.
WHAM: Starting evaluation and performing of attack
Auto-funk: merging 'use 5048' and 'use 5048'.
WHAM: Enqueuing a stun to help with the battle
WHAM: Enqueueing shard of double-ice (macroid use 5048).
WHAM: Enqueueing shard of double-ice (macroid use 5048).
WHAM: Failed to enqueue shard of double-ice (entry 3 in the strategy).
WHAM: The following combat strategy was attempted: 
Entangling Noodles
shard of double-ice
shard of double-ice
Round 1: cafebabe executes a macro!
KoLmafia thinks it is round 2 but KoL thinks it is round 1
WHAM: Failed to enqueue shard of double-ice. There's more detailed information in the gCLI.
You're on your own, partner.
Click here to continue in the relay browser.

KoLmafia thinks it is round 3 but KoL thinks it is round 1
Round 3: cafebabe uses the shard of double-ice and uses the shard of double-ice!
KoLmafia thinks it is round 4 but KoL thinks it is round 2
Round 4: the beast with n ears takes 1381 damage.
Round 4: the beast with n ears takes 2762 damage.
Round 4: cafebabe wins the fight!
After Battle: Eman bends its brim into an approximation of a smile.
You gain 330 Strongness
You gain 149 Enchantedness
You gain a Mysticality point!
You gain 169 Sarcasm
You acquire an item: sugar shard (3)
Your sugar shorts shattered.
 
Anyone willing to try them out?
Yes please, I've downloaded and installed, but I'm already done for the day.

Any particular feedback that might be helpful?

I'm guessing it probably won't convert new minions from weak monsters, since the synergy between infections bite and plague claws isn't there. Are horde costs considered at all?

I guess I shouldn't ask so many questions and just try it tomorrow. I think adding WHAM onto the end of my CCS (bite, indigo, blue, plague, plague), might work out well for me if those things aren't handled.
 
Ehhmm... Apparently there was one thing missing in the data file so it didn't work. This should work.


I'm getting this with an abort:

Code:
[441] eXtreme Slope
Encounter: eXtreme cross-country hippy
Strategy: /home/bhanes/.kolmafia/ccs/WHAM.ccs [default]
Round 0: chef_rannos wins initiative!
Round 1: Dead Items sticks out his foot and trips your opponent
Round 1: extreme cross-country hippy drops 14 attack power.
Round 1: extreme cross-country hippy drops 14 defense.
Expression syntax errors for 'modifier_eval()':
Expected end, found spooky, (zlib.ash, line 162)
Round 1: chef_rannos casts RAVENOUS POUNCE!
Round 2: extreme cross-country hippy takes 542 damage.
Round 2: chef_rannos wins the fight!
You gain 3 hit points
After Battle: Dead Items does a series of pirouettes without losing his balance. Keeping his head stationary while his body turns could be considered cheating, though.
You acquire an item: eXtreme scarf
You acquire an item: decent brain
You gain 9 Strengthliness
You gain 6 Enchantedness
You gain 5 Smarm


My CCS calls wham, then ravenous pounce, then attack (in case WHAM doesn't kill the monster).


EDIT: I commented out the elemental tuning added for Kodiak Moment in the revised BatBrain.ash and it continues nicely...I'm not familiar with BatBrain and don't have the time to read through it tonight...maybe tomorrow if you don't have it figured out.
 
Last edited:
Basement diving. Failing to enque shard of double ice. 90+ in inventory.

gCLI with verbosity 7 below

Code:
[1792] Fernswarthy's Basement (Level 158)
Encounter: The Beast with 2,396 Ears
Round 0: cafebabe loses initiative!
You lose 563 hit points
1 HP costs 0.047μ. ( 1,959 / 2522 )
1 MP costs 2.891μ. ( 288 / 500 )
ATT: 2,396 (94% × 567.26, death in 4)
DEF: 2,157 (26.39% × 34.29, win in 226)
HP: 2,041, Value: 8,428.04 μ
WHAM: You have no profitable MP restoratives.
WHAM: You have no profitable HP restoratives.
WHAM: Monster HP is 2041.0.
WHAM: Running SmartStasis
Profit per round: ActionProfitDamageOtherbase (0μ)0μ--
WHAM: SmartStasis complete.
WHAM: Starting evaluation and performing of attack
Auto-funk: merging 'use 5048' and 'use 5048'.
WHAM: Enqueuing a stun to help with the battle
WHAM: Enqueueing shard of double-ice (macroid use 5048).
WHAM: Enqueueing shard of double-ice (macroid use 5048).
WHAM: Failed to enqueue shard of double-ice (entry 3 in the strategy).
WHAM: The following combat strategy was attempted: 
Entangling Noodles
shard of double-ice
shard of double-ice
Round 1: cafebabe executes a macro!
KoLmafia thinks it is round 2 but KoL thinks it is round 1
WHAM: Failed to enqueue shard of double-ice. There's more detailed information in the gCLI.
You're on your own, partner.
Click here to continue in the relay browser.

KoLmafia thinks it is round 3 but KoL thinks it is round 1
Round 3: cafebabe uses the shard of double-ice and uses the shard of double-ice!
KoLmafia thinks it is round 4 but KoL thinks it is round 2
Round 4: the beast with n ears takes 1381 damage.
Round 4: the beast with n ears takes 2762 damage.
Round 4: cafebabe wins the fight!
After Battle: Eman bends its brim into an approximation of a smile.
You gain 330 Strongness
You gain 149 Enchantedness
You gain a Mysticality point!
You gain 169 Sarcasm
You acquire an item: sugar shard (3)
Your sugar shorts shattered.

The problem appear to be that it tried to enqueue two shards which won't work since it's marked as a once item. This appears to be because I forgot to add the once-checking code to the place that tries to use another item if it enqueues one first. Fixed locally.

Add the following to the item_option() function to fix it:
Code:
if(contains_text(factors["item", to_int(excise(opt.id,"use ",""))].special, "once") && happened(opt.id))
   continue;    //Don't retry things that can only be done once

Yes please, I've downloaded and installed, but I'm already done for the day.

Any particular feedback that might be helpful?

I'm guessing it probably won't convert new minions from weak monsters, since the synergy between infections bite and plague claws isn't there. Are horde costs considered at all?

I guess I shouldn't ask so many questions and just try it tomorrow. I think adding WHAM onto the end of my CCS (bite, indigo, blue, plague, plague), might work out well for me if those things aren't handled.

I especially like feedback on the bear-skills since I don't have those myself. It will create zombies with bite if it enqueues bite, which mine did at least some times yesterday.
I guess it could use bite against monsters where the best attack option will kill it somewhat quickly, like with smash&graaagh.

Horde cost is considered in the same way that MP is since mafia returns your Horde amount when asked about my_mp().

I'm getting this with an abort:

Code:
[441] eXtreme Slope
Encounter: eXtreme cross-country hippy
Strategy: /home/bhanes/.kolmafia/ccs/WHAM.ccs [default]
Round 0: chef_rannos wins initiative!
Round 1: Dead Items sticks out his foot and trips your opponent
Round 1: extreme cross-country hippy drops 14 attack power.
Round 1: extreme cross-country hippy drops 14 defense.
Expression syntax errors for 'modifier_eval()':
Expected end, found spooky, (zlib.ash, line 162)
Round 1: chef_rannos casts RAVENOUS POUNCE!
Round 2: extreme cross-country hippy takes 542 damage.
Round 2: chef_rannos wins the fight!
You gain 3 hit points
After Battle: Dead Items does a series of pirouettes without losing his balance. Keeping his head stationary while his body turns could be considered cheating, though.
You acquire an item: eXtreme scarf
You acquire an item: decent brain
You gain 9 Strengthliness
You gain 6 Enchantedness
You gain 5 Smarm


My CCS calls wham, then ravenous pounce, then attack (in case WHAM doesn't kill the monster).


EDIT: I commented out the elemental tuning added for Kodiak Moment in the revised BatBrain.ash and it continues nicely...I'm not familiar with BatBrain and don't have the time to read through it tonight...maybe tomorrow if you don't have it figured out.

Right, so that way of doing things obviously didn't work... :)

Edit: Try changing that part you commented out to:
Code:
      if (to_skill(it) == $skill[Kodiak Moment] && my_path() == "Zombie Slayer") {
         factors[te,it].dmg += " spooky, stench";
         if (factors[te,it].dmg.contains_text(monster_element(m)))
            factors[te,it].dmg.replace_string(monster_element(m)+",","");
      }
and see if that works?

Edit, edit: Or, I guess, it's easier if I just upload all three latest versions here I guess. Also, contains the fix for double-ice-sharding.
 
Last edited:
Back
Top