Bug - Fixed +ML increasing HP, Attack, Defense

+1 ML = +1 Attack, +0.9 Defense, and +1 HP.

However, the defense is really +ceil(0.9*ML).
so +1 ML gives ceil(0.9) = 1,
+2 gives ceil(1.8) = 2,
+7 gives ceil(6.3) = 7,
+10 gives ceil(9) = 9,
+11 gives ceil(9.9) = 10

Mafia currently has it as a flat +1 Defense per +1 ML.
Hopefully this will be a very small fix.
 

Bale

Minion
So, when I'm running +58ML, that's only +53 defense, not 58. Not a huge difference, but nice to know. Thanks.
 

heeheehee

Developer
Staff member
This is probably most important in the Slime Tube, where ML can easily go over 1000, leading to a difference of more than 100.
 

jasonharper

Developer
Bah, every time I look at this code I get more confused, due to this stupid detail of the monster defense being 90% of the monster defense. I can't tell if the value at any given point is supposed to be the monster defense, or the monster defense, and I doubt that the original Wiki-derived data is at all consistent about which value is used.
 

StDoodle

Minion
I semi-regularly (or, in the past; haven't played much lately) plink with ~+50ML, which means a difference of 5 monster defense. I don't personally find it to be a big deal for manually run combats, but it would have a major impact on any scripted fights.
 

lostcalpolydude

Developer
Staff member
I used potions and regular attacks in the tube. But then I never bothered to get the nodules for a shield and 1-handed weapon, I think.
 

Veracity

Developer
Staff member
This is probably most important in the Slime Tube, where ML can easily go over 1000, leading to a difference of more than 100.
OK. So, people use spells (which ignore monster defense) or Shieldbutt (which ignores monster defense) or potions and regular attacks (which don't, but which I can safely say you won't do unless you've made damned sure you're buffed enough to always hit). Given all that, I still don't understand why it is "most important" that the displayed defense be accurate in the Slime Tube.
 

slyz

Developer
I think it would be more important during an ascension when you are running a lot of ML, especially a softcore one. As RoyalTonberry said, it looks like a small fix, but, if it's not, +1 ML = +1 defense is a good enough approximation I guess.
 
If you're running +ML and plinking (I do that, does anyone else?), then it's fairly important. Especially if you're running +50 ML, that's a difference of 5 defense, which might be difficult to come up with while plinking.

It's not really a huge deal anywhere. A whole lot of monster defenses on the wiki (which I assume mafia uses?) are also wrong anyway. However, being accurate as you can is always nice.

If it'd be horrifying to fix, don't worry about it too much. I would think that it's just a small fix somewhere.

Such as in net.sourceforge.kolmafia.request.FightRequest.getMonsterDefense()

changing this
Code:
return FightRequest.monsterData.getDefense() + FightRequest.levelModifier + KoLCharacter.getMonsterLevelAdjustment();

to this
Code:
return FightRequest.monsterData.getDefense() + FightRequest.levelModifier + Math.ceil(0.9*KoLCharacter.getMonsterLevelAdjustment());

Seems like it'd do the trick.

Also, looking at FightRequest.levelModifier: Disco Face Stab reduces ML by 9, not by 10.

Which is found in: private static final void payActionCost()

EDIT: while i'm on the subject, Shieldbutt decreases either Attack or Defense by 5, depending on the message. payActionCost seems to think that it just reduces both by 5, without looking at the message.
 
Last edited:

Veracity

Developer
Staff member
We were chatting yesterday and you mentioned that we (and the Wiki) have bad defense values for a bunch of monsters and that with very few exceptions, the defense = .9 * attack.

Seems like we could/should use that info. One question: if we delevel a monster by 10, its attack goes down 10. Does its defense go down 10, or does it go down 9?
 

heeheehee

Developer
Staff member
Defense seems to go down by 10. Assuming, that is, the wiki data for wussiness potions is correct (-5 ML).
(Tested by alternating a) attacking barehanded and b) using 2 wussiness potions. Damage increased by 10 each time I attacked.)
 

Theraze

Active member
So the question is, was any of this actually implemented? If not, is mafia already running at a 90% defence assumption and working properly?
 
Top