SmartStasis -- a complex script for a simple CCS

Haha, totally a theoretical function. Although it would be a useful builtin, certainly.

Looks like it's

Code:
hit_percentage = (((6 + (buffed_hit_stat() - monster_defense($monster[monster]))) / 10.5) * (100 - (1/22)));

For the chance for you to hit the monster (assuming no stoat) and thus

Code:
chance_to_be_hit = (((6 + (monster_attack( $monster[monster] ) - my_buffedstat(moxie))) / 10.5) * (100 - (1/22)));

for the other way around.
 
Wiki and spading info now apparently says that it's 10 points for safe, not 7. But yeah, if it doesn't currently exist, until BatMan's functions come out, I suppose my best solution will be using the will_usually functions for now. I get confused sometimes which of them I want. :D
 
BatBrain includes an m_dpr() function, returning expected monster DPR given all current probabilities (stun modifier, ML modifiers, etc). My version of SS already uses this to determine the safety of stasising. Also, there is a single float ZLib setting which controls whether or not to stasis: BatMan_profitforstasis, containing the minimum profit required (combined from all sources) for SS to stasis. This means that SS will be able to consider all known factors when deciding whether or not to stasis, and it may stasis for some situations previously unknown to SS. Stasising for item drops from enthroned familiars is now a possibility. Stasising for healing from the quiet healer is now a possibility. SS will now not stasis when restoring HP is expensive and the monster's DPR costs you more than you gain from other sources.

Basically, now that SS has access to BatBrain, the first S applies more and more.

And what's this about safe moxie being 10 above MA? Please check my formula here and make any necessary corrections:

PHP:
float m_hit_chance() {
   float stunmod = min(1.0,stunadj + 0.5*(1.0-min(1.0,stunadj))*to_int(have_equipped($item[navel ring of navel gazing])));
   if (contains_text(last_monster(),"Gremlin")) return 1.0 - stunmod;
   return (1.0 - stunmod)*minmax((6.5 + (max(monster_stat("att"),0.0) - my_buffedstat($stat[moxie])))/12,0.06,0.94);
}
 
little more complicated - that 6.5 is related to the monster chance to hit when moxie = monster attack. You can pull it out as a constant and it becomes more obvious:

(with fake variables)

(6.5/12) + (monster_attack - my_buffed_moxie)/12

So the way you've got it here, there's a 54% chance of getting hit when your moxie is equal to the monster's. However, you can see that your safe moxie with this is monster_attack + 5.5, which is not correct.

I believe the above equation is actually the chance to hit the monster, not the other way around. The correct equation is:

(55 + (monster_attack-my_buffed_moxie)*5.5)/100

you can see that safe moxie as given by this equation is somewhere between 8 and 9.
That's because this is a linearized version of the formula, which is in reality an s curve. The linearized version is pretty close, though, especially when you floor/ceiling the last 6% of the tails.

Also. Remember to include a switch for Hero of the Halfshell when muscle>moxie and a shield is equipped.
 
Thanks, I'll swap in your new formula and see if the predictions are accurate.

Also, we should not consider Hero for monster hit chance. That only affects monster damage.
 
Hi all,

I'm in a kittycore run trying to permanently unlock Bad Moon. My Black Cat familiar, bless her little black heart, keeps interfering with my Disco Combos, but SmartStasis doesn't seem to notice. It keeps on with the combo anyway, wasting turns and mana and sometimes creating an unexpected combo.

I would like SmartStasis to realize the combo has been invalidated and start over again.

Any suggestions?

Thanks,

Gdunge
 
Same here, lost... I think my total skill set was basically the passives and heals, and I tried to end it as quickly as I could.

Kittycore during Crimbo... now that's some dedication.
 
I have a suggestion you won't like... play kittycore manually. It's supposed to hurt. :)

OK, fair enough. Let me try again.

BUG: SmartStasis fails to recognize when a Disco Combo has failed, such as when prevented by the black cat familiar.

BUG: SmartStasis attempts to cast Transcendent Olfaction during Bad Moon, even though the spell is not available.

Now back to the pain, which I must endure until it's over.

Thanks for your code, Zarqon! It makes my KoL more enjoyable.

- Gdunge
 
Not a bug failing to detect DCombo fails... as it doesn't have checking for success. Since it doesn't check, it's not a bug that it's not being aware it's failed.

Potentially a bug trying to cast olfaction when it's not available, but a bug on the same scale as mafia not being aware that you still have a mosquito larva after finishing the level 2 council quest during Bad Moon.
 
SS checks have_skill() before casting Olfaction, so that bug report belongs elsewhere -- in fact, I think that bug has already been reported.

My current version of SS submits combos as macros, which means there will definitely be no detection of combos being interrupted. I think it's probably better simply not to cast combos if your combos may be interrupted (fighting skill-blocking monster, kitty familiar, huckleberry monster).
 
Tweak for the meat-familiars and stasis... currently, the break on meat in SS is listed as round 9. According to the wiki, it appears to be round 10. I had one today where it SAID round 11... but then again, I'm currently a Saucer. Anyways, in a fight with this:
PHP:
KoLmafia thinks it is round 2 but KoL thinks it is round 1
I got this:
PHP:
Round 11: Gronald roots around in the ground, and comes up with some Meat. He wings it to you.
You gain 60 Meat.
which seems to suggest fairly heavily that round 10 (for KoL) works just fine for meat stasis. Then again, I have no clue how SAUCY SALVE affects things, or if that meant that it actually triggered on round 9 and it's displaying on round 10 (for KoL) or... :D

Anyways, I made this change on mine since it seemed worth a round to potentially gain another 10+ meat per attempt on average...
 
Back
Top