SmartStasis -- a complex script for a simple CCS

ki77bot

Member
I don't think you can rave steal anythign (yet at least) from the fudgies, at least my multi totally faield to do so yesterday when I tested it out.
I think it is not possible at all to pickpocket/steal/rave steal fudgecules...so maybe that should be disabled...it seems like a waste of time/resources. As I am not a good scripter, could someone point out to me, where I need to fix SS in order to NOT try to steal in Candyland?
 

bsander

Member
I am using Bale's UR for recovery, which sets my meatperhp/meatpermp values more accurately than BB's default values. If you're not using UR, using it may help slightly with this problem. However, the HP gain from Bandages is being outweighed by the HP loss from the monster, so the actual value of HP is just a side issue.
I didn't use that before, but I just installed it. Unfortunately, it doesn't seem to have any noticeable effect on the bandaging behavior.
So, reviewing these combats again, I suspect either the formula is off for the Untamed Turtle or you were just the victim of RNG swing in a script that uses averages. The monster was dealing over 40 damage, and Bandages heals 16. Since BB thought the monster was blocked 75% of the time, that means that in an average round Bandaging, you take 10 damage and gain 16, for a net profit of 6 HP. Why 6 HP would be worth over 100 is mysterious, but still just a side effect. In both of your posted examples, your buddy Grort blocked significantly fewer of the monster's attacks than BB thought it would, and ended up getting you killed. This could just be RNG swing, or it could be an inaccurate formula. Either way, something should be changed. Perhaps I'll try some kind of potato for my next 100% run to see if I can iron this out.
This is happening many more times than I have posted here so I seriously doubt it's a RNG issue.

In the meantime, if you'd like to make BB ignore that skill, you could remove the line from batfactors.txt.
Thanks, I've disabled it for now. If there's anything I can do to help debug this, I'll happily switch it back on again.
 

Winterbay

Active member
I think it is not possible at all to pickpocket/steal/rave steal fudgecules...so maybe that should be disabled...it seems like a waste of time/resources. As I am not a good scripter, could someone point out to me, where I need to fix SS in order to NOT try to steal in Candyland?

On line 334 remove "fudge mountain" from the $locations[]-field. You can pickpocket lollipop sticks so you could leave the forest in there, or delete it as well if you want to. If you want to be really really sure you can remove them from line 317 as well.
 

zarqon

Well-known member
I've removed Fudge Mountain from the first post as well, but didn't bump the version again since it's a very minor change.
 

Donavin69

Member
To chime in on the Lasagna bandages thread:
PHP:
[6836] Haunted Gallery
Encounter: Out in the Garden
Encounter: Knight (Wolf)
Strategy: C:\KoLmafia\ccs\Bounty.ccs [default]
Round 0: cheesecake_baby wins initiative!
Round 1: cheesecake_baby tries to steal an item!
You acquire an item: lupine sword
Run SmartStasis! (29 profit to stasis with Lasagna Bandages -- good enough)
1/5 monsters drop goals here.
Round 2: cheesecake_baby executes a macro!
Round 2: cheesecake_baby casts LASAGNA BANDAGES!
You gain 18 hit points
.
.
.
Round 25: cheesecake_baby executes a macro!
Round 25: cheesecake_baby casts LASAGNA BANDAGES!
KoLmafia thinks it is round 26 but KoL thinks it is round 25
You gain 20 hit points
Run SmartStasis! (29 profit to stasis with Lasagna Bandages -- good enough)
Run SmartStasis! (29 profit to stasis with Lasagna Bandages -- good enough)
You're on your own, partner.

I'm in the gallery, with full HP, quickly running out of MP. Using a Piano Cat, so nothing to gain by stasising. I've seen it happen before, but today it is all that it is doing...I hadn't updated anything other than mafia to version 10128, I just updated to the 'slightly' newer SmartStasis, with no change (didn't expect to see any changes based on what you said you updated)
I'm a Lvl 21 DB
 

Donavin69

Member
I am still seeing a lot of the Bandages used in SS...I changed my CCS to only consult SS, and then set verbosity up to 10. Here is an excerpt from the fight:
PHP:
Round 8: goth giant takes 20 damage.
You acquire an effect: Rave Concentration (duration: 1 Adventure)
Happened: skill 52
Happened: skill 50
Happened: skill 51
Happened: skill 50
Happened: skill 51
Happened: skill 52
Parsed round number: 8
Building options...
Options built! (25 actions)
Stasis action chosen: skill 3009
awful poetry journal (30.0 @ +197.74937): 136μ * 89.324814% = 121.48175
thin black candle (30.0 @ +197.74937): 144μ * 89.324814% = 128.62773
Value of stat gain: 441.72μ
Attack action chosen: use 2678
Top of the stasis loop.
Queued: skill 3009
Building options...
Options built! (25 actions)
Executing macro: scrollwhendone; sub batround; if haseffect 8 || haseffect 264 || haseffect 282 || haseffect 283 || haseffect 284; abort "BatBrain abort: poisoned"; endif; endsub; sub batsub1; skill 3009; call batround; endsub; call batsub1; repeat hasskill 3009 && (!hpbelow 345.0 && hpbelow 364 && !mpbelow 12.0 && mpbelow 19 && !pastround 27); if hpbelow 11; abort "BatBrain abort: Danger, Will Robinson"; endif; 
Round 8: cheesecake_baby executes a macro!
Round 8: cheesecake_baby casts LASAGNA BANDAGES!
You gain 14 hit points
Happened: skill 3009
Parsed round number: 9
Building options...
Options built! (25 actions)
Stasis action chosen: skill 3009
awful poetry journal (30.0 @ +197.74937): 136μ * 89.324814% = 121.48175
thin black candle (30.0 @ +197.74937): 144μ * 89.324814% = 128.62773
Value of stat gain: 441.72μ
Attack action chosen: use 2678
Top of the stasis loop.
Queued: skill 3009
Building options...
Options built! (24 actions)
Executing macro: scrollwhendone; sub batround; if haseffect 8 || haseffect 264 || haseffect 282 || haseffect 283 || haseffect 284; abort "BatBrain abort: poisoned"; endif; endsub; sub batsub1; skill 3009; call batround; endsub; call batsub1; repeat hasskill 3009 && (!hpbelow 345.0 && hpbelow 364 && !mpbelow 9.0 && mpbelow 19 && !pastround 27); if hpbelow 11; abort "BatBrain abort: Danger, Will Robinson"; endif; 
Round 9: cheesecake_baby executes a macro!
Round 9: cheesecake_baby casts LASAGNA BANDAGES!

another fight with Verbosity at 8 (using DAM as the consult script)
PHP:
[11539] Giant's Castle
Encounter: Procrastination Giant
Strategy: C:\KoLmafia\ccs\CastleFarm.ccs [default]
Round 0: cheesecake_baby wins initiative!
Factoring in Mayflower bouquet: damage, stun 0.065
Profit per round: ActionProfitDamageOtherbase; Mayflower bouquet; Piano Cat (0μ)0μ--6.5% stun chance
Run SmartStasis! (48 profit to stasis with Lasagna Bandages -- good enough)
Monster: Procrastination Giant, ATT: 125, DEF: 113, HP: 150, Value: 1,321.28
You will die in 646 rounds.
Your attack will kill the monster in 2 rounds.
Round 1: cheesecake_baby executes a macro!
Round 1: cheesecake_baby tries to steal an item!
Round 2: cheesecake_baby tries to steal an item!
Round 3: cheesecake_baby executes a macro!
Round 3: cheesecake_baby casts LASAGNA BANDAGES!

I'd really like to not waste all of my MP on unnecessary bandages, so that I can summon from my librams...
 
Last edited:

zarqon

Well-known member
I've been seeing the Lasagna Bandages issue pop up myself from time to time. Working on debugging it. I think I should make a few tweaks to profit calculations with regard to MP/HP regen, for starters.

In the process I solved a bug with the Crown of Thrones which has existed for quite a while without my knowing. If you were having this issue due to an enthroned familiar that dropped items, that should go away with the next update.

Also, I'd like to add Release the Boots to the custom actions of SS, but I haven't played with my Boots at all yet so I'd appreciate your feedback regarding the best method. How do you personally use this skill in-run, and does it differ from your use of it in aftercore?

The ideal implementation should definitely be goal-sensitive, so if you set a goal of 1 chlorophyll paste, it should only use the skill against plants. Similarly, it should avoid using the skill if the monster drops goals. However, with no paste goals, fighting a monster that drops no goals, should it always use the skill to maximize spleen drops? Or should we have a configurable list of monsters to stomp, as in ftf_olfact and ftf_yellow?
 
Last edited:

Winterbay

Active member
My current implementatin in spamattack looks like the following:
Code:
if(my_familiar() == $familiar[Stomping Boots] && get_property("bootsCharged") == "true" && m.phylum != $phylum[none] && has_goal(m) == 0) {
	enqueue(get_action($skill[release the boots]));
	return macro();
}

It's rather basic, stomp as son as you can, but do not stomp monsters that have goals. Probably very much expandable.

Edit: On the "how do you use it" that is how I use it. But I'm a very suboptimal player most of the time and just want easy access to spleen items, but do not want it to stop me from getting my goal-items.
 

zarqon

Well-known member
Ok, for now I've gone with this:

PHP:
  // release the boots!
   if (my_familiar() == $familiar[stomping boots] && get_property("bootsCharged") == "true" && to_paste(m.phylum) != $item[none] &&
       (is_goal(to_paste(m.phylum)) || has_goal(m) == 0))
      custom[count(custom)] = to_event("skill 7115",to_spread(monster_stat("hp")*6,"physical"),"stun 1",1);

Thanks Winterbay for a great starting point. So far the only enhancement I made is checking for paste goals before checking against item goals.
 

Ruduen

New member
I think I'm having a similar problem. SmartStasis is running and immediately spamming Saucy Salve unnecessarily, even when I'm already at 100% health. I'm not exactly sure where this decision's coming in, but would this be an intended effect that's being misinterpreted on my end, or something else?

My guess is that it's taking a look at profit, and somehow misinterpreting my HP as below max. While that would normally mean that healing is profitable, it's not correctly stopping once I'm at full health and healing therefore becomes worthless.

I'm using ZLib 33, Batbrain 1.15, and SmartStasis 3.10. Here's an example combat with verbosity at 9.

Code:
[240] Haunted Conservatory
Encounter: confused goth music student
Strategy: C:\Users\Ruduen\Dropbox\KoLMafia\ccs\default.ccs [default]
Round 0: Ruduen wins initiative!
Running ZLib version: r33 (current)
1 MP costs 17μ. ( 48 / 82 )
1 HP costs 5.1μ. ( 95 / 95 )
pocket theremin (10.0 @ +50.0): 1,100μ * 15.0% = 165.0
Value of stat gain: 123.75μ
Running BatBrain version: 1.15 (current)
Profit per round: ActionProfitDamageOtherbase; Star Starfish (0μ)96.77μ5.69 (0 μ/dmg)MP: 5.69
Running SmartStasis version: 3.10 (current)
Parsed round number: 1
Building options...
Options built! (17 actions)
pocket theremin (10.0 @ +50.0): 1,100μ * 15.0% = 165.0
Value of stat gain: 123.75μ
ATT: 24 (6% × 1 dmg), DEF: 22, HP: 24, Value: 288.75 μ
You will die in 1584 rounds.
Your attack will kill the monster in 1 rounds.
Building custom actions...
Custom actions built! (0 actions)
Stasis action chosen: skill 4014
pocket theremin (10.0 @ +50.0): 1,100μ * 15.0% = 165.0
Value of stat gain: 123.75μ
Attack action chosen: attack
Top of the stasis loop.
Queued: skill 4014
Building options...
Options built! (17 actions)
Executing macro: scrollwhendone; sub batround; if haseffect 8 || haseffect 264 || haseffect 282 || haseffect 283 || haseffect 284; abort "BatBrain abort: poisoned"; endif; endsub; sub batsub1; skill 4014; call batround; endsub; call batsub1; repeat hasskill 4014 && (!hpbelow 95.0 && !mpbelow 48.0 && !pastround 28); if hpbelow 24; abort "BatBrain abort: Danger, Will Robinson"; endif; 
Round 1: Ruduen executes a macro!
Round 1: Ruduen casts SAUCY SALVE!
KoLmafia thinks it is round 2 but KoL thinks it is round 1
You gain 10 hit points
Happened: skill 4014
Parsed round number: 1
Building options...
Options built! (17 actions)
Stasis action chosen: skill 4014
pocket theremin (10.0 @ +50.0): 1,100μ * 15.0% = 165.0
Value of stat gain: 123.75μ
Attack action chosen: attack
Top of the stasis loop.
Queued: skill 4014
Building options...
Options built! (17 actions)
Executing macro: scrollwhendone; sub batround; if haseffect 8 || haseffect 264 || haseffect 282 || haseffect 283 || haseffect 284; abort "BatBrain abort: poisoned"; endif; endsub; sub batsub1; skill 4014; call batround; endsub; call batsub1; repeat hasskill 4014 && (!hpbelow 95.0 && !mpbelow 44.0 && !pastround 28); if hpbelow 24; abort "BatBrain abort: Danger, Will Robinson"; endif; 
Round 2: Ruduen executes a macro!
Round 2: Ruduen casts SAUCY SALVE!
KoLmafia thinks it is round 3 but KoL thinks it is round 2
You gain 14 hit points
Happened: skill 4014
Parsed round number: 2
Building options...
Options built! (17 actions)
Stasis action chosen: skill 4014
pocket theremin (10.0 @ +50.0): 1,100μ * 15.0% = 165.0
Value of stat gain: 123.75μ
Attack action chosen: attack
Top of the stasis loop.
Queued: skill 4014
Building options...
Options built! (17 actions)
Executing macro: scrollwhendone; sub batround; if haseffect 8 || haseffect 264 || haseffect 282 || haseffect 283 || haseffect 284; abort "BatBrain abort: poisoned"; endif; endsub; sub batsub1; skill 4014; call batround; endsub; call batsub1; repeat hasskill 4014 && (!hpbelow 95.0 && !mpbelow 40.0 && !pastround 28); if hpbelow 24; abort "BatBrain abort: Danger, Will Robinson"; endif; 
Round 3: Ruduen executes a macro!
Round 3: Ruduen casts SAUCY SALVE!
KoLmafia thinks it is round 4 but KoL thinks it is round 2
You gain 13 hit points
Happened: skill 4014
Parsed round number: 2
Building options...
Options built! (17 actions)
Stasis action chosen: skill 4014
pocket theremin (10.0 @ +50.0): 1,100μ * 15.0% = 165.0
Value of stat gain: 123.75μ
Attack action chosen: attack
Top of the stasis loop.
Queued: skill 4014
Building options...
Options built! (17 actions)
Executing macro: scrollwhendone; sub batround; if haseffect 8 || haseffect 264 || haseffect 282 || haseffect 283 || haseffect 284; abort "BatBrain abort: poisoned"; endif; endsub; sub batsub1; skill 4014; call batround; endsub; call batsub1; repeat hasskill 4014 && (!hpbelow 95.0 && !mpbelow 36.0 && mpbelow 40 && !pastround 28); if hpbelow 24; abort "BatBrain abort: Danger, Will Robinson"; endif; 
Round 4: Ruduen executes a macro!
Round 4: Ruduen casts SAUCY SALVE!
KoLmafia thinks it is round 5 but KoL thinks it is round 2
You gain 11 hit points
Happened: skill 4014
Parsed round number: 2
Building options...
Options built! (17 actions)
Stasis action chosen: skill 4014
pocket theremin (10.0 @ +50.0): 1,100μ * 15.0% = 165.0
Value of stat gain: 123.75μ
Attack action chosen: attack
Top of the stasis loop.
Queued: skill 4014
Building options...
Options built! (17 actions)
Executing macro: scrollwhendone; sub batround; if haseffect 8 || haseffect 264 || haseffect 282 || haseffect 283 || haseffect 284; abort "BatBrain abort: poisoned"; endif; endsub; sub batsub1; skill 4014; call batround; endsub; call batsub1; repeat hasskill 4014 && (!hpbelow 95.0 && !mpbelow 32.0 && mpbelow 40 && !pastround 28); if hpbelow 24; abort "BatBrain abort: Danger, Will Robinson"; endif; 
Round 5: Ruduen executes a macro!
Round 5: Ruduen casts SAUCY SALVE!
KoLmafia thinks it is round 6 but KoL thinks it is round 3
You gain 14 hit points
Happened: skill 4014
Parsed round number: 3
Building options...
Options built! (17 actions)
Stasis action chosen: skill 4014
pocket theremin (10.0 @ +50.0): 1,100μ * 15.0% = 165.0
Value of stat gain: 123.75μ
Attack action chosen: attack
Top of the stasis loop.
Queued: skill 4014
Building options...
Options built! (17 actions)
Executing macro: scrollwhendone; sub batround; if haseffect 8 || haseffect 264 || haseffect 282 || haseffect 283 || haseffect 284; abort "BatBrain abort: poisoned"; endif; endsub; sub batsub1; skill 4014; call batround; endsub; call batsub1; repeat hasskill 4014 && (!hpbelow 95.0 && !mpbelow 28.0 && mpbelow 40 && !pastround 28); if hpbelow 24; abort "BatBrain abort: Danger, Will Robinson"; endif; 
Round 6: Ruduen executes a macro!
Round 6: Ruduen casts SAUCY SALVE!
KoLmafia thinks it is round 7 but KoL thinks it is round 4
You gain 10 hit points
Happened: skill 4014
Parsed round number: 4
Building options...
Options built! (16 actions)
Stasis action chosen: skill 4014
pocket theremin (10.0 @ +50.0): 1,100μ * 15.0% = 165.0
Value of stat gain: 123.75μ
Attack action chosen: attack
Top of the stasis loop.
Queued: skill 4014
Building options...
Options built! (16 actions)
Executing macro: scrollwhendone; sub batround; if haseffect 8 || haseffect 264 || haseffect 282 || haseffect 283 || haseffect 284; abort "BatBrain abort: poisoned"; endif; endsub; sub batsub1; skill 4014; call batround; endsub; call batsub1; repeat hasskill 4014 && (!hpbelow 95.0 && !mpbelow 24.0 && mpbelow 40 && !pastround 28); if hpbelow 24; abort "BatBrain abort: Danger, Will Robinson"; endif; 
Round 7: Ruduen executes a macro!
Round 7: Ruduen casts SAUCY SALVE!
KoLmafia thinks it is round 8 but KoL thinks it is round 5
You gain 12 hit points
Round 8: Gronald floats behind your opponent, and begins to glow brightly. Starlight shines through your opponent, doing 17 damage, and pours into your body.
Round 8: confused goth music student takes 17 damage.
You gain 17 Muscularity Points
Round 8: Ruduen casts SAUCY SALVE!
You gain 15 hit points
Round 9: Gronald floats behind your opponent, and begins to glow brightly. Starlight shines through your opponent, doing 20 damage, and pours into your body.
Round 9: confused goth music student takes 20 damage.
You gain 20 Muscularity Points
Round 9: Ruduen wins the fight!
You gain 4 Beefiness
You gain 2 Magicalness
You gain 4 Sarcasm
Happened: skill 4014
Happened: skill 4014
Parsed round number: 0
Building options...
Options built! (8 actions)
 

Theraze

Active member
When I added more logging, the _spec max hp was below the actual max hp, which is what it uses for my_stats, so it always thought my health was below max, and healing was always useful.
 

zarqon

Well-known member
I don't think that's the problem. I added a debug print to my_stat() to print something whenever spec differs from reality:

PHP:
float my_stat(string which) {
   switch (which) {
      case "hp": if (numeric_modifier("_spec","Buffed HP Maximum") != my_maxhp()) print("WTF?! Spec of "+
            rnum(numeric_modifier("_spec","Buffed HP Maximum"))+" doesn't equal real max HP of "+my_maxhp());
         return minmax(my_hp()+adj.hp,0,numeric_modifier("_spec","Buffed HP Maximum"));

I also added some print statements to the dangerous poisons detection section like so:

PHP:
print("pre MaxHP: "+rnum(numeric_modifier("_spec","Buffed HP Maximum")),"red");

   foreach i in $ints[8, 264, 282, 283, 284] {
      cli_execute("whatif up "+to_effect(i)+"; quiet");
      print("poison "+i+" Spec MaxHP: "+rnum(numeric_modifier("_spec","Buffed HP Maximum")),"red");

      if (m_hit_chance() > 0.06 || kill_rounds(attack_action()) > maxround - round) dangerpoisons[i] = true;
      cli_execute("whatif quiet");                     // reset spec in case it was used elsewhere
   }

print("post MaxHP: "+rnum(numeric_modifier("_spec","Buffed HP Maximum")),"red");

After doing that, I had these results:

[48134] Giant's Castle
Encounter: Procrastination Giant
Strategy: KoLmafia\ccs\default.ccs [default]
Round 0: multi wins initiative!
(unable to macrofy due to action: consult SimpleSmack.ash)
1 MP costs 4μ. ( 546 / 546 )
1 HP costs 1.222μ. ( 581 / 581 )
Factoring in Scarysauce: (6) damage, retal
pre MaxHP: 581
poison 8 Spec MaxHP: 537

WTF?! Spec of 537 doesn't equal real max HP of 581
poison 264 Spec MaxHP: 537
WTF?! Spec of 537 doesn't equal real max HP of 581
poison 282 Spec MaxHP: 537
WTF?! Spec of 537 doesn't equal real max HP of 581
poison 283 Spec MaxHP: 537
WTF?! Spec of 537 doesn't equal real max HP of 581
poison 284 Spec MaxHP: 537
WTF?! Spec of 537 doesn't equal real max HP of 581
post MaxHP: 581
ATT: 135 (6% × 9.5, death in 1020)
DEF: 122 (95.45% × 325.72, win in 1)
HP: 160, Value: 1,242.06 μ
Profit per round: ActionProfitDamageOtherbase; Hobo Monkey (75μ)75μ--
Round 1: multi executes a macro!
Round 1: multi tries to steal an item!
You acquire an item: procrastination potion
You gain 67 Meat.
You snatched a procrastination potion (138μ)!
Revised monster value: 1,177.47

SimpleSmack queueing... (Monster HP: 160, base profit 0)
→ Action 1: attack; call batround; if hpbelow 11; abort "BatBrain abort: Danger, Will Robinson"; endif;
→ Outcome: You win!
Round 2: multi executes a macro!
Round 2: multi attacks!
Round 3: procrastination giant takes 324 damage.
Round 3: multi wins the fight!
You gain 746 Meat
You gain 7 Muscleboundness
You gain 11 Mysteriousness
You gain 18 Chutzpah

Requests complete.

> ash numeric_modifier("_spec","Buffed HP Maximum")

Returned: 581.0

Based on the absence of "WTF?" messages everywhere except during poison selection, it looks like it's working as it should. At least, the Buffed HP bit is -- I'm a little surprised the speculative HP maximum would be the same for all poison effects though. Removing the "quiet" bit shows that it gets all the percentage/numerical reductions correct, however although my Buffed Muscle ranged from 54 to 492, my Buffed HP Maximum was always 535. Can I really have over 535 HP with only 54 muscle, with only Reptilian Fortitude modifying my max HP? Something seems odd there.

Anyway, that's either something I don't understand or a mafia bug, but either way it shouldn't affect the Lasagna Bandages issue. If you have evidence to the contrary, please post it.
 

bsander

Member
I have access to both Entangling Noodles and Operation Patriot Shield, which I can throw. It looks like SS doesn't discriminate between the two, so that in half my fights I first entangle my opponent and then throw my shield at them in the next round, which results in a redundant stun. It would obviously be much more effective to first throw the shield and then noodle with auto-crit in the next round (this happens correctly in the other half of my fights). Can the shield be given priority somehow?
 

heeheehee

Developer
Staff member
Based on the absence of "WTF?" messages everywhere except during poison selection, it looks like it's working as it should. At least, the Buffed HP bit is -- I'm a little surprised the speculative HP maximum would be the same for all poison effects though. Removing the "quiet" bit shows that it gets all the percentage/numerical reductions correct, however although my Buffed Muscle ranged from 54 to 492, my Buffed HP Maximum was always 535. Can I really have over 535 HP with only 54 muscle, with only Reptilian Fortitude modifying my max HP? Something seems odd there.

Max buffed HP can't go below unbuffed muscle + 3 (and then all sorts of multiplier goodness is applied on top of that, like being a muscle class or having spirit of ravioli).
 
Last edited:

Theraze

Active member
One thing... SS still tries to use rave combos before finishing up the nemesis quest, if you aren't QUITE strong enough to kill off your demon nemesis in-run or something like that arrests its progress. I was thinking that there wasn't a good way to check if it was completed, but then I realized... if (available_amount($item[seegers unstoppable banjo]) < 1) then you haven't finished the quest. Since it's a quest item, you can only ever have 1 available, and only if the quest is actually finished. I've modified my copy of SS to check for this anytime it calls a rave combo... namely that to_combo's seq function returns "" if you don't have the banjo yet (and you're asking for a rave combo), and the which-switch inside to_combo will break if it's trying to calculate the benefit from a rave combo without the banjo available.

Edit: The one problem with my current fix is that it stops SS from working in the nemesis zone... so I need to add in a check for which zone it's trying to use them after the banjo check. :)

Edit2: That makes this the proper check:
Code:
if (available_amount($item[seegers unstoppable banjo]) < 1 && my_location().zone != "Volcano")

Edit3: In addition to those, it needs the continue-skip in the section to learn unknown rave combos... After adding this to the two sections above as well as the unknown rave learning, it's stopped using rave combos incorrectly when they fail, which makes me much more survivable. :)
 
Last edited:

Galanodel

Member
So, I've recently updated and started using smartstasis again. My question is: Has the script changed drastically in the past few months? Now in pure stasis situations, it takes forever and a day to run through one combat (I'd say it takes an hour to run through one combat). Is there some setting somewhere that I am missing that might speed it up a bit?
 

Winterbay

Active member
You could set your verbosity to say 9 and post the result of a fight here. That may indicate what's being odd for you.
Also, what version of Mafia are you running?
 

Galanodel

Member
I use Wizard's updater, so I always have the latest version of mafia :) Here is a copy of my combat.

Code:
[5087] Exposure Esplanade
Encounter: Archie Stemple, the Hobo Who Looks a Bit Like a Penguin
Strategy: C:\Users\Galanodel\Documents\KOL Mafia\ccs\Shield Butting.ccs [default]
Round 0: Lilin wins initiative!
Running ZLib version: r33 (current)
1 MP costs 4.6μ. ( 506 / 2397 )
1 HP costs 0.027μ. ( 4,478 / 4478 )
hobo nickel (15.0 @ +110.0): 50μ * 31.5% = 15.75
Value of stat gain: 963.02μ
Factoring in navel ring of navel gazing: damage, stun 0.5
Factoring in Hodgman's whackin' stick: 175 damage, oncrit
Checking for updates (running BatBrain ver. 1.15)...
Running BatBrain version: 1.15 (current)
Profit per round: ActionProfitDamageOtherbase; navel ring of navel gazing; Stocking Mimic (38.69μ)84.99μ9.65 (-4.01 μ/dmg)Att: -3.19 (-0.0 DPR) Def: -3.19 50% stun chance HP: 10.07 MP: 10.07
Checking for updates (running SmartStasis ver. 3.10)...
Running SmartStasis version: 3.10 (current)
Parsed round number: 1
Building options...
Options built! (109 actions)
hobo nickel (15.0 @ +110.0): 50μ * 31.5% = 15.75
Value of stat gain: 963.02μ
Monster: Cold Hobo, ATT: 360, DEF: 324, HP: 510, Value: 978.77
You will die in 38872 rounds.
Your attack will kill the monster in 1 rounds.
Building custom actions...
Custom actions built! (0 actions)
Stasis action chosen: use 2678
hobo nickel (15.0 @ +110.0): 50μ * 31.5% = 15.75
Value of stat gain: 963.02μ
Attack action chosen: skill 3022
Top of the stasis loop.
Queued: use 2678
Building options...
Options built! (109 actions)
Executing macro: scrollwhendone; sub batround; if haseffect 8 || haseffect 264 || haseffect 282 || haseffect 283 || haseffect 284; abort "BatBrain abort: poisoned"; endif; endsub; sub batsub1; use 2678; call batround; endsub; call batsub1; repeat hascombatitem 2678 && (!hpbelow 4478.0 && !mpbelow 506.0 && !pastround 28); if hpbelow 5; abort "BatBrain abort: Danger, Will Robinson"; endif; 
Round 1: Lilin executes a macro!
Round 1: Lilin uses the spectre scepter!
Round 2: cold hobo drops 1 attack power.
Round 2: cold hobo drops 2 defense.
Round 2: Lilin uses the spectre scepter!
Round 3: cold hobo takes 18 damage.
Round 3: Skellington mimics a candy-striper nurse, heals some of your wounds, and recharges your mojo.
You gain 122 hit points
You gain 122 Muscularity Points
You lose 287 hit points
Happened: use 2678
Happened: use 2678
Parsed round number: 3
Building options...
Options built! (109 actions)
Stasis action chosen: use 2678
hobo nickel (15.0 @ +110.0): 50μ * 31.5% = 15.75
Value of stat gain: 963.02μ
Attack action chosen: skill 3022
Top of the stasis loop.
Queued: use 2678
Building options...
Options built! (109 actions)
Executing macro: scrollwhendone; sub batround; if haseffect 8 || haseffect 264 || haseffect 282 || haseffect 283 || haseffect 284; abort "BatBrain abort: poisoned"; endif; endsub; sub batsub1; use 2678; call batround; endsub; call batsub1; repeat hascombatitem 2678 && (!hpbelow 4191.0 && hpbelow 4478 && !mpbelow 628.0 && !pastround 28); if hpbelow 5; abort "BatBrain abort: Danger, Will Robinson"; endif; 
Round 3: Lilin executes a macro!
Round 3: Lilin uses the spectre scepter!
Round 4: cold hobo takes 18 damage.
Round 4: Lilin uses the spectre scepter!
Round 5: cold hobo drops 3 attack power.
Round 5: cold hobo drops 3 defense.
You lose 310 hit points
Happened: use 2678
Happened: use 2678
Parsed round number: 5
Building options...
Options built! (109 actions)
Stasis action chosen: use 2678
hobo nickel (15.0 @ +110.0): 50μ * 31.5% = 15.75
Value of stat gain: 963.02μ
Attack action chosen: skill 3022
Top of the stasis loop.
Queued: use 2678
Building options...
Options built! (109 actions)
Executing macro: scrollwhendone; sub batround; if haseffect 8 || haseffect 264 || haseffect 282 || haseffect 283 || haseffect 284; abort "BatBrain abort: poisoned"; endif; endsub; sub batsub1; use 2678; call batround; endsub; call batsub1; repeat hascombatitem 2678 && (!hpbelow 3881.0 && hpbelow 4478 && !mpbelow 628.0 && !pastround 28); if hpbelow 5; abort "BatBrain abort: Danger, Will Robinson"; endif; 
Round 5: Lilin executes a macro!
Round 5: Lilin uses the spectre scepter!
Round 6: cold hobo takes 18 damage.
You lose 295 hit points
Happened: use 2678
Parsed round number: 6
Building options...
Options built! (109 actions)
Stasis action chosen: use 2678
hobo nickel (15.0 @ +110.0): 50μ * 31.5% = 15.75
Value of stat gain: 963.02μ
Attack action chosen: skill 3022
Top of the stasis loop.
Queued: use 2678
Building options...
Options built! (109 actions)
Executing macro: scrollwhendone; sub batround; if haseffect 8 || haseffect 264 || haseffect 282 || haseffect 283 || haseffect 284; abort "BatBrain abort: poisoned"; endif; endsub; sub batsub1; use 2678; call batround; endsub; call batsub1; repeat hascombatitem 2678 && (!hpbelow 3586.0 && hpbelow 4478 && !mpbelow 628.0 && !pastround 28); if hpbelow 5; abort "BatBrain abort: Danger, Will Robinson"; endif; 
Round 6: Lilin executes a macro!
Round 6: Lilin uses the spectre scepter!
Round 7: cold hobo takes 9 damage.
Round 7: Lilin uses the spectre scepter!
Round 8: cold hobo takes 9 damage.
You lose 283 hit points
Happened: use 2678
Happened: use 2678
Parsed round number: 8
Building options...
Options built! (109 actions)
Stasis action chosen: use 2678
hobo nickel (15.0 @ +110.0): 50μ * 31.5% = 15.75
Value of stat gain: 963.02μ
Attack action chosen: skill 3022
Top of the stasis loop.
Queued: use 2678
Building options...
Options built! (109 actions)
Executing macro: scrollwhendone; sub batround; if haseffect 8 || haseffect 264 || haseffect 282 || haseffect 283 || haseffect 284; abort "BatBrain abort: poisoned"; endif; endsub; sub batsub1; use 2678; call batround; endsub; call batsub1; repeat hascombatitem 2678 && (!hpbelow 3303.0 && hpbelow 4478 && !mpbelow 628.0 && !pastround 28); if hpbelow 5; abort "BatBrain abort: Danger, Will Robinson"; endif; 
Round 8: Lilin executes a macro!
Round 8: Lilin uses the spectre scepter!
Round 9: cold hobo takes 16 damage.
Round 9: Lilin uses the spectre scepter!
You gain 5 hit points
Round 10: Lilin uses the spectre scepter!
Round 11: cold hobo drops 2 attack power.
Round 11: cold hobo drops 3 defense.
You lose 285 hit points
Happened: use 2678
Happened: use 2678
Happened: use 2678
Parsed round number: 11
Building options...
Options built! (109 actions)
Stasis action chosen: use 2678
hobo nickel (15.0 @ +110.0): 50μ * 31.5% = 15.75
Value of stat gain: 963.02μ
Attack action chosen: skill 3022
Top of the stasis loop.
Queued: use 2678
Building options...
Options built! (109 actions)
Executing macro: scrollwhendone; sub batround; if haseffect 8 || haseffect 264 || haseffect 282 || haseffect 283 || haseffect 284; abort "BatBrain abort: poisoned"; endif; endsub; sub batsub1; use 2678; call batround; endsub; call batsub1; repeat hascombatitem 2678 && (!hpbelow 3023.0 && hpbelow 4478 && !mpbelow 628.0 && !pastround 28); if hpbelow 5; abort "BatBrain abort: Danger, Will Robinson"; endif; 
Round 11: Lilin executes a macro!
Round 11: Lilin uses the spectre scepter!
You gain 4 hit points
Round 12: Lilin uses the spectre scepter!
Round 13: cold hobo takes 8 damage.
Round 13: Skellington mimics a red-and-white striped candy cane, and canes him for 234 damage.Happy Holidays!
Round 13: cold hobo takes 234 damage.
Round 13: Lilin uses the spectre scepter!
Round 14: cold hobo takes 8 damage.
Round 14: Skellington mimics a red-and-white striped barber pole, spinning in front of your opponent. He looks mesmerized.
Round 14: cold hobo drops 38 attack power.
Round 14: cold hobo drops 38 defense.
Round 14: Lilin uses the spectre scepter!
Round 15: cold hobo drops 2 attack power.
Round 15: cold hobo drops 3 defense.
Round 15: Skellington mimics a red-and-white striped candy cane, and canes him for 118 damage.
Round 15: cold hobo takes 118 damage.
You lose 247 hit points
Happened: use 2678
Happened: use 2678
Happened: use 2678
Happened: use 2678
Parsed round number: 15
Building options...
Options built! (109 actions)
Stasis action chosen: use 185
hobo nickel (15.0 @ +110.0): 50μ * 31.5% = 15.75
Value of stat gain: 963.02μ
Attack action chosen: skill 3022
Top of the stasis loop.
Queued: use 185
Building options...
Options built! (109 actions)
Executing macro: scrollwhendone; sub batround; if haseffect 8 || haseffect 264 || haseffect 282 || haseffect 283 || haseffect 284; abort "BatBrain abort: poisoned"; endif; endsub; sub batsub1; use 185; call batround; endsub; call batsub1; repeat hascombatitem 185 && (!hpbelow 2780.0 && hpbelow 4478 && !mpbelow 628.0 && !pastround 28); if hpbelow 4; abort "BatBrain abort: Danger, Will Robinson"; endif; 
Round 15: Lilin executes a macro!
Round 15: Lilin uses the fat stacks of cash!
Round 16: Skellington mimics a red-and-white striped barber pole, spinning in front of your opponent. He looks mesmerized.
Round 16: cold hobo drops 39 attack power.
Round 16: cold hobo drops 39 defense.
Round 16: Lilin uses the fat stacks of cash!
Round 17: Skellington mimics a red-and-white striped candy cane, and canes him for 117 damage.
Round 17: cold hobo takes 117 damage.
Round 17: Lilin wins the fight!
You gain 49 Strongness
You gain 20 Enchantedness
You gain 26 Roguishness
Happened: use 185
Happened: use 185
Parsed round number: 0
Building options...
Options built! (109 actions)
 

Theraze

Active member
From what I see, HP is basically considered irrelevant, but the stocking mimic provides ~85 meat per round, so it thinks that's definitely a good choice to run as long as it can. However, you don't have enough moxie (or muscle, if you have hero) to avoid getting hit, hard, so the script needs to recalculate if it's safe every time you get hit.

At least, that's my read...
 
Top