#W# Source and Scripts added. Added Scripts/Settings.cs to expose some basic tweak able settings.
This commit is contained in:
parent
b51c58f514
commit
3045c83799
3512 changed files with 627673 additions and 0 deletions
58
Scripts/Engines/CannedEvil/ChampionAltar.cs
Normal file
58
Scripts/Engines/CannedEvil/ChampionAltar.cs
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Engines.CannedEvil
|
||||
{
|
||||
public class ChampionAltar : PentagramAddon
|
||||
{
|
||||
private ChampionSpawn m_Spawn;
|
||||
|
||||
public ChampionAltar( ChampionSpawn spawn )
|
||||
{
|
||||
m_Spawn = spawn;
|
||||
}
|
||||
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
base.OnAfterDelete();
|
||||
|
||||
if ( m_Spawn != null )
|
||||
m_Spawn.Delete();
|
||||
}
|
||||
|
||||
public ChampionAltar( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
|
||||
writer.Write( m_Spawn );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
m_Spawn = reader.ReadItem() as ChampionSpawn;
|
||||
|
||||
if ( m_Spawn == null )
|
||||
Delete();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
89
Scripts/Engines/CannedEvil/ChampionPlatform.cs
Normal file
89
Scripts/Engines/CannedEvil/ChampionPlatform.cs
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Engines.CannedEvil
|
||||
{
|
||||
public class ChampionPlatform : BaseAddon
|
||||
{
|
||||
private ChampionSpawn m_Spawn;
|
||||
|
||||
public ChampionPlatform( ChampionSpawn spawn )
|
||||
{
|
||||
m_Spawn = spawn;
|
||||
|
||||
for ( int x = -2; x <= 2; ++x )
|
||||
for ( int y = -2; y <= 2; ++y )
|
||||
AddComponent( 0x750, x, y, -5 );
|
||||
|
||||
for ( int x = -1; x <= 1; ++x )
|
||||
for ( int y = -1; y <= 1; ++y )
|
||||
AddComponent( 0x750, x, y, 0 );
|
||||
|
||||
for ( int i = -1; i <= 1; ++i )
|
||||
{
|
||||
AddComponent( 0x751, i, 2, 0 );
|
||||
AddComponent( 0x752, 2, i, 0 );
|
||||
|
||||
AddComponent( 0x753, i, -2, 0 );
|
||||
AddComponent( 0x754, -2, i, 0 );
|
||||
}
|
||||
|
||||
AddComponent( 0x759, -2, -2, 0 );
|
||||
AddComponent( 0x75A, 2, 2, 0 );
|
||||
AddComponent( 0x75B, -2, 2, 0 );
|
||||
AddComponent( 0x75C, 2, -2, 0 );
|
||||
}
|
||||
|
||||
public void AddComponent( int id, int x, int y, int z )
|
||||
{
|
||||
AddonComponent ac = new AddonComponent( id );
|
||||
|
||||
ac.Hue = 0x497;
|
||||
|
||||
AddComponent( ac, x, y, z );
|
||||
}
|
||||
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
base.OnAfterDelete();
|
||||
|
||||
if ( m_Spawn != null )
|
||||
m_Spawn.Delete();
|
||||
}
|
||||
|
||||
public ChampionPlatform( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
|
||||
writer.Write( m_Spawn );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
m_Spawn = reader.ReadItem() as ChampionSpawn;
|
||||
|
||||
if ( m_Spawn == null )
|
||||
Delete();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
73
Scripts/Engines/CannedEvil/ChampionSkull.cs
Normal file
73
Scripts/Engines/CannedEvil/ChampionSkull.cs
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.CannedEvil;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class ChampionSkull : Item
|
||||
{
|
||||
private ChampionSkullType m_Type;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public ChampionSkullType Type{ get{ return m_Type; } set{ m_Type = value; InvalidateProperties(); } }
|
||||
|
||||
public override int LabelNumber{ get{ return 1049479 + (int)m_Type; } }
|
||||
|
||||
[Constructable]
|
||||
public ChampionSkull( ChampionSkullType type ) : base( 0x1AE1 )
|
||||
{
|
||||
m_Type = type;
|
||||
LootType = LootType.Cursed;
|
||||
|
||||
// TODO: All hue values
|
||||
switch ( type )
|
||||
{
|
||||
case ChampionSkullType.Power: Hue = 0x159; break;
|
||||
case ChampionSkullType.Venom: Hue = 0x172; break;
|
||||
case ChampionSkullType.Greed: Hue = 0x1EE; break;
|
||||
case ChampionSkullType.Death: Hue = 0x025; break;
|
||||
case ChampionSkullType.Pain: Hue = 0x035; break;
|
||||
}
|
||||
}
|
||||
|
||||
public ChampionSkull( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
|
||||
writer.Write( (int) m_Type );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
case 0:
|
||||
{
|
||||
m_Type = (ChampionSkullType)reader.ReadInt();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if( version == 0 )
|
||||
{
|
||||
if ( LootType != LootType.Cursed )
|
||||
LootType = LootType.Cursed;
|
||||
|
||||
if ( Insured )
|
||||
Insured = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
173
Scripts/Engines/CannedEvil/ChampionSkullBrazier.cs
Normal file
173
Scripts/Engines/CannedEvil/ChampionSkullBrazier.cs
Normal file
|
|
@ -0,0 +1,173 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Targeting;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.CannedEvil
|
||||
{
|
||||
public class ChampionSkullBrazier : AddonComponent
|
||||
{
|
||||
private ChampionSkullPlatform m_Platform;
|
||||
private ChampionSkullType m_Type;
|
||||
private Item m_Skull;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public ChampionSkullPlatform Platform{ get{ return m_Platform; } }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public ChampionSkullType Type{ get{ return m_Type; } set{ m_Type = value; InvalidateProperties(); } }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public Item Skull{ get{ return m_Skull; } set{ m_Skull = value; if ( m_Platform != null ) m_Platform.Validate(); } }
|
||||
|
||||
public override int LabelNumber{ get{ return 1049489 + (int)m_Type; } }
|
||||
|
||||
public ChampionSkullBrazier( ChampionSkullPlatform platform, ChampionSkullType type ) : base( 0x19BB )
|
||||
{
|
||||
Hue = 0x455;
|
||||
Light = LightType.Circle300;
|
||||
|
||||
m_Platform = platform;
|
||||
m_Type = type;
|
||||
}
|
||||
|
||||
public ChampionSkullBrazier( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( m_Platform != null )
|
||||
m_Platform.Validate();
|
||||
|
||||
BeginSacrifice( from );
|
||||
}
|
||||
|
||||
public void BeginSacrifice( Mobile from )
|
||||
{
|
||||
if ( Deleted )
|
||||
return;
|
||||
|
||||
if ( m_Skull != null && m_Skull.Deleted )
|
||||
Skull = null;
|
||||
|
||||
if ( from.Map != this.Map || !from.InRange( GetWorldLocation(), 3 ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 500446 ); // That is too far away.
|
||||
}
|
||||
else if ( !Harrower.CanSpawn )
|
||||
{
|
||||
from.SendMessage( "The harrower has already been spawned." );
|
||||
}
|
||||
else if ( m_Skull == null )
|
||||
{
|
||||
from.SendLocalizedMessage( 1049485 ); // What would you like to sacrifice?
|
||||
from.Target = new SacrificeTarget( this );
|
||||
}
|
||||
else
|
||||
{
|
||||
SendLocalizedMessageTo( from, 1049487, "" ); // I already have my champions awakening skull!
|
||||
}
|
||||
}
|
||||
|
||||
public void EndSacrifice( Mobile from, ChampionSkull skull )
|
||||
{
|
||||
if ( Deleted )
|
||||
return;
|
||||
|
||||
if ( m_Skull != null && m_Skull.Deleted )
|
||||
Skull = null;
|
||||
|
||||
if ( from.Map != this.Map || !from.InRange( GetWorldLocation(), 3 ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 500446 ); // That is too far away.
|
||||
}
|
||||
else if ( !Harrower.CanSpawn )
|
||||
{
|
||||
from.SendMessage( "The harrower has already been spawned." );
|
||||
}
|
||||
else if ( skull == null )
|
||||
{
|
||||
SendLocalizedMessageTo( from, 1049488, "" ); // That is not my champions awakening skull!
|
||||
}
|
||||
else if ( m_Skull != null )
|
||||
{
|
||||
SendLocalizedMessageTo( from, 1049487, "" ); // I already have my champions awakening skull!
|
||||
}
|
||||
else if ( !skull.IsChildOf( from.Backpack ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 1049486 ); // You can only sacrifice items that are in your backpack!
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( skull.Type == this.Type )
|
||||
{
|
||||
skull.Movable = false;
|
||||
skull.MoveToWorld( GetWorldTop(), this.Map );
|
||||
|
||||
this.Skull = skull;
|
||||
}
|
||||
else
|
||||
{
|
||||
SendLocalizedMessageTo( from, 1049488, "" ); // That is not my champions awakening skull!
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class SacrificeTarget : Target
|
||||
{
|
||||
private ChampionSkullBrazier m_Brazier;
|
||||
|
||||
public SacrificeTarget( ChampionSkullBrazier brazier ) : base( 12, false, TargetFlags.None )
|
||||
{
|
||||
m_Brazier = brazier;
|
||||
}
|
||||
|
||||
protected override void OnTarget( Mobile from, object targeted )
|
||||
{
|
||||
m_Brazier.EndSacrifice( from, targeted as ChampionSkull );
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
|
||||
writer.Write( (int) m_Type );
|
||||
writer.Write( m_Platform );
|
||||
writer.Write( m_Skull );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
m_Type = (ChampionSkullType)reader.ReadInt();
|
||||
m_Platform = reader.ReadItem() as ChampionSkullPlatform;
|
||||
m_Skull = reader.ReadItem();
|
||||
|
||||
if ( m_Platform == null )
|
||||
Delete();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( Hue == 0x497 )
|
||||
Hue = 0x455;
|
||||
|
||||
if ( Light != LightType.Circle300 )
|
||||
Light = LightType.Circle300;
|
||||
}
|
||||
}
|
||||
}
|
||||
131
Scripts/Engines/CannedEvil/ChampionSkullPlatform.cs
Normal file
131
Scripts/Engines/CannedEvil/ChampionSkullPlatform.cs
Normal file
|
|
@ -0,0 +1,131 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.CannedEvil
|
||||
{
|
||||
public class ChampionSkullPlatform : BaseAddon
|
||||
{
|
||||
private ChampionSkullBrazier m_Power, m_Enlightenment, m_Venom, m_Pain, m_Greed, m_Death;
|
||||
|
||||
[Constructable]
|
||||
public ChampionSkullPlatform()
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x71A ), -1, -1, -1 );
|
||||
AddComponent( new AddonComponent( 0x709 ), 0, -1, -1 );
|
||||
AddComponent( new AddonComponent( 0x709 ), 1, -1, -1 );
|
||||
AddComponent( new AddonComponent( 0x709 ), -1, 0, -1 );
|
||||
AddComponent( new AddonComponent( 0x709 ), 0, 0, -1 );
|
||||
AddComponent( new AddonComponent( 0x709 ), 1, 0, -1 );
|
||||
AddComponent( new AddonComponent( 0x709 ), -1, 1, -1 );
|
||||
AddComponent( new AddonComponent( 0x709 ), 0, 1, -1 );
|
||||
AddComponent( new AddonComponent( 0x71B ), 1, 1, -1 );
|
||||
|
||||
AddComponent( new AddonComponent( 0x50F ), 0, -1, 4 );
|
||||
AddComponent( m_Power = new ChampionSkullBrazier( this, ChampionSkullType.Power ), 0, -1, 5 );
|
||||
|
||||
AddComponent( new AddonComponent( 0x50F ), 1, -1, 4 );
|
||||
AddComponent( m_Enlightenment = new ChampionSkullBrazier( this, ChampionSkullType.Enlightenment ), 1, -1, 5 );
|
||||
|
||||
AddComponent( new AddonComponent( 0x50F ), -1, 0, 4 );
|
||||
AddComponent( m_Venom = new ChampionSkullBrazier( this, ChampionSkullType.Venom ), -1, 0, 5 );
|
||||
|
||||
AddComponent( new AddonComponent( 0x50F ), 1, 0, 4 );
|
||||
AddComponent( m_Pain = new ChampionSkullBrazier( this, ChampionSkullType.Pain ), 1, 0, 5 );
|
||||
|
||||
AddComponent( new AddonComponent( 0x50F ), -1, 1, 4 );
|
||||
AddComponent( m_Greed = new ChampionSkullBrazier( this, ChampionSkullType.Greed ), -1, 1, 5 );
|
||||
|
||||
AddComponent( new AddonComponent( 0x50F ), 0, 1, 4 );
|
||||
AddComponent( m_Death = new ChampionSkullBrazier( this, ChampionSkullType.Death ), 0, 1, 5 );
|
||||
|
||||
AddonComponent comp = new LocalizedAddonComponent( 0x20D2, 1049495 );
|
||||
comp.Hue = 0x482;
|
||||
AddComponent( comp, 0, 0, 5 );
|
||||
|
||||
comp = new LocalizedAddonComponent( 0x0BCF, 1049496 );
|
||||
comp.Hue = 0x482;
|
||||
AddComponent( comp, 0, 2, -7 );
|
||||
|
||||
comp = new LocalizedAddonComponent( 0x0BD0, 1049497 );
|
||||
comp.Hue = 0x482;
|
||||
AddComponent( comp, 2, 0, -7 );
|
||||
}
|
||||
|
||||
public void Validate()
|
||||
{
|
||||
if ( Validate( m_Power ) && Validate( m_Enlightenment ) && Validate( m_Venom ) && Validate( m_Pain ) && Validate( m_Greed ) && Validate( m_Death ) )
|
||||
{
|
||||
Mobile harrower = Harrower.Spawn( new Point3D( X, Y, Z + 6 ), this.Map );
|
||||
|
||||
if ( harrower == null )
|
||||
return;
|
||||
|
||||
Clear( m_Power );
|
||||
Clear( m_Enlightenment );
|
||||
Clear( m_Venom );
|
||||
Clear( m_Pain );
|
||||
Clear( m_Greed );
|
||||
Clear( m_Death );
|
||||
}
|
||||
}
|
||||
|
||||
public void Clear( ChampionSkullBrazier brazier )
|
||||
{
|
||||
if ( brazier != null )
|
||||
{
|
||||
Effects.SendBoltEffect( brazier );
|
||||
|
||||
if ( brazier.Skull != null )
|
||||
brazier.Skull.Delete();
|
||||
}
|
||||
}
|
||||
|
||||
public bool Validate( ChampionSkullBrazier brazier )
|
||||
{
|
||||
return ( brazier != null && brazier.Skull != null && !brazier.Skull.Deleted );
|
||||
}
|
||||
|
||||
public ChampionSkullPlatform( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
|
||||
writer.Write( m_Power );
|
||||
writer.Write( m_Enlightenment );
|
||||
writer.Write( m_Venom );
|
||||
writer.Write( m_Pain );
|
||||
writer.Write( m_Greed );
|
||||
writer.Write( m_Death );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
m_Power = reader.ReadItem() as ChampionSkullBrazier;
|
||||
m_Enlightenment = reader.ReadItem() as ChampionSkullBrazier;
|
||||
m_Venom = reader.ReadItem() as ChampionSkullBrazier;
|
||||
m_Pain = reader.ReadItem() as ChampionSkullBrazier;
|
||||
m_Greed = reader.ReadItem() as ChampionSkullBrazier;
|
||||
m_Death = reader.ReadItem() as ChampionSkullBrazier;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
15
Scripts/Engines/CannedEvil/ChampionSkullType.cs
Normal file
15
Scripts/Engines/CannedEvil/ChampionSkullType.cs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Engines.CannedEvil
|
||||
{
|
||||
public enum ChampionSkullType
|
||||
{
|
||||
Power,
|
||||
Enlightenment,
|
||||
Venom,
|
||||
Pain,
|
||||
Greed,
|
||||
Death
|
||||
}
|
||||
}
|
||||
1346
Scripts/Engines/CannedEvil/ChampionSpawn.cs
Normal file
1346
Scripts/Engines/CannedEvil/ChampionSpawn.cs
Normal file
File diff suppressed because it is too large
Load diff
122
Scripts/Engines/CannedEvil/ChampionSpawnType.cs
Normal file
122
Scripts/Engines/CannedEvil/ChampionSpawnType.cs
Normal file
|
|
@ -0,0 +1,122 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.CannedEvil
|
||||
{
|
||||
public enum ChampionSpawnType
|
||||
{
|
||||
Abyss,
|
||||
Arachnid,
|
||||
ColdBlood,
|
||||
ForestLord,
|
||||
VerminHorde,
|
||||
UnholyTerror,
|
||||
SleepingDragon,
|
||||
Glade,
|
||||
Pestilence
|
||||
}
|
||||
|
||||
public class ChampionSpawnInfo
|
||||
{
|
||||
private string m_Name;
|
||||
private Type m_Champion;
|
||||
private Type[][] m_SpawnTypes;
|
||||
private string[] m_LevelNames;
|
||||
|
||||
public string Name { get { return m_Name; } }
|
||||
public Type Champion { get { return m_Champion; } }
|
||||
public Type[][] SpawnTypes { get { return m_SpawnTypes; } }
|
||||
public string[] LevelNames { get { return m_LevelNames; } }
|
||||
|
||||
public ChampionSpawnInfo( string name, Type champion, string[] levelNames, Type[][] spawnTypes )
|
||||
{
|
||||
m_Name = name;
|
||||
m_Champion = champion;
|
||||
m_LevelNames = levelNames;
|
||||
m_SpawnTypes = spawnTypes;
|
||||
}
|
||||
|
||||
public static ChampionSpawnInfo[] Table{ get { return m_Table; } }
|
||||
|
||||
private static readonly ChampionSpawnInfo[] m_Table = new ChampionSpawnInfo[]
|
||||
{
|
||||
new ChampionSpawnInfo( "Abyss", typeof( Semidar ), new string[]{ "Foe", "Assassin", "Conqueror" }, new Type[][] // Abyss
|
||||
{ // Abyss
|
||||
new Type[]{ typeof( GreaterMongbat ), typeof( Imp ) }, // Level 1
|
||||
new Type[]{ typeof( Gargoyle ), typeof( Harpy ) }, // Level 2
|
||||
new Type[]{ typeof( FireGargoyle ), typeof( StoneGargoyle ) }, // Level 3
|
||||
new Type[]{ typeof( Daemon ), typeof( Succubus ) } // Level 4
|
||||
} ),
|
||||
new ChampionSpawnInfo( "Arachnid", typeof( Mephitis ), new string[]{ "Bane", "Killer", "Vanquisher" }, new Type[][] // Arachnid
|
||||
{ // Arachnid
|
||||
new Type[]{ typeof( Scorpion ), typeof( GiantSpider ) }, // Level 1
|
||||
new Type[]{ typeof( TerathanDrone ), typeof( TerathanWarrior ) }, // Level 2
|
||||
new Type[]{ typeof( DreadSpider ), typeof( TerathanMatriarch ) }, // Level 3
|
||||
new Type[]{ typeof( PoisonElemental ), typeof( TerathanAvenger ) } // Level 4
|
||||
} ),
|
||||
new ChampionSpawnInfo( "Cold Blood", typeof( Rikktor ), new string[]{ "Blight", "Slayer", "Destroyer" }, new Type[][] // Cold Blood
|
||||
{ // Cold Blood
|
||||
new Type[]{ typeof( Lizardman ), typeof( Snake ) }, // Level 1
|
||||
new Type[]{ typeof( LavaLizard ), typeof( OphidianWarrior ) }, // Level 2
|
||||
new Type[]{ typeof( Drake ), typeof( OphidianArchmage ) }, // Level 3
|
||||
new Type[]{ typeof( Dragon ), typeof( OphidianKnight ) } // Level 4
|
||||
} ),
|
||||
new ChampionSpawnInfo( "Forest Lord", typeof( LordOaks ), new string[]{ "Enemy", "Curse", "Slaughterer" }, new Type[][] // Forest Lord
|
||||
{ // Forest Lord
|
||||
new Type[]{ typeof( Pixie ), typeof( ShadowWisp ) }, // Level 1
|
||||
new Type[]{ typeof( Kirin ), typeof( Wisp ) }, // Level 2
|
||||
new Type[]{ typeof( Centaur ), typeof( Unicorn ) }, // Level 3
|
||||
new Type[]{ typeof( EtherealWarrior ), typeof( SerpentineDragon ) } // Level 4
|
||||
} ),
|
||||
new ChampionSpawnInfo( "Vermin Horde", typeof( Barracoon ), new string[]{ "Adversary", "Subjugator", "Eradicator" }, new Type[][] // Vermin Horde
|
||||
{ // Vermin Horde
|
||||
new Type[]{ typeof( GiantRat ), typeof( Slime ) }, // Level 1
|
||||
new Type[]{ typeof( DireWolf ), typeof( Ratman ) }, // Level 2
|
||||
new Type[]{ typeof( HellHound ), typeof( RatmanMage ) }, // Level 3
|
||||
new Type[]{ typeof( RatmanArcher ), typeof( SilverSerpent ) } // Level 4
|
||||
} ),
|
||||
new ChampionSpawnInfo( "Unholy Terror", typeof( Neira ), new string[]{ "Scourge", "Punisher", "Nemesis" }, new Type[][] // Unholy Terror
|
||||
{ // Unholy Terror
|
||||
(Core.AOS ?
|
||||
new Type[]{ typeof( Bogle ), typeof( Ghoul ), typeof( Shade ), typeof( Spectre ), typeof( Wraith ) } // Level 1 (Pre-AoS)
|
||||
: new Type[]{ typeof( Ghoul ), typeof( Shade ), typeof( Spectre ), typeof( Wraith ) } ), // Level 1
|
||||
|
||||
new Type[]{ typeof( BoneMagi ), typeof( Mummy ), typeof( SkeletalMage ) }, // Level 2
|
||||
new Type[]{ typeof( BoneKnight ), typeof( Lich ), typeof( SkeletalKnight ) }, // Level 3
|
||||
new Type[]{ typeof( LichLord ), typeof( RottingCorpse ) } // Level 4
|
||||
} ),
|
||||
new ChampionSpawnInfo( "Sleeping Dragon", typeof( Serado ), new string[]{ "Rival", "Challenger", "Antagonist" } , new Type[][]
|
||||
{ // Unholy Terror
|
||||
new Type[]{ typeof( DeathwatchBeetleHatchling ), typeof( Lizardman ) },
|
||||
new Type[]{ typeof( DeathwatchBeetle ), typeof( Kappa ) },
|
||||
new Type[]{ typeof( LesserHiryu ), typeof( RevenantLion ) },
|
||||
new Type[]{ typeof( Hiryu ), typeof( Oni ) }
|
||||
} ),
|
||||
new ChampionSpawnInfo( "Glade", typeof( Twaulo ), new string[]{ "Banisher", "Enforcer", "Eradicator" } , new Type[][]
|
||||
{ // Glade
|
||||
new Type[]{ typeof( Pixie ), typeof( ShadowWisp ) },
|
||||
new Type[]{ typeof( Centaur ), typeof( MLDryad ) },
|
||||
new Type[]{ typeof( Satyr ), typeof( CuSidhe ) },
|
||||
new Type[]{ typeof( FerelTreefellow ), typeof( RagingGrizzlyBear ) }
|
||||
} ),
|
||||
new ChampionSpawnInfo( "The Corrupt", typeof( Ilhenir ), new string[]{ "Cleanser", "Expunger", "Depurator" } , new Type[][]
|
||||
{ // Unholy Terror
|
||||
new Type[]{ typeof( PlagueSpawn ), typeof( Bogling ) },
|
||||
new Type[]{ typeof( PlagueBeast ), typeof( BogThing ) },
|
||||
new Type[]{ typeof( PlagueBeastLord ), typeof( InterredGrizzle ) },
|
||||
new Type[]{ typeof( FetidEssence ), typeof( PestilentBandage ) }
|
||||
} )
|
||||
};
|
||||
|
||||
public static ChampionSpawnInfo GetInfo( ChampionSpawnType type )
|
||||
{
|
||||
int v = (int)type;
|
||||
|
||||
if( v < 0 || v >= m_Table.Length )
|
||||
v = 0;
|
||||
|
||||
return m_Table[v];
|
||||
}
|
||||
}
|
||||
}
|
||||
59
Scripts/Engines/CannedEvil/HarrowerGate.cs
Normal file
59
Scripts/Engines/CannedEvil/HarrowerGate.cs
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class HarrowerGate : Moongate
|
||||
{
|
||||
private Mobile m_Harrower;
|
||||
|
||||
public override int LabelNumber{ get{ return 1049498; } } // dark moongate
|
||||
|
||||
public HarrowerGate( Mobile harrower, Point3D loc, Map map, Point3D targLoc, Map targMap ) : base( targLoc, targMap )
|
||||
{
|
||||
m_Harrower = harrower;
|
||||
|
||||
Dispellable = false;
|
||||
ItemID = 0x1FD4;
|
||||
Light = LightType.Circle300;
|
||||
|
||||
MoveToWorld( loc, map );
|
||||
}
|
||||
|
||||
public HarrowerGate( 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();
|
||||
|
||||
if ( m_Harrower == null )
|
||||
Delete();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( Light != LightType.Circle300 )
|
||||
Light = LightType.Circle300;
|
||||
}
|
||||
}
|
||||
}
|
||||
23
Scripts/Engines/CannedEvil/RestartTimer.cs
Normal file
23
Scripts/Engines/CannedEvil/RestartTimer.cs
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Engines.CannedEvil
|
||||
{
|
||||
public class RestartTimer : Timer
|
||||
{
|
||||
private ChampionSpawn m_Spawn;
|
||||
|
||||
public RestartTimer( ChampionSpawn spawn, TimeSpan delay ) : base( delay )
|
||||
{
|
||||
m_Spawn = spawn;
|
||||
Priority = TimerPriority.FiveSeconds;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
m_Spawn.EndRestart();
|
||||
}
|
||||
}
|
||||
}
|
||||
23
Scripts/Engines/CannedEvil/SliceTimer.cs
Normal file
23
Scripts/Engines/CannedEvil/SliceTimer.cs
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Engines.CannedEvil
|
||||
{
|
||||
public class SliceTimer : Timer
|
||||
{
|
||||
private ChampionSpawn m_Spawn;
|
||||
|
||||
public SliceTimer( ChampionSpawn spawn ) : base( TimeSpan.FromSeconds( 1.0 ), TimeSpan.FromSeconds( 1.0 ) )
|
||||
{
|
||||
m_Spawn = spawn;
|
||||
Priority = TimerPriority.OneSecond;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
m_Spawn.OnSlice();
|
||||
}
|
||||
}
|
||||
}
|
||||
106
Scripts/Engines/CannedEvil/StarRoomGate.cs
Normal file
106
Scripts/Engines/CannedEvil/StarRoomGate.cs
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class StarRoomGate : Moongate
|
||||
{
|
||||
private bool m_Decays;
|
||||
private DateTime m_DecayTime;
|
||||
private Timer m_Timer;
|
||||
|
||||
public override int LabelNumber{ get{ return 1049498; } } // dark moongate
|
||||
|
||||
[Constructable]
|
||||
public StarRoomGate() : this( false )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public StarRoomGate( bool decays, Point3D loc, Map map ) : this( decays )
|
||||
{
|
||||
MoveToWorld( loc, map );
|
||||
Effects.PlaySound( loc, map, 0x20E );
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public StarRoomGate( bool decays ) : base( new Point3D( 5143, 1774, 0 ), Map.Felucca )
|
||||
{
|
||||
Dispellable = false;
|
||||
ItemID = 0x1FD4;
|
||||
|
||||
if ( decays )
|
||||
{
|
||||
m_Decays = true;
|
||||
m_DecayTime = DateTime.UtcNow + TimeSpan.FromMinutes( 2.0 );
|
||||
|
||||
m_Timer = new InternalTimer( this, m_DecayTime );
|
||||
m_Timer.Start();
|
||||
}
|
||||
}
|
||||
|
||||
public StarRoomGate( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
if ( m_Timer != null )
|
||||
m_Timer.Stop();
|
||||
|
||||
base.OnAfterDelete();
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
|
||||
writer.Write( m_Decays );
|
||||
|
||||
if ( m_Decays )
|
||||
writer.WriteDeltaTime( m_DecayTime );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
m_Decays = reader.ReadBool();
|
||||
|
||||
if ( m_Decays )
|
||||
{
|
||||
m_DecayTime = reader.ReadDeltaTime();
|
||||
|
||||
m_Timer = new InternalTimer( this, m_DecayTime );
|
||||
m_Timer.Start();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class InternalTimer : Timer
|
||||
{
|
||||
private Item m_Item;
|
||||
|
||||
public InternalTimer( Item item, DateTime end ) : base( end - DateTime.UtcNow )
|
||||
{
|
||||
m_Item = item;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
m_Item.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue