#W# Source and Scripts added. Added Scripts/Settings.cs to expose some basic tweak able settings.

This commit is contained in:
WarrentyExpired 2026-08-06 11:06:05 -04:00
parent b51c58f514
commit 3045c83799
3512 changed files with 627673 additions and 0 deletions

View file

@ -0,0 +1,240 @@
using System;
using Server;
using Server.Items;
using Server.Spells;
using Server.Spells.Seventh;
using Server.Spells.Fifth;
using Server.Engines.CannedEvil;
namespace Server.Mobiles
{
public class Barracoon : BaseChampion
{
public override ChampionSkullType SkullType{ get{ return ChampionSkullType.Greed; } }
public override Type[] UniqueList{ get{ return new Type[] { typeof( FangOfRactus ) }; } }
public override Type[] SharedList{ get{ return new Type[] { typeof( EmbroideredOakLeafCloak ),
typeof( DjinnisRing ),
typeof( DetectiveBoots ),
typeof( GuantletsOfAnger ) }; } }
public override Type[] DecorativeList{ get{ return new Type[] { typeof( SwampTile ), typeof( MonsterStatuette ) }; } }
public override MonsterStatuetteType[] StatueTypes{ get{ return new MonsterStatuetteType[] { MonsterStatuetteType.Slime }; } }
[Constructable]
public Barracoon() : base( AIType.AI_Melee )
{
Name = "Barracoon";
Title = "the piper";
Body = 0x190;
Hue = 0x83EC;
SetStr( 305, 425 );
SetDex( 72, 150 );
SetInt( 505, 750 );
SetHits( 4200 );
SetStam( 102, 300 );
SetDamage( 25, 35 );
SetDamageType( ResistanceType.Physical, 100 );
SetResistance( ResistanceType.Physical, 60, 70 );
SetResistance( ResistanceType.Fire, 50, 60 );
SetResistance( ResistanceType.Cold, 50, 60 );
SetResistance( ResistanceType.Poison, 40, 50 );
SetResistance( ResistanceType.Energy, 40, 50 );
SetSkill( SkillName.MagicResist, 100.0 );
SetSkill( SkillName.Tactics, 97.6, 100.0 );
SetSkill( SkillName.Wrestling, 97.6, 100.0 );
Fame = 22500;
Karma = -22500;
VirtualArmor = 70;
AddItem( new FancyShirt( Utility.RandomGreenHue() ) );
AddItem( new LongPants( Utility.RandomYellowHue() ) );
AddItem( new JesterHat( Utility.RandomPinkHue() ) );
AddItem( new Cloak( Utility.RandomPinkHue() ) );
AddItem( new Sandals() );
HairItemID = 0x203B; // Short Hair
HairHue = 0x94;
}
public override void GenerateLoot()
{
AddLoot( LootPack.UltraRich, 3 );
}
public override bool AlwaysMurderer{ get{ return true; } }
public override bool AutoDispel{ get{ return true; } }
public override double AutoDispelChance{ get{ return 1.0; } }
public override bool BardImmune{ get{ return !Core.SE; } }
public override bool Unprovokable{ get{ return Core.SE; } }
public override bool Uncalmable{ get{ return Core.SE; } }
public override Poison PoisonImmune{ get{ return Poison.Deadly; } }
public override bool ShowFameTitle{ get{ return false; } }
public override bool ClickTitle{ get{ return false; } }
public void Polymorph( Mobile m )
{
if ( !m.CanBeginAction( typeof( PolymorphSpell ) ) || !m.CanBeginAction( typeof( IncognitoSpell ) ) || m.IsBodyMod )
return;
IMount mount = m.Mount;
if ( mount != null )
mount.Rider = null;
if ( m.Mounted )
return;
if ( m.BeginAction( typeof( PolymorphSpell ) ) )
{
Item disarm = m.FindItemOnLayer( Layer.OneHanded );
if ( disarm != null && disarm.Movable )
m.AddToBackpack( disarm );
disarm = m.FindItemOnLayer( Layer.TwoHanded );
if ( disarm != null && disarm.Movable )
m.AddToBackpack( disarm );
m.BodyMod = 42;
m.HueMod = 0;
new ExpirePolymorphTimer( m ).Start();
}
}
private class ExpirePolymorphTimer : Timer
{
private Mobile m_Owner;
public ExpirePolymorphTimer( Mobile owner ) : base( TimeSpan.FromMinutes( 3.0 ) )
{
m_Owner = owner;
Priority = TimerPriority.OneSecond;
}
protected override void OnTick()
{
if ( !m_Owner.CanBeginAction( typeof( PolymorphSpell ) ) )
{
m_Owner.BodyMod = 0;
m_Owner.HueMod = -1;
m_Owner.EndAction( typeof( PolymorphSpell ) );
}
}
}
public void SpawnRatmen( Mobile target )
{
Map map = this.Map;
if ( map == null )
return;
int rats = 0;
foreach ( Mobile m in this.GetMobilesInRange( 10 ) )
{
if ( m is Ratman || m is RatmanArcher || m is RatmanMage )
++rats;
}
if ( rats < 16 )
{
PlaySound( 0x3D );
int newRats = Utility.RandomMinMax( 3, 6 );
for ( int i = 0; i < newRats; ++i )
{
BaseCreature rat;
switch ( Utility.Random( 5 ) )
{
default:
case 0: case 1: rat = new Ratman(); break;
case 2: case 3: rat = new RatmanArcher(); break;
case 4: rat = new RatmanMage(); break;
}
rat.Team = this.Team;
bool validLocation = false;
Point3D loc = this.Location;
for ( int j = 0; !validLocation && j < 10; ++j )
{
int x = X + Utility.Random( 3 ) - 1;
int y = Y + Utility.Random( 3 ) - 1;
int z = map.GetAverageZ( x, y );
if ( validLocation = map.CanFit( x, y, this.Z, 16, false, false ) )
loc = new Point3D( x, y, Z );
else if ( validLocation = map.CanFit( x, y, z, 16, false, false ) )
loc = new Point3D( x, y, z );
}
rat.MoveToWorld( loc, map );
rat.Combatant = target;
}
}
}
public void DoSpecialAbility( Mobile target )
{
if ( target == null || target.Deleted ) //sanity
return;
if ( 0.6 >= Utility.RandomDouble() ) // 60% chance to polymorph attacker into a ratman
Polymorph( target );
if ( 0.2 >= Utility.RandomDouble() ) // 20% chance to more ratmen
SpawnRatmen( target );
if ( Hits < 500 && !IsBodyMod ) // Baracoon is low on life, polymorph into a ratman
Polymorph( this );
}
public override void OnGotMeleeAttack( Mobile attacker )
{
base.OnGotMeleeAttack( attacker );
DoSpecialAbility( attacker );
}
public override void OnGaveMeleeAttack( Mobile defender )
{
base.OnGaveMeleeAttack( defender );
DoSpecialAbility( defender );
}
public Barracoon( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,329 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Server;
using Server.Items;
using Server.Engines.CannedEvil;
namespace Server.Mobiles
{
public abstract class BaseChampion : BaseCreature
{
public override bool CanMoveOverObstacles { get { return true; } }
public override bool CanDestroyObstacles { get { return true; } }
public BaseChampion( AIType aiType ) : this( aiType, FightMode.Closest )
{
}
public BaseChampion( AIType aiType, FightMode mode ) : base( aiType, mode, 18, 1, 0.1, 0.2 )
{
}
public BaseChampion( Serial serial ) : base( serial )
{
}
public abstract ChampionSkullType SkullType{ get; }
public abstract Type[] UniqueList{ get; }
public abstract Type[] SharedList{ get; }
public abstract Type[] DecorativeList{ get; }
public abstract MonsterStatuetteType[] StatueTypes{ get; }
public virtual bool NoGoodies{ get{ return false; } }
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
public Item GetArtifact()
{
double random = Utility.RandomDouble();
if ( 0.05 >= random )
return CreateArtifact( UniqueList );
else if ( 0.15 >= random )
return CreateArtifact( SharedList );
else if ( 0.30 >= random )
return CreateArtifact( DecorativeList );
return null;
}
public Item CreateArtifact( Type[] list )
{
if( list.Length == 0 )
return null;
int random = Utility.Random( list.Length );
Type type = list[random];
Item artifact = Loot.Construct( type );
if( artifact is MonsterStatuette && StatueTypes.Length > 0 )
{
((MonsterStatuette)artifact).Type = StatueTypes[Utility.Random( StatueTypes.Length )];
((MonsterStatuette)artifact).LootType = LootType.Regular;
}
return artifact;
}
private PowerScroll CreateRandomPowerScroll()
{
int level;
double random = Utility.RandomDouble();
if ( 0.05 >= random )
level = 20;
else if ( 0.4 >= random )
level = 15;
else
level = 10;
return PowerScroll.CreateRandomNoCraft( level, level );
}
public void GivePowerScrolls()
{
if ( Map != Map.Felucca )
return;
List<Mobile> toGive = new List<Mobile>();
List<DamageStore> rights = BaseCreature.GetLootingRights( this.DamageEntries, this.HitsMax );
for ( int i = rights.Count - 1; i >= 0; --i )
{
DamageStore ds = rights[i];
if ( ds.m_HasRight )
toGive.Add( ds.m_Mobile );
}
if ( toGive.Count == 0 )
return;
for( int i = 0; i < toGive.Count; i++ )
{
Mobile m = toGive[i];
if( !(m is PlayerMobile) )
continue;
bool gainedPath = false;
int pointsToGain = 800;
if( VirtueHelper.Award( m, VirtueName.Valor, pointsToGain, ref gainedPath ) )
{
if( gainedPath )
m.SendLocalizedMessage( 1054032 ); // You have gained a path in Valor!
else
m.SendLocalizedMessage( 1054030 ); // You have gained in Valor!
//No delay on Valor gains
}
}
// Randomize
for ( int i = 0; i < toGive.Count; ++i )
{
int rand = Utility.Random( toGive.Count );
Mobile hold = toGive[i];
toGive[i] = toGive[rand];
toGive[rand] = hold;
}
for ( int i = 0; i < 6; ++i )
{
Mobile m = toGive[i % toGive.Count];
PowerScroll ps = CreateRandomPowerScroll();
GivePowerScrollTo( m, ps );
}
}
public static void GivePowerScrollTo( Mobile m, PowerScroll ps )
{
if( ps == null || m == null ) //sanity
return;
m.SendLocalizedMessage( 1049524 ); // You have received a scroll of power!
if( !Core.SE || m.Alive )
m.AddToBackpack( ps );
else
{
if( m.Corpse != null && !m.Corpse.Deleted )
m.Corpse.DropItem( ps );
else
m.AddToBackpack( ps );
}
if( m is PlayerMobile )
{
PlayerMobile pm = (PlayerMobile)m;
for( int j = 0; j < pm.JusticeProtectors.Count; ++j )
{
Mobile prot = pm.JusticeProtectors[j];
if( prot.Map != m.Map || prot.Kills >= 5 || prot.Criminal || !JusticeVirtue.CheckMapRegion( m, prot ) )
continue;
int chance = 0;
switch( VirtueHelper.GetLevel( prot, VirtueName.Justice ) )
{
case VirtueLevel.Seeker: chance = 60; break;
case VirtueLevel.Follower: chance = 80; break;
case VirtueLevel.Knight: chance = 100; break;
}
if( chance > Utility.Random( 100 ) )
{
PowerScroll powerScroll = new PowerScroll( ps.Skill, ps.Value );
prot.SendLocalizedMessage( 1049368 ); // You have been rewarded for your dedication to Justice!
if( !Core.SE || prot.Alive )
prot.AddToBackpack( powerScroll );
else
{
if( prot.Corpse != null && !prot.Corpse.Deleted )
prot.Corpse.DropItem( powerScroll );
else
prot.AddToBackpack( powerScroll );
}
}
}
}
}
public override bool OnBeforeDeath()
{
if ( !NoKillAwards )
{
GivePowerScrolls();
if( NoGoodies )
return base.OnBeforeDeath();
Map map = this.Map;
if ( map != null )
{
for ( int x = -12; x <= 12; ++x )
{
for ( int y = -12; y <= 12; ++y )
{
double dist = Math.Sqrt(x*x+y*y);
if ( dist <= 12 )
new GoodiesTimer( map, X + x, Y + y ).Start();
}
}
}
}
return base.OnBeforeDeath();
}
public override void OnDeath( Container c )
{
if ( Map == Map.Felucca )
{
//TODO: Confirm SE change or AoS one too?
List<DamageStore> rights = BaseCreature.GetLootingRights( this.DamageEntries, this.HitsMax );
List<Mobile> toGive = new List<Mobile>();
for ( int i = rights.Count - 1; i >= 0; --i )
{
DamageStore ds = rights[i];
if ( ds.m_HasRight )
toGive.Add( ds.m_Mobile );
}
if ( toGive.Count > 0 )
toGive[Utility.Random( toGive.Count )].AddToBackpack( new ChampionSkull( SkullType ) );
else
c.DropItem( new ChampionSkull( SkullType ) );
}
base.OnDeath( c );
}
private class GoodiesTimer : Timer
{
private Map m_Map;
private int m_X, m_Y;
public GoodiesTimer( Map map, int x, int y ) : base( TimeSpan.FromSeconds( Utility.RandomDouble() * 10.0 ) )
{
m_Map = map;
m_X = x;
m_Y = y;
}
protected override void OnTick()
{
int z = m_Map.GetAverageZ( m_X, m_Y );
bool canFit = m_Map.CanFit( m_X, m_Y, z, 6, false, false );
for ( int i = -3; !canFit && i <= 3; ++i )
{
canFit = m_Map.CanFit( m_X, m_Y, z + i, 6, false, false );
if ( canFit )
z += i;
}
if ( !canFit )
return;
Gold g = new Gold( 500, 1000 );
g.MoveToWorld( new Point3D( m_X, m_Y, z ), m_Map );
if ( 0.5 >= Utility.RandomDouble() )
{
switch ( Utility.Random( 3 ) )
{
case 0: // Fire column
{
Effects.SendLocationParticles( EffectItem.Create( g.Location, g.Map, EffectItem.DefaultDuration ), 0x3709, 10, 30, 5052 );
Effects.PlaySound( g, g.Map, 0x208 );
break;
}
case 1: // Explosion
{
Effects.SendLocationParticles( EffectItem.Create( g.Location, g.Map, EffectItem.DefaultDuration ), 0x36BD, 20, 10, 5044 );
Effects.PlaySound( g, g.Map, 0x307 );
break;
}
case 2: // Ball of fire
{
Effects.SendLocationParticles( EffectItem.Create( g.Location, g.Map, EffectItem.DefaultDuration ), 0x36FE, 10, 10, 5052 );
break;
}
}
}
}
}
}
}

View file

@ -0,0 +1,151 @@
using System;
using Server;
using Server.Misc;
using Server.Items;
using Server.Guilds;
namespace Server.Mobiles
{
public abstract class BaseShieldGuard : BaseCreature
{
public BaseShieldGuard() : base( AIType.AI_Melee, FightMode.Aggressor, 14, 1, 0.8, 1.6 )
{
InitStats( 1000, 1000, 1000 );
Title = "the guard";
SpeechHue = Utility.RandomDyedHue();
Hue = Utility.RandomSkinHue();
if ( Female = Utility.RandomBool() )
{
Body = 0x191;
Name = NameList.RandomName( "female" );
AddItem( new FemalePlateChest() );
AddItem( new PlateArms() );
AddItem( new PlateLegs() );
switch( Utility.Random( 2 ) )
{
case 0: AddItem( new Doublet( Utility.RandomNondyedHue() ) ); break;
case 1: AddItem( new BodySash( Utility.RandomNondyedHue() ) ); break;
}
switch( Utility.Random( 2 ) )
{
case 0: AddItem( new Skirt( Utility.RandomNondyedHue() ) ); break;
case 1: AddItem( new Kilt( Utility.RandomNondyedHue() ) ); break;
}
}
else
{
Body = 0x190;
Name = NameList.RandomName( "male" );
AddItem( new PlateChest() );
AddItem( new PlateArms() );
AddItem( new PlateLegs() );
switch( Utility.Random( 3 ) )
{
case 0: AddItem( new Doublet( Utility.RandomNondyedHue() ) ); break;
case 1: AddItem( new Tunic( Utility.RandomNondyedHue() ) ); break;
case 2: AddItem( new BodySash( Utility.RandomNondyedHue() ) ); break;
}
}
Utility.AssignRandomHair( this );
if( Utility.RandomBool() )
Utility.AssignRandomFacialHair( this, HairHue );
VikingSword weapon = new VikingSword();
weapon.Movable = false;
AddItem( weapon );
BaseShield shield = Shield;
shield.Movable = false;
AddItem( shield );
PackGold( 250, 500 );
Skills[SkillName.Anatomy].Base = 120.0;
Skills[SkillName.Tactics].Base = 120.0;
Skills[SkillName.Swords].Base = 120.0;
Skills[SkillName.MagicResist].Base = 120.0;
Skills[SkillName.DetectHidden].Base = 100.0;
}
public abstract int Keyword{ get; }
public abstract BaseShield Shield{ get; }
public abstract int SignupNumber{ get; }
public abstract GuildType Type{ get; }
public override bool HandlesOnSpeech( Mobile from )
{
if ( from.InRange( this.Location, 2 ) )
return true;
return base.HandlesOnSpeech( from );
}
public override void OnSpeech( SpeechEventArgs e )
{
if ( !e.Handled && e.HasKeyword( Keyword ) && e.Mobile.InRange( this.Location, 2 ) )
{
e.Handled = true;
Mobile from = e.Mobile;
Guild g = from.Guild as Guild;
if ( g == null || g.Type != Type )
{
Say( SignupNumber );
}
else
{
Container pack = from.Backpack;
BaseShield shield = Shield;
Item twoHanded = from.FindItemOnLayer( Layer.TwoHanded );
if ( (pack != null && pack.FindItemByType( shield.GetType() ) != null) || ( twoHanded != null && shield.GetType().IsAssignableFrom( twoHanded.GetType() ) ) )
{
Say( 1007110 ); // Why dost thou ask about virtue guards when thou art one?
shield.Delete();
}
else if ( from.PlaceInBackpack( shield ) )
{
Say( Utility.Random( 1007101, 5 ) );
Say( 1007139 ); // I see you are in need of our shield, Here you go.
from.AddToBackpack( shield );
}
else
{
from.SendLocalizedMessage( 502868 ); // Your backpack is too full.
shield.Delete();
}
}
}
base.OnSpeech( e );
}
public BaseShieldGuard( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,39 @@
using System;
using Server;
namespace Server.Mobiles
{
public class CapturedHordeMinion : HordeMinion
{
[Constructable]
public CapturedHordeMinion()
{
this.FightMode = FightMode.None;
}
public override bool InitialInnocent{ get{ return true; } }
public override bool CanBeDamaged()
{
return false;
}
public CapturedHordeMinion( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.WriteEncodedInt( 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -0,0 +1,41 @@
using System;
using Server;
using Server.Misc;
using Server.Items;
using Server.Guilds;
namespace Server.Mobiles
{
public class ChaosGuard : BaseShieldGuard
{
public override int Keyword{ get{ return 0x22; } } // *chaos shield*
public override BaseShield Shield{ get{ return new ChaosShield(); } }
public override int SignupNumber{ get{ return 1007140; } } // Sign up with a guild of chaos if thou art interested.
public override GuildType Type{ get{ return GuildType.Chaos; } }
public override bool BardImmune{ get{ return true; } }
[Constructable]
public ChaosGuard()
{
}
public ChaosGuard( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,84 @@
using System;
using Server;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName( "a dark guardians' corpse" )]
public class DarkGuardian : BaseCreature
{
[Constructable]
public DarkGuardian() : base( AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4 )
{
Name = "a dark guardian";
Body = 78;
BaseSoundID = 0x3E9;
SetStr( 125, 150 );
SetDex( 100, 120 );
SetInt( 200, 235 );
SetHits( 150, 180 );
SetDamage( 43, 48 );
SetDamageType( ResistanceType.Physical, 10 );
SetDamageType( ResistanceType.Cold, 40 );
SetDamageType( ResistanceType.Energy, 50 );
SetResistance( ResistanceType.Physical, 40, 50 );
SetResistance( ResistanceType.Fire, 20, 45 );
SetResistance( ResistanceType.Cold, 50, 60 );
SetResistance( ResistanceType.Poison, 20, 45 );
SetResistance( ResistanceType.Energy, 30, 40 );
SetSkill( SkillName.EvalInt, 40.1, 50);
SetSkill( SkillName.Magery, 50.1, 60.0 );
SetSkill( SkillName.Meditation, 85.1, 95.0 );
SetSkill( SkillName.MagicResist, 50.1, 70.0 );
SetSkill( SkillName.Tactics, 50.1, 70.0 );
Fame = 5000;
Karma = -5000;
VirtualArmor = 50;
PackNecroReg( 15, 25 );
PackItem( new DaemonBone( 30 ) );
}
public DarkGuardian( Serial serial ) : base( serial )
{
}
public override void GenerateLoot()
{
AddLoot( LootPack.Rich );
AddLoot( LootPack.MedScrolls, 2 );
}
public override OppositionGroup OppositionGroup
{
get{ return OppositionGroup.FeyAndUndead; }
}
public override int TreasureMapLevel{ get{ return 2; } }
public override bool BleedImmune{ get{ return true; } }
public override Poison PoisonImmune{ get{ return Poison.Lethal; } }
public override bool Unprovokable { get { return true; } }
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.WriteEncodedInt( 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -0,0 +1,152 @@
using System;
using Server.Items;
using Server.Mobiles;
using Server.Spells;
namespace Server.Mobiles
{
/// <summary>
/// This is a test creature
/// You can set its value in game
/// It die after 5 minutes, so your test server stay clean
/// Create a macro to help your creation "[add Dummy 1 15 7 -1 0.5 2"
///
/// A iTeam of negative will set a faction at random
///
/// Say Kill if you want them to die
///
/// </summary>
public class Dummy : BaseCreature
{
public Timer m_Timer;
[Constructable]
public Dummy(AIType iAI, FightMode iFightMode, int iRangePerception, int iRangeFight, double dActiveSpeed, double dPassiveSpeed) : base(iAI, iFightMode, iRangePerception, iRangeFight, dActiveSpeed, dPassiveSpeed)
{
this.Body = 400 + Utility.Random(2);
this.Hue = Utility.RandomSkinHue();
this.Skills[SkillName.DetectHidden].Base = 100;
this.Skills[SkillName.MagicResist].Base = 120;
Team = Utility.Random(3);
int iHue = 20 + Team * 40;
int jHue = 25 + Team * 40;
Utility.AssignRandomHair( this, iHue );
LeatherGloves glv = new LeatherGloves();
glv.Hue = iHue;
glv.LootType = LootType.Newbied;
AddItem(glv);
Container pack = new Backpack();
pack.Movable = false;
AddItem( pack );
m_Timer = new AutokillTimer(this);
m_Timer.Start();
}
public Dummy( Serial serial ) : base( serial )
{
m_Timer = new AutokillTimer(this);
m_Timer.Start();
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
public override bool HandlesOnSpeech( Mobile from )
{
if ( from.AccessLevel >= AccessLevel.GameMaster )
return true;
return base.HandlesOnSpeech( from );
}
public override void OnSpeech( SpeechEventArgs e )
{
base.OnSpeech( e );
if (e.Mobile.AccessLevel >= AccessLevel.GameMaster)
{
if (e.Speech == "kill")
{
m_Timer.Stop();
m_Timer.Delay = TimeSpan.FromSeconds( Utility.Random(1, 5) );
m_Timer.Start();
}
}
}
public override void OnTeamChange()
{
int iHue = 20 + Team * 40;
int jHue = 25 + Team * 40;
Item item = FindItemOnLayer( Layer.OuterTorso );
if ( item != null )
item.Hue = jHue;
item = FindItemOnLayer( Layer.Helm );
if ( item != null )
item.Hue = iHue;
item = FindItemOnLayer( Layer.Gloves );
if ( item != null )
item.Hue = iHue;
item = FindItemOnLayer( Layer.Shoes );
if ( item != null )
item.Hue = iHue;
HairHue = iHue;
item = FindItemOnLayer( Layer.MiddleTorso );
if ( item != null )
item.Hue = iHue;
item = FindItemOnLayer( Layer.OuterLegs );
if ( item != null )
item.Hue = iHue;
}
private class AutokillTimer : Timer
{
private Dummy m_Owner;
public AutokillTimer( Dummy owner ) : base( TimeSpan.FromMinutes(5.0) )
{
m_Owner = owner;
Priority = TimerPriority.FiveSeconds;
}
protected override void OnTick()
{
m_Owner.Kill();
Stop();
}
}
}
}

View file

@ -0,0 +1,814 @@
using System;
using Server.Items;
using Server.Mobiles;
using Server.Spells;
namespace Server.Mobiles
{
/// <summary>
/// This is a test creature
/// You can set its value in game
/// It die after 5 minutes, so your test server stay clean
/// Create a macro to help your creation "[add Dummy 1 15 7 -1 0.5 2"
///
/// A iTeam of negative will set a faction at random
///
/// Say Kill if you want them to die
///
/// </summary>
public class DummyMace : Dummy
{
[Constructable]
public DummyMace() : base(AIType.AI_Melee, FightMode.Closest, 15, 1, 0.2, 0.6)
{
// A Dummy Macer
int iHue = 20 + Team * 40;
int jHue = 25 + Team * 40;
// Skills and Stats
this.InitStats( 125, 125, 90 );
this.Skills[SkillName.Macing].Base = 120;
this.Skills[SkillName.Anatomy].Base = 120;
this.Skills[SkillName.Healing].Base = 120;
this.Skills[SkillName.Tactics].Base = 120;
// Name
this.Name = "Macer";
// Equip
WarHammer war = new WarHammer();
war.Movable = true;
war.Crafter = this;
war.Quality = WeaponQuality.Regular;
AddItem( war );
Boots bts = new Boots();
bts.Hue = iHue;
AddItem( bts );
ChainChest cht = new ChainChest();
cht.Movable = false;
cht.LootType = LootType.Newbied;
cht.Crafter = this;
cht.Quality = ArmorQuality.Regular;
AddItem( cht );
ChainLegs chl = new ChainLegs();
chl.Movable = false;
chl.LootType = LootType.Newbied;
chl.Crafter = this;
chl.Quality = ArmorQuality.Regular;
AddItem( chl );
PlateArms pla = new PlateArms();
pla.Movable = false;
pla.LootType = LootType.Newbied;
pla.Crafter = this;
pla.Quality = ArmorQuality.Regular;
AddItem( pla );
Bandage band = new Bandage( 50 );
AddToBackpack( band );
}
public DummyMace( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
public class DummyFence : Dummy
{
[Constructable]
public DummyFence() : base(AIType.AI_Melee, FightMode.Closest, 15, 1, 0.2, 0.6)
{
// A Dummy Fencer
int iHue = 20 + Team * 40;
int jHue = 25 + Team * 40;
// Skills and Stats
this.InitStats( 125, 125, 90 );
this.Skills[SkillName.Fencing].Base = 120;
this.Skills[SkillName.Anatomy].Base = 120;
this.Skills[SkillName.Healing].Base = 120;
this.Skills[SkillName.Tactics].Base = 120;
// Name
this.Name = "Fencer";
// Equip
Spear ssp = new Spear();
ssp.Movable = true;
ssp.Crafter = this;
ssp.Quality = WeaponQuality.Regular;
AddItem( ssp );
Boots snd = new Boots();
snd.Hue = iHue;
snd.LootType = LootType.Newbied;
AddItem( snd );
ChainChest cht = new ChainChest();
cht.Movable = false;
cht.LootType = LootType.Newbied;
cht.Crafter = this;
cht.Quality = ArmorQuality.Regular;
AddItem( cht );
ChainLegs chl = new ChainLegs();
chl.Movable = false;
chl.LootType = LootType.Newbied;
chl.Crafter = this;
chl.Quality = ArmorQuality.Regular;
AddItem( chl );
PlateArms pla = new PlateArms();
pla.Movable = false;
pla.LootType = LootType.Newbied;
pla.Crafter = this;
pla.Quality = ArmorQuality.Regular;
AddItem( pla );
Bandage band = new Bandage( 50 );
AddToBackpack( band );
}
public DummyFence( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
public class DummySword : Dummy
{
[Constructable]
public DummySword() : base(AIType.AI_Melee, FightMode.Closest, 15, 1, 0.2, 0.6)
{
// A Dummy Swordsman
int iHue = 20 + Team * 40;
int jHue = 25 + Team * 40;
// Skills and Stats
this.InitStats( 125, 125, 90 );
this.Skills[SkillName.Swords].Base = 120;
this.Skills[SkillName.Anatomy].Base = 120;
this.Skills[SkillName.Healing].Base = 120;
this.Skills[SkillName.Tactics].Base = 120;
this.Skills[SkillName.Parry].Base = 120;
// Name
this.Name = "Swordsman";
// Equip
Katana kat = new Katana();
kat.Crafter = this;
kat.Movable = true;
kat.Quality = WeaponQuality.Regular;
AddItem( kat );
Boots bts = new Boots();
bts.Hue = iHue;
AddItem( bts );
ChainChest cht = new ChainChest();
cht.Movable = false;
cht.LootType = LootType.Newbied;
cht.Crafter = this;
cht.Quality = ArmorQuality.Regular;
AddItem( cht );
ChainLegs chl = new ChainLegs();
chl.Movable = false;
chl.LootType = LootType.Newbied;
chl.Crafter = this;
chl.Quality = ArmorQuality.Regular;
AddItem( chl );
PlateArms pla = new PlateArms();
pla.Movable = false;
pla.LootType = LootType.Newbied;
pla.Crafter = this;
pla.Quality = ArmorQuality.Regular;
AddItem( pla );
Bandage band = new Bandage( 50 );
AddToBackpack( band );
}
public DummySword( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
public class DummyNox : Dummy
{
[Constructable]
public DummyNox() : base(AIType.AI_Mage, FightMode.Closest, 15, 1, 0.2, 0.6)
{
// A Dummy Nox or Pure Mage
int iHue = 20 + Team * 40;
int jHue = 25 + Team * 40;
// Skills and Stats
this.InitStats( 90, 90, 125 );
this.Skills[SkillName.Magery].Base = 120;
this.Skills[SkillName.EvalInt].Base = 120;
this.Skills[SkillName.Inscribe].Base = 100;
this.Skills[SkillName.Wrestling].Base = 120;
this.Skills[SkillName.Meditation].Base = 120;
this.Skills[SkillName.Poisoning].Base = 100;
// Name
this.Name = "Nox Mage";
// Equip
Spellbook book = new Spellbook();
book.Movable = false;
book.LootType = LootType.Newbied;
book.Content =0xFFFFFFFFFFFFFFFF;
AddItem( book );
Kilt kilt = new Kilt();
kilt.Hue = jHue;
AddItem( kilt );
Sandals snd = new Sandals();
snd.Hue = iHue;
snd.LootType = LootType.Newbied;
AddItem( snd );
SkullCap skc = new SkullCap();
skc.Hue = iHue;
AddItem( skc );
// Spells
AddSpellAttack( typeof(Spells.First.MagicArrowSpell) );
AddSpellAttack( typeof(Spells.First.WeakenSpell) );
AddSpellAttack( typeof(Spells.Third.FireballSpell) );
AddSpellDefense( typeof(Spells.Third.WallOfStoneSpell) );
AddSpellDefense( typeof(Spells.First.HealSpell) );
}
public DummyNox( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
public class DummyStun : Dummy
{
[Constructable]
public DummyStun() : base(AIType.AI_Mage, FightMode.Closest, 15, 1, 0.2, 0.6)
{
// A Dummy Stun Mage
int iHue = 20 + Team * 40;
int jHue = 25 + Team * 40;
// Skills and Stats
this.InitStats( 90, 90, 125 );
this.Skills[SkillName.Magery].Base = 100;
this.Skills[SkillName.EvalInt].Base = 120;
this.Skills[SkillName.Anatomy].Base = 80;
this.Skills[SkillName.Wrestling].Base = 80;
this.Skills[SkillName.Meditation].Base = 100;
this.Skills[SkillName.Poisoning].Base = 100;
// Name
this.Name = "Stun Mage";
// Equip
Spellbook book = new Spellbook();
book.Movable = false;
book.LootType = LootType.Newbied;
book.Content =0xFFFFFFFFFFFFFFFF;
AddItem( book );
LeatherArms lea = new LeatherArms();
lea.Movable = false;
lea.LootType = LootType.Newbied;
lea.Crafter = this;
lea.Quality = ArmorQuality.Regular;
AddItem( lea );
LeatherChest lec = new LeatherChest();
lec.Movable = false;
lec.LootType = LootType.Newbied;
lec.Crafter = this;
lec.Quality = ArmorQuality.Regular;
AddItem( lec );
LeatherGorget leg = new LeatherGorget();
leg.Movable = false;
leg.LootType = LootType.Newbied;
leg.Crafter = this;
leg.Quality = ArmorQuality.Regular;
AddItem( leg );
LeatherLegs lel = new LeatherLegs();
lel.Movable = false;
lel.LootType = LootType.Newbied;
lel.Crafter = this;
lel.Quality = ArmorQuality.Regular;
AddItem( lel );
Boots bts = new Boots();
bts.Hue = iHue;
AddItem( bts );
Cap cap = new Cap();
cap.Hue = iHue;
AddItem( cap );
// Spells
AddSpellAttack( typeof(Spells.First.MagicArrowSpell) );
AddSpellAttack( typeof(Spells.First.WeakenSpell) );
AddSpellAttack( typeof(Spells.Third.FireballSpell) );
AddSpellDefense( typeof(Spells.Third.WallOfStoneSpell) );
AddSpellDefense( typeof(Spells.First.HealSpell) );
}
public DummyStun( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
public class DummySuper : Dummy
{
[Constructable]
public DummySuper() : base(AIType.AI_Mage, FightMode.Closest, 15, 1, 0.2, 0.6)
{
// A Dummy Super Mage
int iHue = 20 + Team * 40;
int jHue = 25 + Team * 40;
// Skills and Stats
this.InitStats( 125, 125, 125 );
this.Skills[SkillName.Magery].Base = 120;
this.Skills[SkillName.EvalInt].Base = 120;
this.Skills[SkillName.Anatomy].Base = 120;
this.Skills[SkillName.Wrestling].Base = 120;
this.Skills[SkillName.Meditation].Base = 120;
this.Skills[SkillName.Poisoning].Base = 100;
this.Skills[SkillName.Inscribe].Base = 100;
// Name
this.Name = "Super Mage";
// Equip
Spellbook book = new Spellbook();
book.Movable = false;
book.LootType = LootType.Newbied;
book.Content =0xFFFFFFFFFFFFFFFF;
AddItem( book );
LeatherArms lea = new LeatherArms();
lea.Movable = false;
lea.LootType = LootType.Newbied;
lea.Crafter = this;
lea.Quality = ArmorQuality.Regular;
AddItem( lea );
LeatherChest lec = new LeatherChest();
lec.Movable = false;
lec.LootType = LootType.Newbied;
lec.Crafter = this;
lec.Quality = ArmorQuality.Regular;
AddItem( lec );
LeatherGorget leg = new LeatherGorget();
leg.Movable = false;
leg.LootType = LootType.Newbied;
leg.Crafter = this;
leg.Quality = ArmorQuality.Regular;
AddItem( leg );
LeatherLegs lel = new LeatherLegs();
lel.Movable = false;
lel.LootType = LootType.Newbied;
lel.Crafter = this;
lel.Quality = ArmorQuality.Regular;
AddItem( lel );
Sandals snd = new Sandals();
snd.Hue = iHue;
snd.LootType = LootType.Newbied;
AddItem( snd );
JesterHat jhat = new JesterHat();
jhat.Hue = iHue;
AddItem( jhat );
Doublet dblt = new Doublet();
dblt.Hue = iHue;
AddItem( dblt );
// Spells
AddSpellAttack( typeof(Spells.First.MagicArrowSpell) );
AddSpellAttack( typeof(Spells.First.WeakenSpell) );
AddSpellAttack( typeof(Spells.Third.FireballSpell) );
AddSpellDefense( typeof(Spells.Third.WallOfStoneSpell) );
AddSpellDefense( typeof(Spells.First.HealSpell) );
}
public DummySuper( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
public class DummyHealer : Dummy
{
[Constructable]
public DummyHealer() : base(AIType.AI_Healer, FightMode.Closest, 15, 1, 0.2, 0.6)
{
// A Dummy Healer Mage
int iHue = 20 + Team * 40;
int jHue = 25 + Team * 40;
// Skills and Stats
this.InitStats( 125, 125, 125 );
this.Skills[SkillName.Magery].Base = 120;
this.Skills[SkillName.EvalInt].Base = 120;
this.Skills[SkillName.Anatomy].Base = 120;
this.Skills[SkillName.Wrestling].Base = 120;
this.Skills[SkillName.Meditation].Base = 120;
this.Skills[SkillName.Healing].Base = 100;
// Name
this.Name = "Healer";
// Equip
Spellbook book = new Spellbook();
book.Movable = false;
book.LootType = LootType.Newbied;
book.Content =0xFFFFFFFFFFFFFFFF;
AddItem( book );
LeatherArms lea = new LeatherArms();
lea.Movable = false;
lea.LootType = LootType.Newbied;
lea.Crafter = this;
lea.Quality = ArmorQuality.Regular;
AddItem( lea );
LeatherChest lec = new LeatherChest();
lec.Movable = false;
lec.LootType = LootType.Newbied;
lec.Crafter = this;
lec.Quality = ArmorQuality.Regular;
AddItem( lec );
LeatherGorget leg = new LeatherGorget();
leg.Movable = false;
leg.LootType = LootType.Newbied;
leg.Crafter = this;
leg.Quality = ArmorQuality.Regular;
AddItem( leg );
LeatherLegs lel = new LeatherLegs();
lel.Movable = false;
lel.LootType = LootType.Newbied;
lel.Crafter = this;
lel.Quality = ArmorQuality.Regular;
AddItem( lel );
Sandals snd = new Sandals();
snd.Hue = iHue;
snd.LootType = LootType.Newbied;
AddItem( snd );
Cap cap = new Cap();
cap.Hue = iHue;
AddItem( cap );
Robe robe = new Robe();
robe.Hue = iHue;
AddItem( robe );
}
public DummyHealer( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
public class DummyAssassin : Dummy
{
[Constructable]
public DummyAssassin() : base(AIType.AI_Melee, FightMode.Closest, 15, 1, 0.2, 0.6)
{
// A Dummy Hybrid Assassin
int iHue = 20 + Team * 40;
int jHue = 25 + Team * 40;
// Skills and Stats
this.InitStats( 105, 105, 105 );
this.Skills[SkillName.Magery].Base = 120;
this.Skills[SkillName.EvalInt].Base = 120;
this.Skills[SkillName.Swords].Base = 120;
this.Skills[SkillName.Tactics].Base = 120;
this.Skills[SkillName.Meditation].Base = 120;
this.Skills[SkillName.Poisoning].Base = 100;
// Name
this.Name = "Hybrid Assassin";
// Equip
Spellbook book = new Spellbook();
book.Movable = false;
book.LootType = LootType.Newbied;
book.Content =0xFFFFFFFFFFFFFFFF;
AddToBackpack( book );
Katana kat = new Katana();
kat.Movable = false;
kat.LootType = LootType.Newbied;
kat.Crafter = this;
kat.Poison = Poison.Deadly;
kat.PoisonCharges = 12;
kat.Quality = WeaponQuality.Regular;
AddToBackpack( kat );
LeatherArms lea = new LeatherArms();
lea.Movable = false;
lea.LootType = LootType.Newbied;
lea.Crafter = this;
lea.Quality = ArmorQuality.Regular;
AddItem( lea );
LeatherChest lec = new LeatherChest();
lec.Movable = false;
lec.LootType = LootType.Newbied;
lec.Crafter = this;
lec.Quality = ArmorQuality.Regular;
AddItem( lec );
LeatherGorget leg = new LeatherGorget();
leg.Movable = false;
leg.LootType = LootType.Newbied;
leg.Crafter = this;
leg.Quality = ArmorQuality.Regular;
AddItem( leg );
LeatherLegs lel = new LeatherLegs();
lel.Movable = false;
lel.LootType = LootType.Newbied;
lel.Crafter = this;
lel.Quality = ArmorQuality.Regular;
AddItem( lel );
Sandals snd = new Sandals();
snd.Hue = iHue;
snd.LootType = LootType.Newbied;
AddItem( snd );
Cap cap = new Cap();
cap.Hue = iHue;
AddItem( cap );
Robe robe = new Robe();
robe.Hue = iHue;
AddItem( robe );
DeadlyPoisonPotion pota = new DeadlyPoisonPotion();
pota.LootType = LootType.Newbied;
AddToBackpack( pota );
DeadlyPoisonPotion potb = new DeadlyPoisonPotion();
potb.LootType = LootType.Newbied;
AddToBackpack( potb );
DeadlyPoisonPotion potc = new DeadlyPoisonPotion();
potc.LootType = LootType.Newbied;
AddToBackpack( potc );
DeadlyPoisonPotion potd = new DeadlyPoisonPotion();
potd.LootType = LootType.Newbied;
AddToBackpack( potd );
Bandage band = new Bandage( 50 );
AddToBackpack( band );
}
public DummyAssassin( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
[TypeAlias( "Server.Mobiles.DummyTheif" )]
public class DummyThief : Dummy
{
[Constructable]
public DummyThief() : base(AIType.AI_Thief, FightMode.Closest, 15, 1, 0.2, 0.6)
{
// A Dummy Hybrid Thief
int iHue = 20 + Team * 40;
int jHue = 25 + Team * 40;
// Skills and Stats
this.InitStats( 105, 105, 105 );
this.Skills[SkillName.Healing].Base = 120;
this.Skills[SkillName.Anatomy].Base = 120;
this.Skills[SkillName.Stealing].Base = 120;
this.Skills[SkillName.ArmsLore].Base = 100;
this.Skills[SkillName.Meditation].Base = 120;
this.Skills[SkillName.Wrestling].Base = 120;
// Name
this.Name = "Hybrid Thief";
// Equip
Spellbook book = new Spellbook();
book.Movable = false;
book.LootType = LootType.Newbied;
book.Content =0xFFFFFFFFFFFFFFFF;
AddItem( book );
LeatherArms lea = new LeatherArms();
lea.Movable = false;
lea.LootType = LootType.Newbied;
lea.Crafter = this;
lea.Quality = ArmorQuality.Regular;
AddItem( lea );
LeatherChest lec = new LeatherChest();
lec.Movable = false;
lec.LootType = LootType.Newbied;
lec.Crafter = this;
lec.Quality = ArmorQuality.Regular;
AddItem( lec );
LeatherGorget leg = new LeatherGorget();
leg.Movable = false;
leg.LootType = LootType.Newbied;
leg.Crafter = this;
leg.Quality = ArmorQuality.Regular;
AddItem( leg );
LeatherLegs lel = new LeatherLegs();
lel.Movable = false;
lel.LootType = LootType.Newbied;
lel.Crafter = this;
lel.Quality = ArmorQuality.Regular;
AddItem( lel );
Sandals snd = new Sandals();
snd.Hue = iHue;
snd.LootType = LootType.Newbied;
AddItem( snd );
Cap cap = new Cap();
cap.Hue = iHue;
AddItem( cap );
Robe robe = new Robe();
robe.Hue = iHue;
AddItem( robe );
Bandage band = new Bandage( 50 );
AddToBackpack( band );
}
public DummyThief( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,671 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Server;
using Server.Items;
using Server.Engines.CannedEvil;
namespace Server.Mobiles
{
public class Harrower : BaseCreature
{
public Type[] UniqueList{ get{ return new Type[] { typeof( AcidProofRobe ) }; } }
public Type[] SharedList{ get{ return new Type[] { typeof( TheRobeOfBritanniaAri ) }; } }
public Type[] DecorativeList{ get{ return new Type[] { typeof( EvilIdolSkull ), typeof( SkullPole ) }; } }
private bool m_TrueForm;
private Item m_GateItem;
private List<HarrowerTentacles> m_Tentacles;
private Timer m_Timer;
private class SpawnEntry
{
public Point3D m_Location;
public Point3D m_Entrance;
public SpawnEntry( Point3D loc, Point3D ent )
{
m_Location = loc;
m_Entrance = ent;
}
}
private static SpawnEntry[] m_Entries = new SpawnEntry[]
{
new SpawnEntry( new Point3D( 5242, 945, -40 ), new Point3D( 1176, 2638, 0 ) ), // Destard
new SpawnEntry( new Point3D( 5225, 798, 0 ), new Point3D( 1176, 2638, 0 ) ), // Destard
new SpawnEntry( new Point3D( 5556, 886, 30 ), new Point3D( 1298, 1080, 0 ) ), // Despise
new SpawnEntry( new Point3D( 5187, 615, 0 ), new Point3D( 4111, 432, 5 ) ), // Deceit
new SpawnEntry( new Point3D( 5319, 583, 0 ), new Point3D( 4111, 432, 5 ) ), // Deceit
new SpawnEntry( new Point3D( 5713, 1334, -1 ), new Point3D( 2923, 3407, 8 ) ), // Fire
new SpawnEntry( new Point3D( 5860, 1460, -2 ), new Point3D( 2923, 3407, 8 ) ), // Fire
new SpawnEntry( new Point3D( 5328, 1620, 0 ), new Point3D( 5451, 3143, -60 ) ), // Terathan Keep
new SpawnEntry( new Point3D( 5690, 538, 0 ), new Point3D( 2042, 224, 14 ) ), // Wrong
new SpawnEntry( new Point3D( 5609, 195, 0 ), new Point3D( 514, 1561, 0 ) ), // Shame
new SpawnEntry( new Point3D( 5475, 187, 0 ), new Point3D( 514, 1561, 0 ) ), // Shame
new SpawnEntry( new Point3D( 6085, 179, 0 ), new Point3D( 4721, 3822, 0 ) ), // Hythloth
new SpawnEntry( new Point3D( 6084, 66, 0 ), new Point3D( 4721, 3822, 0 ) ), // Hythloth
new SpawnEntry( new Point3D( 5499, 2003, 0 ), new Point3D( 2499, 919, 0 ) ), // Covetous
new SpawnEntry( new Point3D( 5579, 1858, 0 ), new Point3D( 2499, 919, 0 ) ) // Covetous
};
private static ArrayList m_Instances = new ArrayList();
public static ArrayList Instances{ get{ return m_Instances; } }
public static Harrower Spawn( Point3D platLoc, Map platMap )
{
if ( m_Instances.Count > 0 )
return null;
SpawnEntry entry = m_Entries[Utility.Random( m_Entries.Length )];
Harrower harrower = new Harrower();
harrower.MoveToWorld( entry.m_Location, Map.Felucca );
harrower.m_GateItem = new HarrowerGate( harrower, platLoc, platMap, entry.m_Entrance, Map.Felucca );
return harrower;
}
public static bool CanSpawn
{
get
{
return ( m_Instances.Count == 0 );
}
}
[Constructable]
public Harrower() : base( AIType.AI_Mage, FightMode.Closest, 18, 1, 0.2, 0.4 )
{
m_Instances.Add( this );
Name = "the harrower";
BodyValue = 146;
SetStr( 900, 1000 );
SetDex( 125, 135 );
SetInt( 1000, 1200 );
Fame = 22500;
Karma = -22500;
VirtualArmor = 60;
SetDamageType( ResistanceType.Physical, 50 );
SetDamageType( ResistanceType.Energy, 50 );
SetResistance( ResistanceType.Physical, 55, 65 );
SetResistance( ResistanceType.Fire, 60, 80 );
SetResistance( ResistanceType.Cold, 60, 80 );
SetResistance( ResistanceType.Poison, 60, 80 );
SetResistance( ResistanceType.Energy, 60, 80 );
SetSkill( SkillName.Wrestling, 90.1, 100.0 );
SetSkill( SkillName.Tactics, 90.2, 110.0 );
SetSkill( SkillName.MagicResist, 120.2, 160.0 );
SetSkill( SkillName.Magery, 120.0 );
SetSkill( SkillName.EvalInt, 120.0 );
SetSkill( SkillName.Meditation, 120.0 );
m_Tentacles = new List<HarrowerTentacles>();
m_Timer = new TeleportTimer( this );
m_Timer.Start();
}
public override void GenerateLoot()
{
AddLoot( LootPack.SuperBoss, 2 );
AddLoot( LootPack.Meager );
}
public override bool AutoDispel{ get{ return true; } }
public override bool Unprovokable{ get{ return true; } }
public override Poison PoisonImmune{ get{ return Poison.Lethal; } }
private static readonly double[] m_Offsets = new double[]
{
Math.Cos( 000.0 / 180.0 * Math.PI ), Math.Sin( 000.0 / 180.0 * Math.PI ),
Math.Cos( 040.0 / 180.0 * Math.PI ), Math.Sin( 040.0 / 180.0 * Math.PI ),
Math.Cos( 080.0 / 180.0 * Math.PI ), Math.Sin( 080.0 / 180.0 * Math.PI ),
Math.Cos( 120.0 / 180.0 * Math.PI ), Math.Sin( 120.0 / 180.0 * Math.PI ),
Math.Cos( 160.0 / 180.0 * Math.PI ), Math.Sin( 160.0 / 180.0 * Math.PI ),
Math.Cos( 200.0 / 180.0 * Math.PI ), Math.Sin( 200.0 / 180.0 * Math.PI ),
Math.Cos( 240.0 / 180.0 * Math.PI ), Math.Sin( 240.0 / 180.0 * Math.PI ),
Math.Cos( 280.0 / 180.0 * Math.PI ), Math.Sin( 280.0 / 180.0 * Math.PI ),
Math.Cos( 320.0 / 180.0 * Math.PI ), Math.Sin( 320.0 / 180.0 * Math.PI ),
};
public void Morph()
{
if ( m_TrueForm )
return;
m_TrueForm = true;
Name = "the true harrower";
BodyValue = 780;
Hue = 0x497;
Hits = HitsMax;
Stam = StamMax;
Mana = ManaMax;
ProcessDelta();
Say( 1049499 ); // Behold my true form!
Map map = this.Map;
if ( map != null )
{
for ( int i = 0; i < m_Offsets.Length; i += 2 )
{
double rx = m_Offsets[i];
double ry = m_Offsets[i + 1];
int dist = 0;
bool ok = false;
int x = 0, y = 0, z = 0;
while ( !ok && dist < 10 )
{
int rdist = 10 + dist;
x = this.X + (int)(rx * rdist);
y = this.Y + (int)(ry * rdist);
z = map.GetAverageZ( x, y );
if ( !(ok = map.CanFit( x, y, this.Z, 16, false, false ) ) )
ok = map.CanFit( x, y, z, 16, false, false );
if ( dist >= 0 )
dist = -(dist + 1);
else
dist = -(dist - 1);
}
if ( !ok )
continue;
HarrowerTentacles spawn = new HarrowerTentacles( this );
spawn.Team = this.Team;
spawn.MoveToWorld( new Point3D( x, y, z ), map );
m_Tentacles.Add( spawn );
}
}
}
[CommandProperty( AccessLevel.GameMaster )]
public override int HitsMax{ get{ return m_TrueForm ? 65000 : 30000; } }
[CommandProperty( AccessLevel.GameMaster )]
public override int ManaMax{ get{ return 5000; } }
public Harrower( Serial serial ) : base( serial )
{
m_Instances.Add( this );
}
public override void OnAfterDelete()
{
m_Instances.Remove( this );
base.OnAfterDelete();
}
public override bool DisallowAllMoves{ get{ return m_TrueForm; } }
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
writer.Write( m_TrueForm );
writer.Write( m_GateItem );
writer.WriteMobileList<HarrowerTentacles>( m_Tentacles );
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 0:
{
m_TrueForm = reader.ReadBool();
m_GateItem = reader.ReadItem();
m_Tentacles = reader.ReadStrongMobileList<HarrowerTentacles>();
m_Timer = new TeleportTimer( this );
m_Timer.Start();
break;
}
}
}
public void GivePowerScrolls()
{
List<Mobile> toGive = new List<Mobile>();
List<DamageStore> rights = BaseCreature.GetLootingRights( this.DamageEntries, this.HitsMax );
for ( int i = rights.Count - 1; i >= 0; --i )
{
DamageStore ds = rights[i];
if ( ds.m_HasRight )
toGive.Add( ds.m_Mobile );
}
if ( toGive.Count == 0 )
return;
// Randomize
for ( int i = 0; i < toGive.Count; ++i )
{
int rand = Utility.Random( toGive.Count );
Mobile hold = toGive[i];
toGive[i] = toGive[rand];
toGive[rand] = hold;
}
for ( int i = 0; i < 16; ++i )
{
int level;
double random = Utility.RandomDouble();
if ( 0.1 >= random )
level = 25;
else if ( 0.25 >= random )
level = 20;
else if ( 0.45 >= random )
level = 15;
else if ( 0.70 >= random )
level = 10;
else
level = 5;
Mobile m = toGive[i % toGive.Count];
m.SendLocalizedMessage( 1049524 ); // You have received a scroll of power!
m.AddToBackpack( new StatCapScroll( 225 + level ) );
if ( m is PlayerMobile )
{
PlayerMobile pm = (PlayerMobile)m;
for ( int j = 0; j < pm.JusticeProtectors.Count; ++j )
{
Mobile prot = (Mobile)pm.JusticeProtectors[j];
if ( prot.Map != m.Map || prot.Kills >= 5 || prot.Criminal || !JusticeVirtue.CheckMapRegion( m, prot ) )
continue;
int chance = 0;
switch ( VirtueHelper.GetLevel( prot, VirtueName.Justice ) )
{
case VirtueLevel.Seeker: chance = 60; break;
case VirtueLevel.Follower: chance = 80; break;
case VirtueLevel.Knight: chance = 100; break;
}
if ( chance > Utility.Random( 100 ) )
{
prot.SendLocalizedMessage( 1049368 ); // You have been rewarded for your dedication to Justice!
prot.AddToBackpack( new StatCapScroll( 225 + level ) );
}
}
}
}
}
public override bool OnBeforeDeath()
{
if ( m_TrueForm )
{
List<DamageStore> rights = BaseCreature.GetLootingRights( this.DamageEntries, this.HitsMax );
for ( int i = rights.Count - 1; i >= 0; --i )
{
DamageStore ds = rights[i];
if ( ds.m_HasRight && ds.m_Mobile is PlayerMobile )
PlayerMobile.ChampionTitleInfo.AwardHarrowerTitle( (PlayerMobile)ds.m_Mobile );
}
if ( !NoKillAwards )
{
GivePowerScrolls();
Map map = this.Map;
if ( map != null )
{
for ( int x = -16; x <= 16; ++x )
{
for ( int y = -16; y <= 16; ++y )
{
double dist = Math.Sqrt(x*x+y*y);
if ( dist <= 16 )
new GoodiesTimer( map, X + x, Y + y ).Start();
}
}
}
m_DamageEntries = new Dictionary<Mobile, int>();
for ( int i = 0; i < m_Tentacles.Count; ++i )
{
Mobile m = m_Tentacles[i];
if ( !m.Deleted )
m.Kill();
RegisterDamageTo( m );
}
m_Tentacles.Clear();
RegisterDamageTo( this );
AwardArtifact( GetArtifact() );
if ( m_GateItem != null )
m_GateItem.Delete();
}
return base.OnBeforeDeath();
}
else
{
Morph();
return false;
}
}
Dictionary<Mobile, int> m_DamageEntries;
public virtual void RegisterDamageTo( Mobile m )
{
if( m == null )
return;
foreach( DamageEntry de in m.DamageEntries )
{
Mobile damager = de.Damager;
Mobile master = damager.GetDamageMaster( m );
if( master != null )
damager = master;
RegisterDamage( damager, de.DamageGiven );
}
}
public void RegisterDamage( Mobile from, int amount )
{
if( from == null || !from.Player )
return;
if( m_DamageEntries.ContainsKey( from ) )
m_DamageEntries[from] += amount;
else
m_DamageEntries.Add( from, amount );
from.SendMessage(String.Format("Total Damage: {0}", m_DamageEntries[from]) );
}
public void AwardArtifact( Item artifact )
{
if (artifact == null )
return;
int totalDamage = 0;
Dictionary<Mobile, int> validEntries = new Dictionary<Mobile, int>();
foreach (KeyValuePair<Mobile, int> kvp in m_DamageEntries)
{
if( IsEligible( kvp.Key, artifact ) )
{
validEntries.Add( kvp.Key, kvp.Value );
totalDamage += kvp.Value;
}
}
int randomDamage = Utility.RandomMinMax( 1, totalDamage );
totalDamage = 0;
foreach (KeyValuePair<Mobile, int> kvp in validEntries)
{
totalDamage += kvp.Value;
if( totalDamage >= randomDamage )
{
GiveArtifact( kvp.Key, artifact );
return;
}
}
artifact.Delete();
}
public void GiveArtifact( Mobile to, Item artifact )
{
if ( to == null || artifact == null )
return;
Container pack = to.Backpack;
if ( pack == null || !pack.TryDropItem( to, artifact, false ) )
artifact.Delete();
else
to.SendLocalizedMessage( 1062317 ); // For your valor in combating the fallen beast, a special artifact has been bestowed on you.
}
public bool IsEligible( Mobile m, Item Artifact )
{
return m.Player && m.Alive && m.InRange( Location, 32 ) && m.Backpack != null && m.Backpack.CheckHold( m, Artifact, false );
}
public Item GetArtifact()
{
double random = Utility.RandomDouble();
if ( 0.05 >= random )
return CreateArtifact( UniqueList );
else if ( 0.15 >= random )
return CreateArtifact( SharedList );
else if ( 0.30 >= random )
return CreateArtifact( DecorativeList );
return null;
}
public Item CreateArtifact( Type[] list )
{
if( list.Length == 0 )
return null;
int random = Utility.Random( list.Length );
Type type = list[random];
return Loot.Construct( type );
}
private class TeleportTimer : Timer
{
private Mobile m_Owner;
private static int[] m_Offsets = new int[]
{
-1, -1,
-1, 0,
-1, 1,
0, -1,
0, 1,
1, -1,
1, 0,
1, 1
};
public TeleportTimer( Mobile owner ) : base( TimeSpan.FromSeconds( 5.0 ), TimeSpan.FromSeconds( 5.0 ) )
{
Priority = TimerPriority.TwoFiftyMS;
m_Owner = owner;
}
protected override void OnTick()
{
if ( m_Owner.Deleted )
{
Stop();
return;
}
Map map = m_Owner.Map;
if ( map == null )
return;
if ( 0.25 < Utility.RandomDouble() )
return;
Mobile toTeleport = null;
foreach ( Mobile m in m_Owner.GetMobilesInRange( 16 ) )
{
if ( m != m_Owner && m.Player && m_Owner.CanBeHarmful( m ) && m_Owner.CanSee( m ) )
{
toTeleport = m;
break;
}
}
if ( toTeleport != null )
{
int offset = Utility.Random( 8 ) * 2;
Point3D to = m_Owner.Location;
for ( int i = 0; i < m_Offsets.Length; i += 2 )
{
int x = m_Owner.X + m_Offsets[(offset + i) % m_Offsets.Length];
int y = m_Owner.Y + m_Offsets[(offset + i + 1) % m_Offsets.Length];
if ( map.CanSpawnMobile( x, y, m_Owner.Z ) )
{
to = new Point3D( x, y, m_Owner.Z );
break;
}
else
{
int z = map.GetAverageZ( x, y );
if ( map.CanSpawnMobile( x, y, z ) )
{
to = new Point3D( x, y, z );
break;
}
}
}
Mobile m = toTeleport;
Point3D from = m.Location;
m.Location = to;
Server.Spells.SpellHelper.Turn( m_Owner, toTeleport );
Server.Spells.SpellHelper.Turn( toTeleport, m_Owner );
m.ProcessDelta();
Effects.SendLocationParticles( EffectItem.Create( from, m.Map, EffectItem.DefaultDuration ), 0x3728, 10, 10, 2023 );
Effects.SendLocationParticles( EffectItem.Create( to, m.Map, EffectItem.DefaultDuration ), 0x3728, 10, 10, 5023 );
m.PlaySound( 0x1FE );
m_Owner.Combatant = toTeleport;
}
}
}
private class GoodiesTimer : Timer
{
private Map m_Map;
private int m_X, m_Y;
public GoodiesTimer( Map map, int x, int y ) : base( TimeSpan.FromSeconds( Utility.RandomDouble() * 10.0 ) )
{
Priority = TimerPriority.TwoFiftyMS;
m_Map = map;
m_X = x;
m_Y = y;
}
protected override void OnTick()
{
int z = m_Map.GetAverageZ( m_X, m_Y );
bool canFit = m_Map.CanFit( m_X, m_Y, z, 6, false, false );
for ( int i = -3; !canFit && i <= 3; ++i )
{
canFit = m_Map.CanFit( m_X, m_Y, z + i, 6, false, false );
if ( canFit )
z += i;
}
if ( !canFit )
return;
Gold g = new Gold( 750, 1250 );
g.MoveToWorld( new Point3D( m_X, m_Y, z ), m_Map );
if ( 0.5 >= Utility.RandomDouble() )
{
switch ( Utility.Random( 3 ) )
{
case 0: // Fire column
{
Effects.SendLocationParticles( EffectItem.Create( g.Location, g.Map, EffectItem.DefaultDuration ), 0x3709, 10, 30, 5052 );
Effects.PlaySound( g, g.Map, 0x208 );
break;
}
case 1: // Explosion
{
Effects.SendLocationParticles( EffectItem.Create( g.Location, g.Map, EffectItem.DefaultDuration ), 0x36BD, 20, 10, 5044 );
Effects.PlaySound( g, g.Map, 0x307 );
break;
}
case 2: // Ball of fire
{
Effects.SendLocationParticles( EffectItem.Create( g.Location, g.Map, EffectItem.DefaultDuration ), 0x36FE, 10, 10, 5052 );
break;
}
}
}
}
}
}
}

View file

@ -0,0 +1,221 @@
using System;
using System.Collections;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName( "a tentacles corpse" )]
public class HarrowerTentacles : BaseCreature
{
private Mobile m_Harrower;
private DrainTimer m_Timer;
[CommandProperty( AccessLevel.GameMaster )]
public Mobile Harrower
{
get
{
return m_Harrower;
}
set
{
m_Harrower = value;
}
}
[Constructable]
public HarrowerTentacles() : this( null )
{
}
public HarrowerTentacles( Mobile harrower ) : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
{
m_Harrower = harrower;
Name = "tentacles of the harrower";
Body = 129;
SetStr( 901, 1000 );
SetDex( 126, 140 );
SetInt( 1001, 1200 );
SetHits( 541, 600 );
SetDamage( 13, 20 );
SetDamageType( ResistanceType.Physical, 20 );
SetDamageType( ResistanceType.Fire, 20 );
SetDamageType( ResistanceType.Cold, 20 );
SetDamageType( ResistanceType.Poison, 20 );
SetDamageType( ResistanceType.Energy, 20 );
SetResistance( ResistanceType.Physical, 55, 65 );
SetResistance( ResistanceType.Fire, 35, 45 );
SetResistance( ResistanceType.Cold, 35, 45 );
SetResistance( ResistanceType.Poison, 35, 45 );
SetResistance( ResistanceType.Energy, 35, 45 );
SetSkill( SkillName.Meditation, 100.0 );
SetSkill( SkillName.MagicResist, 120.1, 140.0 );
SetSkill( SkillName.Swords, 90.1, 100.0 );
SetSkill( SkillName.Tactics, 90.1, 100.0 );
SetSkill( SkillName.Wrestling, 90.1, 100.0 );
Fame = 15000;
Karma = -15000;
VirtualArmor = 60;
m_Timer = new DrainTimer( this );
m_Timer.Start();
PackReg( 50 );
PackNecroReg( 15, 75 );
}
public override void CheckReflect( Mobile caster, ref bool reflect )
{
reflect = true;
}
public override int GetIdleSound()
{
return 0x101;
}
public override int GetAngerSound()
{
return 0x5E;
}
public override int GetDeathSound()
{
return 0x1C2;
}
public override int GetAttackSound()
{
return -1; // unknown
}
public override int GetHurtSound()
{
return 0x289;
}
public override void GenerateLoot()
{
AddLoot( LootPack.FilthyRich, 2 );
AddLoot( LootPack.MedScrolls, 3 );
AddLoot( LootPack.HighScrolls, 2 );
}
public override bool AutoDispel{ get{ return true; } }
public override bool Unprovokable{ get{ return true; } }
public override Poison PoisonImmune{ get{ return Poison.Lethal; } }
public override bool DisallowAllMoves{ get{ return true; } }
public HarrowerTentacles( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
writer.Write( m_Harrower );
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 0:
{
m_Harrower = reader.ReadMobile();
m_Timer = new DrainTimer( this );
m_Timer.Start();
break;
}
}
}
public override void OnAfterDelete()
{
if ( m_Timer != null )
m_Timer.Stop();
m_Timer = null;
base.OnAfterDelete();
}
private class DrainTimer : Timer
{
private HarrowerTentacles m_Owner;
public DrainTimer( HarrowerTentacles owner ) : base( TimeSpan.FromSeconds( 5.0 ), TimeSpan.FromSeconds( 5.0 ) )
{
m_Owner = owner;
Priority = TimerPriority.TwoFiftyMS;
}
private static ArrayList m_ToDrain = new ArrayList();
protected override void OnTick()
{
if ( m_Owner.Deleted )
{
Stop();
return;
}
foreach ( Mobile m in m_Owner.GetMobilesInRange( 9 ) )
{
if ( m == m_Owner || m == m_Owner.Harrower || !m_Owner.CanBeHarmful( m ) )
continue;
if ( m is BaseCreature )
{
BaseCreature bc = m as BaseCreature;
if ( bc.Controlled || bc.Summoned )
m_ToDrain.Add( m );
}
else if ( m.Player )
{
m_ToDrain.Add( m );
}
}
foreach ( Mobile m in m_ToDrain )
{
m_Owner.DoHarmful( m );
m.FixedParticles( 0x374A, 10, 15, 5013, 0x455, 0, EffectLayer.Waist );
m.PlaySound( 0x1F1 );
int drain = Utility.RandomMinMax( 14, 30 );
m_Owner.Hits += drain;
if ( m_Owner.Harrower != null )
m_Owner.Harrower.Hits += drain;
m.Damage( drain, m_Owner );
}
m_ToDrain.Clear();
}
}
}
}

View file

@ -0,0 +1,238 @@
using System;
using Server;
using Server.Items;
using Server.Engines.CannedEvil;
namespace Server.Mobiles
{
public class LordOaks : BaseChampion
{
private Mobile m_Queen;
private bool m_SpawnedQueen;
public override ChampionSkullType SkullType{ get{ return ChampionSkullType.Enlightenment; } }
public override Type[] UniqueList{ get{ return new Type[] { typeof( OrcChieftainHelm ) }; } }
public override Type[] SharedList{ get{ return new Type[] { typeof( RoyalGuardSurvivalKnife ),
typeof( DjinnisRing ),
typeof( LieutenantOfTheBritannianRoyalGuard ),
typeof( SamaritanRobe ),
typeof( DetectiveBoots ),
typeof( TheMostKnowledgePerson ) }; } }
public override Type[] DecorativeList{ get{ return new Type[] { typeof( WaterTile ),
typeof( WindSpirit ),
typeof( Pier ),
typeof( DirtPatch )}; } }
public override MonsterStatuetteType[] StatueTypes{ get{ return new MonsterStatuetteType[] { }; } }
[Constructable]
public LordOaks() : base( AIType.AI_Mage, FightMode.Evil )
{
Body = 175;
Name = "Lord Oaks";
SetStr( 403, 850 );
SetDex( 101, 150 );
SetInt( 503, 800 );
SetHits( 3000 );
SetStam( 202, 400 );
SetDamage( 21, 33 );
SetDamageType( ResistanceType.Physical, 75 );
SetDamageType( ResistanceType.Fire, 25 );
SetResistance( ResistanceType.Physical, 85, 90 );
SetResistance( ResistanceType.Fire, 60, 70 );
SetResistance( ResistanceType.Cold, 60, 70 );
SetResistance( ResistanceType.Poison, 80, 90 );
SetResistance( ResistanceType.Energy, 80, 90 );
SetSkill( SkillName.Anatomy, 75.1, 100.0 );
SetSkill( SkillName.EvalInt, 120.1, 130.0 );
SetSkill( SkillName.Magery, 120.0 );
SetSkill( SkillName.Meditation, 120.1, 130.0 );
SetSkill( SkillName.MagicResist, 100.5, 150.0 );
SetSkill( SkillName.Tactics, 100.0 );
SetSkill( SkillName.Wrestling, 100.0 );
Fame = 22500;
Karma = 22500;
VirtualArmor = 100;
}
public override void GenerateLoot()
{
AddLoot( LootPack.UltraRich, 5 );
}
public override bool AutoDispel{ get{ return true; } }
public override bool CanFly { get { return true; } }
public override bool BardImmune{ get{ return !Core.SE; } }
public override bool Unprovokable{ get{ return Core.SE; } }
public override bool Uncalmable{ get{ return Core.SE; } }
public override OppositionGroup OppositionGroup
{
get{ return OppositionGroup.FeyAndUndead; }
}
public override Poison PoisonImmune{ get{ return Poison.Deadly; } }
public void SpawnPixies( Mobile target )
{
Map map = this.Map;
if ( map == null )
return;
this.Say( 1042154 ); // You shall never defeat me as long as I have my queen!
int newPixies = Utility.RandomMinMax( 3, 6 );
for ( int i = 0; i < newPixies; ++i )
{
Pixie pixie = new Pixie();
pixie.Team = this.Team;
pixie.FightMode = FightMode.Closest;
bool validLocation = false;
Point3D loc = this.Location;
for ( int j = 0; !validLocation && j < 10; ++j )
{
int x = X + Utility.Random( 3 ) - 1;
int y = Y + Utility.Random( 3 ) - 1;
int z = map.GetAverageZ( x, y );
if ( validLocation = map.CanFit( x, y, this.Z, 16, false, false ) )
loc = new Point3D( x, y, Z );
else if ( validLocation = map.CanFit( x, y, z, 16, false, false ) )
loc = new Point3D( x, y, z );
}
pixie.MoveToWorld( loc, map );
pixie.Combatant = target;
}
}
public override int GetAngerSound()
{
return 0x2F8;
}
public override int GetIdleSound()
{
return 0x2F8;
}
public override int GetAttackSound()
{
return Utility.Random( 0x2F5, 2 );
}
public override int GetHurtSound()
{
return 0x2F9;
}
public override int GetDeathSound()
{
return 0x2F7;
}
public void CheckQueen()
{
if( this.Map == null )
return;
if ( !m_SpawnedQueen )
{
this.Say( 1042153 ); // Come forth my queen!
m_Queen = new Silvani();
((BaseCreature)m_Queen).Team = this.Team;
m_Queen.MoveToWorld( this.Location, this.Map );
m_SpawnedQueen = true;
}
else if ( m_Queen != null && m_Queen.Deleted )
{
m_Queen = null;
}
}
public override void AlterDamageScalarFrom( Mobile caster, ref double scalar )
{
CheckQueen();
if ( m_Queen != null )
{
scalar *= 0.1;
if ( 0.1 >= Utility.RandomDouble() )
SpawnPixies( caster );
}
}
public override void OnGaveMeleeAttack( Mobile defender )
{
base.OnGaveMeleeAttack( defender );
defender.Damage( Utility.Random( 20, 10 ), this );
defender.Stam -= Utility.Random( 20, 10 );
defender.Mana -= Utility.Random( 20, 10 );
}
public override void OnGotMeleeAttack( Mobile attacker )
{
base.OnGotMeleeAttack( attacker );
CheckQueen();
if ( m_Queen != null && 0.1 >= Utility.RandomDouble() )
SpawnPixies( attacker );
attacker.Damage( Utility.Random( 20, 10 ), this );
attacker.Stam -= Utility.Random( 20, 10 );
attacker.Mana -= Utility.Random( 20, 10 );
}
public LordOaks( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
writer.Write( m_Queen );
writer.Write( m_SpawnedQueen );
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 0:
{
m_Queen = reader.ReadMobile();
m_SpawnedQueen = reader.ReadBool();
break;
}
}
}
}
}

View file

@ -0,0 +1,87 @@
using System;
using Server;
using Server.Items;
using Server.Engines.CannedEvil;
namespace Server.Mobiles
{
public class Mephitis : BaseChampion
{
public override ChampionSkullType SkullType{ get{ return ChampionSkullType.Venom; } }
public override Type[] UniqueList{ get{ return new Type[] { typeof( Calm ) }; } }
public override Type[] SharedList { get { return new Type[] { typeof(OblivionsNeedle), typeof(ANecromancerShroud), typeof(EmbroideredOakLeafCloak), typeof(TheMostKnowledgePerson) }; } }
public override Type[] DecorativeList{ get{ return new Type[] { typeof( Web ), typeof( MonsterStatuette ) }; } }
public override MonsterStatuetteType[] StatueTypes{ get{ return new MonsterStatuetteType[] { MonsterStatuetteType.Spider }; } }
[Constructable]
public Mephitis() : base( AIType.AI_Melee )
{
Body = 173;
Name = "Mephitis";
BaseSoundID = 0x183;
SetStr( 505, 1000 );
SetDex( 102, 300 );
SetInt( 402, 600 );
SetHits( 3000 );
SetStam( 105, 600 );
SetDamage( 21, 33 );
SetDamageType( ResistanceType.Physical, 50 );
SetDamageType( ResistanceType.Poison, 50 );
SetResistance( ResistanceType.Physical, 75, 80 );
SetResistance( ResistanceType.Fire, 60, 70 );
SetResistance( ResistanceType.Cold, 60, 70 );
SetResistance( ResistanceType.Poison, 100 );
SetResistance( ResistanceType.Energy, 60, 70 );
SetSkill( SkillName.MagicResist, 70.7, 140.0 );
SetSkill( SkillName.Tactics, 97.6, 100.0 );
SetSkill( SkillName.Wrestling, 97.6, 100.0 );
Fame = 22500;
Karma = -22500;
VirtualArmor = 80;
}
public override void GenerateLoot()
{
AddLoot( LootPack.UltraRich, 4 );
}
public override Poison PoisonImmune{ get{ return Poison.Lethal; } }
public override Poison HitPoison{ get{ return Poison.Lethal; } }
public override void OnGotMeleeAttack( Mobile attacker )
{
base.OnGotMeleeAttack( attacker );
// TODO: Web ability
}
public Mephitis( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,298 @@
using System;
using System.Collections;
using Server;
using Server.Items;
using Server.Engines.CannedEvil;
namespace Server.Mobiles
{
public class Neira : BaseChampion
{
public override ChampionSkullType SkullType{ get{ return ChampionSkullType.Death; } }
public override Type[] UniqueList{ get{ return new Type[] { typeof( ShroudOfDeciet ) }; } }
public override Type[] SharedList{ get{ return new Type[] { typeof( ANecromancerShroud ),
typeof( CaptainJohnsHat ) }; } }
public override Type[] DecorativeList{ get{ return new Type[] { typeof( WallBlood ), typeof( TatteredAncientMummyWrapping ) }; } }
public override MonsterStatuetteType[] StatueTypes{ get{ return new MonsterStatuetteType[] { }; } }
[Constructable]
public Neira() : base( AIType.AI_Mage )
{
Name = "Neira";
Title = "the necromancer";
Body = 401;
Hue = 0x83EC;
SetStr( 305, 425 );
SetDex( 72, 150 );
SetInt( 505, 750 );
SetHits( 4800 );
SetStam( 102, 300 );
SetDamage( 25, 35 );
SetDamageType( ResistanceType.Physical, 100 );
SetResistance( ResistanceType.Physical, 25, 30 );
SetResistance( ResistanceType.Fire, 35, 45 );
SetResistance( ResistanceType.Cold, 50, 60 );
SetResistance( ResistanceType.Poison, 30, 40 );
SetResistance( ResistanceType.Energy, 20, 30 );
SetSkill( SkillName.EvalInt, 120.0 );
SetSkill( SkillName.Magery, 120.0 );
SetSkill( SkillName.Meditation, 120.0 );
SetSkill( SkillName.MagicResist, 150.0 );
SetSkill( SkillName.Tactics, 97.6, 100.0 );
SetSkill( SkillName.Wrestling, 97.6, 100.0 );
Fame = 22500;
Karma = -22500;
VirtualArmor = 30;
Female = true;
Item shroud = new HoodedShroudOfShadows();
shroud.Movable = false;
AddItem( shroud );
Scimitar weapon = new Scimitar();
weapon.Skill = SkillName.Wrestling;
weapon.Hue = 38;
weapon.Movable = false;
AddItem( weapon );
//new SkeletalMount().Rider = this;
AddItem( new VirtualMountItem( this ) );
}
public override void GenerateLoot()
{
AddLoot( LootPack.UltraRich, 3 );
AddLoot( LootPack.Meager );
}
public override bool OnBeforeDeath()
{
IMount mount = this.Mount;
if ( mount != null )
mount.Rider = null;
if ( mount is Mobile )
((Mobile)mount).Delete();
return base.OnBeforeDeath();
}
private bool m_SpeedBoost;
public override void OnDamage( int amount, Mobile from, bool willKill )
{
CheckSpeedBoost();
base.OnDamage( amount, from, willKill );
}
private const double SpeedBoostScalar = 1.2;
private void CheckSpeedBoost()
{
if( Hits < (HitsMax / 4 ) )
{
if( !m_SpeedBoost )
{
ActiveSpeed /= SpeedBoostScalar;
PassiveSpeed /= SpeedBoostScalar;
m_SpeedBoost = true;
}
}
else if( m_SpeedBoost )
{
ActiveSpeed *= SpeedBoostScalar;
PassiveSpeed *= SpeedBoostScalar;
m_SpeedBoost = false;
}
}
private class VirtualMount : IMount
{
private VirtualMountItem m_Item;
public Mobile Rider
{
get { return m_Item.Rider; }
set { }
}
public VirtualMount( VirtualMountItem item )
{
m_Item = item;
}
public virtual void OnRiderDamaged( int amount, Mobile from, bool willKill )
{
}
}
private class VirtualMountItem : Item, IMountItem
{
private Mobile m_Rider;
private VirtualMount m_Mount;
public Mobile Rider { get { return m_Rider; } }
public VirtualMountItem( Mobile mob )
: base( 0x3EBB )
{
Layer = Layer.Mount;
Movable = false;
m_Rider = mob;
m_Mount = new VirtualMount( this );
}
public IMount Mount
{
get { return m_Mount; }
}
public VirtualMountItem( Serial serial )
: base( serial )
{
m_Mount = new VirtualMount( this );
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int)0 ); // version
writer.Write( (Mobile)m_Rider );
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
m_Rider = reader.ReadMobile();
if( m_Rider == null )
Delete();
}
}
public override bool AlwaysMurderer{ get{ return true; } }
public override bool BardImmune{ get{ return !Core.SE; } }
public override bool Unprovokable{ get{ return Core.SE; } }
public override bool Uncalmable{ get{ return Core.SE; } }
public override Poison PoisonImmune{ get{ return Poison.Deadly; } }
public override bool ShowFameTitle{ get{ return false; } }
public override bool ClickTitle{ get{ return false; } }
public override void OnGaveMeleeAttack( Mobile defender )
{
base.OnGaveMeleeAttack( defender );
if ( 0.1 >= Utility.RandomDouble() ) // 10% chance to drop or throw an unholy bone
AddUnholyBone( defender, 0.25 );
CheckSpeedBoost();
}
public override void OnGotMeleeAttack( Mobile attacker )
{
base.OnGotMeleeAttack( attacker );
if ( 0.1 >= Utility.RandomDouble() ) // 10% chance to drop or throw an unholy bone
AddUnholyBone( attacker, 0.25 );
}
public override void AlterDamageScalarFrom( Mobile caster, ref double scalar )
{
base.AlterDamageScalarFrom( caster, ref scalar );
if ( 0.1 >= Utility.RandomDouble() ) // 10% chance to throw an unholy bone
AddUnholyBone( caster, 1.0 );
}
public void AddUnholyBone( Mobile target, double chanceToThrow )
{
if( this.Map == null )
return;
if ( chanceToThrow >= Utility.RandomDouble() )
{
Direction = GetDirectionTo( target );
MovingEffect( target, 0xF7E, 10, 1, true, false, 0x496, 0 );
new DelayTimer( this, target ).Start();
}
else
{
new UnholyBone().MoveToWorld( Location, Map );
}
}
private class DelayTimer : Timer
{
private Mobile m_Mobile;
private Mobile m_Target;
public DelayTimer( Mobile m, Mobile target ) : base( TimeSpan.FromSeconds( 1.0 ) )
{
m_Mobile = m;
m_Target = target;
}
protected override void OnTick()
{
if ( m_Mobile.CanBeHarmful( m_Target ) )
{
m_Mobile.DoHarmful( m_Target );
AOS.Damage( m_Target, m_Mobile, Utility.RandomMinMax( 10, 20 ), 100, 0, 0, 0, 0 );
new UnholyBone().MoveToWorld( m_Target.Location, m_Target.Map );
}
}
}
public Neira( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 1 ); // version
writer.Write( m_SpeedBoost );
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch( version )
{
case 1:
{
m_SpeedBoost = reader.ReadBool();
break;
}
}
}
}
}

View file

@ -0,0 +1,41 @@
using System;
using Server;
using Server.Misc;
using Server.Items;
using Server.Guilds;
namespace Server.Mobiles
{
public class OrderGuard : BaseShieldGuard
{
public override int Keyword{ get{ return 0x21; } } // *order shield*
public override BaseShield Shield{ get{ return new OrderShield(); } }
public override int SignupNumber{ get{ return 1007141; } } // Sign up with a guild of order if thou art interested.
public override GuildType Type{ get{ return GuildType.Order; } }
public override bool BardImmune{ get{ return true; } }
[Constructable]
public OrderGuard()
{
}
public OrderGuard( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,217 @@
using System;
using Server;
using Server.Items;
namespace Server.Mobiles
{
public class Paragon
{
public static double ChestChance = .10; // Chance that a paragon will carry a paragon chest
public static double ChocolateIngredientChance = .20; // Chance that a paragon will drop a chocolatiering ingredient
public static Map[] Maps = new Map[] // Maps that paragons will spawn on
{
Map.Ilshenar
};
private static TimeSpan FastRegenRate = TimeSpan.FromSeconds( .5 );
private static TimeSpan CPUSaverRate = TimeSpan.FromSeconds( 2 );
private class ParagonStamRegen : Timer
{
private BaseCreature m_Owner;
public ParagonStamRegen( Mobile m )
: base( FastRegenRate, FastRegenRate )
{
this.Priority = TimerPriority.FiftyMS;
m_Owner = m as BaseCreature;
}
protected override void OnTick()
{
if( !m_Owner.Deleted && m_Owner.IsParagon && m_Owner .Map != Map.Internal )
{
m_Owner.Stam++;
Delay = Interval = ( m_Owner.Stam < ( m_Owner.StamMax * .75 ) ) ? FastRegenRate : CPUSaverRate;
}
else
{
Stop();
}
}
}
public static Type[] Artifacts = new Type[]
{
typeof( GoldBricks ), typeof( PhillipsWoodenSteed ),
typeof( AlchemistsBauble ), typeof( ArcticDeathDealer ),
typeof( BlazeOfDeath ), typeof( BowOfTheJukaKing ),
typeof( BurglarsBandana ), typeof( CavortingClub ),
typeof( EnchantedTitanLegBone ), typeof( GwennosHarp ),
typeof( IolosLute ), typeof( LunaLance ),
typeof( NightsKiss ), typeof( NoxRangersHeavyCrossbow ),
typeof( OrcishVisage ), typeof( PolarBearMask ),
typeof( ShieldOfInvulnerability ), typeof( StaffOfPower ),
typeof( VioletCourage ), typeof( HeartOfTheLion ),
typeof( WrathOfTheDryad ), typeof( PixieSwatter ),
typeof( GlovesOfThePugilist )
};
public static int Hue = 0x501; // Paragon hue
// Buffs
public static double HitsBuff = 5.0;
public static double StrBuff = 1.05;
public static double IntBuff = 1.20;
public static double DexBuff = 1.20;
public static double SkillsBuff = 1.20;
public static double SpeedBuff = 1.20;
public static double FameBuff = 1.40;
public static double KarmaBuff = 1.40;
public static int DamageBuff = 5;
public static void Convert( BaseCreature bc )
{
if ( bc.IsParagon )
return;
bc.Hue = Hue;
if ( bc.HitsMaxSeed >= 0 )
bc.HitsMaxSeed = (int)( bc.HitsMaxSeed * HitsBuff );
bc.RawStr = (int)( bc.RawStr * StrBuff );
bc.RawInt = (int)( bc.RawInt * IntBuff );
bc.RawDex = (int)( bc.RawDex * DexBuff );
bc.Hits = bc.HitsMax;
bc.Mana = bc.ManaMax;
bc.Stam = bc.StamMax;
for( int i = 0; i < bc.Skills.Length; i++ )
{
Skill skill = (Skill)bc.Skills[i];
if ( skill.Base > 0.0 )
skill.Base *= SkillsBuff;
}
bc.PassiveSpeed /= SpeedBuff;
bc.ActiveSpeed /= SpeedBuff;
bc.CurrentSpeed = bc.PassiveSpeed;
bc.DamageMin += DamageBuff;
bc.DamageMax += DamageBuff;
if ( bc.Fame > 0 )
bc.Fame = (int)( bc.Fame * FameBuff );
if ( bc.Fame > 32000 )
bc.Fame = 32000;
// TODO: Mana regeneration rate = Sqrt( buffedFame ) / 4
if ( bc.Karma != 0 )
{
bc.Karma = (int)( bc.Karma * KarmaBuff );
if( Math.Abs( bc.Karma ) > 32000 )
bc.Karma = 32000 * Math.Sign( bc.Karma );
}
new ParagonStamRegen( bc ).Start();
}
public static void UnConvert( BaseCreature bc )
{
if( !bc.IsParagon )
return;
bc.Hue = 0;
if( bc.HitsMaxSeed >= 0 )
bc.HitsMaxSeed = (int)( bc.HitsMaxSeed / HitsBuff );
bc.RawStr = (int)( bc.RawStr / StrBuff );
bc.RawInt = (int)( bc.RawInt / IntBuff );
bc.RawDex = (int)( bc.RawDex / DexBuff );
bc.Hits = bc.HitsMax;
bc.Mana = bc.ManaMax;
bc.Stam = bc.StamMax;
for( int i = 0; i < bc.Skills.Length; i++ )
{
Skill skill = (Skill)bc.Skills[i];
if ( skill.Base > 0.0 )
skill.Base /= SkillsBuff;
}
bc.PassiveSpeed *= SpeedBuff;
bc.ActiveSpeed *= SpeedBuff;
bc.CurrentSpeed = bc.PassiveSpeed;
bc.DamageMin -= DamageBuff;
bc.DamageMax -= DamageBuff;
if ( bc.Fame > 0 )
bc.Fame = (int)( bc.Fame / FameBuff );
if ( bc.Karma != 0 )
bc.Karma = (int)( bc.Karma / KarmaBuff );
}
public static bool CheckConvert( BaseCreature bc )
{
return CheckConvert( bc, bc.Location, bc.Map );
}
public static bool CheckConvert( BaseCreature bc, Point3D location, Map m )
{
if ( !Core.AOS )
return false;
if ( Array.IndexOf( Maps, m ) == -1 )
return false;
if ( bc is BaseChampion || bc is Harrower || bc is BaseVendor || bc is BaseEscortable || bc is Clone || bc.IsParagon )
return false;
int fame = bc.Fame;
if ( fame > 32000 )
fame = 32000;
double chance = 1 / Math.Round( 20.0 - ( fame / 3200 ));
return ( chance > Utility.RandomDouble() );
}
public static bool CheckArtifactChance( Mobile m, BaseCreature bc )
{
if ( !Core.AOS )
return false;
double fame = (double)bc.Fame;
if ( fame > 32000 )
fame = 32000;
double chance = 1 / ( Math.Max( 10, 100 * ( 0.83 - Math.Round( Math.Log( Math.Round( fame / 6000, 3 ) + 0.001, 10 ), 3 ) ) ) * ( 100 - Math.Sqrt( m.Luck ) ) / 100.0 );
return chance > Utility.RandomDouble();
}
public static void GiveArtifactTo( Mobile m )
{
Item item = (Item)Activator.CreateInstance( Artifacts[Utility.Random(Artifacts.Length)] );
if ( m.AddToBackpack( item ) )
m.SendMessage( "As a reward for slaying the mighty paragon, an artifact has been placed in your backpack." );
else
m.SendMessage( "As your backpack is full, your reward for destroying the legendary paragon has been placed at your feet." );
}
}
}

View file

@ -0,0 +1,162 @@
using System;
using System.Collections;
using Server;
using Server.Items;
using Server.Spells;
using Server.Engines.CannedEvil;
namespace Server.Mobiles
{
public class Rikktor : BaseChampion
{
public override ChampionSkullType SkullType{ get{ return ChampionSkullType.Power; } }
public override Type[] UniqueList{ get{ return new Type[] { typeof( CrownOfTalKeesh ) }; } }
public override Type[] SharedList{ get{ return new Type[] { typeof( TheMostKnowledgePerson ),
typeof( BraveKnightOfTheBritannia ),
typeof( LieutenantOfTheBritannianRoyalGuard ) }; } }
public override Type[] DecorativeList{ get{ return new Type[] { typeof( LavaTile ),
typeof( MonsterStatuette ),
typeof( MonsterStatuette ) }; } }
public override MonsterStatuetteType[] StatueTypes{ get{ return new MonsterStatuetteType[] { MonsterStatuetteType.OphidianArchMage,
MonsterStatuetteType.OphidianWarrior }; } }
[Constructable]
public Rikktor() : base( AIType.AI_Melee )
{
Body = 172;
Name = "Rikktor";
SetStr( 701, 900 );
SetDex( 201, 350 );
SetInt( 51, 100 );
SetHits( 3000 );
SetStam( 203, 650 );
SetDamage( 28, 55 );
SetDamageType( ResistanceType.Physical, 25 );
SetDamageType( ResistanceType.Fire, 50 );
SetDamageType( ResistanceType.Energy, 25 );
SetResistance( ResistanceType.Physical, 80, 90 );
SetResistance( ResistanceType.Fire, 80, 90 );
SetResistance( ResistanceType.Cold, 30, 40 );
SetResistance( ResistanceType.Poison, 80, 90 );
SetResistance( ResistanceType.Energy, 80, 90 );
SetSkill( SkillName.Anatomy, 100.0 );
SetSkill( SkillName.MagicResist, 140.2, 160.0 );
SetSkill( SkillName.Tactics, 100.0 );
Fame = 22500;
Karma = -22500;
VirtualArmor = 130;
}
public override void GenerateLoot()
{
AddLoot( LootPack.UltraRich, 4 );
}
public override Poison PoisonImmune{ get{ return Poison.Lethal; } }
public override ScaleType ScaleType{ get{ return ScaleType.All; } }
public override int Scales{ get{ return 20; } }
public override void OnGaveMeleeAttack( Mobile defender )
{
base.OnGaveMeleeAttack( defender );
if ( 0.2 >= Utility.RandomDouble() )
Earthquake();
}
public void Earthquake()
{
Map map = this.Map;
if ( map == null )
return;
ArrayList targets = new ArrayList();
foreach ( Mobile m in this.GetMobilesInRange( 8 ) )
{
if ( m == this || !CanBeHarmful( m ) )
continue;
if ( m is BaseCreature && (((BaseCreature)m).Controlled || ((BaseCreature)m).Summoned || ((BaseCreature)m).Team != this.Team) )
targets.Add( m );
else if ( m.Player )
targets.Add( m );
}
PlaySound( 0x2F3 );
for ( int i = 0; i < targets.Count; ++i )
{
Mobile m = (Mobile)targets[i];
double damage = m.Hits * 0.6;
if ( damage < 10.0 )
damage = 10.0;
else if ( damage > 75.0 )
damage = 75.0;
DoHarmful( m );
AOS.Damage( m, this, (int)damage, 100, 0, 0, 0, 0 );
if ( m.Alive && m.Body.IsHuman && !m.Mounted )
m.Animate( 20, 7, 1, true, false, 0 ); // take hit
}
}
public override int GetAngerSound()
{
return Utility.Random( 0x2CE, 2 );
}
public override int GetIdleSound()
{
return 0x2D2;
}
public override int GetAttackSound()
{
return Utility.Random( 0x2C7, 5 );
}
public override int GetHurtSound()
{
return 0x2D1;
}
public override int GetDeathSound()
{
return 0x2CC;
}
public Rikktor( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,143 @@
using System;
using System.Collections;
using Server.Items;
using Server.Engines.CannedEvil;
namespace Server.Mobiles
{
public class Semidar : BaseChampion
{
public override ChampionSkullType SkullType{ get{ return ChampionSkullType.Pain; } }
public override Type[] UniqueList{ get{ return new Type[] { typeof( GladiatorsCollar ) }; } }
public override Type[] SharedList { get { return new Type[] { typeof(RoyalGuardSurvivalKnife), typeof(ANecromancerShroud), typeof(LieutenantOfTheBritannianRoyalGuard) }; } }
public override Type[] DecorativeList{ get{ return new Type[] { typeof( LavaTile ), typeof( DemonSkull ) }; } }
public override MonsterStatuetteType[] StatueTypes{ get{ return new MonsterStatuetteType[] { }; } }
[Constructable]
public Semidar() : base( AIType.AI_Mage )
{
Name = "Semidar";
Body = 174;
BaseSoundID = 0x4B0;
SetStr( 502, 600 );
SetDex( 102, 200 );
SetInt( 601, 750 );
SetHits( 1500 );
SetStam( 103, 250 );
SetDamage( 29, 35 );
SetDamageType( ResistanceType.Physical, 75 );
SetDamageType( ResistanceType.Fire, 25 );
SetResistance( ResistanceType.Physical, 20, 30 );
SetResistance( ResistanceType.Fire, 50, 60 );
SetResistance( ResistanceType.Cold, 20, 30 );
SetResistance( ResistanceType.Poison, 20, 30 );
SetResistance( ResistanceType.Energy, 10, 20 );
SetSkill( SkillName.EvalInt, 95.1, 100.0 );
SetSkill( SkillName.Magery, 90.1, 105.0 );
SetSkill( SkillName.Meditation, 95.1, 100.0 );
SetSkill( SkillName.MagicResist, 120.2, 140.0 );
SetSkill( SkillName.Tactics, 90.1, 105.0 );
SetSkill( SkillName.Wrestling, 90.1, 105.0 );
Fame = 24000;
Karma = -24000;
VirtualArmor = 20;
}
public override void GenerateLoot()
{
AddLoot( LootPack.UltraRich, 4 );
AddLoot( LootPack.FilthyRich );
}
public override bool Unprovokable{ get{ return true; } }
public override Poison PoisonImmune{ get{ return Poison.Lethal; } }
public override void CheckReflect( Mobile caster, ref bool reflect )
{
if ( caster.Body.IsMale )
reflect = true; // Always reflect if caster isn't female
}
public override void AlterDamageScalarFrom( Mobile caster, ref double scalar )
{
if ( caster.Body.IsMale )
scalar = 20; // Male bodies always reflect.. damage scaled 20x
}
public void DrainLife()
{
if( this.Map == null )
return;
ArrayList list = new ArrayList();
foreach ( Mobile m in this.GetMobilesInRange( 2 ) )
{
if ( m == this || !CanBeHarmful( m ) )
continue;
if ( m is BaseCreature && (((BaseCreature)m).Controlled || ((BaseCreature)m).Summoned || ((BaseCreature)m).Team != this.Team) )
list.Add( m );
else if ( m.Player )
list.Add( m );
}
foreach ( Mobile m in list )
{
DoHarmful( m );
m.FixedParticles( 0x374A, 10, 15, 5013, 0x496, 0, EffectLayer.Waist );
m.PlaySound( 0x231 );
m.SendMessage( "You feel the life drain out of you!" );
int toDrain = Utility.RandomMinMax( 10, 40 );
Hits += toDrain;
m.Damage( toDrain, this );
}
}
public override void OnGaveMeleeAttack( Mobile defender )
{
base.OnGaveMeleeAttack( defender );
if ( 0.25 >= Utility.RandomDouble() )
DrainLife();
}
public override void OnGotMeleeAttack( Mobile attacker )
{
base.OnGotMeleeAttack( attacker );
if ( 0.25 >= Utility.RandomDouble() )
DrainLife();
}
public Semidar( 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();
}
}
}

View file

@ -0,0 +1,187 @@
using System;
using System.Collections;
using Server;
using Server.Items;
using Server.Engines.CannedEvil;
namespace Server.Mobiles
{
public class Serado : BaseChampion
{
public override ChampionSkullType SkullType{ get{ return ChampionSkullType.Power; } }
public override Type[] UniqueList{ get{ return new Type[] { typeof( Pacify ) }; } }
public override Type[] SharedList{ get{ return new Type[] { typeof( BraveKnightOfTheBritannia ),
typeof( DetectiveBoots ),
typeof( EmbroideredOakLeafCloak ),
typeof( LieutenantOfTheBritannianRoyalGuard ) }; } }
public override Type[] DecorativeList{ get{ return new Type[] { typeof( Futon ), typeof( SwampTile ) }; } }
public override MonsterStatuetteType[] StatueTypes{ get{ return new MonsterStatuetteType[] { }; } }
public override WeaponAbility GetWeaponAbility()
{
return WeaponAbility.DoubleStrike;
}
[Constructable]
public Serado() : base( AIType.AI_Melee )
{
Name = "Serado";
Title = "the awakened";
Body = 249;
Hue = 0x96C;
SetStr( 1000 );
SetDex( 150 );
SetInt( 300 );
SetHits( 9000 );
SetMana( 300 );
SetDamage( 29, 35 );
SetDamageType( ResistanceType.Physical, 70 );
SetDamageType( ResistanceType.Poison, 20 );
SetDamageType( ResistanceType.Energy, 10 );
SetResistance( ResistanceType.Physical, 30 );
SetResistance( ResistanceType.Fire, 60 );
SetResistance( ResistanceType.Cold, 60 );
SetResistance( ResistanceType.Poison, 90 );
SetResistance( ResistanceType.Energy, 50 );
SetSkill( SkillName.MagicResist, 120.0 );
SetSkill( SkillName.Tactics, 120.0 );
SetSkill( SkillName.Wrestling, 70.0 );
SetSkill( SkillName.Poisoning, 150.0 );
Fame = 22500;
Karma = -22500;
PackItem( Engines.Plants.Seed.RandomBonsaiSeed() );
}
public override void GenerateLoot()
{
AddLoot( LootPack.UltraRich, 4 );
AddLoot( LootPack.FilthyRich );
AddLoot( LootPack.Gems, 6 );
}
public override int TreasureMapLevel{ get{ return 5; } }
public override Poison HitPoison{ get{ return Poison.Lethal; } }
public override Poison PoisonImmune{ get{ return Poison.Lethal; } }
public override double HitPoisonChance{ get{ return 0.8; } }
public override int Feathers{ get{ return 30; } }
public override bool ShowFameTitle{ get{ return false; } }
public override bool ClickTitle{ get{ return false; } }
// TODO: Hit Lightning Area
public override void OnDamagedBySpell( Mobile attacker )
{
base.OnDamagedBySpell( attacker );
ScaleResistances();
DoCounter( attacker );
}
public override void OnGotMeleeAttack( Mobile attacker )
{
base.OnGotMeleeAttack( attacker );
ScaleResistances();
DoCounter( attacker );
}
private void ScaleResistances()
{
double hitsLost = (HitsMax - Hits) / (double)HitsMax;
SetResistance( ResistanceType.Physical, 30 + (int)(hitsLost * ( 95 - 30 )) );
SetResistance( ResistanceType.Fire, 60 + (int)(hitsLost * ( 95 - 60 )) );
SetResistance( ResistanceType.Cold, 60 + (int)(hitsLost * ( 95 - 60 )) );
SetResistance( ResistanceType.Poison, 90 + (int)(hitsLost * ( 95 - 90 )) );
SetResistance( ResistanceType.Energy, 50 + (int)(hitsLost * ( 95 - 50 )) );
}
private void DoCounter( Mobile attacker )
{
if ( this.Map == null || ( attacker is BaseCreature && ((BaseCreature)attacker).BardProvoked ) )
return;
if ( 0.2 > Utility.RandomDouble() )
{
/* Counterattack with Hit Poison Area
* 20-25 damage, unresistable
* Lethal poison, 100% of the time
* Particle effect: Type: "2" From: "0x4061A107" To: "0x0" ItemId: "0x36BD" ItemIdName: "explosion" FromLocation: "(296 615, 17)" ToLocation: "(296 615, 17)" Speed: "1" Duration: "10" FixedDirection: "True" Explode: "False" Hue: "0xA6" RenderMode: "0x0" Effect: "0x1F78" ExplodeEffect: "0x1" ExplodeSound: "0x0" Serial: "0x4061A107" Layer: "255" Unknown: "0x0"
* Doesn't work on provoked monsters
*/
Mobile target = null;
if ( attacker is BaseCreature )
{
Mobile m = ((BaseCreature)attacker).GetMaster();
if ( m != null )
target = m;
}
if ( target == null || !target.InRange( this, 25 ) )
target = attacker;
this.Animate( 10, 4, 1, true, false, 0 );
ArrayList targets = new ArrayList();
foreach ( Mobile m in target.GetMobilesInRange( 8 ) )
{
if ( m == this || !CanBeHarmful( m ) )
continue;
if ( m is BaseCreature && (((BaseCreature)m).Controlled || ((BaseCreature)m).Summoned || ((BaseCreature)m).Team != this.Team) )
targets.Add( m );
else if ( m.Player )
targets.Add( m );
}
for ( int i = 0; i < targets.Count; ++i )
{
Mobile m = (Mobile)targets[i];
DoHarmful( m );
AOS.Damage( m, this, Utility.RandomMinMax( 20, 25 ), true, 0, 0, 0, 100, 0 );
m.FixedParticles( 0x36BD, 1, 10, 0x1F78, 0xA6, 0, (EffectLayer)255 );
m.ApplyPoison( this, Poison.Lethal );
}
}
}
public Serado( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,49 @@
using System;
using Server;
namespace Server.Mobiles
{
public class ServantOfSemidar : BaseCreature
{
[Constructable]
public ServantOfSemidar() : base( AIType.AI_Melee, FightMode.None, 10, 1, 0.2, 0.4 )
{
Name = "a servant of Semidar";
Body = 0x26;
}
public override bool DisallowAllMoves{ get{ return true; } }
public override bool InitialInnocent{ get{ return true; } }
public override bool CanBeDamaged()
{
return false;
}
public override void AddNameProperties( ObjectPropertyList list )
{
base.AddNameProperties( list );
list.Add( 1005494 ); // enslaved
}
public ServantOfSemidar( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.WriteEncodedInt( 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -0,0 +1,138 @@
using System;
using Server;
using Server.Items;
namespace Server.Mobiles
{
public class Silvani : BaseCreature
{
[Constructable]
public Silvani() : base( AIType.AI_Mage, FightMode.Evil, 18, 1, 0.1, 0.2 )
{
Name = "Silvani";
Body = 176;
BaseSoundID = 0x467;
SetStr( 253, 400 );
SetDex( 157, 850 );
SetInt( 503, 800 );
SetHits( 600 );
SetDamage( 27, 38 );
SetDamageType( ResistanceType.Physical, 75 );
SetDamageType( ResistanceType.Cold, 25 );
SetResistance( ResistanceType.Physical, 45, 55 );
SetResistance( ResistanceType.Fire, 30, 40 );
SetResistance( ResistanceType.Cold, 30, 40 );
SetResistance( ResistanceType.Poison, 40, 50 );
SetResistance( ResistanceType.Energy, 40, 50 );
SetSkill( SkillName.EvalInt, 100.0 );
SetSkill( SkillName.Magery, 97.6, 107.5 );
SetSkill( SkillName.Meditation, 100.0 );
SetSkill( SkillName.MagicResist, 100.5, 150.0 );
SetSkill( SkillName.Tactics, 97.6, 100.0 );
SetSkill( SkillName.Wrestling, 97.6, 100.0 );
Fame = 20000;
Karma = 20000;
VirtualArmor = 50;
}
public override void GenerateLoot()
{
AddLoot( LootPack.UltraRich, 2 );
}
public override OppositionGroup OppositionGroup
{
get{ return OppositionGroup.FeyAndUndead; }
}
public override bool CanFly { get { return true; } }
public override bool Unprovokable{ get{ return true; } }
public override Poison PoisonImmune{ get{ return Poison.Regular; } }
public override int TreasureMapLevel{ get{ return 5; } }
public void SpawnPixies( Mobile target )
{
Map map = this.Map;
if ( map == null )
return;
int newPixies = Utility.RandomMinMax( 3, 6 );
for ( int i = 0; i < newPixies; ++i )
{
Pixie pixie = new Pixie();
pixie.Team = this.Team;
pixie.FightMode = FightMode.Closest;
bool validLocation = false;
Point3D loc = this.Location;
for ( int j = 0; !validLocation && j < 10; ++j )
{
int x = X + Utility.Random( 3 ) - 1;
int y = Y + Utility.Random( 3 ) - 1;
int z = map.GetAverageZ( x, y );
if ( validLocation = map.CanFit( x, y, this.Z, 16, false, false ) )
loc = new Point3D( x, y, Z );
else if ( validLocation = map.CanFit( x, y, z, 16, false, false ) )
loc = new Point3D( x, y, z );
}
pixie.MoveToWorld( loc, map );
pixie.Combatant = target;
}
}
public override void AlterDamageScalarFrom( Mobile caster, ref double scalar )
{
if ( 0.1 >= Utility.RandomDouble() )
SpawnPixies( caster );
}
public override void OnGaveMeleeAttack( Mobile defender )
{
base.OnGaveMeleeAttack( defender );
defender.Damage( Utility.Random( 20, 10 ), this );
defender.Stam -= Utility.Random( 20, 10 );
defender.Mana -= Utility.Random( 20, 10 );
}
public override void OnGotMeleeAttack( Mobile attacker )
{
base.OnGotMeleeAttack( attacker );
if ( 0.1 >= Utility.RandomDouble() )
SpawnPixies( attacker );
}
public Silvani( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,69 @@
using System;
using Server;
namespace Server.Mobiles
{
public class Wanderer : Mobile
{
private Timer m_Timer;
[Constructable]
public Wanderer()
{
this.Name = "Me";
this.Body = 0x1;
this.AccessLevel = AccessLevel.Counselor;
m_Timer = new InternalTimer( this );
m_Timer.Start();
}
public Wanderer( Serial serial ) : base( serial )
{
m_Timer = new InternalTimer( this );
m_Timer.Start();
}
public override void OnDelete()
{
m_Timer.Stop();
base.OnDelete();
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
private class InternalTimer : Timer
{
private Wanderer m_Owner;
private int m_Count = 0;
public InternalTimer( Wanderer owner ) : base( TimeSpan.FromSeconds( 0.1 ), TimeSpan.FromSeconds( 0.1 ) )
{
m_Owner = owner;
}
protected override void OnTick()
{
if ( (m_Count++ & 0x3) == 0 )
{
m_Owner.Direction = (Direction)(Utility.Random( 8 ) | 0x80);
}
m_Owner.Move( m_Owner.Direction );
}
}
}
}