Universal Recovery Script

Bale

Minion
Perhaps I am reading the code wrong, but some issue is still causing hot tub uses to remain unused, at times.

You are reading it wrong. It will use the Hot Tub any time that it is needed critically. (Critically is defined as beaten up or at 1/8 HP.) It then gets extremely proactive when you're nearly out of Hot Tub use, just in case it hasn't been seriously needed yet.
 
Last edited:

AlbinoRhino

Active member
Well...that being the case, I guess my play style makes it end up being unused. The script spends meat on restores for a couple hundred turns and then these free hp end up unused. I will tinker with my copy and despite Jason's claims, I will adjust the logic without resorting to a time machine. :)
 

Bale

Minion
BTW, I'd just finished code for UR that will have it make use of the Hot Tub to cure serious status effects under those conditions. That's a nice bonus for people who uncheck "auto-remove malignant status effects." Perhaps that will help you use up the Hot Tub?


PHP:
// If Hot Tub would be used by the script anyway, then lets use it to clear up your status!!
void cure_status() {
	if(!unpoison()) print("Can't cure poison! OOoch! It burns in my veins!", "red");
	if(get_property("removeMalignantEffects").to_boolean()) return;
	
	if(afflicted($effects[Apathy, Easily Embarrassed, Prestidigysfunction, Tenuous Grip on Reality, The Colors...])
	  && !use_hot_tub() && have_skill($skill[Disco Power Nap]))
		use_skill(1, $skill[Disco Power Nap]);

	if(afflicted($effects[Cunctatitis, Tetanus, Socialismydia]) && !use_hot_tub()) {
		if(have_skill($skill[Disco Power Nap]))
			use_skill(1, $skill[Disco Power Nap]);
		else if(item_amount($item[ancient Magi-Wipes]) > 0
		  && heal[$item[ancient Magi-Wipes]].avemp < my_maxmp() - my_mp())
			use(1, $item[ancient Magi-Wipes]);
	}

	if(afflicted($effects[Embarrassed, Sleepy]) && !use_hot_tub() 
	  || (my_primestat() == $stat[Mysticality] && afflicted($effects[Confused, Light-Headed]))) {
		if(have_skill($skill[Disco Nap]))
			use_skill(1, $skill[Disco Nap]);
		else if(have_skill($skill[Disco Power Nap]))
			use_skill(1, $skill[Disco Power Nap]);
		else if(!tongue && item_amount($item[tiny house]) > 0
		  && heal[$item[tiny house]].avemp < my_maxmp() - my_mp())
			use(1, $item[tiny house]);
	}
}

Incidentally, that won't touch Prestidigysfunction or Tenuous Grip on Reality until after you have unlocked the Oasis. There's a check for that earlier.
 
Last edited:

AlbinoRhino

Active member
I do leave that pref unchecked, so it should certainly help. Also, I think a moderately looser definition of "extremely proactive" should take care of it.
 

AlbinoRhino

Active member
What definition do you think I should use?

Well...if I'm the only one this happens to, then I guess you should change nothing. Today I changed the line of use_hot_tub:

from
return expec_adv < 10 * (5 - hotTubSoaks);

to
return expec_adv < 20 * (5 - hotTubSoaks);

and am going to see how it goes.

BTW, thanks for adding the logic that looks for the spleen familiars. The script definitely works better with my critter-poor character !
 

Theraze

Active member
That may actually be a good user preference... set roughly how many adventures you expect to happen between beaten-up/affliction sessions, for hottub override. Whether a multiple of 5, or just a straight number... then people that want the hot tub to trigger all the time could set it to 50 or so, normal people can leave it at 10, and paranoid people adventuring in dangerous zones can set it down to 5 or even less.
 

zarqon

Well-known member
Feature request: can UR automatically avoid the VIP hot tub if my_location() == slime tube? Or, include the chamois.ash logic to determine when using the Hot Tub would actually be desired for both healing and death avoidance.
 

Bale

Minion
Yes, yes it can. That's a very good idea and it is actually a very simple thing to add. I guess UR has enough new stuff now that is time to release the new version.



Universal recovery v 3.8 released!


Changelog:
version 3.8 February 24, 2011
  • Include Nemesis final battle as a multi-state battle to avoid healing in the middle of.
  • Handle bad status effects to encourage players to turn off mafia's "auto-remove malignant status effects." This even uses the Hot Tub to cure them if you'd use it for healing anyway.
  • Refuse to use Hot Tub when you're in the Slime Tube. (You probably want to ration that.)
 
Last edited:

zarqon

Well-known member
Awesome, thanks for the prompt implementation Bale.

Can you explain in more detail UR's new handling of bad status effects? Which effects/what conditions/what methods?
 

Winterbay

Active member
It removed Apathy from my character today after I got infected by the Apathetic Lizardman so that is definitely in there and it did so by use of the Hot Tub since I was below 50% or so anyway.
 

Bale

Minion
Can you explain in more detail UR's new handling of bad status effects? Which effects/what conditions/what methods?

Gladly. It removes:Apathy, Easily Embarrassed, Prestidigysfunction, Tenuous Grip on Reality, The Colors..., Cunctatitis, Tetanus, Socialismydia, Embarrassed, Sleepy.

These are all effects that can be removed by Disco Nap or Disco Power Nap. Some of them are also removable with ancient Magi-Wipes or tiny houses. If those items will not waste MP, then they are considered in the absence of napping skills. Of course, if you would use a Hot Tub soak, then that is preferred.

If there are other crippling status effects that anyone feels should be handled by Hot Tub usage, then I'll consider adding them. Right now it only handles the above list.
 

slyz

Developer
If I'm in the unhydrated desert looking to unlock the Oasis, I wouldn't want to use a hot tub soak to remove some of those effects until the moment I know I need to be ready for a combat.
 

Bale

Minion
If I'm in the unhydrated desert looking to unlock the Oasis, I wouldn't want to use a hot tub soak to remove some of those effects until the moment I know I need to be ready for a combat.

No worries. It already checks for that earlier in the script. I won't restore anything in the unhydrated desert or the Hidden Temple, unless you may run into a Feast of Boris monster, hipster combat or the like.
 

slyz

Developer
Oh, I forgot to check if the unhydrated desert was part of those locations. No need to be careful then, thanks!
 

Raijinili

Member
Well, you won't want to uneffect the stat debuffs every turn on Feast of Boris unless you're really gunning for every stat, would you?

Also: Feature Request:
Keep a list of preferred healing items that the script Searches for in its daily search, and the rest of the items are relegated to, say, a weekly search, or perhaps a search that you're reminded of to make the script do. The idea is that the second search builds the first list, under the assumption that the top X most effective things will probably stay that effective for another week.
 

Bale

Minion
Also: Feature Request:
Keep a list of preferred healing items that the script Searches for in its daily search, and the rest of the items are relegated to, say, a weekly search, or perhaps a search that you're reminded of to make the script do. The idea is that the second search builds the first list, under the assumption that the top X most effective things will probably stay that effective for another week.

I don't follow. Why is that better? And which are the top most effective healing items?
 
Top