SmartStasis -- a complex script for a simple CCS

mredge73

Member
Code:
[655] Menagerie 1
Encounter: Fruit Golem
Strategy: d:\Data\My Stuff\kol\Kol Mafia\ccs\basic.ccs [default]
Round 0: alotavagina loses initiative!
You lose 10 hit points
FTF
1/3 monsters dropping goals.
This monster drops all your remaining goals!
SS
Round 1: alotavagina uses the turtle totem!
Round 2: fruit golem takes 1 damage.
You lose 10 hit points
Round 2: alotavagina uses the turtle totem!
Round 3: fruit golem takes 1 damage.
Round 3: alotavagina uses the turtle totem!
Round 4: fruit golem takes 1 damage.
You lose 10 hit points
You acquire an item: grapefruit
Round 4: alotavagina uses the turtle totem!
Round 5: fruit golem takes 1 damage.
You lose 12 hit points
Round 5: alotavagina uses the turtle totem!
Round 6: fruit golem takes 1 damage.
You lose 12 hit points
Round 6: alotavagina uses the turtle totem!
Round 7: fruit golem takes 1 damage.
You lose 11 hit points
Casual Combat, re-revamped.
Round 7
Round 7: alotavagina casts RAVIOLI SHURIKENS!
Round 8: fruit golem takes 19 damage.
You lose 12 hit points
Combat finished!

Health fell below 0. Auto-abort triggered.
I am using an edited version of casual combat that includes your script. Here is the main():
Code:
//Main
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
void main (int initround, monster foe, string url) 
{    
    round = initround - 1; act(url);
    print("FTF", "blue");
    url = ftf(url);
    
    if (can_combo())
        url = best_combos(url);
    
    if (intheclear() || is_our_huckleberry()) 
    {
        print("SS", "blue");
        url = stasis(url);
    }
    
    //Run CasualCombat
    print("Casual Combat, re-revamped.", "blue");
    while(!combat_finished(url))
    {    
        url=clear_poison(url);
        print("Round "+round,"olive");
        url=CasualCombat(url);    
    }
    print("Combat finished!", "blue");
}
It is just a copy/paste of the main from SS.

This is the best combat script that I can find on the forums that suits my needs but it is not very good, eagerly awaiting BATMAN.
 
Last edited:

slyz

Developer
What setting do you have for the threshold zlib variable?

EDIT: oh, and how much +ML where you running? How high was your buffed moxie?
 

mredge73

Member
My ML is controlled by BBB so the radio is set to 0 in the menage 1, but I do have the annoying pitchfork equipped.
threshold is default: 4
Buffed moxie is 50

Maybe SS does not see the +5 ML from the annoying pitchfork?
 

slyz

Developer
monster_attack() returns the mob's attack with the +ML taken into account. intheclear() should return false, since the Fruit Golem's attack is 56+5, and your moxie is 50 (unless you have Hero, are using a shield, and have a higher muscle?).

Try adding
Code:
print("intheclear() returned "+intheclear());
to see if that's the culprit?

EDIT:

...
alotavagina?
 

mredge73

Member
Code:
[741] Goatlet
Encounter: drunk goat
Strategy: d:\Data\My     Stuff\kol\Kol Mafia\ccs\basic.ccs [default]
Round 0: alotavagina wins     initiative!
intheclear() returned true
FTF
1/3     monsters dropping goals.
SS
Round 1:     alotavagina uses the turtle totem!
Round 2: drunk goat takes 1 damage.
You     lose 13 hit points
Round 2: alotavagina uses the turtle totem!
Round     3: drunk goat takes 1 damage.
You lose 12 hit points
Round 3:     alotavagina uses the turtle totem!
Round 4: drunk goat takes 1 damage.
You     lose 14 hit points
Round 4: alotavagina uses the turtle totem!
Round     5: drunk goat takes 1 damage.
Round 5: Magic Woman floats behind your     opponent, and begins to glow brightly. Starlight shines through your     opponent, doing 15 damage, and pours into your body.
Round 5: drunk     goat takes 15 damage.
You gain 15 Mana Points
You lose 13 hit points
Casual     Combat, re-revamped.
Round 5
Round     5: alotavagina casts RAVIOLI SHURIKENS!
Round 6: drunk goat takes 20     damage.
You lose 13 hit points
Combat finished!

Health     fell below 0. Auto-abort triggered.
intheclear() returned true
ML = 0
moxie= 53
muscle= 48
myst = 80
class = pasta
threshold =4
hero= true
tao= true
shield = false
Alotavagina = my female alter-ego and my HC ascender.
Stole the name from Austin Powers and have used it for every female game character that I have ever played.

Thanks for the help
 
Last edited:

mredge73

Member
Latest and greatest... 3.7
SS is also the latest.

also verified that using SS by itself, not bundled in another script, does the same thing.

Thanks for you help.
I rarely use SS during ascension because of this issue, but I want to help resolve it if possible.
 

zarqon

Well-known member
Well, crap. I had a stupid typo, which was causing all monster attacks to be evaluated as 0. Fixed that and updated the heck out of it. Geez, that's embarrassing.

When you update you'll also need a recent build of mafia, because I'd already started working in ASH's brand new item_drops_array().
 

zarqon

Well-known member
Indeed. It felt ugly when I was coding it, and as it turns out it was also a little buggy. I'll have to look into a better algorithm for combos that still allows me to work them into BatMan the way I'd planned. It helps that I actually (finally) have a character who is ascending as a DB at the moment, so in a few days I should be able to actually test out this script I wrote. :) I'll try to get to that this weekend if possible.
 

Cheese Loaf

New member
[1647] Giant's Castle
Encounter: Alphabet Giant
Round 0: uncle leroy wins initiative!
Round 1: uncle leroy tries to steal an item! (auto-attack)
You acquire an item: heavy D
Map modified within foreach (SmartStasis.ash, line 174)

Then the script aborts. Same issue?
 

Bale

Minion
Cheese Loaf, the problem was transitory. It seems you've updated your mafia to r8382 or greater, but less than r8386. Update to r8386 and the problem will be fixed.
 
Last edited:

zarqon

Well-known member
No it won't. The problem is in the script, which foreaches over a map but due to an oversight on my part can sometimes remove upcoming keys. I'll try to fix it this weekend.

In BatMan news, I finally got my data restructure working. w00t! I'm feeling confident that a fight.php relay script will be up before the end of the month.
 

Bale

Minion
It does? I took a look at it, but I only saw the current key being removed. I guess I missed it.

Very much looking forward to BatMan fight.php, but take as long as you need. Delays are acceptable.
 

Winterbay

Active member
It does? I took a look at it, but I only saw the current key being removed. I guess I missed it.

Very much looking forward to BatMan fight.php, but take as long as you need. Delays are acceptable.

I can verifythat even with the latest version it still fails. I will run my automatic fighting in 8381 fo rthe time being. It did however solve the similar problem in eat_drink.ash.
 

zarqon

Well-known member
Update coming at rollover! Tried a fix at DB combos, smarter pickpocketing (won't pickpocket for no-pp items, or items with a 100% drop rate), smarter Concentration profit calculations using item_drops_array(), and added support for Slimelings (finally!) and relevant Nemesis familiars.

While I was figuring out adding Slimeling support, I realized I could remove the "ghostname" variable. Users will no longer need to configure that to use the script with GGG's -- looking for your familiar's image on the page is better than looking for its name. Duh!

Of the above changes, Slimeling support is tested. The rest -- I'm pretty sure it will work. If it doesn't, you know what to do. :)
 

Bale

Minion
While I was figuring out adding Slimeling support, I realized I could remove the "ghostname" variable. Users will no longer need to configure that to use the script with GGG's -- looking for your familiar's image on the page is better than looking for its name.
O! Good point!

I'm pretty sure it will work. If it doesn't, you know what to do. :)
I should comb through your code for the bug and then suggest a fix?
 

zarqon

Well-known member
Lies! All lies! Unfortunately, I left my thumb drive at home this morning, so update will not happen at rollover -- it will happen about 6 hours from now, when I get home. Be forewarned that it will require updating both FTF and SS.

I should comb through your code for the bug and then suggest a fix?

See, you do know what to do.
 
Top