Get Slimy

I have a question regarding the fumble buffer.

I'm at 7 levels of Hate as a level 28 TT with a Scythe (ergo can't Shieldbutt) and no LTS. My shirt is a chamoisole. I'm using hand chalk to avoid fumbles entirely, and I do have Entangling Noodles.

Overall this adds up to mean at 4 turns of Covered in Slime I'm being left with around 150hps and the slimes hit for something like 50-100 damage. The script is assuming I'll die after 5 turns of Covered in Slime, but I know from manual runs that due to Noodles and the chalk I can take out the 4 turn slime.

Do I need to adjust the fumble buffer, and if so should it be positive or negative? (I'm sort of thinking it should be set to either 2 or 3, but I'm not sure.)

-------

Having thought about it, I figured it wouldn't hurt to try playing with the numbers and see what happened. I entered a test amount of 20 adventures to spend and watched the Graphical CLI. I first set the buffer to "3" and this caused it to want to clean the slime off every other adventure. (I aborted that pretty quickly.) Then I set it to "-3" and it worked like I wanted.

I guess maybe the note in the script regarding this value might want to be made a little more clear, because I'm not sure if it'd be immediately obvious that you want to go for a negative number here.

Edit: Oh, and thanks for making the script, it's a real time saver! =+)
 
The Hero check doesn't check if your muscle is actually higher than your moxie before deciding to use muscle....


There seems to be something else weird in the "expected damage", since I'm consistently being told that I'll die on the second turn of being slimed unless I skip that section out of the script, but I need more investigation to find out why. It seems to think I'll take ~200 damage per turn from the slime, when from experience I'm getting ~200 damage per combat - but I can't see why, as yet, so that may be off base.
 
I've fixed the check for muscle > moxie in the latest version.

As for the expected damage problem, if you could send me a debug log of a single adventure run through the script, I'd be very grateful.
 
Hi again!

After b_piryte's post, I was trying to find out why slime.ash was refusing to adventure when covered in slime = 5 (I know that I could LTS the slime) and I found another bug:

- max_possible_damage() was returning 105, while the max damage the slime could do was 16 (slime) and 25 (in the rare case of physical dmg)

(a)
I checked the function and {DA, elemantal resistance} calculations were correct.
Variable absorb_frac was 0.8591663, when my DA is 920, which is correct

But the calculation of damage has a mistake, as it is:
damage = damage * absorb_frac;
Instead of
damage = damage * (1 - absorb_frac);

(b)
Also, as you can see from the script, the calculation is done for elemental damage, while (at least for the Slime Mouths that i fight) there is also a (small) chance of a physical attack.

I think that the line:
damage = damage * ( ( 100 - elemental_resistance( $element[slime] ) ) / 100 );
should be commented as max damage is the damage done by the physical attacks (and in extreme case this wrong calculation can get you killed)
 
Also, not that it is important, but in main(), function slime_damage() is called at least 2 times per loop (4 in the case a chamois must be used), which slows down the script...

You could have a tmp variable in line 254:
tmp_slime_dmg = slime_damage();
and use it in the conditions
 
In the latest version, is it me or does the ML calculation appears to have an extra 100 in it? Not sure where this comes from, perhaps a leftover from the 5 * 20ML of the bladders?
 
The ml calculation at the end is a rough estimate. I've not found it all that much of a priority to fix because half the people I've talked to don't even realize that the feature is there. However, if somebody actually uses it, I'll take the time to get it fixed up to be more accurate.
 
I attempted the debug - but it's now working perfectly with the latest version, so I'm going to assume the reason I couldn't see the fault was that there wasn't one, and it was a holdover from the Hero issue.

(does mafia cache scripts on first run? I didn't think so, but it is the only way I can make sense of the behaviour yesterday)
 
It does cache scripts. It saves the modification date of the file, so if you change the script, it should re-read it.
 
It does cache scripts. It saves the modification date of the file, so if you change the script, it should re-read it.

Adding a print command was definitely updating - added to max_possible_damage like so:
Code:
int max_possible_damage()
{
	int def_stat = my_buffedstat( $stat[moxie] );
	if( have_skill( $skill[Hero of the Halfshell] ) && item_type( equipped_item( $slot[offhand] ) ) == "shield" && my_buffedstat( $stat[muscle] ) > my_buffedstat( $stat[moxie] ) )
		def_stat = my_buffedstat( $stat[muscle] );
	int slime_attack = 100 + numeric_modifier( "Monster Level" );
	int diff = max( 0 , slime_attack - def_stat );
	float absorb_frac = min( .9 , ( square_root( numeric_modifier( "Damage Absorption" ).to_float() / 10.0 ) - 1.0 ) / 10 );
	
	int damage = diff + ( .25 * slime_attack ) - numeric_modifier( "Damage Reduction" );
	damage = damage * ( 1 - absorb_frac );
        print("expecting "+int_to_string(damage)+" damage");
	return damage;
}
got me this:

Code:
[22570] The Slime Tube
Encounter: cyclopean Slime behemoth
Round 0: BDrag0n loses initiative!
Round 0: Chi-WaWa irritates the crap out of you and your opponent with his incessant high-pitched yapping.
You lose 13 hit points
You lose 27 hit points
Round 1: BDrag0n attacks!
Round 1: slime5 takes 267 damage.
Round 2: BDrag0n attacks!
Round 2: slime5 takes 259 damage.
You lose 26 hit points
Round 3: BDrag0n attacks!
Round 3: slime5 takes 263 damage.
You lose 25 hit points
Round 4: BDrag0n attacks!
Round 4: slime5 takes 277 damage.
Round 5: BDrag0n attacks!
Round 5: slime5 takes 263 damage.
Round 6: BDrag0n attacks!
Round 6: slime5 takes 262 damage.
You gain 107 Strongness
You gain 86 Magicalness
You gain 132 Chutzpah
> 1512.0 ML on average for 2 turns, totalling 3024 ML killed total!

account.php?action=autoattack&whichattack=0&pwd
> using 1302
clan_hobopolis.php?place=3&action=talkrichard&whichtalk=3
clan_hobopolis.php?place=4
clan_hobopolis.php?place=6
clan_hobopolis.php?place=5
clan_hobopolis.php?place=7
clan_hobopolis.php?place=8
clan_hobopolis.php?place=2
 > expecting 234 damage
 > The slime covering you will kill you if you don't do something! Hitting up your clan.
clan_slimetube.php?action=chamois&pwd
You lose an effect: Coated in Slime
> Chamois successfully used.
 > expecting 234 damage

cast 1 Cannelloni Cocoon
You gain 91 hit points
 > I'm feeling rather... dry. Let's go get slimy!
custom outfit minml

familiar Ninja Pirate Zombie Robot (35 lbs)

uneffect Ur-Kel's Aria of Annoyance
 > expecting 8 damage
 > expecting 8 damage

[22571] The Slime Tube
Encounter: pulsing Slime pseudopod
Round 0: BDrag0n wins initiative!
You acquire an effect: Coated in Slime (duration: 10 Adventures)
Round 1: BDrag0n uses the tattered scrap of paper and uses the tattered scrap of paper!
 > expecting 8 damage
 > expecting 8 damage
> Covered in slime, adventuring normally in the tube!
custom outfit maxml

familiar Purse Rat (35 lbs)
mcd 10

cast 1 Ur-Kel's Aria of Annoyance
You acquire an effect: Ur-Kel's Aria of Annoyance (duration: 10 Adventures)

account.php?action=autoattack&whichattack=1&pwd

[22571] The Slime Tube
Encounter: towering Slime behemoth
Round 0: BDrag0n loses initiative!
Round 0: Chi-WaWa irritates the crap out of you and your opponent with his incessant high-pitched yapping.
You lose 13 hit points
Round 1: BDrag0n attacks!
Round 1: slime5 takes 254 damage.
Round 2: BDrag0n attacks!
Round 2: slime5 takes 301 damage.
Round 3: BDrag0n attacks!
Round 3: slime5 takes 264 damage.
Round 4: BDrag0n attacks!
Round 4: slime5 takes 265 damage.
You lose 24 hit points
Round 5: BDrag0n attacks!
Round 5: slime5 takes 261 damage.
You gain 97 Strengthliness
You gain a Muscle point!
You gain 75 Magicalness
You gain 151 Chutzpah
 > expecting 234 damage
 > The slime covering you will kill you if you don't do something! Hitting up your clan.

clan_slimetube.php?action=chamois&pwd
You lose an effect: Coated in Slime
> Chamois successfully used.
 > expecting 234 damage

With a moxie of ~1300, and a muscle ~950 - so it certainly looks (to me) like it was still using Muscle instead of Moxie as defstat. The only difference between my code and the latest script is that I used buffedstat to decide if muscle is higher, which would only make a difference if I was running +muscle buffs. Same code last night works fine, which is why I was thinking it may be something cached - but the added "print" commands are operating.
 
Oops, I did use basestat instead of buffedstat for whatever reason, but I'm still not seeing why it would be that far off if your moxie is still higher...

In any case, I'll finally have a chance to test it myself tonight, so I'll see what I can figure out.
 
Last edited:
I was testing this script for myself, and since this latest version, it is healing me too soon, probably because I'm a saucerer using saucegeyser for my attack. Since that's not one of the supported skills, the script thinks I'll die two turns before I actually do.

I'm not sure if I know enough to fix it for my own use, so I'm just reporting it here for completeness.

Thanks for the script. It is incredibly helpful.
 
That would be exactly why it is healing you too soon. I'll add in saucegeyser and probably a couple of other spells in the next version.

Okay, I'm going freaking crazy trying to figure out why the max damage function is coming up with such off the wall numbers. The only thought I have is that the formula from the wiki is not correct. Can anyone verify the accuracy of that formula for me?
 
Last edited:
Back
Top