Formulas / Calculations for AC and MR?

Discussion on running your own board and editing MajorMUD.
User avatar
syntax
Site Admin
Posts: 517
Joined: Tue Jun 02, 2009 10:02 am

Re: Formulas / Calculations for AC and MR?

Post by syntax »

DeathCow wrote:150*150 =22500

22500/100=225

300*300=90000
90000/140=643 (the 140 is because metro changed one of the /10's into a /14)

225/643= 0.349
Yup, it all works out! Thanks!
Attachments
deathcow.png


User avatar
syntax
Site Admin
Posts: 517
Joined: Tue Jun 02, 2009 10:02 am

Re: Formulas / Calculations for AC and MR?

Post by syntax »

Ravyn wrote: note: the damage shown to the user is not the damage taken, it does not include this formula.
What do you mean by this?


DeathCow
Posts: 14
Joined: Tue Aug 07, 2012 12:58 am

Re: Formulas / Calculations for AC and MR?

Post by DeathCow »

syntax wrote:
Ravyn wrote: note: the damage shown to the user is not the damage taken, it does not include this formula.
What do you mean by this?

He's talking about some occations where the displayed damage doesn't match the actual damage taken.


User avatar
syntax
Site Admin
Posts: 517
Joined: Tue Jun 02, 2009 10:02 am

Re: Formulas / Calculations for AC and MR?

Post by syntax »

DeathCow wrote:
syntax wrote:
Ravyn wrote: note: the damage shown to the user is not the damage taken, it does not include this formula.
What do you mean by this?

He's talking about some occations where the displayed damage doesn't match the actual damage taken.
hrmph, ok. I'm testing on the MR formula he gave and not getting results. Is there more to it? like level the spell is being cast at vs the targets level? or more to the Never / No / Yes resist option on the spell? Any confirmation on the "Resist Yes will allow MR to completely resist, possibly using above formula as %" ?


User avatar
syntax
Site Admin
Posts: 517
Joined: Tue Jun 02, 2009 10:02 am

Re: Formulas / Calculations for AC and MR?

Post by syntax »

I just tested a mob casting (a modified) lbol @level 5 (required level on the spell is 8 but mobs don't obey that). Spell was set to "never" resist. I tested it against a level 1 char with both 50 and 100 MR and so no damage reduction. I then changed it to "No" resist and against a level 1 with 95 MR and no change. Spell min / max is 10 - 20 and my average hit is 15 on all tests.

edit:

Name test4 (2014)
Alignment Chaotic Evil
Abilities: ImmuPoison, Animal

Attack 1 (100%) Spell
Spell: [lbol(5041), (@lvl 5): Damage(-MR) 10 to 20]
Cast %: 100
Energy: 200 (Max 5x/round)

----

#: 5041, Name: lbol, Short: lbol, Magery: Mage-1, LVL: 8, Mana: 5, Diff: 0
>> Target: Monster or User -- Attack Type: Lightning -- LVL Gain Cap: 15 -- (@lvl 15): Damage(-MR) 20 to 40
>> References: Monster: test4(2014)


User avatar
syntax
Site Admin
Posts: 517
Joined: Tue Jun 02, 2009 10:02 am

Re: Formulas / Calculations for AC and MR?

Post by syntax »

So yea, I don't know what the hell is going on here, but I'm getting no damage resist. I changed the spell to "yes" resist and now I'm resisting the spell completely (50.9% of the time with 100MR -- which doesn't match the formula???) but not getting any actual resistance to the damage itself.


User avatar
BearFather
Posts: 652
Joined: Sun Feb 09, 2014 6:27 pm
Location: Portland, OR
Contact:

Re: Formulas / Calculations for AC and MR?

Post by BearFather »

I wish I could help more on this convo, but doesn't mr hide it resists? As in mud tell me the dragon cast dragonfire on me for 150 damage, but due to MR I only actually take 75 damage. Is this what your having problems with? I got lost in the math, I really suck at it so I learned to tell the computer to do it.


Ravyn
Posts: 38
Joined: Wed Mar 30, 2016 4:40 pm

Re: Formulas / Calculations for AC and MR?

Post by Ravyn »

So i did quite a bit of testing a couple years back for the remakes, the formula i posted is correct to the best of my knowledge, the part about it not showing the correct amount is true, it shows the full damage BEFORE mr on the screen, my first thought was MR does nothing with monster casting on player but on further investigation i was able to determine it does but just doesnt show the total on the screen. heres the method i used--- i made a monster called "spellcasting practice dummy" with a room spell that heals 9999 hp/round, a test char with exactly 1000 hps and a set MR to test with. the spellcasting dummy every round casts a spell that does EXACTLY 100 damage, one fire, one cold, one pois, one light, one stone, one water, and one magic. it then shows the player resist on anything instantly (ie if you have 73 rlit it would show you getting struck by lightning for 27 damage or if you had 115 rfir youd get healed for 15), i used the magic attack to prove the formula, by getting hit for that 100 damage against 1000 hps then simply measuring the difference to show the damage actually taken. the screen always showed getting hit for 100 magic damage, no matter what your MR. except i think antimagic did show the real #, but I cant remember


User avatar
syntax
Site Admin
Posts: 517
Joined: Tue Jun 02, 2009 10:02 am

Re: Formulas / Calculations for AC and MR?

Post by syntax »

I just verified your formulas. You are correct in that it just doesn't show you the damage reduction. Your formulas are correct except that anti-magic still has the same cap (150). But that 150 equates to a 75% reduction due to the change in the formula.

NON-Anti-Magic: DAMAGE = DAMAGE - ( DAMAGE * IF( MR>150 , 0.5 , (MR-50)/200 ) )

Anti-Magic: DAMAGE = DAMAGE - ( DAMAGE * IF( MR>150 , 0.75 , MR/200 ) )

I'm going to run some sims to try and nail down the resist chances. My initial observation is that it looks like the spell setting of "Resist: No" means only anti-magic can completely resist the spell, "Resist: Yes" means everyone can resist, and "Resist: Never" means nobody can resist.

edit: Also of note: It looks like the resist may be calculated before the failure rate of the spell itself. But more importantly for the monster damage thing I'm working on, is that on a resist, half the energy spent to cast it is also returned, as if the monster failed to cast it.


DeathCow
Posts: 14
Joined: Tue Aug 07, 2012 12:58 am

Re: Formulas / Calculations for AC and MR?

Post by DeathCow »

syntax wrote: edit: Also of note: It looks like the resist may be calculated before the failure rate of the spell itself. But more importantly for the monster damage thing I'm working on, is that on a resist, half the energy spent to cast it is also returned, as if the monster failed to cast it.
Chance to completely resist a spell is calculated prior to the spell being cast(or attempted)..

I'm pretty sure that when MR is subbed into the formula its uses an unsigned 8 bit integer when the target has antimagic, which is significant if the target has negative mr, or higher than 255 mr. I'm not basing this assumption on testing, rather just on in-game observation. This doesn't come up very often in game..might not be worth your time to verify.


Post Reply