Mp restore not working correctly with Travoltan Trousers
The issue I have been running into occurs in the following situation:
1. I have the Travoltan Trousers in my inventory
2. I have a mood running that purchases something from an NPC store (Such as hair spray)
3. My HP or MP go below the trigger point for restoration in the same turn as the hair spray buff needs to be refreshed.
What happens is that mafia sees that the hair spray buff needs to be refreshed - so it automatically puts on the Travoltan Trousers in order to get the best price. Since my character is a Disco Bandit, my moxie is much higher than my myst - so the "Moxie used to determine Maximum MP" takes effect and suddenly my myst is much higher than it was before.
This is where the problem occurs. My MP was already going to be restored - but now I suddenly have a much larger MP pool than I did before. The MP is then restored with the much higher limit, and then my original pants are restored - losing a large chunk of the MP that was restored and losing the amount of meat spent to restore.
e.g.
1. My MP pool is of size 900.
2. My restore setting is set to restore when it falls below 20% and restore up to 50%
3. My MP hits 170 (below the 180 restore target) at the same time I run low on the hair spray buff
4. The Travoltan trousers are put on automatically - my MP pool is now 2500
5. The Hair Spray buff is purchased from the NPC store and used automatically
6. While the trousers are still being worn, my MP is is restored to 1250 (50% of 2500)
7. The Travoltan trousers are removed - and my MP pool is now back to 900 - losing me 350 MP - and however much meat was spent to restore it to that.
One Additional Note: I just remembered that I have a recovery script set (I am using this one -
http://kolmafia.us/showthread.php?1780-Universal-Recovery-Script) - so that might have some bearing on it.
Thanks