BatBrain -- a central nervous system for consult scripts

You need something like Tortoise SVN or similar. Or alternative you can use, until Zarqon updates this one, the version in the first post of the WHAM-thread which is fixed.
 
New upadate breaking BB:
r11624 | lostcalpolydude | 2012-11-14 06:34:40 +0000 (Wed, 14 Nov 2012) | 1 line

Recognize monsters whose names appear to start with "The " when it isn't actually part of the monster's name
Code:
Bad monster value: "the naughty sorceress" (BatBrain.ash, line 847)
Bad monster value: "the spaghetti demon" (BatBrain.ash, line 1175)
Bad monster value: "the naughty sorceress" (BatBrain.ash, line 1217)
 
I think it was the earlier version that removed the "the" from those names that actually broke it. The version posted in the WHAM-thread has been fied fo rthis issue, but contains some minor changes apart from that as well.
 
Hey FYI, the matchers for the Pop-and-Lock Raver in 1.26 aren't quite right, so it won't learn that rave skill. I personally fixed it by paring the matcher down to just the "spastic and jerky" bit:

Code:
      case $monster[pop-and-lock raver]: if (!have_skill($skill[pop and lock it]) && have_skill($skill[gothy handwave]) &&
             !happened($skill[gothy handwave]) && contains_text(action,"[B]spastic and jerky[/B]") && my_stat("mp") > 0)
         return act(use_skill($skill[gothy handwave])); break;

Code:
      case $monster[pop-and-lock raver]: if (!have_skill($skill[pop and lock it]) && have_skill($skill[gothy handwave]) &&
             !happened($skill[gothy handwave]))
         res.append("if match \"[B]spastic and jerky[/B]\"; skill 49; endif; "); break;
 
Last edited:
[2594] McMillicancuddy's Farm
Encounter: Malevolent Tofurkey
Strategy: D:\Games\KoL\Current Builds\Joe Derp\ccs\default.ccs [malevolent tofurkey]
Round 0: Joe Derp wins initiative!
Reserved word 'in' cannot be a key variable name (BatBrain.ash, line 475)
Consult script 'SmartStasis.ash' not found.

You're on your own, partner.
Click here to continue in the relay browser.
 
Ehhmm... That must be a really really old version of BatBrain. Line 475 in both my modified one and the one in the first post of this thread is "return dmgt;"...
 
1.27 Update

  • Keep up with mafia's monster name updates.
  • No more division by zero for Zombie Masters, as discovered by Raven.
  • Change the matcher for the raver skill, as suggested by Smelly.
  • I noticed that BatBrain was not properly accounting for equipment and effects that affect combat, such as the double-ice box I've been wearing this run. It definitely used to work long ago, and I don't think I've changed that code since. After lots of debug code to narrow it down, I finally realized I'd been relying on mafia auto-casting items to strings in order to match the function declaration; so adding some to_string()'s fixed it. Who knows how long that's been broken?

Enjoy!


That seems like something that mafia should fix. Do The Lost Glasses reduce the initial defense by 15% or the current "effective" defense?

Drat, I forgot to test this before ascending. Mafia accounting for the glasses in its reported monster defense would be excellent, and would save me a headache.

That said, would it make sense to use the same technique used for Infectious Bite for Stringozzi Serpent?

This technique involves permanently adding something to the base round, meaning that it will always exist from that point forward. Anything with a changing value (such as all sorts of poisoning attacks) wouldn't work so well for that, unfortunately. There are probably other things that would work, however.

Also, any reason why you removed the auto-hit code for the zombie skills and bear skills that auto-hit?

I'm fairly sure all skills are assumed to auto-hit unless explicitly coded otherwise...? Are you seeing otherwise?
 
I'm fairly sure all skills are assumed to auto-hit unless explicitly coded otherwise...? Are you seeing otherwise?

Well... Looking closer that appears indeed to be the case. Failed to notice the default-case I guess.

ETA: You forgot to add the physically resistant monsters from the a-boo peak:
Code:
      case $monster[battlie knight ghost]:
      case $monster[claybender sorcerer ghost]:
      case $monster[dusken raider ghost]:
      case $monster[space tourist explorer ghost]:
      case $monster[whatsian commando ghost]:
      case $monster[snow queen]:
      case $monster[chalkdust wraith]:
      case $monster[ancient protector spirit]:
      case $monster[Protector Spectre]:
      case $monster[sexy sorority ghost]:
      case $monster[ghost miner]: mres[$element[none]] = 1; break;
(my entire section of physically resistant monsters)
 
Last edited:
I have run into an interesting issue with "Jiggle", it appears that the entry in happened is different depending on if the action has happened (chefstaff) or just been enqueued (jiggle). I can't find where this is set in set_happened meaning that I'm completely confused as to why this is. I do believe I have a workaround for now, but consistency is probably better...
 
1.28 Update

A few little fixies for Crimbo season.

  • Sauceror skills properly account for saucespheres returning MP/HP. This ended up being mostly a batfactors thing rather than special code in the script. My Classy Sauceror run was very unsatisfactory prior to this change.
  • Knocked something off the TODO list: Raging Animal grants +30 familiar damage.
  • Added the new resistant monsters Winterbay mentioned above.
  • While I was at it, BatBrain now uses the monster proxy record fields attack_element and defense_element where appropriate, rather than ASH's monster_element(), which doesn't differentiate attack/defense. There are currently over 40 monsters where attack_element != defense_element, so this ought to be a helpful change.

Enjoy and Merry Crimbo!

I'm pretty sure I also recall when fighting Groar that mafia wasn't aware his defense and/or attack element is cold. Can anyone confirm this?

@Winterbay: I took a look at that as well. The most likely reason is that KoL uses "chefstaff" rather than "jiggle" on the page showing the results of the jiggle. Can you look at the HTML after submitting a jiggle macro and tell me what the HTML comment says? It'll say something like "<!-- macroaction: chefstaff/jiggle -->". How are you jiggling the staff? From a relay script, or from WHAM? The word "chefstaff" doesn't appear in BatBrain other than as an item_type() check, so it either comes from KoL itself or another source, such as a non-BatBrain-generated macro being submitted prior to BatBrain parsing the page. It sounds like the former, but the latter is a possibility.

EDIT: The Wiki now appears to have a much more comprehensive knowledge of plural monsters far exceeding the information in our long-un-updated pluralMonsters.txt, so I just updated that to the best of the Wiki's knowledge. Some of the myst-class spells were missing AoE information as well. The current data files are now as knowledgeable as it's possible to be about plural monsters and your skills' effect on them.
 
Last edited:
Believe that Groar HAS cold attacks, but his normal attack isn't cold damage. I might be wrong though, but that's what the attacks themselves say.
 
I'm not clear about his attacks -- there seemed to be something special going on there -- but I do seem to recall him resisting the cold damage my spells dealt, meaning that his defense element, at least, is probably cold.
 
Back
Top