Bug - Fixed Tomb Rat King stats unaffected by +ML

lostcalpolydude

Developer
Staff member
When you use a tangle of rat tails on a tomb rat, it turns into a tomb rat king. Mafia applies +ML to the new monster, but +ML should not be applied. A simple fix is to put its HP, Def, and Atk inside [] in monsters.txt. It's possible that there's something more generic going on that could be accounted for, but Eleron pointed out that KoL handles this differently (using javascript) than other monster-changing-mid-combat things (CLEESH uses a new page load), so it probably isn't necessary to make the code more generic. Tomb rat kings can't be copied, so they will always be encountered by using tangles and will always ignore +ML (at least until KoL introduces some new mechanic).
 

roippi

Developer
I almost went in and just put brackets in monsters.txt, but I reconsidered. As far as I can see, there's no special handling in mafia for tomb rat kings; it's handled just like other mid-combat monster swaps. The Right Way would be to ignore ML for any monster that appears mid-combat. Though I almost consider this a KoL bug - it seems like ML should be applied.

But then there's lots of weird cases - does ML apply to Ed's second-through-final forms? How about the NS?
 

lostcalpolydude

Developer
Staff member
With all of those cases, you go back to round 1, starting a new adventure. The only potentially similar cases I can think of are using CLEESH and using a pasta ghost for a giant sandworm.
 

roippi

Developer
Well the NS isn't a new adventure, but point taken. Like I mentioned to you, the adventuring subsystems of mafia are really not my schtick, so I'll punt to another dev on this one :)
 

lostcalpolydude

Developer
Staff member
An adventure is used between form 1 ending and form 2 beginning. Form 2 is a monster that doesn't take a turn, like bricko monsters (pretty clear if you die against form 2), which means that form 3 can easily be a separate fight.
 

lostcalpolydude

Developer
Staff member
It is. There was a time when it was not. Now I can't even extend a CLEESH fight with a seal tooth long enough to get stuff from my CoT (with +ML piled on of course).
 

lostcalpolydude

Developer
Staff member
I just realized that CLEESH monsters are fixed with [], so for now the same thing will do for tomb rat kings. That's done in r10929.

A more robust fix is to have a two-argument version of MonsterStatusTracker.setNextMonsterName() with a boolean indicating whether to apply +ML. The only time it would be false is when CLEESH_PATTERN is matched in FightRequest.processNode(). I don't know that it's worth adding all of that code when the same result can be achieved so easily in the data file.
 
Top