Damage Cap

Naviehs

Citizen
Where should one go to cap damage (in pvp)
Im looking at Spell.cs and Baseweapon/BaseArchery but I do not seem to find out where

I believe its something like

if (damage> 35.0)
damage = 35.0;

but im not sure, thank you!
 

Lemke

Citizen
Hello, i have some creatures using this code for melee damage:

C#:
public override void AlterMeleeDamageTo( Mobile to, ref int damage )
{
       if ( to is PlayerMobile )
          {
             int negfactor = Utility.Random(100);
             damage /= 2;
          }
}
And this code for spell damage:

C#:
public override void AlterSpellDamageTo( Mobile to, ref int damage )
{
       if ( to is PlayerMobile )
          {
             int negfactor = Utility.Random(100);
             damage /= 2;
          }
}
You can try to add this on your PlayerMobile and test.In my two cases,is just damage / 2.So you can try:

C#:
public override void AlterMeleeDamageTo( Mobile to, ref int damage )
{
       if ( to is PlayerMobile )
          {
               if ( damage >=  35 )
                  damage = 35;
          }
}
And for spells:

C#:
public override void AlterSpellDamageTo( Mobile to, ref int damage )
{
       if ( to is PlayerMobile )
          {
               if ( damage >=  35 )
                  damage = 35;
          }
}