#W# Source and Scripts added. Added Scripts/Settings.cs to expose some basic tweak able settings.
This commit is contained in:
parent
b51c58f514
commit
3045c83799
3512 changed files with 627673 additions and 0 deletions
296
Scripts/Mobiles/Monsters/LBR/Meers/EnragedCreatures.cs
Normal file
296
Scripts/Mobiles/Monsters/LBR/Meers/EnragedCreatures.cs
Normal file
|
|
@ -0,0 +1,296 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a hare corpse" )]
|
||||
public class EnragedRabbit : BaseEnraged
|
||||
{
|
||||
public EnragedRabbit( Mobile summoner ) : base( summoner )
|
||||
{
|
||||
Name = "a rabbit";
|
||||
Body = 0xcd;
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0xC9;
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0xCA;
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0xCB;
|
||||
}
|
||||
|
||||
public EnragedRabbit( 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();
|
||||
}
|
||||
}
|
||||
|
||||
[CorpseName( "a deer corpse" )]
|
||||
public class EnragedHart : BaseEnraged
|
||||
{
|
||||
public EnragedHart( Mobile summoner ) : base( summoner )
|
||||
{
|
||||
Name = "a great hart";
|
||||
Body = 0xea;
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0x82;
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0x83;
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0x84;
|
||||
}
|
||||
|
||||
public EnragedHart( 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();
|
||||
}
|
||||
}
|
||||
|
||||
[CorpseName( "a deer corpse" )]
|
||||
public class EnragedHind : BaseEnraged
|
||||
{
|
||||
public EnragedHind( Mobile summoner ) : base( summoner )
|
||||
{
|
||||
Name = "a hind";
|
||||
Body = 0xed;
|
||||
}
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0x82;
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0x83;
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0x84;
|
||||
}
|
||||
|
||||
public EnragedHind( 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();
|
||||
}
|
||||
}
|
||||
|
||||
[CorpseName( "a bear corpse" )]
|
||||
public class EnragedBlackBear : BaseEnraged
|
||||
{
|
||||
public EnragedBlackBear( Mobile summoner ) : base( summoner )
|
||||
{
|
||||
Name = "a black bear";
|
||||
Body = 0xd3;
|
||||
BaseSoundID = 0xa3;
|
||||
}
|
||||
public EnragedBlackBear( 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();
|
||||
}
|
||||
}
|
||||
|
||||
[CorpseName( "an eagle corpse" )]
|
||||
public class EnragedEagle : BaseEnraged
|
||||
{
|
||||
public EnragedEagle( Mobile summoner ) : base( summoner )
|
||||
{
|
||||
Name = "an eagle";
|
||||
Body = 0x5;
|
||||
BaseSoundID = 0x2ee;
|
||||
}
|
||||
public EnragedEagle( 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();
|
||||
}
|
||||
}
|
||||
|
||||
public class BaseEnraged : BaseCreature
|
||||
{
|
||||
public BaseEnraged( Mobile summoner )
|
||||
: base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
SetStr( 50, 200 );
|
||||
SetDex( 50, 200 );
|
||||
SetHits( 50, 200 );
|
||||
SetStam( 50, 200 );
|
||||
|
||||
/*
|
||||
On OSI, all stats are random 50-200, but
|
||||
str is never less than hits, and dex is never
|
||||
less than stam.
|
||||
*/
|
||||
|
||||
if( Str < Hits )
|
||||
Str = Hits;
|
||||
if( Dex < Stam )
|
||||
Dex = Stam;
|
||||
|
||||
Karma = -1000;
|
||||
Tamable = false;
|
||||
|
||||
SummonMaster = summoner;
|
||||
}
|
||||
|
||||
public override void OnThink()
|
||||
{
|
||||
|
||||
if( SummonMaster == null || SummonMaster.Deleted )
|
||||
{
|
||||
Delete();
|
||||
}
|
||||
|
||||
/*
|
||||
On OSI, without combatant, they behave as if they have been
|
||||
given "come" command, ie they wander towards their summoner,
|
||||
but never actually "follow".
|
||||
*/
|
||||
|
||||
else if( !Combat( this ))
|
||||
{
|
||||
if( AIObject != null )
|
||||
{
|
||||
AIObject.MoveTo( SummonMaster, false , 5 );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
On OSI, if the summon attacks a mobile, the summoner meer also
|
||||
attacks them, regardless of karma, etc. as long as the combatant
|
||||
is a player or controlled/summoned, and the summoner is not already
|
||||
engaged in combat.
|
||||
*/
|
||||
|
||||
else if( !Combat( SummonMaster ))
|
||||
{
|
||||
BaseCreature bc = null;
|
||||
if( Combatant is BaseCreature )
|
||||
{
|
||||
bc = (BaseCreature)Combatant;
|
||||
}
|
||||
if( Combatant.Player || ( bc != null && ( bc.Controlled || bc.SummonMaster != null )))
|
||||
{
|
||||
SummonMaster.Combatant = Combatant;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
base.OnThink();
|
||||
}
|
||||
}
|
||||
|
||||
private bool Combat( Mobile mobile )
|
||||
{
|
||||
Mobile combatant = mobile.Combatant;
|
||||
if( combatant == null || combatant.Deleted )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if ( combatant.IsDeadBondedPet || !combatant.Alive )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void OnSingleClick( Mobile from )
|
||||
{
|
||||
base.OnSingleClick( from );
|
||||
PrivateOverheadMessage( MessageType.Regular, 0x3B2, 1060768, from.NetState ); // enraged
|
||||
}
|
||||
|
||||
public override void AddNameProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.AddNameProperties( list );
|
||||
list.Add( 1060768 ); // enraged
|
||||
}
|
||||
|
||||
public BaseEnraged( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
168
Scripts/Mobiles/Monsters/LBR/Meers/MeerCaptain.cs
Normal file
168
Scripts/Mobiles/Monsters/LBR/Meers/MeerCaptain.cs
Normal file
|
|
@ -0,0 +1,168 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server;
|
||||
using Server.Misc;
|
||||
using Server.Items;
|
||||
using Server.Spells;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a meer corpse" )]
|
||||
public class MeerCaptain : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public MeerCaptain() : base( AIType.AI_Archer, FightMode.Evil, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a meer captain";
|
||||
Body = 773;
|
||||
|
||||
SetStr( 96, 110 );
|
||||
SetDex( 186, 200 );
|
||||
SetInt( 96, 110 );
|
||||
|
||||
SetHits( 58, 66 );
|
||||
|
||||
SetDamage( 5, 15 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 45, 55 );
|
||||
SetResistance( ResistanceType.Fire, 10, 20 );
|
||||
SetResistance( ResistanceType.Cold, 40, 50 );
|
||||
SetResistance( ResistanceType.Poison, 35, 45 );
|
||||
SetResistance( ResistanceType.Energy, 35, 45 );
|
||||
|
||||
SetSkill( SkillName.Archery, 90.1, 100.0 );
|
||||
SetSkill( SkillName.MagicResist, 91.0, 100.0 );
|
||||
SetSkill( SkillName.Swords, 90.1, 100.0 );
|
||||
SetSkill( SkillName.Tactics, 91.0, 100.0 );
|
||||
SetSkill( SkillName.Wrestling, 80.9, 89.9 );
|
||||
|
||||
Fame = 2000;
|
||||
Karma = 5000;
|
||||
|
||||
VirtualArmor = 28;
|
||||
|
||||
Container pack = new Backpack();
|
||||
|
||||
pack.DropItem( new Bolt( Utility.RandomMinMax( 10, 20 ) ) );
|
||||
pack.DropItem( new Bolt( Utility.RandomMinMax( 10, 20 ) ) );
|
||||
|
||||
switch ( Utility.Random( 6 ) )
|
||||
{
|
||||
case 0: pack.DropItem( new Broadsword() ); break;
|
||||
case 1: pack.DropItem( new Cutlass() ); break;
|
||||
case 2: pack.DropItem( new Katana() ); break;
|
||||
case 3: pack.DropItem( new Longsword() ); break;
|
||||
case 4: pack.DropItem( new Scimitar() ); break;
|
||||
case 5: pack.DropItem( new VikingSword() ); break;
|
||||
}
|
||||
|
||||
Container bag = new Bag();
|
||||
|
||||
int count = Utility.RandomMinMax( 10, 20 );
|
||||
|
||||
for ( int i = 0; i < count; ++i )
|
||||
{
|
||||
Item item = Loot.RandomReagent();
|
||||
|
||||
if ( item == null )
|
||||
continue;
|
||||
|
||||
if ( !bag.TryDropItem( this, item, false ) )
|
||||
item.Delete();
|
||||
}
|
||||
|
||||
pack.DropItem( bag );
|
||||
|
||||
AddItem( new Crossbow() );
|
||||
PackItem( pack );
|
||||
|
||||
m_NextAbilityTime = DateTime.UtcNow + TimeSpan.FromSeconds( Utility.RandomMinMax( 2, 5 ) );
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.Meager );
|
||||
}
|
||||
|
||||
public override bool BardImmune{ get{ return !Core.AOS; } }
|
||||
public override bool CanRummageCorpses{ get{ return true; } }
|
||||
|
||||
public override bool InitialInnocent{ get{ return true; } }
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0x14D;
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0x314;
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0x75;
|
||||
}
|
||||
|
||||
private DateTime m_NextAbilityTime;
|
||||
|
||||
public override void OnThink()
|
||||
{
|
||||
if ( Combatant != null && this.MagicDamageAbsorb < 1 )
|
||||
{
|
||||
this.MagicDamageAbsorb = Utility.RandomMinMax( 5, 7 );
|
||||
this.FixedParticles( 0x375A, 10, 15, 5037, EffectLayer.Waist );
|
||||
this.PlaySound( 0x1E9 );
|
||||
}
|
||||
|
||||
if ( DateTime.UtcNow >= m_NextAbilityTime )
|
||||
{
|
||||
m_NextAbilityTime = DateTime.UtcNow + TimeSpan.FromSeconds( Utility.RandomMinMax( 10, 15 ) );
|
||||
|
||||
ArrayList list = new ArrayList();
|
||||
|
||||
foreach ( Mobile m in this.GetMobilesInRange( 8 ) )
|
||||
{
|
||||
if ( m is MeerWarrior && IsFriend( m ) && CanBeBeneficial( m ) && m.Hits < m.HitsMax && !m.Poisoned && !MortalStrike.IsWounded( m ) )
|
||||
list.Add( m );
|
||||
}
|
||||
|
||||
for ( int i = 0; i < list.Count; ++i )
|
||||
{
|
||||
Mobile m = (Mobile)list[i];
|
||||
|
||||
DoBeneficial( m );
|
||||
|
||||
int toHeal = Utility.RandomMinMax( 20, 30 );
|
||||
|
||||
SpellHelper.Turn( this, m );
|
||||
|
||||
m.Heal( toHeal, this );
|
||||
|
||||
m.FixedParticles( 0x376A, 9, 32, 5030, EffectLayer.Waist );
|
||||
m.PlaySound( 0x202 );
|
||||
}
|
||||
}
|
||||
|
||||
base.OnThink();
|
||||
}
|
||||
|
||||
public MeerCaptain( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
217
Scripts/Mobiles/Monsters/LBR/Meers/MeerEternal.cs
Normal file
217
Scripts/Mobiles/Monsters/LBR/Meers/MeerEternal.cs
Normal file
|
|
@ -0,0 +1,217 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server;
|
||||
using Server.Misc;
|
||||
using Server.Items;
|
||||
using Server.Spells;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a meer's corpse" )]
|
||||
public class MeerEternal : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public MeerEternal() : base( AIType.AI_Mage, FightMode.Evil, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a meer eternal";
|
||||
Body = 772;
|
||||
|
||||
SetStr( 416, 505 );
|
||||
SetDex( 146, 165 );
|
||||
SetInt( 566, 655 );
|
||||
|
||||
SetHits( 250, 303 );
|
||||
|
||||
SetDamage( 11, 13 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 45, 55 );
|
||||
SetResistance( ResistanceType.Fire, 15, 25 );
|
||||
SetResistance( ResistanceType.Cold, 45, 55 );
|
||||
SetResistance( ResistanceType.Poison, 30, 40 );
|
||||
SetResistance( ResistanceType.Energy, 30, 40 );
|
||||
|
||||
SetSkill( SkillName.EvalInt, 90.1, 100.0 );
|
||||
SetSkill( SkillName.Magery, 90.1, 100.0 );
|
||||
SetSkill( SkillName.Meditation, 90.1, 100.0 );
|
||||
SetSkill( SkillName.MagicResist, 150.5, 200.0 );
|
||||
SetSkill( SkillName.Tactics, 50.1, 70.0 );
|
||||
SetSkill( SkillName.Wrestling, 60.1, 80.0 );
|
||||
|
||||
Fame = 18000;
|
||||
Karma = 18000;
|
||||
|
||||
VirtualArmor = 34;
|
||||
|
||||
m_NextAbilityTime = DateTime.UtcNow + TimeSpan.FromSeconds( Utility.RandomMinMax( 2, 5 ) );
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.FilthyRich, 2 );
|
||||
AddLoot( LootPack.MedScrolls, 2 );
|
||||
AddLoot( LootPack.HighScrolls, 2 );
|
||||
}
|
||||
|
||||
public override bool AutoDispel{ get{ return true; } }
|
||||
public override bool BardImmune{ get{ return !Core.AOS; } }
|
||||
public override bool CanRummageCorpses{ get{ return true; } }
|
||||
public override Poison PoisonImmune{ get{ return Poison.Lethal; } }
|
||||
public override int TreasureMapLevel{ get{ return Core.AOS ? 5 : 4; } }
|
||||
|
||||
public override bool InitialInnocent{ get{ return true; } }
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0x167;
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0xBC;
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0x28B;
|
||||
}
|
||||
|
||||
private DateTime m_NextAbilityTime;
|
||||
|
||||
private void DoAreaLeech()
|
||||
{
|
||||
m_NextAbilityTime += TimeSpan.FromSeconds( 2.5 );
|
||||
|
||||
this.Say( true, "Beware, mortals! You have provoked my wrath!" );
|
||||
this.FixedParticles( 0x376A, 10, 10, 9537, 33, 0, EffectLayer.Waist );
|
||||
|
||||
Timer.DelayCall( TimeSpan.FromSeconds( 5.0 ), new TimerCallback( DoAreaLeech_Finish ) );
|
||||
}
|
||||
|
||||
private void DoAreaLeech_Finish()
|
||||
{
|
||||
ArrayList list = new ArrayList();
|
||||
|
||||
foreach ( Mobile m in this.GetMobilesInRange( 6 ) )
|
||||
{
|
||||
if ( this.CanBeHarmful( m ) && this.IsEnemy( m ) )
|
||||
list.Add( m );
|
||||
}
|
||||
|
||||
if ( list.Count == 0 )
|
||||
{
|
||||
this.Say( true, "Bah! You have escaped my grasp this time, mortal!" );
|
||||
}
|
||||
else
|
||||
{
|
||||
double scalar;
|
||||
|
||||
if ( list.Count == 1 )
|
||||
scalar = 0.75;
|
||||
else if ( list.Count == 2 )
|
||||
scalar = 0.50;
|
||||
else
|
||||
scalar = 0.25;
|
||||
|
||||
for ( int i = 0; i < list.Count; ++i )
|
||||
{
|
||||
Mobile m = (Mobile)list[i];
|
||||
|
||||
int damage = (int)(m.Hits * scalar);
|
||||
|
||||
damage += Utility.RandomMinMax( -5, 5 );
|
||||
|
||||
if ( damage < 1 )
|
||||
damage = 1;
|
||||
|
||||
m.MovingParticles( this, 0x36F4, 1, 0, false, false, 32, 0, 9535, 1, 0, (EffectLayer)255, 0x100 );
|
||||
m.MovingParticles( this, 0x0001, 1, 0, false, true, 32, 0, 9535, 9536, 0, (EffectLayer)255, 0 );
|
||||
|
||||
this.DoHarmful( m );
|
||||
this.Hits += AOS.Damage( m, this, damage, 100, 0, 0, 0, 0 );
|
||||
}
|
||||
|
||||
this.Say( true, "If I cannot cleanse thy soul, I will destroy it!" );
|
||||
}
|
||||
}
|
||||
|
||||
private void DoFocusedLeech( Mobile combatant, string message )
|
||||
{
|
||||
this.Say( true, message );
|
||||
|
||||
Timer.DelayCall( TimeSpan.FromSeconds( 0.5 ), new TimerStateCallback( DoFocusedLeech_Stage1 ), combatant );
|
||||
}
|
||||
|
||||
private void DoFocusedLeech_Stage1( object state )
|
||||
{
|
||||
Mobile combatant = (Mobile)state;
|
||||
|
||||
if ( this.CanBeHarmful( combatant ) )
|
||||
{
|
||||
this.MovingParticles( combatant, 0x36FA, 1, 0, false, false, 1108, 0, 9533, 1, 0, (EffectLayer)255, 0x100 );
|
||||
this.MovingParticles( combatant, 0x0001, 1, 0, false, true, 1108, 0, 9533, 9534, 0, (EffectLayer)255, 0 );
|
||||
this.PlaySound( 0x1FB );
|
||||
|
||||
Timer.DelayCall( TimeSpan.FromSeconds( 1.0 ), new TimerStateCallback( DoFocusedLeech_Stage2 ), combatant );
|
||||
}
|
||||
}
|
||||
|
||||
private void DoFocusedLeech_Stage2( object state )
|
||||
{
|
||||
Mobile combatant = (Mobile)state;
|
||||
|
||||
if ( this.CanBeHarmful( combatant ) )
|
||||
{
|
||||
combatant.MovingParticles( this, 0x36F4, 1, 0, false, false, 32, 0, 9535, 1, 0, (EffectLayer)255, 0x100 );
|
||||
combatant.MovingParticles( this, 0x0001, 1, 0, false, true, 32, 0, 9535, 9536, 0, (EffectLayer)255, 0 );
|
||||
|
||||
this.PlaySound( 0x209 );
|
||||
this.DoHarmful( combatant );
|
||||
this.Hits += AOS.Damage( combatant, this, Utility.RandomMinMax( 30, 40 ) - (Core.AOS ? 0 : 10), 100, 0, 0, 0, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnThink()
|
||||
{
|
||||
if ( DateTime.UtcNow >= m_NextAbilityTime )
|
||||
{
|
||||
Mobile combatant = this.Combatant;
|
||||
|
||||
if ( combatant != null && combatant.Map == this.Map && combatant.InRange( this, 12 ) )
|
||||
{
|
||||
m_NextAbilityTime = DateTime.UtcNow + TimeSpan.FromSeconds( Utility.RandomMinMax( 10, 15 ) );
|
||||
|
||||
int ability = Utility.Random( 4 );
|
||||
|
||||
switch ( ability )
|
||||
{
|
||||
case 0: DoFocusedLeech( combatant, "Thine essence will fill my withering body with strength!" ); break;
|
||||
case 1: DoFocusedLeech( combatant, "I rebuke thee, worm, and cleanse thy vile spirit of its tainted blood!" ); break;
|
||||
case 2: DoFocusedLeech( combatant, "I devour your life's essence to strengthen my resolve!" ); break;
|
||||
case 3: DoAreaLeech(); break;
|
||||
// TODO: Resurrect ability
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
base.OnThink();
|
||||
}
|
||||
|
||||
public MeerEternal( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
226
Scripts/Mobiles/Monsters/LBR/Meers/MeerMage.cs
Normal file
226
Scripts/Mobiles/Monsters/LBR/Meers/MeerMage.cs
Normal file
|
|
@ -0,0 +1,226 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server;
|
||||
using Server.Misc;
|
||||
using Server.Items;
|
||||
using Server.Spells;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a meer's corpse" )]
|
||||
public class MeerMage : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public MeerMage() : base( AIType.AI_Mage, FightMode.Evil, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a meer mage";
|
||||
Body = 770;
|
||||
|
||||
SetStr( 171, 200 );
|
||||
SetDex( 126, 145 );
|
||||
SetInt( 276, 305 );
|
||||
|
||||
SetHits( 103, 120 );
|
||||
|
||||
SetDamage( 24, 26 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 45, 55 );
|
||||
SetResistance( ResistanceType.Fire, 15, 25 );
|
||||
SetResistance( ResistanceType.Cold, 50 );
|
||||
SetResistance( ResistanceType.Poison, 25, 35 );
|
||||
SetResistance( ResistanceType.Energy, 25, 35 );
|
||||
|
||||
SetSkill( SkillName.EvalInt, 100.0 );
|
||||
SetSkill( SkillName.Magery, 70.1, 80.0 );
|
||||
SetSkill( SkillName.Meditation, 85.1, 95.0 );
|
||||
SetSkill( SkillName.MagicResist, 80.1, 100.0 );
|
||||
SetSkill( SkillName.Tactics, 70.1, 90.0 );
|
||||
SetSkill( SkillName.Wrestling, 60.1, 80.0 );
|
||||
|
||||
Fame = 8000;
|
||||
Karma = 8000;
|
||||
|
||||
VirtualArmor = 16;
|
||||
|
||||
m_NextAbilityTime = DateTime.UtcNow + TimeSpan.FromSeconds( Utility.RandomMinMax( 2, 5 ) );
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.FilthyRich );
|
||||
AddLoot( LootPack.MedScrolls, 2 );
|
||||
// TODO: Daemon bone ...
|
||||
}
|
||||
|
||||
public override bool AutoDispel{ get{ return true; } }
|
||||
public override Poison PoisonImmune{ get{ return Poison.Lethal; } }
|
||||
public override bool CanRummageCorpses{ get{ return true; } }
|
||||
public override int TreasureMapLevel{ get{ return 3; } }
|
||||
|
||||
public override bool InitialInnocent{ get{ return true; } }
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0x14D;
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0x314;
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0x75;
|
||||
}
|
||||
|
||||
private DateTime m_NextAbilityTime;
|
||||
|
||||
public override void OnThink()
|
||||
{
|
||||
if ( DateTime.UtcNow >= m_NextAbilityTime )
|
||||
{
|
||||
Mobile combatant = this.Combatant;
|
||||
|
||||
if ( combatant != null && combatant.Map == this.Map && combatant.InRange( this, 12 ) && IsEnemy( combatant ) && !UnderEffect( combatant ) )
|
||||
{
|
||||
m_NextAbilityTime = DateTime.UtcNow + TimeSpan.FromSeconds( Utility.RandomMinMax( 20, 30 ) );
|
||||
|
||||
if( combatant is BaseCreature )
|
||||
{
|
||||
BaseCreature bc = (BaseCreature)combatant;
|
||||
|
||||
if( bc.Controlled && bc.ControlMaster != null && !bc.ControlMaster.Deleted && bc.ControlMaster.Alive )
|
||||
{
|
||||
if ( bc.ControlMaster.Map == this.Map && bc.ControlMaster.InRange( this, 12 ) && !UnderEffect( bc.ControlMaster ) )
|
||||
{
|
||||
Combatant = combatant = bc.ControlMaster;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( Utility.RandomDouble() < .1 )
|
||||
{
|
||||
int[][] coord =
|
||||
{
|
||||
new int[]{-4,-6}, new int[]{4,-6}, new int[]{0,-8}, new int[]{-5,5}, new int[]{5,5}
|
||||
};
|
||||
|
||||
BaseCreature rabid;
|
||||
|
||||
for( int i=0; i<5; i++ )
|
||||
{
|
||||
int x = combatant.X + coord[i][0];
|
||||
int y = combatant.Y + coord[i][1];
|
||||
|
||||
Point3D loc = new Point3D( x, y, combatant.Map.GetAverageZ( x, y ) );
|
||||
|
||||
if ( !combatant.Map.CanSpawnMobile( loc ) )
|
||||
continue;
|
||||
|
||||
switch ( i )
|
||||
{
|
||||
case 0: rabid = new EnragedRabbit( this ); break;
|
||||
case 1: rabid = new EnragedHind( this ); break;
|
||||
case 2: rabid = new EnragedHart( this ); break;
|
||||
case 3: rabid = new EnragedBlackBear( this ); break;
|
||||
default: rabid = new EnragedEagle( this ); break;
|
||||
}
|
||||
|
||||
rabid.FocusMob = combatant;
|
||||
rabid.MoveToWorld( loc, combatant.Map );
|
||||
}
|
||||
this.Say( 1071932 ); //Creatures of the forest, I call to thee! Aid me in the fight against all that is evil!
|
||||
}
|
||||
else if ( combatant.Player )
|
||||
{
|
||||
this.Say( true, "I call a plague of insects to sting your flesh!" );
|
||||
m_Table[combatant] = Timer.DelayCall( TimeSpan.FromSeconds( 0.5 ), TimeSpan.FromSeconds( 7.0 ), new TimerStateCallback( DoEffect ), new object[]{ combatant, 0 } );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
base.OnThink();
|
||||
}
|
||||
|
||||
private static Hashtable m_Table = new Hashtable();
|
||||
|
||||
public static bool UnderEffect( Mobile m )
|
||||
{
|
||||
return m_Table.Contains( m );
|
||||
}
|
||||
|
||||
public static void StopEffect( Mobile m, bool message )
|
||||
{
|
||||
Timer t = (Timer)m_Table[m];
|
||||
|
||||
if ( t != null )
|
||||
{
|
||||
if ( message )
|
||||
m.PublicOverheadMessage( Network.MessageType.Emote, m.SpeechHue, true, "* The open flame begins to scatter the swarm of insects *" );
|
||||
|
||||
t.Stop();
|
||||
m_Table.Remove( m );
|
||||
}
|
||||
}
|
||||
|
||||
public void DoEffect( object state )
|
||||
{
|
||||
object[] states = (object[])state;
|
||||
|
||||
Mobile m = (Mobile)states[0];
|
||||
int count = (int)states[1];
|
||||
|
||||
if ( !m.Alive )
|
||||
{
|
||||
StopEffect( m, false );
|
||||
}
|
||||
else
|
||||
{
|
||||
Torch torch = m.FindItemOnLayer( Layer.TwoHanded ) as Torch;
|
||||
|
||||
if ( torch != null && torch.Burning )
|
||||
{
|
||||
StopEffect( m, true );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( (count % 4) == 0 )
|
||||
{
|
||||
m.LocalOverheadMessage( Network.MessageType.Emote, m.SpeechHue, true, "* The swarm of insects bites and stings your flesh! *" );
|
||||
m.NonlocalOverheadMessage( Network.MessageType.Emote, m.SpeechHue, true, String.Format( "* {0} is stung by a swarm of insects *", m.Name ) );
|
||||
}
|
||||
|
||||
m.FixedParticles( 0x91C, 10, 180, 9539, EffectLayer.Waist );
|
||||
m.PlaySound( 0x00E );
|
||||
m.PlaySound( 0x1BC );
|
||||
|
||||
AOS.Damage( m, this, Utility.RandomMinMax( 30, 40 ) - (Core.AOS ? 0 : 10), 100, 0, 0, 0, 0 );
|
||||
|
||||
states[1] = count + 1;
|
||||
|
||||
if ( !m.Alive )
|
||||
StopEffect( m, false );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public MeerMage( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
92
Scripts/Mobiles/Monsters/LBR/Meers/MeerWarrior.cs
Normal file
92
Scripts/Mobiles/Monsters/LBR/Meers/MeerWarrior.cs
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server;
|
||||
using Server.Misc;
|
||||
using Server.Items;
|
||||
using Server.Spells;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a meer corpse" )]
|
||||
public class MeerWarrior : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public MeerWarrior() : base( AIType.AI_Melee, FightMode.Evil, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a meer warrior";
|
||||
Body = 771;
|
||||
|
||||
SetStr( 86, 100 );
|
||||
SetDex( 186, 200 );
|
||||
SetInt( 86, 100 );
|
||||
|
||||
SetHits( 52, 60 );
|
||||
|
||||
SetDamage( 12, 19 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 35, 45 );
|
||||
SetResistance( ResistanceType.Fire, 5, 15 );
|
||||
SetResistance( ResistanceType.Cold, 30, 40 );
|
||||
SetResistance( ResistanceType.Poison, 25, 35 );
|
||||
SetResistance( ResistanceType.Energy, 25, 35 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 91.0, 100.0 );
|
||||
SetSkill( SkillName.Tactics, 91.0, 100.0 );
|
||||
SetSkill( SkillName.Wrestling, 91.0, 100.0 );
|
||||
|
||||
VirtualArmor = 22;
|
||||
|
||||
Fame = 2000;
|
||||
Karma = 5000;
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.Meager );
|
||||
}
|
||||
|
||||
public override bool BardImmune{ get{ return !Core.AOS; } }
|
||||
public override bool CanRummageCorpses{ get{ return true; } }
|
||||
|
||||
public override bool InitialInnocent{ get{ return true; } }
|
||||
|
||||
public override void OnDamage( int amount, Mobile from, bool willKill )
|
||||
{
|
||||
if ( from != null && !willKill && amount > 3 && from != null && !InRange( from, 7 ) )
|
||||
{
|
||||
this.MovingEffect( from, 0xF51, 10, 0, false, false );
|
||||
SpellHelper.Damage( TimeSpan.FromSeconds( 1.0 ), from, this, Utility.RandomMinMax( 30, 40 ) - (Core.AOS ? 0 : 10), 100, 0, 0, 0, 0 );
|
||||
}
|
||||
|
||||
base.OnDamage( amount, from, willKill );
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0x156;
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0x15C;
|
||||
}
|
||||
|
||||
public MeerWarrior( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue