SmartStasis -- a complex script for a simple CCS

Actually, if zlib is called by another script that script will fail due to the lack of vprint(), before getting to check for updates. :D
 
Oh... I guess I can't assume everyone else ends up using ZLib several times before they enter a combat for the day. (In my case, it's used by my login script and of course BBB, both of which fire before this.)

I'm adding in Bandersnatch bonus damage right now. Might finish before I have to go back to work, might not. Wish me luck.
 
I think for every action SmartStasis is taking it's skipping entries in my CCS. Take this CCS for example:
Code:
[ default ]
1: consult SmartStasis.ash
2: item spices
3: item turtle totem
4: item seal tooth
5: item spectre scepter
6: attack with weapon
Now look at this combat log

Code:
[1837] Haunted Ballroom
Encounter: zombie waltzers
Round 0: Epicgamer loses initiative!
Round 1: Epicgamer casts DISCO EYE-POKE!
Round 1: zombie waltzers takes 1 damage.
Round 2: Epicgamer casts DISCO DANCE OF DOOM!
Round 2: zombie waltzers takes 7 damage.
Round 3: Epicgamer casts DISCO DANCE II: ELECTRIC BOOGALOO!
Round 3: zombie waltzers takes 9 damage.
You lose 4 hit points
Round 4: Epicgamer uses the seal tooth and uses the seal tooth!
Round 4: zombie waltzers takes 2 damage.
Round 5: Epicgamer uses the spectre scepter and uses the spectre scepter!
Round 5: zombie waltzers takes 19 damage.
Round 6: Epicgamer attacks!
Round 6: zombie waltzers takes 170 damage.
Round 7: Epicgamer attacks!
Round 7: Spicy gives them a good ol' fashion Indian Rugburn. Which is probably a Native American Rugburn, these days. They take 48 damage from the friction-induced heat.
Round 7: Spicy holds out the plastic pumpkin bucket, hoping for extra goodies.
Round 7: Spicy smiles a three-lipped smile from beneath the shade of his little sombrero.
Round 7: zombie waltzers takes 204 damage.
You gain 141 Meat
You acquire an item: dance card
You gain 20 Strongness
You gain 21 Mysteriousness
You gain 31 Cheek
It's jumping to step 4 in my CCS after spending 3 rounds on the Disco Combo. Is this a mafia thing? Have I just not noticed this happening before? I was able to get around it by adding a bunch of rounds worth of notes as a buffer between SmartStasis and the rest of my CSS.
 
Last edited:
I'm pretty sure that's normal; I've never seen mafia handle it differently than that. Might want to double check older session logs if you think otherwise, but I doubt you'll find anything being handled differently. This is one reason I prefer ASH CCS's, because you can make actions sequential rather than tied to round number (you could probably whip up a consult script that solves this problem pretty quickly).
 
Can anyone with the DB Crimbo skill confirm whether or not familiars act when using that skill? (Ideally, confirm whether or not your GGG's usual message shows up when using it.) If not, the new DB skill probably breaks GGG hunger detection and needs attention.
 
Well, I'm in a snow angel run right now, and I get the usual snow angel activation message, right after the bells. Like this:

Shirayuki's bells jingle merrily

Shirayuki rises into the air and spreads her wings, bathing your opponent in cold light and dealing 28 damage. It's inspiring.
You gain 28 Mojo Points.
I imagine all others will be similar. It should not break hunger detection.
 
I was talking about the DB skill, not the TT skill. As far as I know, Stealth Mistletoe does not consume a round and may therefore have the same mechanic as a "quick" Saucy Salve.
 
Oh. Stealth Missletoe. Sorry, it's really easy to get mixed up associating them with classes since you don't need to be that class to learn it. That's why I'm glad you need to be a Sauceror to learn Storm of Cheese Sauce. (Excuse my inability to remember its German name.) I just went with the first one I could think of to have a familiar interaction.

I don't have that skill (or plans to learn it soon), but I'm given to understand that it completely ignores the round where it is case. It won't even remove a chance to pick pockets, unless it auto-attacks. I can see how that might break hunger detection.

Try asking in /hardcore if nobody swiftly answers here -- I'm sure someone there will know.
 
Wow, looking at my logs from the past couple months it does look like it's always worked this way. I'm really not sure how I never noticed this behavior before considering it really screws me over.
 
Last edited:
Hmmm, I'm assuming you're not just using random stasis items after SS then. :) In that case, if your "notes" workaround isn't livable I'd suggest whipping up a quick and dirty consult script as a slightly better workaround. I'll get you started:

PHP:
import <SmartStasis.ash>

void main(int initround, monster foe, string url) {
   round = initround - 1; act(url);
   nowfightingonstageone = foe;
   url = ftf(url);
   if (can_nirvana || can_concentrate) url = try_combos(url);
   if (intheclear() || is_our_huckleberry()) url = stasis(url);
  // put the commands you want to use post-SS here:

  // end of post-SS commands
}

Sorry but I don't have anything better to suggest.
 
I know how to solve the issue, it's just that I can't understand how I failed to notice this for so long in the first place. Honestly it feels like a bug to me.
 
That would be awesome! So far I haven't had much time to spade, and there's nothing about it on the Wiki. I'm trying to be careful not to spend too many turns so that I can spade it before I lose it.

I also tried calling some girls that I know (just in case) but evidently the blessing doesn't have that kind of real-world effect. :)
 
Loving the automatic disco combos (they are such a hassle to remember and perform manually).

Does SmartStasis automatically go for nirvana (instead of concentration) in the Nuns?


Here is an advanced scenario that may or may not be of interest:

I was fighting a Procrastination Giant, and on turn zero pickpocketed his only drop (a procrastination potion). SmartStasis proceeded to perform the disco combo for Concentration. However, since no further drops were possible for this combat (after the successful pickpocket), there was no benefit to getting Concentration.

-Th3Y
 
Some excellent feedback.

For some reason, right now the script is set to skip Nirvana on brigands. I think the logic here was that it is not profitable, since the meat doesn't go to you. However, this does help speed up your quest. Perhaps I should make skipping brigands dependent on your ocw_nunspeed setting? But that only works for OCW users.

About the second issue -- yes. There is an upcoming update to FTF which detects which item, if any, was pickpocketed. Which means it would be possible to detect this scenario and avoid needlessly casting Concentration. Unfortunately, although we can access which item types drop from a monster in ASH, we can't easily access how many of each item drop from a monster. So then it becomes a performance issue -- figuring out the necessary information would require loading a (large) data file and parsing item types and amounts from it, which would make the script notably clunkier. If I were you, I wouldn't expect a solution to this issue for a while.
 
I suspect this is the work of SS:

Code:
[1542] Fantasy Airship
Encounter: MagiMechTech MechaMech
Strategy: /Users/blwalker/Library/Application Support/KoLmafia/ccs/aqualectrix.ccs [default]
Round 0: aqualectrix loses initiative!
[B]Modifier syntax error: expected end, found + zone(sea)*0.5[/B]

(emphasis mine)
Battle then proceeds normally. I found "+ zone(sea)*.05" in SmartStasis, and indeed my current familiar is the rock lobster. (SS does stasis -- nothing seems to be wrong per se except for the error message being printed.)

My CCS is currently very simple:
Code:
[default]
1: consult SmartStasis.ash
2: attack
 
For some reason, right now the script is set to skip Nirvana on brigands. I think the logic here was that it is not profitable, since the meat doesn't go to you. However, this does help speed up your quest.

Saving turns is always profitable.
 
@aqualectrix: Oh that's right, modifier_eval() formulas shouldn't have spaces. Ok, I uploaded a spaces-less version, but didn't bump version number.

About brigands: I think I'll make it so it only skips brigands if ocw_nunspeed is false. Basically, this means it will only prevent Nirvana for brigands if you have instructed OCW to take its time completing the nuns sidequest.
 
Back
Top