1.8 Update!
I'm very pleased with all the goodies in this update. Please enjoy reading about how awesome this script is becoming.
As I mentioned before, the damage cap update is not happening this time. I did, however, cap the hipster's attack in batfactors since it was causing very inaccurate predictions. BatBrain also tracks the Hipster's substats-granting action, although as of yet it doesn't do anything differently about it.
Robust Tracking
Speaking of tracking, there's now a new mechanism for tracking once-per-combat happenings which can't be otherwise detected. The previous method of storing these in global variables worked fine -- assuming that script ran continuously. But for fight.php overrides or interrupted script execution, the variables are reset and the script therefore gives erroneous information. So now, the script saves tracked information in an external
int[string] map. The string is the event being tracked, and the integer is the turn on which the event last happened. The map is only written if an event actually happens.
Current happenings tracked:
- famspent: For hobo monkeys, Slimelings, Spirit Hobos, and GGG's. Your familiar has used up its special actions.
- smusted: Your Bandersnatch has created a cloud of Smust around your opponent.
- waved: You have waved at a raver this combat.
- mistletoed: You have cast Stealth Mistletoe.
- stolen: You have successfully stolen an item by pickpocketing or Rave Steal.
- mother_element: You have triggered Mother Slime's resistance to element.
- hipster_stats: Your Mini-Hipster has performed its stats-granting action.
I'm very excited to finally see my fight.php relay override wise up about Mother Slime's resistances throughout combat, rather than only on the round in which they are triggered.
You can use this mechanism to track happenings as well, using these functions:
boolean happened(string occurrance)
void set_happened(string occurrance)
Use the former to check if something has happened. Use the latter to inform BatBrain that whatever it is has happened.
Critically Awesome
Thanks to all of the recent hitchance reworking, it was a simple matter to add the critical event to your regular attack. Many weapons or other items cause something extra to happen on critical hits, so those items were added to batfactors and the critical event was factored in.
Poisoned? Eh, It's Nothing
BatBrain now ignores two things: 1) mafia's autoAntidote setting, and b) harmless poisons. A poison is considered harmless if, having the effect, the monster still can't hit you and your attack can still kill the monster before maxround. Toad in the Hole, however, is always dangerous.
As a nifty side effect of adding this, my_stat() now works for "Muscle", "Mysticality", and "Moxie" and is sensitive to "whatif." This is a step along an exciting path towards making BatBrain totally speculative. Another side effect is that now I'm often seeing completely empty batrounds.
Misc
- Fix the lower bounds issue in hitch-ance formula.
- Fix the max => min issue in the Harpoon! formula.
- During enqueueing, precede deleveling skills with Mistletoe if you have it available and haven't used it yet this combat. For skills where it has no effect, it's still completely harmless to cast so better detection of which skills it affects is unnecessary.
- Parse events more efficiently using a matcher. Parse the 'stats' and 'note' fields, and include a note field in the advevent, since that extra info may be desirable for relay overrides.
Enjoy the crap out of this update!