Nyyrazzilyss / NyyLIB

Mudlet client script for Torilmud
http://www.torilmud.com/phpBB3/viewtopic.php?f=4&t=27194
GNU General Public License v2.0
7 stars 4 forks source link

Rescue prioritization #342

Open byzanthia opened 2 months ago

byzanthia commented 2 months ago

From what I can see, the "visible fighting" trigger does the following after the --autorescue comment on line 92:

  1. If the rescue target is a warrior, and rescue type is set to "all" (.i.e. not "off" or "basic"), then it tries to rescue the warrior.
  2. If you're a ranger and the rescue target is also a ranger, do nothing.
  3. If the rescue target is a hex or ranger, rescue them 25% of the time.
  4. Then finally, send a rescue by default (line 113).

Any chance this could be updated with some "prioritization"? I.e. rescue clerics and enchanters first, then other casters, and finally the 25% chance for rangers/hexes and warriors (if rescue type set to "all")?

This will make it more complex. The existing "visible fighting" seems to send individual rescues based on the sequence of strings that trigger it. I.e. it fires a rescue for John, for Jason, for Betsy, Joe, etc.

The new change can still fire individual rescues if only 1 string comes in triggering it. But, it would somehow have to start prioritizing when more than 1 string comes in that triggers it. I.e. in big fights, there will often be multiple strings back-to-back.

Say John is a lich, Jason is a sorc, Betsy is a hex, and Joe is a cleric.

If it gets a bunch of strings that match in that order, rather than sending individual one-by-one rescues:

rescue John
rescue Jason
rescue Betsy
rescue Joe

Could you somehow add a short delay after any string comes in, during which you check if other strings come in, and if they do, perform a check on their flag and prioritize the rescues according to e.g. cleric > enchanter > druid > shaman > sorcerer > all others and send this?

rescue Joe
rescue Jason
rescue John
rescue Betsy

I guess the tricky part is what kind of delay do we add, as it would add a delay in case just 1 person gets hit. But I think it can be very short (milliseconds) and still be effective as in the cases where these fights happen, a ton of hits happen in just very little time (i.e. big groups of enemies walking into the group). Thoughts?