Skip to content

Instantly share code, notes, and snippets.

@msturgill
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save msturgill/9886679 to your computer and use it in GitHub Desktop.
Save msturgill/9886679 to your computer and use it in GitHub Desktop.
public static double GetBaseDifficulty( Mobile targ )
{
/* Difficulty TODO: Add another 100 points for each of the following abilities:
- Radiation or Aura Damage (Heat, Cold etc.)
- Summoning Undead
*/
double val = targ.Hits + targ.Stam + targ.Mana;
for ( int i = 0; i < targ.Skills.Length; i++ )
val += targ.Skills[i].Base;
if ( val > 700 )
val = 700 + ((val - 700) / 3.66667);
BaseCreature bc = targ as BaseCreature;
if ( IsMageryCreature( bc ) )
val += 100;
if ( IsFireBreathingCreature( bc ) )
val += 100;
if ( IsPoisonImmune( bc ) )
val += 100;
if ( targ is VampireBat || targ is VampireBatFamiliar )
val += 100;
val += GetPoisonLevel( bc ) * 20;
val /= 10;
if ( Core.SE && val > 160.0 )
val = 160.0;
return val;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment