tweaks to champs. adjustable spawn count, added proper special to interred grizzle, bumped miasma's skill.
This commit is contained in:
parent
ae6ea4fc81
commit
0fcd5821a5
3 changed files with 98 additions and 10 deletions
|
|
@ -83,6 +83,73 @@ namespace Server.Mobiles
|
|||
return 0x584;
|
||||
}
|
||||
|
||||
public override void OnDamage( int amount, Mobile from, bool willKill )
|
||||
{
|
||||
if( Utility.RandomDouble() < 0.1 )
|
||||
DropOoze();
|
||||
|
||||
base.OnDamage( amount, from, willKill );
|
||||
}
|
||||
|
||||
private int RandomPoint( int mid )
|
||||
{
|
||||
return ( mid + Utility.RandomMinMax( -2, 2 ) );
|
||||
}
|
||||
|
||||
public virtual Point3D GetSpawnPosition( int range )
|
||||
{
|
||||
return GetSpawnPosition( Location, Map, range );
|
||||
}
|
||||
|
||||
public virtual Point3D GetSpawnPosition( Point3D from, Map map, int range )
|
||||
{
|
||||
if( map == null )
|
||||
return from;
|
||||
|
||||
Point3D loc = new Point3D( ( RandomPoint( X ) ), ( RandomPoint( Y ) ), Z );
|
||||
|
||||
loc.Z = Map.GetAverageZ( loc.X, loc.Y );
|
||||
|
||||
return loc;
|
||||
}
|
||||
|
||||
public virtual void DropOoze()
|
||||
{
|
||||
int amount = Utility.RandomMinMax( 1, 3 );
|
||||
bool corrosive = Utility.RandomBool();
|
||||
|
||||
for( int i = 0; i < amount; i++ )
|
||||
{
|
||||
Item ooze = new StainedOoze( corrosive );
|
||||
Point3D p = new Point3D( Location );
|
||||
|
||||
for( int j = 0; j < 5; j++ )
|
||||
{
|
||||
p = GetSpawnPosition( 2 );
|
||||
bool found = false;
|
||||
|
||||
foreach( Item item in Map.GetItemsInRange( p, 0 ) )
|
||||
if( item is StainedOoze )
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if( !found )
|
||||
break;
|
||||
}
|
||||
|
||||
ooze.MoveToWorld( p, Map );
|
||||
}
|
||||
|
||||
if( Combatant != null )
|
||||
{
|
||||
if( corrosive )
|
||||
Combatant.SendLocalizedMessage( 1072071 ); // A corrosive gas seeps out of your enemy's skin!
|
||||
else
|
||||
Combatant.SendLocalizedMessage( 1072072 ); // A poisonous gas seeps out of your enemy's skin!
|
||||
}
|
||||
}
|
||||
/*
|
||||
public override bool OnBeforeDeath()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue