public override void OnGaveMeleeAttack( Mobile defender )
{
int kpgainmin, kpgainmax;
if ( this.Stage == 1 )
{
if (defender is TrainingElementalTrainerCharacter)
{
defender.PublicOverheadMessage(MessageType.Yell, 37, true, "Evolution dragons cannot gain kill points from me!");
base.OnGaveMeleeAttack( defender );
return;
}
if ( defender is BaseCreature )
{
BaseCreature bc = (BaseCreature)defender;
if ( bc.Controlled != true )
{
kpgainmin = 5 + ( bc.HitsMax ) / 10;
kpgainmax = 5 + ( bc.HitsMax ) / 5;
this.KP += Utility.RandomList( kpgainmin, kpgainmax );
}
}
if ( this.KP >= 25000 )
{
if ( this.S1 == true )
{
this.S1 = false;
int hits, va, mindamage, maxdamage;
hits = ( this.HitsMax + 300 );
va = ( this.VirtualArmor + 10 );
mindamage = this.DamageMin + ( 1 );
maxdamage = this.DamageMax + ( 1 );
this.Warmode = false;
this.Say( "*"+ this.Name +" evolves*");
this.SetDamage( mindamage, maxdamage );
this.SetHits( hits );
this.BodyValue = 89;
this.BaseSoundID = 219;
this.VirtualArmor = va;
this.Stage = 2;
this.SetDamageType( ResistanceType.Physical, 50 );
this.SetDamageType( ResistanceType.Fire, 25 );
this.SetDamageType( ResistanceType.Cold, 5 );
this.SetDamageType( ResistanceType.Poison, 5 );
this.SetDamageType( ResistanceType.Energy, 15 );
this.SetResistance( ResistanceType.Physical, 20 );
this.SetResistance( ResistanceType.Fire, 20 );
this.SetResistance( ResistanceType.Cold, 5 );
this.SetResistance( ResistanceType.Poison, 5 );
this.SetResistance( ResistanceType.Energy, 10 );
this.RawStr += 100;
this.RawInt += 85;
this.RawDex += 20;
}
}
}
else if ( this.Stage == 2 )
{
if ( defender is BaseCreature )
{
BaseCreature bc = (BaseCreature)defender;
if ( bc.Controlled != true )
{
kpgainmin = 5 + ( bc.HitsMax ) / 20;
kpgainmax = 5 + ( bc.HitsMax ) / 10;
this.KP += Utility.RandomList( kpgainmin, kpgainmax );
}
}
if ( this.KP >= 75000 )
{
if ( this.S2 == true )
{
this.S2 = false;
int hits, va, mindamage, maxdamage;
hits = ( this.HitsMax + 200 );
va = ( this.VirtualArmor + 10 );
mindamage = this.DamageMin + ( 1 );
maxdamage = this.DamageMax + ( 1 );
this.Warmode = false;
this.Say( "*"+ this.Name +" evolves*");
this.SetDamage( mindamage, maxdamage );
this.SetHits( hits );
this.BodyValue = 0xCE;
this.BaseSoundID = 0x5A;
this.VirtualArmor = va;
this.Stage = 3;
this.MinTameSkill = 100.0;
this.SetDamageType( ResistanceType.Physical, 50 );
this.SetDamageType( ResistanceType.Fire, 25 );
this.SetDamageType( ResistanceType.Cold, 5 );
this.SetDamageType( ResistanceType.Poison, 5 );
this.SetDamageType( ResistanceType.Energy, 15 );
this.SetResistance( ResistanceType.Physical, 40 );
this.SetResistance( ResistanceType.Fire, 40 );
this.SetResistance( ResistanceType.Cold, 5 );
this.SetResistance( ResistanceType.Poison, 5 );
this.SetResistance( ResistanceType.Energy, 15 );
this.RawStr += 85;
this.RawInt += 85;
this.RawDex += 10;
}
}
}
else if ( this.Stage == 3 )
{
if ( defender is BaseCreature )
{
BaseCreature bc = (BaseCreature)defender;
if ( bc.Controlled != true )
{
kpgainmin = 5 + ( bc.HitsMax ) / 30;
kpgainmax = 5 + ( bc.HitsMax ) / 20;
this.KP += Utility.RandomList( kpgainmin, kpgainmax );
}
}
if ( this.KP >= 175000 )
{
if ( this.S3 == true )
{
this.S3 = false;
int hits, va, mindamage, maxdamage;
hits = ( this.HitsMax + 200 );
va = ( this.VirtualArmor + 5 );
mindamage = this.DamageMin + ( 1 );
maxdamage = this.DamageMax + ( 1 );
this.Warmode = false;
this.Say( "*"+ this.Name +" evolves*");
this.SetDamage( mindamage, maxdamage );
this.SetHits( hits );
this.BodyValue = Utility.RandomList( 60, 61 );
this.BaseSoundID = 362;
this.VirtualArmor = va;
this.Stage = 4;
this.SetResistance( ResistanceType.Physical, 50 );
this.SetResistance( ResistanceType.Fire, 50 );
this.SetResistance( ResistanceType.Cold, 5 );
this.SetResistance( ResistanceType.Poison, 5 );
this.SetResistance( ResistanceType.Energy, 10 );
this.RawStr += 150;
this.RawInt += 85;
this.RawDex += 10;
}
}
}
else if ( this.Stage == 4 )
{
if ( defender is BaseCreature )
{
BaseCreature bc = (BaseCreature)defender;
if ( bc.Controlled != true )
{
kpgainmin = 5 + ( bc.HitsMax ) / 50;
kpgainmax = 5 + ( bc.HitsMax ) / 40;
this.KP += Utility.RandomList( kpgainmin, kpgainmax );
}
}
if ( this.KP >= 500000 )
{
if ( this.S4 == true )
{
this.S4 = false;
int hits, va, mindamage, maxdamage;
hits = ( this.HitsMax + 200 );
va = ( this.VirtualArmor + 5 );
mindamage = this.DamageMin + ( 3 );
maxdamage = this.DamageMax + ( 3 );
this.Warmode = false;
this.Say( "*"+ this.Name +" evolves*");
this.SetDamage( mindamage, maxdamage );
this.SetHits( hits );
this.BodyValue = 59;
this.VirtualArmor = va;
this.Stage = 5;
this.MinTameSkill = 109.9;
this.SetDamageType( ResistanceType.Physical, 45 );
this.SetDamageType( ResistanceType.Fire, 40 );
this.SetDamageType( ResistanceType.Cold, 5 );
this.SetDamageType( ResistanceType.Poison, 5 );
this.SetDamageType( ResistanceType.Energy, 5 );
this.SetResistance( ResistanceType.Physical, 60 );
this.SetResistance( ResistanceType.Fire, 60 );
this.SetResistance( ResistanceType.Cold, 5 );
this.SetResistance( ResistanceType.Poison, 5 );
this.SetResistance( ResistanceType.Energy, 10 );
this.RawStr += 150;
this.RawInt += 85;
this.RawDex += 20;
}
}
}
else if ( this.Stage == 5 )
{
if ( defender is BaseCreature )
{
BaseCreature bc = (BaseCreature)defender;
if ( bc.Controlled != true )
{
kpgainmin = 5 + ( bc.HitsMax ) / 160;
kpgainmax = 5 + ( bc.HitsMax ) / 100;
this.KP += Utility.RandomList( kpgainmin, kpgainmax );
}
}
if ( this.KP >= 2500000 )
{
if ( this.S5 == true )
{
this.S5 = false;
int hits, va, mindamage, maxdamage;
hits = ( this.HitsMax + 200 );
va = ( this.VirtualArmor + 30 );
mindamage = this.DamageMin + ( 5 );
maxdamage = this.DamageMax + ( 5 );
this.Warmode = false;
this.Say( "*"+ this.Name +" evolves*");
this.SetDamage( mindamage, maxdamage );
this.SetHits( hits );
this.BodyValue = 46;
this.VirtualArmor = va;
this.Stage = 6;
this.SetResistance( ResistanceType.Physical, 85 );
this.SetResistance( ResistanceType.Fire, 95 );
this.SetResistance( ResistanceType.Cold, 5 );
this.SetResistance( ResistanceType.Poison, 5 );
this.SetResistance( ResistanceType.Energy, 15 );
this.RawStr += 150;
this.RawInt += 85;
this.RawDex += 20;
}
}
}
else if ( this.Stage == 6 )
{
if ( defender is BaseCreature )
{
BaseCreature bc = (BaseCreature)defender;
if ( bc.Controlled != true )
{
kpgainmin = 5 + ( bc.HitsMax ) / 540;
kpgainmax = 5 + ( bc.HitsMax ) / 480;
this.KP += Utility.RandomList( kpgainmin, kpgainmax );
}
}
if ( this.KP >= 7500000 )
{
if ( this.S6 == true )
{
this.S6 = false;
int hits, va, mindamage, maxdamage;
hits = ( this.HitsMax + 250 );
va = ( this.VirtualArmor + 50 );
mindamage = this.DamageMin + ( 50 );
maxdamage = this.DamageMax + ( 60 );
this.Warmode = false;
this.Say( "*"+ this.Name +" is now an ancient dragon*");
this.Title = "the Ancient Dragon";
this.SetDamage( mindamage, maxdamage );
this.SetHits( hits );
this.BodyValue = 0x68;
this.VirtualArmor = va;
this.Stage = 7;
this.MinTameSkill = 115.0;
this.SetDamageType( ResistanceType.Physical, 40 );
this.SetDamageType( ResistanceType.Fire, 45 );
this.SetDamageType( ResistanceType.Cold, 5 );
this.SetDamageType( ResistanceType.Poison, 5 );
this.SetDamageType( ResistanceType.Energy, 5 );
this.RawStr += 165;
this.RawInt += 85;
this.RawDex += 15;
}
}
}
else if ( this.Stage == 7 )
{
if ( defender is BaseCreature )
{
BaseCreature bc = (BaseCreature)defender;
if ( bc.Controlled != true )
{
kpgainmin = 5 + ( bc.Hits ) / 740;
kpgainmax = 5 + ( bc.Hits ) / 660;
this.KP += Utility.RandomList( kpgainmin, kpgainmax );
}
}
}
base.OnGaveMeleeAttack( defender );
//return base.Damage( amount, defender );
}