#W# Initial Commit: Avatars Conquest
This commit is contained in:
commit
5df497787a
7510 changed files with 416048 additions and 0 deletions
244
Scripts/Items/Wands/BaseWand.cs
Normal file
244
Scripts/Items/Wands/BaseWand.cs
Normal file
|
|
@ -0,0 +1,244 @@
|
|||
using System;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using Server.Network;
|
||||
using Server.Targeting;
|
||||
using Server.Spells;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public enum WandEffect
|
||||
{
|
||||
Clumsiness,
|
||||
Healing,
|
||||
Feeblemindedness,
|
||||
Weakness,
|
||||
MagicArrow,
|
||||
Harming,
|
||||
Fireball,
|
||||
GreaterHealing,
|
||||
Lightning,
|
||||
ManaDraining,
|
||||
Recall,
|
||||
Mark,
|
||||
RemoveTrap,
|
||||
Unlock,
|
||||
Resurrection
|
||||
}
|
||||
|
||||
public abstract class BaseWand : BaseBashing
|
||||
{
|
||||
public override int UOStrengthReq { get { return 0; } }
|
||||
public override int UOMinDamage { get { return 2; } }
|
||||
public override int UOMaxDamage { get { return 6; } }
|
||||
public override int UOSpeed { get { return 35; } }
|
||||
|
||||
public override int InitMinHits { get { return 31; } }
|
||||
public override int InitMaxHits { get { return 110; } }
|
||||
|
||||
private WandEffect m_WandEffect;
|
||||
|
||||
public virtual TimeSpan GetUseDelay{ get{ return TimeSpan.FromSeconds( 4.0 ); } }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public WandEffect Effect
|
||||
{
|
||||
get{ return m_WandEffect; }
|
||||
set{ m_WandEffect = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
public BaseWand( WandEffect effect, int minCharges, int maxCharges ) : base( Utility.RandomList( 0xDF2, 0xDF3, 0xDF4, 0xDF5 ) )
|
||||
{
|
||||
Weight = 1.0;
|
||||
Effect = effect;
|
||||
m_Uses = Utility.RandomMinMax( minCharges, maxCharges );
|
||||
m_UsesMax = m_Uses;
|
||||
}
|
||||
|
||||
public void ConsumeCharge( Mobile from )
|
||||
{
|
||||
ConsumeUses();
|
||||
|
||||
if ( m_Uses == 0 )
|
||||
{
|
||||
from.SendLocalizedMessage( 1019073 ); // This item is out of charges.
|
||||
Name = "useless wand";
|
||||
}
|
||||
|
||||
ApplyDelayTo( from );
|
||||
}
|
||||
|
||||
public BaseWand( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void ApplyDelayTo( Mobile from )
|
||||
{
|
||||
from.BeginAction( typeof( BaseWand ) );
|
||||
Timer.DelayCall( GetUseDelay, new TimerStateCallback( ReleaseWandLock_Callback ), from );
|
||||
}
|
||||
|
||||
public virtual void ReleaseWandLock_Callback( object state )
|
||||
{
|
||||
((Mobile)state).EndAction( typeof( BaseWand ) );
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( !from.CanBeginAction( typeof( BaseWand ) ) )
|
||||
return;
|
||||
|
||||
if ( Parent == from )
|
||||
{
|
||||
if ( m_Uses > 0 )
|
||||
OnWandUse( from );
|
||||
else
|
||||
from.SendLocalizedMessage( 1019073 ); // This item is out of charges.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 502641 ); // You must equip this item to use it.
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 ); // version
|
||||
writer.Write( (int) m_WandEffect );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
m_WandEffect = (WandEffect)reader.ReadInt();
|
||||
}
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
if ( m_Uses > 0 && Server.Misc.Settings.DisplayInfo() )
|
||||
{
|
||||
switch ( m_WandEffect )
|
||||
{
|
||||
case WandEffect.Clumsiness: list.Add( 1017326, m_Uses.ToString() ); break; // clumsiness charges: ~1_val~
|
||||
case WandEffect.Healing: list.Add( 1017329, m_Uses.ToString() ); break; // healing charges: ~1_val~
|
||||
case WandEffect.Feeblemindedness: list.Add( 1017327, m_Uses.ToString() ); break; // feeblemind charges: ~1_val~
|
||||
case WandEffect.Weakness: list.Add( 1017328, m_Uses.ToString() ); break; // weakness charges: ~1_val~
|
||||
case WandEffect.MagicArrow: list.Add( 1060492, m_Uses.ToString() ); break; // magic arrow charges: ~1_val~
|
||||
case WandEffect.Harming: list.Add( 1017334, m_Uses.ToString() ); break; // harm charges: ~1_val~
|
||||
case WandEffect.Fireball: list.Add( 1060487, m_Uses.ToString() ); break; // fireball charges: ~1_val~
|
||||
case WandEffect.GreaterHealing: list.Add( 1017330, m_Uses.ToString() ); break; // greater healing charges: ~1_val~
|
||||
case WandEffect.Lightning: list.Add( 1060491, m_Uses.ToString() ); break; // lightning charges: ~1_val~
|
||||
case WandEffect.ManaDraining: list.Add( 1017339, m_Uses.ToString() ); break; // mana drain charges: ~1_val~
|
||||
case WandEffect.Recall: list.Add( 1017343, m_Uses.ToString() ); break; // recall charges: ~1_val~
|
||||
case WandEffect.Mark: list.Add( 1017344, m_Uses.ToString() ); break; // mark charges: ~1_val~
|
||||
case WandEffect.RemoveTrap: list.Add( 1017345, m_Uses.ToString() ); break; // remove trap charges: ~1_val~
|
||||
case WandEffect.Unlock: list.Add( 1017346, m_Uses.ToString() ); break; // unlock charges: ~1_val~
|
||||
case WandEffect.Resurrection: list.Add( 1017349, m_Uses.ToString() ); break; // resurrection charges: ~1_val~
|
||||
}
|
||||
}
|
||||
else if ( m_Uses > 0 )
|
||||
{
|
||||
double usage = (double)m_Uses / (double)m_UsesMax;
|
||||
|
||||
if ( usage > 0.95 )
|
||||
list.Add( 1063269 ); // Fully Charged
|
||||
else if ( usage > 0.75 )
|
||||
list.Add( 1063270 ); // Mostly Charged
|
||||
else if ( usage > 0.50 )
|
||||
list.Add( 1063271 ); // Partially Charged
|
||||
else if ( usage > 0.25 )
|
||||
list.Add( 1063272 ); // Somewhat Charged
|
||||
else if ( usage > 0.05 )
|
||||
list.Add( 1063273 ); // Barely Charged
|
||||
else
|
||||
list.Add( 1063274 ); // Almost Drained
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnSingleClick( Mobile from )
|
||||
{
|
||||
ArrayList attrs = new ArrayList();
|
||||
|
||||
if ( DisplayLootType )
|
||||
{
|
||||
if ( LootType == LootType.Blessed )
|
||||
attrs.Add( new EquipInfoAttribute( 1038021 ) ); // blessed
|
||||
}
|
||||
|
||||
int num = 0;
|
||||
|
||||
switch ( m_WandEffect )
|
||||
{
|
||||
case WandEffect.Clumsiness: num = 3002011; break;
|
||||
case WandEffect.Healing: num = 3002014; break;
|
||||
case WandEffect.Feeblemindedness: num = 3002013; break;
|
||||
case WandEffect.Weakness: num = 3002018; break;
|
||||
case WandEffect.MagicArrow: num = 3002015; break;
|
||||
case WandEffect.Harming: num = 3002022; break;
|
||||
case WandEffect.Fireball: num = 3002028; break;
|
||||
case WandEffect.GreaterHealing: num = 3002039; break;
|
||||
case WandEffect.Lightning: num = 3002040; break;
|
||||
case WandEffect.ManaDraining: num = 3002041; break;
|
||||
case WandEffect.Recall: num = 3002042; break;
|
||||
case WandEffect.Mark: num = 3002055; break;
|
||||
case WandEffect.RemoveTrap: num = 3002024; break;
|
||||
case WandEffect.Unlock: num = 3002033; break;
|
||||
case WandEffect.Resurrection: num = 3002069; break;
|
||||
}
|
||||
|
||||
if ( num > 0 )
|
||||
attrs.Add( new EquipInfoAttribute( num, m_Uses ) );
|
||||
|
||||
int number;
|
||||
|
||||
if ( Name == null )
|
||||
{
|
||||
number = 1017085;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.LabelTo( from, Name );
|
||||
number = 1041000;
|
||||
}
|
||||
|
||||
if ( attrs.Count == 0 && Crafter == null && Name != null )
|
||||
return;
|
||||
|
||||
EquipmentInfo eqInfo = new EquipmentInfo( number, Crafter, false, (EquipInfoAttribute[])attrs.ToArray( typeof( EquipInfoAttribute ) ) );
|
||||
|
||||
from.Send( new DisplayEquipmentInfo( this, eqInfo ) );
|
||||
}
|
||||
|
||||
public void Cast( Spell spell )
|
||||
{
|
||||
bool m = Movable;
|
||||
|
||||
Movable = false;
|
||||
spell.Cast();
|
||||
Movable = m;
|
||||
}
|
||||
|
||||
public virtual void OnWandUse( Mobile from )
|
||||
{
|
||||
from.Target = new WandTarget( this );
|
||||
}
|
||||
|
||||
public virtual void DoWandTarget( Mobile from, object o )
|
||||
{
|
||||
if ( Deleted || m_Uses <= 0 || Parent != from || o is StaticTarget || o is LandTarget )
|
||||
return;
|
||||
|
||||
if ( OnWandTarget( from, o ) )
|
||||
ConsumeCharge( from );
|
||||
}
|
||||
|
||||
public virtual bool OnWandTarget( Mobile from, object o )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
38
Scripts/Items/Wands/ClumsyWand.cs
Normal file
38
Scripts/Items/Wands/ClumsyWand.cs
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Spells.First;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class ClumsyWand : BaseWand
|
||||
{
|
||||
[Constructable]
|
||||
public ClumsyWand() : base( WandEffect.Clumsiness, 5, 30 )
|
||||
{
|
||||
}
|
||||
|
||||
public ClumsyWand( 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 override void OnWandUse( Mobile from )
|
||||
{
|
||||
Cast( new ClumsySpell( from, this ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
38
Scripts/Items/Wands/FeebleWand.cs
Normal file
38
Scripts/Items/Wands/FeebleWand.cs
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Spells.First;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class FeebleWand : BaseWand
|
||||
{
|
||||
[Constructable]
|
||||
public FeebleWand() : base( WandEffect.Feeblemindedness, 5, 30 )
|
||||
{
|
||||
}
|
||||
|
||||
public FeebleWand( 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 override void OnWandUse( Mobile from )
|
||||
{
|
||||
Cast( new FeeblemindSpell( from, this ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
38
Scripts/Items/Wands/FireballWand.cs
Normal file
38
Scripts/Items/Wands/FireballWand.cs
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Spells.Third;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class FireballWand : BaseWand
|
||||
{
|
||||
[Constructable]
|
||||
public FireballWand() : base( WandEffect.Fireball, 5, 15 )
|
||||
{
|
||||
}
|
||||
|
||||
public FireballWand( 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 override void OnWandUse( Mobile from )
|
||||
{
|
||||
Cast( new FireballSpell( from, this ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
38
Scripts/Items/Wands/GreaterHealWand.cs
Normal file
38
Scripts/Items/Wands/GreaterHealWand.cs
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Spells.Fourth;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class GreaterHealWand : BaseWand
|
||||
{
|
||||
[Constructable]
|
||||
public GreaterHealWand() : base( WandEffect.GreaterHealing, 1, 5 )
|
||||
{
|
||||
}
|
||||
|
||||
public GreaterHealWand( 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 override void OnWandUse( Mobile from )
|
||||
{
|
||||
Cast( new GreaterHealSpell( from, this ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
38
Scripts/Items/Wands/HarmWand.cs
Normal file
38
Scripts/Items/Wands/HarmWand.cs
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Spells.Second;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class HarmWand : BaseWand
|
||||
{
|
||||
[Constructable]
|
||||
public HarmWand() : base( WandEffect.Harming, 5, 30 )
|
||||
{
|
||||
}
|
||||
|
||||
public HarmWand( 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 override void OnWandUse( Mobile from )
|
||||
{
|
||||
Cast( new HarmSpell( from, this ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
38
Scripts/Items/Wands/HealWand.cs
Normal file
38
Scripts/Items/Wands/HealWand.cs
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Spells.First;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class HealWand : BaseWand
|
||||
{
|
||||
[Constructable]
|
||||
public HealWand() : base( WandEffect.Healing, 10, 25 )
|
||||
{
|
||||
}
|
||||
|
||||
public HealWand( 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 override void OnWandUse( Mobile from )
|
||||
{
|
||||
Cast( new HealSpell( from, this ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
38
Scripts/Items/Wands/LightningWand.cs
Normal file
38
Scripts/Items/Wands/LightningWand.cs
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Spells.Fourth;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class LightningWand : BaseWand
|
||||
{
|
||||
[Constructable]
|
||||
public LightningWand() : base( WandEffect.Lightning, 5, 20 )
|
||||
{
|
||||
}
|
||||
|
||||
public LightningWand( 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 override void OnWandUse( Mobile from )
|
||||
{
|
||||
Cast( new LightningSpell( from, this ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
38
Scripts/Items/Wands/MagicArrowWand.cs
Normal file
38
Scripts/Items/Wands/MagicArrowWand.cs
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Spells.First;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class MagicArrowWand : BaseWand
|
||||
{
|
||||
[Constructable]
|
||||
public MagicArrowWand() : base( WandEffect.MagicArrow, 5, 30 )
|
||||
{
|
||||
}
|
||||
|
||||
public MagicArrowWand( 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 override void OnWandUse( Mobile from )
|
||||
{
|
||||
Cast( new MagicArrowSpell( from, this ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
38
Scripts/Items/Wands/ManaDrainWand.cs
Normal file
38
Scripts/Items/Wands/ManaDrainWand.cs
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Spells.Fourth;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class ManaDrainWand : BaseWand
|
||||
{
|
||||
[Constructable]
|
||||
public ManaDrainWand() : base( WandEffect.ManaDraining, 5, 30 )
|
||||
{
|
||||
}
|
||||
|
||||
public ManaDrainWand( 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 override void OnWandUse( Mobile from )
|
||||
{
|
||||
Cast( new ManaDrainSpell( from, this ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
38
Scripts/Items/Wands/MarkWand.cs
Normal file
38
Scripts/Items/Wands/MarkWand.cs
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Spells.Sixth;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class MarkWand : BaseWand
|
||||
{
|
||||
[Constructable]
|
||||
public MarkWand() : base( WandEffect.Mark, 5, 30 )
|
||||
{
|
||||
}
|
||||
|
||||
public MarkWand( 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 override void OnWandUse( Mobile from )
|
||||
{
|
||||
Cast( new MarkSpell( from, this ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
38
Scripts/Items/Wands/RecallWand.cs
Normal file
38
Scripts/Items/Wands/RecallWand.cs
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Spells.Fourth;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class RecallWand : BaseWand
|
||||
{
|
||||
[Constructable]
|
||||
public RecallWand() : base( WandEffect.Recall, 5, 30 )
|
||||
{
|
||||
}
|
||||
|
||||
public RecallWand( 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 override void OnWandUse( Mobile from )
|
||||
{
|
||||
Cast( new RecallSpell( from, this ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
38
Scripts/Items/Wands/RemoveTrapWand.cs
Normal file
38
Scripts/Items/Wands/RemoveTrapWand.cs
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Spells.Second;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class RemoveTrapWand : BaseWand
|
||||
{
|
||||
[Constructable]
|
||||
public RemoveTrapWand() : base( WandEffect.RemoveTrap, 5, 30 )
|
||||
{
|
||||
}
|
||||
|
||||
public RemoveTrapWand( 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 override void OnWandUse( Mobile from )
|
||||
{
|
||||
Cast( new RemoveTrapSpell( from, this ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
38
Scripts/Items/Wands/ResurrectionWand.cs
Normal file
38
Scripts/Items/Wands/ResurrectionWand.cs
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Spells.Eighth;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class ResurrectionWand : BaseWand
|
||||
{
|
||||
[Constructable]
|
||||
public ResurrectionWand() : base( WandEffect.Resurrection, 1, 5 )
|
||||
{
|
||||
}
|
||||
|
||||
public ResurrectionWand( 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 override void OnWandUse( Mobile from )
|
||||
{
|
||||
Cast( new ResurrectionSpell( from, this ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
38
Scripts/Items/Wands/UnlockWand.cs
Normal file
38
Scripts/Items/Wands/UnlockWand.cs
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Spells.Third;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class UnlockWand : BaseWand
|
||||
{
|
||||
[Constructable]
|
||||
public UnlockWand() : base( WandEffect.Unlock, 5, 30 )
|
||||
{
|
||||
}
|
||||
|
||||
public UnlockWand( 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 override void OnWandUse( Mobile from )
|
||||
{
|
||||
Cast( new UnlockSpell( from, this ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
26
Scripts/Items/Wands/WandTarget.cs
Normal file
26
Scripts/Items/Wands/WandTarget.cs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Targeting
|
||||
{
|
||||
public class WandTarget : Target
|
||||
{
|
||||
private BaseWand m_Item;
|
||||
|
||||
public WandTarget( BaseWand item ) : base( 6, false, TargetFlags.None )
|
||||
{
|
||||
m_Item = item;
|
||||
}
|
||||
|
||||
private static int GetOffset( Mobile caster )
|
||||
{
|
||||
return 5 + (int)(caster.Skills[SkillName.Magery].Value * 0.02 );
|
||||
}
|
||||
|
||||
protected override void OnTarget( Mobile from, object targeted )
|
||||
{
|
||||
m_Item.DoWandTarget( from, targeted );
|
||||
}
|
||||
}
|
||||
}
|
||||
38
Scripts/Items/Wands/WeaknessWand.cs
Normal file
38
Scripts/Items/Wands/WeaknessWand.cs
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Spells.First;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class WeaknessWand : BaseWand
|
||||
{
|
||||
[Constructable]
|
||||
public WeaknessWand() : base( WandEffect.Weakness, 5, 30 )
|
||||
{
|
||||
}
|
||||
|
||||
public WeaknessWand( 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 override void OnWandUse( Mobile from )
|
||||
{
|
||||
Cast( new WeakenSpell( from, this ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue