I have this idea to take out magic resist from the game and make AR be the deciding factor in the damage you receive from magic. I haven't started fiddling with this just want to get some insight before I dive head first into this tweak.
 
I guess I would do a global search for the magic resist keywords and then edit them to check for AR instead. Likely in AOS.cs iirc.
 
I am using RunUO, but I checked github for ServUo and it seems to work the same. If you do a search in your server files for CheckResisted you will find that it is used once in BaseWeapon under the DoDispel method to trigger a dispel effect on the defender. The others times it is used is in each individual damage spell.

If I were trying to do this, I would edit each individual spell that calls ChecksResisted. The following is taken from Fireball.cs, but is the same general format for all.

Code:
                if ( Core.AOS )
                {
                    damage = GetNewAosDamage( 19, 1, 5, m );
                }
                else
                {
                    damage = Utility.Random( 10, 7 );

                    if ( CheckResisted( m ) )
                    {
                        damage *= 0.75;

                        m.SendLocalizedMessage( 501783 ); // You feel yourself resisting magical energy.
                    }

                    damage *= GetDamageScalar( m );
                }

I would comment out the lines as follows:

Code:
                    //if ( CheckResisted( m ) )
                   //{
                   // damage *= 0.75;

                  m.SendLocalizedMessage( 501783 ); // You feel yourself resisting magical energy.
                  }

                  damage *= GetDamageScalar( m );

And replace it with the formula you wish to use for AR.


Note: CheckResisted is also used in SkillMasteries in ServUO, though I am not familiar with this.
Post automatically merged:

Also, you would probably want to take into account VirtualArmor for mobs.
 
Last edited:
Archaaz I would want to use the same damage formula as melee weapons so I guess that would be simple enough. I will try this soon and let you know how it goes.

damage * (attacker.Skills[SkillName.EvaluatingInteligence].Value / 100.0)

That's probably spelt wrong ill fix it later and let you know how it goes thanks for the help man.
Post automatically merged:

I'm looking at this right now you got me fired up looking for it I think I might try switching this to target.AR or something
C#:
        public virtual double GetDamageScalar(Mobile target)
        {
            double scalar = 1.0;

            if (target == null)
                return scalar;

            if (!Core.AOS) //EvalInt stuff for AoS is handled elsewhere
            {
                double casterEI = m_Caster.Skills[DamageSkill].Value;
                double targetRS = target.Skills[SkillName.MagicResist].Value;

                /*
                if( Core.AOS )
                targetRS = 0;
                */

                //m_Caster.CheckSkill( DamageSkill, 0.0, 120.0 );

Just have to get this in there
C#:
var virtualArmor = defender.ArmorRating;
Post automatically merged:

lul this compiled
C#:
            if (!Core.AOS) //EvalInt stuff for AoS is handled elsewhere
            {
                double casterEI = m_Caster.Skills[DamageSkill].Value;
                double targetRS = target.ArmorRating;
 
Last edited:
I hadn't thought to put it in GetDamageScalar. I am glad it works the way you want.
 
Last edited:
it worked but its like not perfect. there is a sweet spot where the ar gets high enough it blocks the magic damage. need to change something else to make it feel more balanced.
 
I rather expected that would be the case. The AR is not going to go nearly high enough to keep up with EvalInt (or other spell damage skill), particularly in high level casting mobs. Will need to tweak the formula a bit. Perhaps you could determine the highest AR on your shard, Invulnerable Plate, I suppose, and work from there.

Out of curiosity, did this work for BaseCreatures as well as PlayerMobiles?
 
you know what I don't know... I don't think it has changed the mobs reaction to magic at all. And magic taken from mobs has definitely been reduced as armor gets up there.
 
Back