BatBrain -- a central nervous system for consult scripts

Theraze

Active member
Magus, the problem there is that this is a relay script, not a consult script. Relay scripts use a format like I gave... check on BatMan_RE. Yours is what you'd find in something like WHAM. :)

ckb, it's quite likely that something isn't getting calculated yet. Especially if you're Heavy Rains or something similar with additional 'unknown' skills. But I often find that there are variances... If you don't have an objection, try out BatMan_RE. It will calculate the damages (and healings, and delevellings, and...) for all available skills/items. At least, as currently known.

If you find something that doesn't work, report, as specifically as possible. :) There might be something that needs to be updated in batfactors, or maybe even actual BatBrain code changes... but anecdotal reports are very difficult to generate useful results.
 

zarqon

Well-known member
BatMan RE is doing fancy stuff and AJAXing in all the BatBrain-powered stuff after the page loads, so copypastaing from there will also fail.

For a relay script, I believe a simple act(visit_url()) as your first command will do for you.

As to the number discrepancy, we need a lot more information to figure that out. What was your attack and the monster's defense? What monster was it? Etc.
 

Magus_Prime

Well-known member
It seems that in a Heavy Rains run "Gurgle" now reflects spell damage back to the caster. Using Batbrain and WHAM I was beaten up three times before I figured out what was happening.

I'm assuming that a change to batfactors is needed.
 
Last edited:

zarqon

Well-known member
Ah I coded that wrong. BatBrain duplicates the damage to the player rather than reflecting it. Fixed in r46.
 

ckb

Minion
Staff member
For a relay script, I believe a simple act(visit_url()) as your first command will do for you.

As to the number discrepancy, we need a lot more information to figure that out. What was your attack and the monster's defense? What monster was it? Etc.

Yes zarqon, this is exactly what I was doing. I still do not understand where the number discrepancy is coming from. I am in aftercore, so no run weirdness.
I also installed BatMan RE to see what value that would give.

As a lvl 16 TT, with Muscle 346 (247), Myst 175 (159), Moxie 195 (156) attacking with bottle-rocket crossbow (Bag of Tricks off-hand)
Fighting a Steampunk Giant (+0ML) with 145 attack, 140 def
Mafia reports bonus weapon dmg as +27, +20%

for 'Attack with Weapon' Batman RE reports Damage as 45.58
When I attack: "You fire a patriotic bolt from your bottle-rocket crossbow, hitting for truth, justice, and 86 damage"

Something is off here.

Edit: spell damage and reporting seems to be spot on!
 
Last edited:

Bale

Minion
Is there any way to ask BatBrain what damage a skill actually does regardless of monster HP?

For instance, if I am a Sauceror, I want to finish off the monster with my cheapest spell that does at least 167 points of damage. (To explode my weaksauce.) However, if the monster only has 20 HP, then BatBrain will tell me it does 20 points of damage. Normally, 20 HP is a good number to know, but not in this case.
 

zarqon

Well-known member
You can directly check get_action(whatever).dmg. A quick summing function would probably come in handy there:

PHP:
spreadsum(spread nutella) {
   float res;
   foreach el,am in nutella res += am;
   return res;
}

So, spreadsum(opts[x].dmg) would give you the total damage done by the current action number x, before monster resistances.
 

Bale

Minion
So, spreadsum(opts[x].dmg) would give you the total damage done by the current action number x, before monster resistances.

I want monster resistances and elemental vulnerability to be included in the damage total. It is only the limit of monster HP that I don't want.


PS. I like your taste in spreads. Yum!
 

zarqon

Well-known member
Ah, well then this looks like a job for... Optional Parameter! r47 adds an optional hpcap parameter to dmg_dealt() (default true).
 

Bale

Minion
Thank you. I can now improve my combat script to figure out which sauce spell is best for MP regen! :)


PS. In case anyone is curious, no. This is not something I intend to publish since it isn't general purpose enough for most people. I made it a lot simpler to write by simply assuming that the character actually has every possible skill. And for most classes, WHAM is what is needed. I hope that WHAM will eventually have logic for weaksauce mp regen.
 
Last edited:

Winterbay

Active member
Weaksauce? What the heck is that? If you explain clearly (and probably in the WHAM thread) I am more likely to be able to add it :)
 

Bale

Minion
Stun duration for Accordion Bash is 3 + (max(0,SD-10)/3), where SD is the song duration of the accordion. Thus a quirky accordion stuns for 3 rounds, while a zombie accordion stuns for 6-7 rounds.

I have no idea how to add that to Batfactors.
 

Theraze

Active member
Can SD be defined by using turns_per_cast($skill[the moxious madrigal]) or something like that?

The problem lies in that KoL no longer uses your equipped accordion, but instead your best accordion, for buffs. Not sure if stuns do the same.
 

Theraze

Active member
Ah, nifty. I looked through modref, but didn't see that in there. So now comes the question of whether an off-hand accordion still counts or not. And if we care. :)
 

Theraze

Active member
Ah, that explains it. Odd that you can have a 1 handed accord ion that can't go into the second hand. Oh well. So that's easy enough... Should just be able to check the SD mod on mainhand then.
 
Top