using System;
using Server;
using Server.Items;
using System.Collections;
using System.Collections.Generic;
namespace Server.Mobiles
{
[CorpseName( "a Dracolich corpse" )]
public class MalDracolich : BaseSpecialCreature
{
[Constructable]
public MalDracolich () : base( AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4 )
{
Name = "a Malaugrym Dracolich";
Body = 104;
BaseSoundID = 0x488;
Hue = 0;
SetStr( 100, 175 );
SetDex( 68, 200 );
SetInt( 300, 466 );
SetHits( 2200, 4567 );
SetDamage( 35, 50 );
SetDamageType( ResistanceType.Physical, 75 );
SetDamageType( ResistanceType.Fire, 25 );
SetResistance( ResistanceType.Physical, 75, 80 );
SetResistance( ResistanceType.Fire, 40, 60 );
SetResistance( ResistanceType.Cold, 40, 60 );
SetResistance( ResistanceType.Poison, 70, 80 );
SetResistance( ResistanceType.Energy, 40, 60 );
SetSkill( SkillName.EvalInt, 80.1, 100.0 );
SetSkill( SkillName.Magery, 80.1, 200.0 );
SetSkill( SkillName.MagicResist, 100.3, 130.0 );
SetSkill( SkillName.Tactics, 97.6, 100.0 );
SetSkill( SkillName.Wrestling, 97.6, 100.0 );
Fame = 22500;
Karma = -22500;
VirtualArmor = 45;
}
public override void GenerateLoot()
{
AddLoot( LootPack.FilthyRich, 2 );
}
public override void OnDamage( int amount, Mobile from, bool willKill )
{
base.OnDamage( amount, from, willKill );
if (Body == 104 && Hits < 400)
{
BodyValue = 26;
Hits = 2000;
Hue = 16385;
}
if( willKill )
{
if( from == null || from.Deleted || from.Backpack == null || from.Backpack.Deleted )
return;
{
Item item = from.Backpack.FindItemByType(typeof(HuntStone));
if (item == null || item.Deleted)
{
from.AddToBackpack( new HuntStone() );
}
if (item != null)
{
((HuntStone)item).MalHunted = ((HuntStone)item).MalHunted+1 ;
if (((HuntStone)item).MalHunted >= 31)
{
((HuntStone)item).MalHunted = 1;
}
return;
}
}
}
}
public override void OnDeath (Container c )
{
if( 50 > Utility.Random( 100 ) )
{
c.DropItem( new DeathEssence (Utility.RandomMinMax(0,2)));
c.DropItem( new LifeEssence (Utility.RandomMinMax(0,2)));
c.DropItem( new MalaugEssence (Utility.RandomMinMax(0,2)));
c.DropItem( new ShadowEssence (Utility.RandomMinMax(0,2)));
c.DropItem( new ColdforgedSteel (Utility.RandomMinMax(0,15)));
}
if( 5 > Utility.Random( 100 ) )
switch ( Utility.Random(4 ))
{
case 0: c.DropItem( new Spelldisc() ); break;
case 1: c.DropItem( new PhaerimKey() ); break;
case 2: c.DropItem( new MordrunKey() ); break;
case 3: c.DropItem( new TharbouldKey() ); break;
}
base.OnDeath( c );
}
public override bool ReacquireOnMovement{ get{ return true; } }
public virtual bool DoesMultiFirebreathing { get { return true; } }
public virtual double MultiFirebreathingChance { get { return 1.000; } }
public virtual int BreathDamagePercent { get { return 40; } }
public virtual int BreathMaxTargets { get { return 3; } }
public virtual int BreathMaxRange { get { return 7; } }
public override bool HasBreath { get { return DoesMultiFirebreathing; } }
public override int BreathEffectHue{ get{ return 2142; } }
public override double BonusPetDamageScalar{ get{ return (Core.SE)? 6.0 : 1.0; } }
public override bool AutoDispel{ get{ return true; } }
public override Poison PoisonImmune{ get{ return Poison.Lethal; } }
public override bool BleedImmune{ get{ return true; } }
public MalDracolich( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 );
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}