FightOptimizer.ash

This code would be great except for one thing. fightform doesn't show up if you don't use the CAB. I found that "<form name=attack" shows up on both.
Hmm, guess I should have tested that first...

I've fixed that, and added a few other things:
  • jiggle staff (useful guaranteed hit for no MP)
  • some spell damage formulae fixes
  • doesn't try to steal if monster has no items
  • new LESS_PESSIMISTIC flag (false, i.e. off, by default)
The formulae in this script are generally worst-case values, and in some cases it fails to find a winning strategy as a result. Setting LESS_PESSIMISTIC in the script to true uses average instead of worst-case values in a few places, which can save a lot of MP. I've used this for a whole ascension and didn't get beaten up, but I don't have Cocoon, so don't let HP get too low between battles.

Some people have mentioned SmartStasis - I use this script with SmartStasis, but in that script I've commented out:
Code:
else url = try_skill(url,$skill[entangling noodles]);

I'm not planning on doing much more with this script, as therealtahu mentioned something about a rewrite?
 

Attachments

  • FightOptimizer.ash
    115.3 KB · Views: 129

Paragon

Member
Sorry, I can never tell how old the version of fightoptimizer or what has been updated... but when using what i think to be the latest version, the one linked to by nudely_appendage. I was playing as a sauceror but my moxie and musle was high enough that the cheapest strat would have been to just attack, According the the location overview I had 100% hit and dodge ratings, however the script decied that the best couse of action would be to attack with my weapon once, then use wave of sauce at 268 meat per adventure, I turned on the debug logging and the script was under the impression that I would take damage over the course of the combat... Is this a common probelm? How close would you say this script is to being fixed? Is anyone working on it and if so who? And Is there anyway I might be able to help because I really like the idea of this script but It is such a huge undertaking to rewrite
 
... According the the location overview I had 100% hit and dodge ratings, however the script decided that the best course of action would be to attack with my weapon once, then use wave of sauce at 268 meat per adventure, I turned on the debug logging and the script was under the impression that I would take damage over the course of the combat... Is this a common problem? ...
I had this kind of problem, which is why I added the LESS_PESSIMISTIC flag. Have you tried setting that to true? The default settings assume you might always get hit (by a crit I guess), and that you will do minimum damage from your hits/spells.
 

Jazzmin

New member
I downloaded and tried this script, I also use Smartstasis and I had to comment out a line in FTF to prevent it from trying to use noodles twice.

The only issue I noticed is that I got a lot of warnings that the damage done was not what was predicted. This was with the pastamancer spells, Cannelloni Cannon, Stuffed Mortar Shell, and Weapon of the Pastalord. It still worked as it was supposed to and defeated all the monsters I came across.
 

Baconslicer

New member
I've been working on this script a bit recently; I have Crimbo '09 monsters mostly working, and last night I added preliminary support for Stealth Mistletoe. I'll try and get it presentable so I can share it with everyone.

EDIT: Or not. Vacation time is over and I haven't made much progress with this, and I won't have time to maintain it now I'm back at work. Should've thought this through better, really.
 
Last edited:

LeJackal

New member
I've been working on this script a bit recently; I have Crimbo '09 monsters mostly working, and last night I added preliminary support for Stealth Mistletoe. I'll try and get it presentable so I can share it with everyone.

EDIT: Or not. Vacation time is over and I haven't made much progress with this, and I won't have time to maintain it now I'm back at work. Should've thought this through better, really.

Will there ever be an update?
 

DeNarr

New member
When I tried using this as a sauceror on the battlefield my guy just kept attacking until he died, whereas casting spells would have won easily.

[1736] Battlefield (Hippy Uniform)
Encounter: War Frat Elite 500th Captain
Strategy: C:\KolMafia\ccs\Fight Optimizer.ccs [default]
Round 0: Ingot loses initiative!
Round 1: war frat elite 500th captain takes 3 damage.
Round 1: war frat elite 500th captain takes 14 damage.
Round 1: war frat elite 500th captain takes 3 damage.
You lose 42 hit points
Round 1: Ingot executes a macro!
Round 1: Ingot attacks!
Round 2: war frat elite 500th captain takes 3 damage.
Round 2: war frat elite 500th captain takes 4 damage.
Round 2: war frat elite 500th captain takes 4 damage.
You lose 41 hit points
Round 2: Ingot attacks!
Round 3: war frat elite 500th captain takes 3 damage.
Round 3: war frat elite 500th captain takes 4 damage.
Round 3: war frat elite 500th captain takes 4 damage.
You lose 43 hit points
Round 3: Ingot attacks!
Round 4: war frat elite 500th captain takes 2 damage.
Round 4: war frat elite 500th captain takes 6 damage.
Round 4: war frat elite 500th captain takes 4 damage.
You lose 41 hit points
Round 4: Ingot attacks!
Round 5: Ingot attacks!
Round 6: war frat elite 500th captain takes 2 damage.
Round 6: war frat elite 500th captain takes 20 damage.
Round 6: war frat elite 500th captain takes 5 damage.
You lose 40 hit points
 

Rinn

Developer
This script hasn't been updated in years I wouldn't use it. There's a very good possibility zarqon's BatBrain will be used to create a better version in the near future.
 
Last edited:

roippi

Developer
Yeah. I've made a couple of failed attempts at it, but I'm afraid BatBrain is a little too syntactically complex for me. I'm looking forward to whomever does the work for me :)
 

Catch-22

Active member
Catch-22's Update v1

Edit: Guys, please ignore this and see here. It's currently much better than the changes I have made, clearly I should lurk more :) I will, however, post any changes I make to this script that I think others might find useful.

Given that Harry Crimboween put in a fair mount of effort on this script (nearly 3000 lines!), I've taken some time out to patch it up a little.

The script should now at least run...

Please note, I've only been testing this on a Pastamancer so far. Aside from showstoppers, I've only made changes that affect my character (for example, I have added support for "navel ring of navel gazing" and "Bag o' Tricks", but I haven't added support for "tiny plastic Naughty Sorceress"). Basically no new bonus damage items since NS13 will be affecting the calculations, as I don't really have the time to go through them all.

I may or may not continue to update this script. My next run is going to be a moxie run, so I'll probably tweak it a bit more then, but I make no promises.

What really needs to be done is something a bit more modular and not so much item specific stuff. Having said that, I can see a lot of good work has gone into this script and I think it just needed a little TLC for it to be restored to an at least usable state.

Here's the changes I've made:
Code:
// Catch-22's Update v1
//    - adjusted all the pastamancer skills to their new names and formulas.
//    - changed the formula for working out capped spell damage.
//    - changed "Crossbow Fever" to "Disco Fever" and capped damage bonus at 15.
//    - "plexiglass pike pike" is now known as "plexiglass pikestaff".
//    - replaced "Gnollish nunchaku" with "Third-hand nunchaku" and adjusted damage bonus.
//    - "can of hair spray" is now known as "Hair spray".
//    - fixed ranged_weapon_equipped, credit to an old post by slyz.
//    - added "navel ring of navel gazing" and "Bag o' Tricks" to equipment_spell_percentage_bonus.
//    - made a change so that if no strategy is found, it will continue with the next CCS action instead of throwing an error.

Edit: I didn't notice this. Looks like some good changes have already been made. It may be worthwhile at some stage for someone to mash those changes together with mine, or I will probably do it later.
 

Attachments

  • FightOptimizer.ash
    123.8 KB · Views: 68
Last edited:

heeheehee

Developer
Staff member
One main issue I see with the script is that it's presumably older than numeric_modifier() and its ilk, which, if incorporated, would cut down on a lot of hardcoding. I'd say that in itself is worth looking into.
 

Catch-22

Active member
One main issue I see with the script is that it's presumably older than numeric_modifier() and its ilk, which, if incorporated, would cut down on a lot of hardcoding. I'd say that in itself is worth looking into.

You are exactly right, I just realized that some other people have already added numeric_modifier() support. It's probably worth just ignoring the changes I have made for now :)
 
Top