BatBrain -- a central nervous system for consult scripts

Okay... I just have to add this...

Code:
fvars["fistbonus"] = min(10,have_effect($effect[earthen fist])*10);

Seriously? Was that so much prettier than the saner version of...

Code:
fvars["fistbonus"] = have_effect($effect[earthen fist]) >0? 10: 0

? You're not going to convince me that your version was faster so I know that you were just amusing yourself. You're just batshit insane sometimes. In a good way.

Oh, and in case it didn't come across in my previous post (I think it really did not come across), I am really happy that you're back and ripping me a new one for forking your script without safe versioning.
 
Oh nice. One question though: Doesn't the fist-skills get their bonuses from known skills even after you break the prism (and thus is no longer obliged to use no weapon)? If so the current setup would mean that those fvars don't get populated and if you continue to run without weapon (for whatever reason) you will lose out on those skills.
 
Does my_path() return an empty string after freeing the King? News to me.

Haha Bale, that comes from all the formulas I had to make for batfactors. However, I should change it to min(1,have_effect($effect[earthen fist]))*10, that's better.
 
Does my_path() return an empty string after freeing the King?

Correct. Just as with Beecore, the value only exists when you are under a restriction. Once you are no longer under a path restriction you can autosell stuff and use your hands. That is reflected by KoL's options and consequently Mafia.
 
Okay, will change the path check to a fistSkillsKnown > 0 check. I'm assuming that mafia doesn't include permed Master in fistSkillsKnown -- it wouldn't be terribly useful if it did.

I'll also use mafia's recent Unarmed modifier rather than checking the hand slots.

By the way, JakAtk just made me a fabulous new animated sig which features my shiny Regex Tongs! In an unanticipated twist, he made the tongs actually made out of regex. Wicked sweet. I'll change that when I get home.
 
Okay, will change the path check to a fistSkillsKnown > 0 check. I'm assuming that mafia doesn't include permed Master in fistSkillsKnown -- it wouldn't be terribly useful if it did.

That is correct.

Also, my_path() returns "None" in aftercore rather than an empty string. I don't think it actually matters for this case.
 
Yeah, this shouldn't happen.
Code:
[1644] Giant's Castle
Encounter: Procrastination Giant
Round 0:     fluxxdog wins initiative!
map_pluralMonsters.txt =>     2011-06-09T02:13:59-05:00, checked 20110907
You     have the latest pluralMonsters.txt. Will not check again today.
map_batfactors.txt     => 2011-09-06T04:34:58-05:00, checked 20110907
You     have the latest batfactors.txt. Will not check again today.
Factoring     in Scarysauce: (6) damage,     retal
Checking for updates (running BatBrain ver.     1.10)...
_version_batbrain => 1.10
You     have a current version of BatBrain.
Profit per round:                             Action                          Profit                          Damage                          Other                                      base; Stocking Mimic; enthroned Hovering Sombrero (24.19μ)                          88.47μ                          6.02 (6.3) Actual:           12.32 (-1.96 μ/dmg)                          Att: -1.97 (-0.01 DPR) Def: -1.97           HP: 6.56 MP: 6.56                      
    Checking for updates (running SmartStasis ver. 3.6)...
_version_SS     => 3.6
You have a current version of SmartStasis.
Custom     action: skill 7095 (stun first with use 5230)
Round 1: fluxxdog     executes a macro!
Round 1: fluxxdog tries to steal an item!
Round 2:     fluxxdog uses the oversized snowflake!
Round 3: Flotando passes through     your opponent, freaking him out and dealing 17 damage.
Round 3:     procrastination giant takes 17 damage.
Round 3: fluxxdog casts GIVE     YOUR OPPONENT THE STINKEYE!
Round 4: Flotando passes through your     opponent, freaking him out and dealing 24 damage.
Round 4:     procrastination giant takes 24 damage.
It's planning to use Stink eye but first use a stunning item that's not reusable?
Code:
> ash $item[oversized snowflake].reusable

Returned:     false
 
Pretty sure that's a SS bug, not BB.

SS will stun before doing some actions (like flyering), which I like. It however seems to use disposable stunners preferentially over, say, noodles, which is less than optimal.

I wouldn't say SS should completely disregard using non-reusable stunners, since I'm fine with it using my finger cuffs if it thinks it's a good idea (and I've already used/ don't have mp for noodles).
 
Evidently that was your cheapest-per-round stunner. I'm guessing that has to do with it being a new item (checking historical_price() on that would have been your biggest clue). The script should probably treat unknown values (items valued at 0) as being worth a lot, if it doesn't already. Also, the "share mall prices with other users" option should be enabled in your preferences, to get more accurate pricing when adventuring, since mall_price() is inaccessible during combat.

In my current Fist run, it's been preferring the Monkey Brain technique to stun with -- which works fine at higher levels but at lower levels it often kills the monster before it gets to the action it actually intended to do. It also tries to do it more than once, even though it only actually stuns once. Some additional checks are needed to the stun sort, and tracking for Monkey Brain.

I have no plan to remove single-use stunners from the sort -- slinging gobs of wet hair (for instance) along with a damaging item may save your skin in some situations. Or even castle junk like plot holes may reduce the damage you take considerably.

P.S. Isn't my siggy fantastic?! I enjoy watching myself defeat the Nefarious Regex over and over again.
 
I really want to see the bigger version of that signature to get more of the awesome.

I really like the bat servants. They're so cute!
 
Evidently that was your cheapest-per-round stunner.
No, it's using a stun item before using a banish. Cost wasn't the issue. If it's going to banish, why stun?
P.S. Isn't my siggy fantastic?! I enjoy watching myself defeat the Nefarious Regex over and over again.
I think you're a little batty for having it :p (Seriously, cool sig ^^)
 
zarqon, you seem to have left something really important out of BatBrain.

It thinks that my dictionary does 45 damage!! That is somewhat troublesome. Apparently it doesn't parse out the monsters in the special field and reduce to 0 if it isn't one of those.
 
Another doozy of a bug in BatBrain, but I can fix this one! I haven't been happy with it's calculation of my attack chance lately. Unless I'm missing something important the problem is really obvious. In hitchance():

PHP:
      case "attack": if (equipped_item($slot[weapon]) == $item[none] && have_skill($skill[master of the surprising fist])) attack += 20;

Should there be a break; at the end of that line? Yes?
 
If you get Temporary Amnesia during a combat, BatBrain will still suggest to use skills even though they always fail. This is affecting smart stasis.

I never knew this but it seems if a skill fails to activate because of amnesia familiar actions don't occur either.
 
@Rinn: Aha. Immediately after loading batfactors, BatBrain removes all skills if you have amnesia:

PHP:
if (have_effect($effect[temporary amnesia]) > 0) {     // this is line 433-ish
   remove factors["skill"];                    // remove skills if impossible
   vprint("You can't cast any skills with amnesia!",-5);
}

However, that means it no longer filters for the effect during combat. Will add it to the build_skills bit.

Bale, yes, break needed there. My copy also uses the Unarmed modifier rather than the weapon slot.

EDIT: The dictionary issue is because batfactors is missing the "monster" keyword before the list of monsters. Ha!

Will throw up an update with these fixes in about 10 minutes; batfactors will have to wait till I'm on the subway though.
 
Last edited:
Awesome. Now I can pull some workarounds out of DestroyAllMonsters.

Unfortunately it is a real drag not being able to upload to your mapmanager. I want to add a line to batfactors so that DestroyAllMonsters will auto-use little parachute guys. Can you add this for me? Is it going to cause serious problems that the restoration doesn't appear until the end of combat? I need that there for the profit calculation.

Code:
item	4628	little parachute guy	0	none	hp {10,15,20}, mp {10,15,20}
 
Last edited:
I'm getting an error in the gcli before a Disco Nirvana.......
Code:
The string "5005; skill 5008" is not an integer; returning 50055008 (BatBrain.ash, line 1020)
...although the Disco Nirvana is executed correctly.
 
Bug! Easy to fix.

Code:
   if ($monsters[naughty sorority nurse, quiet healer] contains m) return 0;   // these monsters have no attack
That is incorrect. the quiet healer has an attack that is perfectly functional for killing adventurerers even though she does sometimes heal her adversary by accident.

Fixed:

Code:
   if ($monster[naughty sorority nurse] == m) return 0;   // these monsters have no attack
 
Back
Top