Feature - Rejected HP Missing for Monsters

bumcheekcity

Active member
Can it be made that mafia predicts monsters who don't have HP values to have HP = ML? It's vaguely accurate and helps automated scripting of fights.

Thinking particularly of Pandamonium, where the script thinks monsters have 1HP and decides to cast trivial skills at them. I note that HP isn't completely spaded yet, but it would be helpful to have an estimate at the very least.

Edit: Actually, the way I ended up phrasing it was more of a feature. I can't seem to change this, though. Well, I consider it a feature request.
 
Last edited:
Extra ML absolutely does increase HP.

On turn 1 I turn my MCD to max because those extra 10 HP let me stasis a monster in the Haunted Pantry (with a seal tooth) while I wait for the red ray.

However, mafia already knows to include ML in the HP calculation. All that matters is that it should conclude base HP = monster level.
 
I set my myst consult script to use monster attack as a proxy for the missing HP because that seems to be roughly equivalent as well (at least for the random monsters I looked up on the wiki) so that I didn't get killed by the stupid monsters in Pandamonium.
 
Thinking particularly of Pandamonium, where the script thinks monsters have 1HP and decides to cast trivial skills at them. I note that HP isn't completely spaded yet, but it would be helpful to have an estimate at the very least.

The spading is :

Monster Stats :

The Laugh Floor
BL Imp - ML 65, HP 65 (Dwarf outfit shows 56-62 Def, 62-68 Att, 62-68 HP)
CH Imp - ML 62, HP 61 (Dwarf outfit shows 54-59 Def, 59-65 Att, 58-64 HP)
Pr Imp - ML 60, HP 60 (Dwarf outfit shows 52-57 Def, 57-63 Att, 57-63 HP)

Infernal Rackets Backstage
Inkubus - ML 58, HP 58 (Dwarf outfit shows 51-54 Def, 56-60 Att, 56-60 HP)
Serialbus - ML 60, HP 60 (Dwarf outfit shows 52-57 Def, 57-63 Att, 57-63 HP)
Suckubus - ML 55, HP 55 (Dwarf outfit shows 48-52 Def, 53-57 Att, 53-57 HP)

from : http://kolspading.com/forums/viewtopic.php?f=2&t=225
 
Thinking particularly of Pandamonium, where the script thinks monsters have 1HP and decides to cast trivial skills at them. I note that HP isn't completely spaded yet, but it would be helpful to have an estimate at the very least.
Fix your script to not do that. Or, more precisely, fix your script to do the "prediction" you want KoLmafia to do for you - which might not be what other scripts want, and which is therefore not appropriate for a core feature, in my opinion.

Looking at the monster database, I see that if we don't specify a value for HP at all, we return 0, but if we specify a value, we return that value + ML, with a minimum of 1 - even if the value was explicitly 0 in the DB, which SHOULD mean "unspaded".

I'll make it return 0 if either we don't specify a value or explicitly say it is 0.
You can fix you script to "predict" whatever you want for unspaded HP values.

I'll also add the spaded values for the 6 Pandamonium monsters Darzil listed.

Edit: Revision 9231 does those things.
 
Last edited:
I see that if we don't specify a value for HP at all, we return 0, but if we specify a value, we return that value + ML, with a minimum of 1 - even if the value was explicitly 0 in the DB, which SHOULD mean "unspaded".

I'll make it return 0 if either we don't specify a value or explicitly say it is 0.
You can fix you script to "predict" whatever you want for unspaded HP values.

OH! I like this! I've got to go and rework some code for my Adventure Advisor now! Yay!
 
Fix your script to not do that. Or, more precisely, fix your script to do the "prediction" you want KoLmafia to do for you - which might not be what other scripts want, and which is therefore not appropriate for a core feature, in my opinion.

Looking at the monster database, I see that if we don't specify a value for HP at all, we return 0, but if we specify a value, we return that value + ML, with a minimum of 1 - even if the value was explicitly 0 in the DB, which SHOULD mean "unspaded".

I'll make it return 0 if either we don't specify a value or explicitly say it is 0.
You can fix you script to "predict" whatever you want for unspaded HP values.

I'll also add the spaded values for the 6 Pandamonium monsters Darzil listed.

Edit: Revision 9231 does those things.

Thanks, that'll work great :D

Edit: Hold on a min, isn't there a chance that monster_hp() could return 0 because of HP variance?

- Base monster HP is 100 for a given monster.
- HP Variance raises that randomly one fight to 103.
- We cast two spells that do 50 damage each or whatever.
- Monster has 3HP but mafia predicts 0HP.
- Scripts interpret that HP as "unknown/unspaded" and commence prediction based on whatever they feel is most appropriate, possibly predicting high HP for a monster that's almost dead.
 
Last edited:
BCC, what you do is pass the monster to the monster_hp() function; if you call it without parameters, you get the "current" value. Using the "base" value via the monster-parameter version gives you starting hp, which allows you to check for spaded / unspaded. Alternatively, you could make use of BatBrain to intelligify your ascension script. :p (Actually, this isn't a bad idea; your script could probably do well to rely on that as a default, and make users go through extra effort to use something else.)
 
The only problem I found when converting to BatBrain was that I could no longer do predictive fighting, i.e. I cannot supply the script with a monster name and see what would happen against that monster since BatBrain uses the last_monster()-function and not monster_hp() which can be given a specific monster if you want to.
 
Back
Top