SmartStasis -- a complex script for a simple CCS

There was a time it used to make a difference or at least no one had spaded it out and so most people thought it made a difference. I'd link it, but I don't remember where, but these things all stack now (or always did). The order doesn't matter as you said.

Oh nice, I didn't know they stacked up. That's sweet! :D
 
Jiggling that staff can be handy for stassis and against low HP monsters. Even though it doesn't do much damage it can make a difference in how much MP you're spending to kill stuff, especially against certain elements.
 
Technically, if you have any passive damaging/special effects, the monster *might* die/do something that ends fight after your first action. In that case "jiggle, noodles" will save you 1-3 MP (or more, if you have +cost) wrt "noodles, jiggle".

Right, and if you're going to do silent squirt, you might as well do it before entangling. What if you've got a familiar or effect running that damages monsters? The earlier damage may save you from casting entangling.

I know it's just a few MP here or there, but in HC it's nice to save every MP you can to cut down on meat costs when you're running lots of buffs.
 
SS calculates whether or not to insert a preparatory stunner before enqueueing each custom action. It was missing a check for whether the custom action was itself a stunner. I've added that locally and it will be in the upcoming SVN release.
 
Here's a complaint. Sometimes SmartStassis lets me die when I'm using my Rogue Program. Sure I like free MP, but it seems to be cutting it too close (HCO Sauceror at the time).

Code:
[857] Battlefield (Frat Uniform)
Encounter: War Hippy Baker
Round 0: chef_rannos wins initiative!
ATT: 239 (48.88% × (26.88), death in 82)
DEF: 217 (8.8% × 35.81 (15), win in 18)
HP: 254, Value: 1,026.87 μ, RES: 0 (-1) (-1) (1)
WHAM: Monster HP is 254.0.
WHAM: Running SmartStasis
Profit per round: ActionProfitDamageOtherbase; Rogue Program (0μ)37.66μ8.66 (0 μ/dmg)48% stun chance MP: 8.66
Round 1: chef_rannos executes a macro!
Round 1: chef_rannos casts SUCKERPUNCH!
Round 2: war hippy baker takes 1 damage.
Round 2: war hippy baker drops 1 attack power.
Round 2: war hippy baker drops 1 defense.
Round 2: war hippy baker takes 2 damage.
Round 2: war hippy baker takes 5 damage.
You lose 25 hit points
Round 2: chef_rannos executes a macro!
Round 2: chef_rannos casts SUCKERPUNCH!
Round 3: war hippy baker takes 1 damage.
Round 3: war hippy baker drops 1 attack power.
Round 3: war hippy baker drops 1 defense.
Round 3: MP-Gamer de-rezzes him for 32 damage, then offers you a drink out of his identity disc. It's a little too intimate for your comfort, but it's still refreshing.
Round 3: war hippy baker takes 32 damage.
You gain 32 Mana Points
Round 3: MP-Gamer drives a square around him, trapping him in a glowing orange box. That's a good deal, that orange box!
Round 3: chef_rannos casts SUCKERPUNCH!
Round 4: war hippy baker takes 1 damage.
Round 4: war hippy baker drops 1 attack power.
Round 4: war hippy baker drops 1 defense.
Round 4: war hippy baker takes 3 damage.
Round 4: war hippy baker takes 5 damage.
You lose 24 hit points
Round 4: chef_rannos executes a macro!
Round 4: chef_rannos casts SUCKERPUNCH!
Round 5: war hippy baker takes 1 damage.
Round 5: war hippy baker drops 1 attack power.
Round 5: war hippy baker drops 1 defense.
Round 5: war hippy baker takes 3 damage.
Round 5: war hippy baker takes 5 damage.
You lose 24 hit points
Round 5: chef_rannos executes a macro!
Round 5: chef_rannos casts SUCKERPUNCH!
Round 6: war hippy baker takes 1 damage.
Round 6: war hippy baker drops 1 attack power.
Round 6: war hippy baker drops 1 defense.
Round 6: war hippy baker takes 2 damage.
Round 6: war hippy baker takes 4 damage.
You lose 24 hit points
Round 6: chef_rannos executes a macro!
Round 6: chef_rannos casts SUCKERPUNCH!
Round 7: war hippy baker takes 1 damage.
Round 7: war hippy baker drops 1 attack power.
Round 7: war hippy baker drops 1 defense.
Round 7: MP-Gamer drives a square around him, trapping him in a glowing orange box. That's a good deal, that orange box!
Round 7: chef_rannos executes a macro!
Round 7: chef_rannos casts SUCKERPUNCH!
Round 8: war hippy baker takes 1 damage.
Round 8: war hippy baker drops 1 attack power.
Round 8: war hippy baker drops 1 defense.
Round 8: war hippy baker takes 1 damage.
Round 8: war hippy baker takes 5 damage.
You lose 18 hit points
Round 8: chef_rannos executes a macro!
Round 8: chef_rannos casts SUCKERPUNCH!
Round 9: war hippy baker takes 1 damage.
Round 9: war hippy baker drops 1 attack power.
Round 9: war hippy baker drops 1 defense.
Round 9: war hippy baker takes 3 damage.
Round 9: war hippy baker takes 5 damage.
You lose 24 hit points
Round 9: chef_rannos executes a macro!
Round 9: chef_rannos casts SUCKERPUNCH!
Round 10: war hippy baker takes 1 damage.
Round 10: war hippy baker drops 1 attack power.
Round 10: war hippy baker drops 1 defense.
Round 10: MP-Gamer drives a square around him, trapping him in a glowing orange box. That's a good deal, that orange box!
Round 10: chef_rannos executes a macro!
Round 10: chef_rannos casts SUCKERPUNCH!
Round 11: war hippy baker takes 1 damage.
Round 11: war hippy baker drops 1 attack power.
Round 11: war hippy baker drops 1 defense.
Round 11: MP-Gamer drives a square around him, trapping him in a glowing orange box. That's a good deal, that orange box!
Round 11: chef_rannos executes a macro!
Round 11: chef_rannos uses the spectre scepter!
You gain 5 hit points
Round 12: MP-Gamer bounces his disc off of him for 20 damage, and it ricochets into you, giving you quite a shock.
Round 12: war hippy baker takes 20 damage.
You gain 20 Mana Points
Round 12: MP-Gamer drives a square around him, trapping him in a glowing orange box. That's a good deal, that orange box!
Round 12: chef_rannos uses the spectre scepter!
Round 13: war hippy baker takes 10 damage.
Round 13: MP-Gamer drives a square around him, trapping him in a glowing orange box. That's a good deal, that orange box!
Round 13: chef_rannos uses the spectre scepter!
Round 14: war hippy baker drops 3 attack power.
Round 14: war hippy baker drops 2 defense.
Round 14: war hippy baker takes 3 damage.
Round 14: war hippy baker takes 5 damage.
You lose 17 hit points
Round 14: chef_rannos executes a macro!
Round 14: chef_rannos uses the spectre scepter!
You gain 4 hit points
Round 15: war hippy baker takes 2 damage.
Round 15: war hippy baker takes 5 damage.
You lose 15 hit points
Round 15: chef_rannos executes a macro!
Round 15: chef_rannos uses the spectre scepter!
Round 16: war hippy baker takes 9 damage.
Round 16: MP-Gamer drives a square around him, trapping him in a glowing orange box. That's a good deal, that orange box!
Round 16: chef_rannos uses the spectre scepter!
You gain 5 hit points
Round 17: MP-Gamer tosses his identity disc at him for 29 damage, then invites you to drink some glowing blue liquid out of the disc. The whole thing's a little more intimate than you're comfortable with, but it's still refreshing.
Round 17: war hippy baker takes 29 damage.
You gain 29 Mana Points
Round 17: MP-Gamer drives a square around him, trapping him in a glowing orange box. That's a good deal, that orange box!
Round 17: chef_rannos uses the spectre scepter!
Round 18: war hippy baker takes 8 damage.
Round 18: war hippy baker takes 2 damage.
Round 18: war hippy baker takes 3 damage.
You lose 15 hit points
Round 18: chef_rannos executes a macro!
Round 18: chef_rannos casts SUCKERPUNCH!
Round 19: war hippy baker takes 1 damage.
Round 19: war hippy baker drops 1 attack power.
Round 19: war hippy baker drops 1 defense.
Round 19: MP-Gamer tosses his identity disc at him for 28 damage, then invites you to drink some glowing blue liquid out of the disc. The whole thing's a little more intimate than you're comfortable with, but it's still refreshing.
Round 19: war hippy baker takes 28 damage.
You gain 28 Mana Points
Round 19: MP-Gamer drives a square around him, trapping him in a glowing orange box. That's a good deal, that orange box!
Round 19: chef_rannos casts SUCKERPUNCH!
Round 20: war hippy baker takes 1 damage.
Round 20: war hippy baker drops 1 attack power.
Round 20: war hippy baker drops 1 defense.
Round 20: war hippy baker takes 1 damage.
Round 20: war hippy baker takes 5 damage.
You lose 17 hit points
Round 20: chef_rannos executes a macro!
Round 20: chef_rannos casts SAUCY SALVE!
KoLmafia thinks it is round 21 but KoL thinks it is round 20
You gain 10 hit points
Round 21: chef_rannos executes a macro!
Round 21: chef_rannos casts SAUCY SALVE!
KoLmafia thinks it is round 22 but KoL thinks it is round 20
You gain 11 hit points
Round 22: chef_rannos executes a macro!
Round 22: chef_rannos casts SAUCY SALVE!
KoLmafia thinks it is round 23 but KoL thinks it is round 21
You gain 10 hit points
Round 23: war hippy baker takes 2 damage.
Round 23: war hippy baker takes 4 damage.
You lose 23 hit points
Round 23: chef_rannos executes a macro!
Round 23: chef_rannos casts SUCKERPUNCH!
KoLmafia thinks it is round 24 but KoL thinks it is round 22
Round 24: war hippy baker takes 1 damage.
Round 24: war hippy baker drops 1 attack power.
Round 24: war hippy baker drops 1 defense.
Round 24: war hippy baker takes 1 damage.
Round 24: war hippy baker takes 4 damage.
You lose 15 hit points
Round 24: chef_rannos executes a macro!
Round 24: chef_rannos casts SUCKERPUNCH!
KoLmafia thinks it is round 25 but KoL thinks it is round 23
Round 25: war hippy baker takes 1 damage.
Round 25: war hippy baker drops 1 attack power.
Round 25: war hippy baker drops 1 defense.
Round 25: chef_rannos executes a macro!
Round 25: chef_rannos uses the spectre scepter!
KoLmafia thinks it is round 26 but KoL thinks it is round 24
Round 26: war hippy baker takes 8 damage.
Round 26: MP-Gamer drives a square around him, trapping him in a glowing orange box. That's a good deal, that orange box!
Round 26: chef_rannos uses the spectre scepter!
Round 27: war hippy baker takes 10 damage.
Round 27: war hippy baker takes 3 damage.
Round 27: war hippy baker takes 4 damage.
You lose 22 hit points
WHAM: SS has finished the fight. Aborting script execution.
 
For whatever reason, SS/BB believe you'd survive for 82 rounds and you didn't.

EDIT: Wait, I don't see beaten up. It just aborted?

If you get beaten up in the stasis part WHAM aborts as if SS had ended the fight.a bit of a descriptive bug I guess.
 
Yeah, I got beaten up. The biggest problem for me was I was in a *HCO* run so every wasted adventure stung. It wasted a couple on me that day that I noticed.

Normally I only care about day count, but when I finished the run, I fought the NS with *3* adventures left. I really didn't have much wiggle room! :O
 
SmartStasis is now on SourceForge!

The new installation instructions have been added to the first post. BatBrain dependency is specified, so for any scripts that import SmartStasis (WHAM), their authors (Winterbay) can now simply list a dependency on SmartStasis alone. Woohoo!

This update is pretty swell and includes more support for the Suburbs of Dis, which has been a recent issue in the WHAM thread:

  • Throw 10 jars full of wind at Thug 1 and Thug 2. If you don't have that many jars, it will skip throwing them altogether so you don't waste jars.
  • Throw 6 dangerous jerkcicles at Mammon. Again, if you don't have that many, it will skip them all.
  • Throw 8-10 (or 0) dangerous jerkcicles at The Large-Bellied Snitch.
  • Throw 10 (or no) clumsiness barks at The Bat in the Spats.
  • Consider The Thorax our huckleberry so long as you have clumsiness bark to auto-respond with. With which to autorespond.

Also, BatBrain was updated to know about Torment Plants, Pinch Ghost, and Tattle yielding one extra item when used against regular monsters in those zones, so it's likely SS will choose to use those skills as a stasis option. I'm curious to know if this is enough, or if further encouragement will be needed (in the form of custom actions).

This leaves only one Dis monster which SS doesn't know how to handle: The Terrible Pinch. And I'm not sure if it's worth coding the actual mechanics into BatBrain, given that a hard-coded strategy of alternating jars and attacks will work in the majority of cases. I may just leave it at this, and leave using the appropriate strategy up to users/calling scripts.

Further updates are also swell and include such splendid features as:

  • As mentioned previously, don't consider a preparatory stunner before actions which are themselves stunners.
  • I moved all the comments for El Vibrato punchcards from the script into the advevents themselves! Now BatMan RE, or any other script that might display the note field of an action, can show you what the particular combination of cards means (such as "ATTACK WALL" or "MODIFY TARGET").
  • Since custom actions are now present in opts, I also went through build_custom() and, where possible, switched to using get_action() rather than constructing a new advevent.
  • The Server is a huckleberry until the panel falls off, triggering BatBrain's strange goggles autoresponse.
  • For my birthday I received a new Logitech mouse, so my scroll wheel no longer arbitrarily scrolls the document in the opposite direction to the way I moved my finger! This means I will be able to script better. It is also wireless, so I will be able to script from across the room, until I realize that scripting using only a mouse is extremely difficult, at which point I will return to my desk.

Enjoy!
 
[*]For my birthday I received a new Logitech mouse, so my scroll wheel no longer arbitrarily scrolls the document in the opposite direction to the way I moved my finger! This means I will be able to script better. It is also wireless, so I will be able to script from across the room, until I realize that scripting using only a mouse is extremely difficult, at which point I will return to my desk.

Happy belated birthday. I think I would have ditched the old mouse a long time ago but then I tend to have a collection of $5 wired mice hanging around and most of them still work.
 
For my birthday I received a new Logitech mouse, so my scroll wheel no longer arbitrarily scrolls the document in the opposite direction to the way I moved my finger! This means I will be able to script better. It is also wireless, so I will be able to script from across the room, until I realize that scripting using only a mouse is extremely difficult, at which point I will return to my desk.

I would advise you to purchase a wireless keyboard as a companion for your wireless mouse. That way you can continue scripting from across the room. I use this keyboard and like it very much.
 
That keyboard looks awesome, plus it could share the USB dongle with my mouse. However, I use a big laptop which sits on a cooling stand on my desk most of the time, so buying a separate keyboard just so I could roll back a ways from my desk would be a bit silly -- especially considering I can remotely use my laptop through my phone. :)
 
Ah, but this keyboard is so light and thin that you could roll your chair back and put your feet up on your desk with the keyboard in your lap while you type. Much more comfortable than using your phone.
 
Ah, but this keyboard is so light and thin that you could roll your chair back and put your feet up on your desk with the keyboard in your lap while you type
If I did that, how would the light from the monitor charge the solar keyboard?
 
With phosphorescent bats to recharge the keyboard, of course. The question is how to keep luring them into the room to charge the keyboard but not stuck so they cause problems after the keyboard is fully charged.
 
If I did that, how would the light from the monitor charge the solar keyboard?

My experience provides evidence that ambient light in the room provides more charging than the light from the monitor. Assuming you do have an electric light in the room. If you've got a window to let in sunlight, that's even better.

My keyboard has only indirect light from a window and a single light fixture. I've had it for a year and a half without ever needing to worry about changing batteries.
 
The Dis-boss-code seem to be working, mostly, but for some reason it refuses to autofunk the two items together some times. I.e. it funks one boss item with another sometime but most of the time it funks it with a stunner. Seeing as I take 3-4 damage from the monster when it hits me this seems like a silly waste of an opportunity to funk things for a shorter combat.
 
I think SS is trying to stasis using a once per combat item

Code:
        816] The Haunted Library
Encounter: bookbat
Round 0: [COLOR=#2cae33]Epicgamer[/COLOR]     wins initiative!
[COLOR=purple]WHAM: Running SmartStasis[/COLOR]
Round     1: [COLOR=#2cae33]Epicgamer[/COLOR] executes a macro!
Round 1: [COLOR=#2cae33]Epicgamer[/COLOR]     casts FIRE ORANGE BOTTLE-ROCKET!
Round 2: [COLOR=#2cae33]Epicgamer[/COLOR]     executes a macro!
Round 2: [COLOR=#2cae33]Epicgamer[/COLOR] uses     the Rain-Doh indigo cup!
You gain 84 hit points
Round 3: Converse     hops on your back for an ironic piggy-back ride. You feel a little     stronger after hauling all of that irony around.
You gain 2     Strengthliness
Round 3: [COLOR=#2cae33]Epicgamer[/COLOR] executes     a macro!
Round 3: [COLOR=#2cae33]Epicgamer[/COLOR] uses the The     Big Book of Pirate Insults!
You lose 1 hit point
Round 4: [COLOR=#2cae33]Epicgamer[/COLOR]     executes a macro!
Round 4: [COLOR=#2cae33]Epicgamer[/COLOR] uses     the The Big Book of Pirate Insults!
KoLmafia thinks it is round 5 but     KoL thinks it is round 4
Round 5: [COLOR=#2cae33]Epicgamer[/COLOR]     executes a macro!
Round 5: [COLOR=#2cae33]Epicgamer[/COLOR] uses     the The Big Book of Pirate Insults!
KoLmafia thinks it is round 6 but     KoL thinks it is round 4
Round 6: [COLOR=#2cae33]Epicgamer[/COLOR]     executes a macro!
Round 6: [COLOR=#2cae33]Epicgamer[/COLOR] uses     the The Big Book of Pirate Insults!
KoLmafia thinks it is round 7 but     KoL thinks it is round 4
Round 7: [COLOR=#2cae33]Epicgamer[/COLOR]     executes a macro!
Round 7: [COLOR=#2cae33]Epicgamer[/COLOR] uses     the The Big Book of Pirate Insults!
KoLmafia thinks it is round 8 but     KoL thinks it is round 4
Round 8: [COLOR=#2cae33]Epicgamer[/COLOR]     executes a macro!
Round 8: [COLOR=#2cae33]Epicgamer[/COLOR] uses     the The Big Book of Pirate Insults!
KoLmafia thinks it is round 9 but     KoL thinks it is round 4
Round 9: [COLOR=#2cae33]Epicgamer[/COLOR]     executes a macro!
Round 9: [COLOR=#2cae33]Epicgamer[/COLOR] uses     the The Big Book of Pirate Insults!
KoLmafia thinks it is round 10 but     KoL thinks it is round 4
[COLOR=red]KoLmafia declares world     peace.[/COLOR]
[COLOR=red]You're on your own, partner.
[/COLOR]
 
Back
Top