Elemental weakness multiplies with elemental resistance
I think I get you. To clarify: say we have a stench-aligned monster with no special resistances. That monster will be vulnerable to sleaze and cold, taking 200% damage from them. Now, say we are running +50 ML. Our monster's spooky and hot resistance will be 20%, the bonus from running +50 ML. Its stench resistance will still be the maximum (all damage reduced to 1). But for the elements it's vulnerable to, it will take 160% damage (200% reduced by 20%), yes?
There aren't any monsters which are only slightly weak to an element, are there? Assuming not, so since the resistance bug is rather severe we have ourselves an update:
r87 Update!
In addition to fixing the rather serious elemental resistance bug as mentioned above, this update brings us a fairly significant overhaul of the way monster data is handled by BatBrain. Unfortunately, this update breaks most of the scripts that rely on BatBrain, as forewarned in the WHAM thread, however I posted a version of WHAM that works with the update and I'm also about to update all the rest so it should be quite painless for most of you.
All the monster data which was previously stored in a float[string] map -- and even some of the global variables -- has now been moved into a
monster_data record type. Each record contains all the special information we need for a given monster which can't be obtained by mafia's functions or proxy records. Further, we now statically maintain a database of monsters. Each time you encounter a monster, if the monster's record is already cached, we'll just use that data rather than rebuilding it from scratch. Of course, some monsters are variable -- such as Fun-Guy playmates or the recent combat training snowmen -- and should never be cached; so for these monsters we now support a "variable" monster keyword.
I've also added another new keyword for monsters: "onlyhurtby". Use this keyword for monsters that can only be damaged in special ways. Presently supported: "pottery", "healing", and all weapon types (this keyword obsoletes the "seal" keyword which will eventually be removed).
Some other goodies that made their respective ways into this update:
- Temporarily blacklist your fizzing spore pods until you have blown up the cave wall with them.
- Correctly apply the "dodge" monster keyword.
- Correctly handle the "underwater" keyword. After batfactors was being loaded statically, underwater options were being permanently removed whenever you adventured terrestrially. Now they are filtered in to_event() so those underwater-only options will now show up for all you divers out there.
- Rather than adding tons of player damage (what really happens), don't even allow options dealing more than 39 damage into opts vs. mine crabs.
- Use a global variable "where" throughout the BatBrain environment instead of my_location(). Another step toward extracombat uses of BatBrain.
- Support for the ice hotel bell.
- Support (and by "support" I mean "ignore") a few more training snowman parts.
Enjoy!