case "damagecap": if (is_integer(val)) matt["damagecap"] = min(matt["damagecap"], max(1,to_int(val)));
	skill 1003 : 106.49
skill 4020 : 28.415999999999997
skill 2015 : 106.49
skill 3003 : 106.49
skill 4005 : 106.49
skill 4003 : 85.24799999999999
skill 7246 : 17.759999999999998
skill 1022 : 33.93
attack : 14.563220378809493
skill 1005 : 106.49
skill 3005 : 106.49
skill 3007 : 106.49
skill 4009 : 106.49
skill 4032 : 106.49
skill 3020 : 13.32
skill 1004 : 10.872207063514708
skill 2023 : 11.1
skill 4012 : 106.49
skill 29 : 106.49
skill 33 : 106.49
skill 1023 : 106.49
skill 3008 : 106.49
skill 5033 : 39.96
skill 97 : 106.49
skill 2003 : 10.406007063514709
skill 5012 : 26.085
skill 1038 : 47.86690070571899
skill 2 : 11.1
skill 31 : 84.8928
skill 37 : 84.8928
skill 5037 : 29.6
skill 5036 : 19.240000000000002
skill 5008 : 6.66
skill 6037 : 17.02
skill 5005 : 5.18
use 1777 : 16.65
use 559 : 2.3125
skill 94 : 35.36460141143798
use 2 : 1.0
skill 17047 : 1.0
skill 5035 : 13.875
skill 6025 : 1.85
skill 28 : 106.49
skill 30 : 106.49
skill 36 : 106.49
skill 32 : 106.49
skill 117 : 5.0
skill 5021 : 1.0
skill 5003 : 1.48
skill 99 : 12.21
skill 6029 : 1.1099999999999999
skill 2028 : 1.0
skill 5019 : 1.0
skill 6034 : 1.0
use 1939 : 1.0
skill 2022 : 1.0
skill 43 : 1.0
skill 3019 : 1.0
use 747 : 2.775
skill 42 : 1.0
use 518 : 0.0
skill 7182 : 0.0
skill 7247 : 0.0
use 2947 : 0.0
skill 7183 : 0.0
use 27 : 0.0
use 829 : 0.0
skill 3004 : 0.0
use 452 : 0.0
skill 4014 : 0.0
skill 4029 : 0.0
use 469 : 0.0
use 474 : 0.0
use 208 : 0.0
skill 3009 : 0.0
use 1922 : 0.0
skill 79 : 0.0
skill 1033 : 0.0
skill 4034 : 0.0
skill 15 : 0.0
skill 2032 : 0.0
use 1958 : 0.0
use 1907 : 0.0
skill 104 : 0.0
use 2091 : 0.0
skill 19 : 0.0
use 7266 : 0.0
runaway; repeat : 0.0
	r73 stops min-ing damagecap by itself, as well as several other changes:
- A very important bugfix for stun_action(). I had a sign reversed, so it was seldom recommending stuns when it ought to have. I found myself getting killed while flyering, despite having multiple free stunning skills at hand, and getting into the numbers revealed the nasty little bug hiding in a closet talking to his regex friends. Using my tongs, I scared his friends away and then stomped on him by typing a minus, thus negating the bug.
 - Removed support for ID-ing spheres. Who cares about ID-ing spheres? Not us.
 
I also just updated batfactors with what ought to be the correct formula for Belching Rainbows.
Enjoy!
Thanks, I just committed a fix to SmartStasis.
Also, did you type that entire error message in rather than pasting it? Or is your script actually named Smartstatis.ash?
How strange. How do you know this? Where was it spaded?Ghostly is 87.5% (7/8) physical resistance.
ancient protector spirit	0	protspirit.gif	HP: 80 Def: 145 Atk: 158 Init: 10 Phys: 100 P: undead
Battlie Knight Ghost	1257	aboo_wars.gif	Atk: 76 Def: 64 HP: 40 Init: -10000 Phys: 100 E: spooky P: undead
booty crab	634	bootycrab.gif	Atk: 100 Def: 90 HP: 70 Init: 10000 Meat: 286-334 E: sleaze Phys: 25 P: beast
chalkdust wraith	383	chalkdust.gif	Atk: 25 Def: 23 HP: 25 Init: 50 ED: spooky Phys: 100 P: undead
Claybender Sorcerer Ghost	1254	aboo_wiz.gif	Atk: 70 Def: 70 HP: 40 Init: -10000 E: spooky P: undead Phys: 100
Demon of New Wave	892	5_4a.gif	BOSS Atk: 200 Def: 180 HP: 500 Init: 100 Phys: 40 P: demon
Dusken Raider Ghost	1255	aboo_dipshit.gif	Atk: 72 Def: 68 HP: 40 Init: -10000 E: spooky P: undead Phys: 100
ghost miner	370	ghostminer.gif	Atk: 30 Def: 27 HP: 31 Init: 50 E: spooky Phys: 100 P: undead
Gorgolok, the Demonic Hellseal	888	1_4a.gif	BOSS Atk: 200 Def: 180 HP: 400 Init: 100 Phys: 40
Heavy Kegtank	504	warfratar2.gif	Atk: 180 Def: 162 HP: 300 Init: 20 E: sleaze Phys: 50 P: orc
Lumpy, the Demonic Sauceblob	891	4_4a.gif	BOSS Atk: 200 Def: 180 HP: 500 Init: 100 Phys: 40 P: demon
Lumpy, the Sinister Sauceblob (Volcanic Cave)	885	4_3.gif	BOSS Atk: 185 Def: 166 HP: 260 Init: 90 Phys: 25 P: slime
Mobile Armored Sweat Lodge	488	warhipar2.gif	Atk: 180 Def: 162 HP: 300 Init: 20 E: stench Phys: 50 P: hippy
Protector Spectre	450	protspect.gif	Atk: 164 Def: 151 HP: 100 Init: 30 Phys: 100 P: undead
Snow Queen	385	snowqueen.gif	Atk: 107 Def: 94 HP: 70 Init: 60 E: cold Phys: 100 P: elemental
Space Tourist Explorer Ghost	1256	aboo_trek.gif	Atk: 74 Def: 66 HP: 40 Init: -10000 E: spooky P: undead Phys: 100
swarm of Knob lice	1059	kg_lice.gif	Atk: 25 Def: 22 HP: 30 Init: 50 Phys: 50 P: bug
trophyfish	774	trophyfish.gif	Atk: 5000 Def: 4500 HP: 15000 Init: 200 Phys: 25 P: fish
War Frat Kegrider	420	warfratar.gif	Atk: 170 Def: 153 HP: 300 Init: 20 E: sleaze Phys: 25 P: orc
War Hippy Dread Squad	410	warhipar.gif	Atk: 170 Def: 153 HP: 300 Init: 20 E: stench Phys: 25 P: hippy
Whatsian Commando Ghost	1258	aboo_who.gif	Atk: 78 Def: 62 HP: 40 Init: -10000 E: spooky P: undead Phys: 100
wild seahorse	778	seahorse.gif	Atk: 500 Def: 900000 HP: 1000000 Init: 10000 P: fish Phys: 100
X Stone Golem	242	stonegolem.gif	HP: [0.85*ceil(BL^1.4)+ML] Def: [2*ceil(BL^1.4)+ML] Atk: [2*ceil(BL^1.4)+ML] Init: 70 Phys: 50 P: construct
Ghost of Fernswarthy's Grandfather	238	fernghost.gif	HP: [0.425*ceil(BL^1.4)+ML] Def: [2*ceil(BL^1.4)+ML] Atk: [2*ceil(BL^1.4)+ML] Init: 70 Phys: 100 P: undead
X-dimensional horror	592	dimhorror.gif	HP: [1.7*ceil(BL^1.4)+ML] Def: [2*ceil(BL^1.4)+ML] Atk: [2*ceil(BL^1.4)+ML] Init: -10000 Phys: 90 P: horror
cold ghost	1408	dvcoldghost1.gif,dvcoldghost2.gif,dvcoldghost3.gif	HP: [600+KV*200+ML] Atk: [400+KV*100+ML] Def: [400+KV*100+ML] Init: [15+KV*10] E: cold P: undead Phys: 100
hot ghost	1407	dvhotghost1.gif,dvhotghost2.gif,dvhotghost3.gif	HP: [600+KV*200+ML] Atk: [400+KV*100+ML] Def: [400+KV*100+ML] Init: [15+KV*60] E: hot P: undead Phys: 100
sleaze ghost	1411	dvsleazeghost1.gif,dvsleazeghost2.gif,dvsleazeghost3.gif	HP: [600+KV*200+ML] Atk: [400+KV*100+ML] Def: [400+KV*100+ML] Init: [15+KV*10] E: sleaze P: undead Phys: 100
spooky ghost	1409	dvspookyghost1.gif,dvspookyghost2.gif,dvspookyghost3.gif	HP: [600+KV*200+ML] Atk: [400+KV*100+ML] Def: [400+KV*100+ML] Init: [15+KV*10] E: spooky P: undead Phys: 100
stench ghost	1410	dvstenchghost1.gif,dvstenchghost2.gif,dvstenchghost3.gif	HP: [600+KV*200+ML] Atk: [400+KV*100+ML] Def: [400+KV*100+ML] Init: [15+KV*10] E: stench P: undead Phys: 100
Cyrus the Virus	811	prim_cyru.gif	BOSS HP: 100000 Def: 100000 Atk: 100000 Init: 0 Phys: 100 P: plant
BRICKO cathedral	927	brickocathedral.gif	FREE Atk: 725 Def: 652 HP: 100000 Init: 200 P: construct Phys: 50
BRICKO gargantuchicken	928	brickogchicken.gif	FREE Atk: 1000 Def: 900 HP: 1000000 Init: 300 P: construct Phys: 50
BRICKO vacuum cleaner	925	brickovacuum.gif	FREE Atk: 400 Def: 360 HP: 2500 Init: 150 P: construct Phys: 10
The Landscaper	917	landscaper.gif	BOSS Atk: 100 Def: 90 HP: 100000 Init: -10000 EA: hot Phys: 100 P: demon
The Whole Kingdom	0	wholekingdom.gif	HP: 10000000 Def: 1 Atk: 1 Phys: 100 P: construct
Vanya's Creature	953	cvcreature.gif	BOSS Atk: 1000 Def: 900 HP: 3000 Init: -10000 Meat: 1500 Phys: 50 E: spooky P: construct
Crys-Rock	854	crys_rock.gif	HP: [min(240,HP*2/3)] Def: [min(300,MUS+10)] Atk: [min(300,MOX+10)] Exp: [(min(300,STAT+10))/4] Init: 50 Phys: 50
Don Crimbo	0	doncrimbo.gif	HP: 1000000 Def: 89999 Atk: 99999 Init: 100 Phys: 100
reanimated baboon skeleton	988	foss_baboon.gif	HP: 150 Def: 135 Atk: 150 Init: -10000 Phys: 100 P: undead
reanimated bat skeleton	986	foss_bat.gif	HP: 50 Def: 45 Atk: 50 Init: -10000 Phys: 100 P: undead
reanimated demon skeleton	990	foss_demon.gif	HP: 250 Def: 225 Atk: 250 Init: 50 Phys: 100 P: undead
reanimated giant spider skeleton	991	foss_spider.gif	HP: 300 Def: 270 Atk: 300 Init: 50 Phys: 100 P: undead
reanimated serpent skeleton	987	foss_serpent.gif	HP: 100 Def: 90 Atk: 100 Init: -10000 Phys: 100 P: undead
reanimated wyrm skeleton	989	foss_wyrm.gif	HP: 200 Def: 180 Atk: 200 Init: -10000 Phys: 100 P: undead
Uncle Hobo	0	unclehobo.gif	HP: 15000 Def: 450 Atk: 500 Init: 100 Phys: 100
Chef Boy, R&D	1466	chefboy.gif	WANDERER Scale: 5 Init: -10000 P: dude Phys: 100
	How strange. How do you know this? Where was it spaded?
Every monster for which we have recorded physical resistance has a nice even divisible-by-five percentage. Hence, internally, we store it as an integer from 0 to 100.
If what you say is true, KoL itself does one of the following:
- physical resistance is a float
- physical resistance is a rational (7/8...)
- physical resistance is an integer, but represents (at least) .1 percentage points
... and in order to model it accurately, we'd have to do the same.
expected	observed	round(expected/8)	expected / observed	
494	62	62	7.967741935
156	20	20	7.8
10	1	1	10
	That sounds like adding special code, rather than overriding a parameter of the monster. I bet it's a numeric parameter.Not necessarily? It could be that ghostly just divides physical damage by 8 at the end of the day.
That seems definitive.and, divine noisemaker vs dancin', ghostly swarm of Knob lice with 7088 buffed muscle did 4430 damage. I think it's safe to say that ghostly doesn't override a monster's innate physical resistance, if present.
edit: that also happens to be 62.5% of the expected damage. Hm. This sounds like deft hands at work.
Is this because you were not taking deft hands into account?I'd be happy to say that ghostly is 90% physical resistance. My bad.
Is this because you were not taking deft hands into account?
Don't min damagecap to itself, or it will always be 0. Will need another solution for stacking them.
float stack_physres(float start, float new) {
   if(start == 0)
      return new;
   return min(start, new);
}
	> ashq monster [int] resmon; foreach m in $monsters[] if(m.physical_resistance != 0) resmon[ count(resmon) ] = m; sort resmon by value.physical_resistance; foreach x,m in resmon print(m.physical_resistance+" -- "+m);
10 -- BRICKO vacuum cleaner
25 -- booty crab
25 -- Lumpy, the Sinister Sauceblob (Volcanic Cave)
25 -- trophyfish
25 -- War Frat Kegrider
25 -- War Hippy Dread Squad
40 -- Demon of New Wave
40 -- Gorgolok, the Demonic Hellseal
40 -- Lumpy, the Demonic Sauceblob
50 -- BRICKO cathedral
50 -- BRICKO gargantuchicken
50 -- Crys-Rock
50 -- Heavy Kegtank
50 -- Mobile Armored Sweat Lodge
50 -- swarm of Knob lice
50 -- Vanya's Creature
50 -- X Stone Golem
90 -- X-dimensional horror
100 -- ancient protector spirit
100 -- Battlie Knight Ghost
100 -- chalkdust wraith
100 -- Chef Boy, R&D
100 -- Claybender Sorcerer Ghost
100 -- cold ghost
100 -- Cyrus the Virus
100 -- Don Crimbo
100 -- Dusken Raider Ghost
100 -- ghost miner
100 -- Ghost of Fernswarthy's Grandfather
100 -- hot ghost
100 -- Protector Spectre
100 -- reanimated baboon skeleton
100 -- reanimated bat skeleton
100 -- reanimated demon skeleton
100 -- reanimated giant spider skeleton
100 -- reanimated serpent skeleton
100 -- reanimated wyrm skeleton
100 -- sleaze ghost
100 -- Snow Queen
100 -- Space Tourist Explorer Ghost
100 -- spooky ghost
100 -- stench ghost
100 -- The Landscaper
100 -- The Whole Kingdom
100 -- Uncle Hobo
100 -- Whatsian Commando Ghost
100 -- wild seahorse
	@Bale: Your suggestion is several years old. The last time we had this discussion, there were enough variances between batfactors and KoLmafia's information that I opted to keep using the batfactors information.
r9020 | jasonharper | 2011-02-07 21:51:54 -0500 (Mon, 07 Feb 2011) | 19 lines
Added support for scaling monster stats: all numeric stats in monsters.txt
can now be an expression in square brackets (currently limited to the monster
expression dialect).  Note that a normal monster's defense is, for historical
reasons, expected to be the raw database value, and gets reduced to 90% for
the effective defense value - but a defense expression is interpreted as the
effective defense value directly.
Also in progress:
* Added some more numeric monster stats, which can also be specified via
expressions: experience (for bosses that don't give stats equal to 1/4 of
their level), physical resistance, item block rate, skill block rate, spell
block rate.  Only the experience value is used at all (the rest aren't even
being stored yet), but they are being parsed, so that the file format won't
have to change again when they're implemented.
* Added a BL value (for Basement Level) to the monster expression dialect, to
allow stats to be calculated for Fernswarthy's Basement monsters.  This will
require some additional work to disambiguate the varying monster names in the
Basement before this will actually be useful.
					else if ( option.equals( "Phys:" ) )
				{
					if ( tokens.hasMoreTokens() )
					{
						physical = StringUtilities.parseInt( tokens.nextToken() );
						continue;
					}
					continue;
				}
				else if ( option.equals( "Item:" ) )
				{
					/* itemBlock = */ parseNumeric( tokens );
					continue;
				}
				else if ( option.equals( "Skill:" ) )
				{
					/* skillBlock = */ parseNumeric( tokens );
					continue;
				}
				else if ( option.equals( "Spell:" ) )
				{
					/* spellBlock = */ parseNumeric( tokens );
					continue;
				}