This commit is contained in:
mark 2009-08-09 07:18:50 +00:00
parent 57b345a480
commit 68d742d262
28 changed files with 432 additions and 193 deletions

View file

@ -1,6 +1,7 @@
using System;
using Server;
using Server.Items;
using Server.Spells;
namespace Server.Mobiles
{
@ -12,9 +13,8 @@ namespace Server.Mobiles
{
return WeaponAbility.CrushingBlow;
}
[Constructable]
public DeathwatchBeetle() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
public DeathwatchBeetle() : base( AIType.AI_Melee, Core.ML ? FightMode.Aggressor : FightMode.Closest, 10, 1, 0.2, 0.4 )
{
Name = "a deathwatch beetle";
Body = 242;
@ -30,7 +30,6 @@ namespace Server.Mobiles
SetDamageType( ResistanceType.Physical, 100 );
SetResistance( ResistanceType.Physical, 35, 40 );
SetResistance( ResistanceType.Fire, 15, 30 );
SetResistance( ResistanceType.Cold, 15, 30 );
@ -53,7 +52,6 @@ namespace Server.Mobiles
case 3: PackItem( new LeatherLegs() ); break;
case 4: PackItem( new LeatherCap() ); break;
case 5: PackItem( new LeatherChest() ); break;
}
if ( Utility.RandomDouble() < .5 )
@ -95,15 +93,40 @@ namespace Server.Mobiles
AddLoot( LootPack.Potions, 1 );
}
public override int Feathers{ get{ return 50; } }
public override int Meat{ get{ return 1; } }
public override void AlterMeleeDamageTo( Mobile to, ref int damage )
{
if ( Utility.RandomBool() && (this.Mana > 14) && to != null )
{
damage = (damage + (damage / 2));
to.SendLocalizedMessage( 1060091 ); // You take extra damage from the crushing attack!
to.PlaySound( 0x1E1 );
to.FixedParticles( 0x377A, 1, 32, 0x26da, 0, 0, 0 );
Mana -= 15;
}
}
/*
* Death spit: 0x118
* Effect: source.MovingParticles( m, 0x36D4, 1, 0, false, false, 0x3F, 0, 0x1F73, 1, 0, 255, 0x100 );
* Message: 1070821
*/
public override void OnDamage( int amount, Mobile from, bool willKill )
{
Mobile combatant = Combatant;
if ( combatant == null || combatant.Deleted || combatant.Map != Map || !InRange( combatant, 12 ) || !CanBeHarmful( combatant ) || !InLOS( combatant ) )
return;
if( Utility.Random( 10 ) == 0 )
PoisonAttack( combatant );
base.OnDamage( amount, from, willKill );
}
public void PoisonAttack( Mobile m )
{
DoHarmful( m );
this.MovingParticles( m, 0x36D4, 1, 0, false, false, 0x3F, 0, 0x1F73, 1, 0, (EffectLayer)255, 0x100 );
m.ApplyPoison( this, Poison.Regular );
m.SendLocalizedMessage( 1070821, this.Name ); // %s spits a poisonous substance at you!
}
public override int Hides{ get{ return 8; } }
public DeathwatchBeetle( Serial serial ) : base( serial )
{
}