#W# Initial Commit: Avatars Conquest
This commit is contained in:
commit
5df497787a
7510 changed files with 416048 additions and 0 deletions
54
Scripts/Spells/8th/AirElemental.cs
Normal file
54
Scripts/Spells/8th/AirElemental.cs
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Spells.Eighth
|
||||
{
|
||||
public class AirElementalSpell : MagerySpell
|
||||
{
|
||||
private static SpellInfo m_Info = new SpellInfo(
|
||||
"Air Elemental", "Kal Vas Xen Hur",
|
||||
269,
|
||||
9010,
|
||||
false,
|
||||
Reagent.Bloodmoss,
|
||||
Reagent.MandrakeRoot,
|
||||
Reagent.SpidersSilk
|
||||
);
|
||||
|
||||
public override SpellCircle Circle { get { return SpellCircle.Eighth; } }
|
||||
|
||||
public AirElementalSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
|
||||
{
|
||||
}
|
||||
|
||||
public override bool CheckCast()
|
||||
{
|
||||
if ( !base.CheckCast() )
|
||||
return false;
|
||||
|
||||
if ( (Caster.Followers + 2) > Caster.FollowersMax )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 1049645 ); // You have too many followers to summon that creature.
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void OnCast()
|
||||
{
|
||||
if ( CheckSequence() )
|
||||
{
|
||||
Caster.CheckSkill( SkillName.Concentration, 0.0, 100.0 );
|
||||
|
||||
TimeSpan duration = TimeSpan.FromSeconds( ((2 * Caster.Skills.Magery.Fixed) / 5) + ((2 * Caster.Skills.Concentration.Value) / 5) );
|
||||
|
||||
SpellHelper.Summon( new AirElemental(), Caster, 0x217, duration, false, false );
|
||||
}
|
||||
|
||||
FinishSequence();
|
||||
}
|
||||
}
|
||||
}
|
||||
54
Scripts/Spells/8th/EarthElemental.cs
Normal file
54
Scripts/Spells/8th/EarthElemental.cs
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Spells.Eighth
|
||||
{
|
||||
public class EarthElementalSpell : MagerySpell
|
||||
{
|
||||
private static SpellInfo m_Info = new SpellInfo(
|
||||
"Earth Elemental", "Kal Vas Xen Ylem",
|
||||
269,
|
||||
9020,
|
||||
false,
|
||||
Reagent.Bloodmoss,
|
||||
Reagent.MandrakeRoot,
|
||||
Reagent.SpidersSilk
|
||||
);
|
||||
|
||||
public override SpellCircle Circle { get { return SpellCircle.Eighth; } }
|
||||
|
||||
public EarthElementalSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
|
||||
{
|
||||
}
|
||||
|
||||
public override bool CheckCast()
|
||||
{
|
||||
if ( !base.CheckCast() )
|
||||
return false;
|
||||
|
||||
if ( (Caster.Followers + 2) > Caster.FollowersMax )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 1049645 ); // You have too many followers to summon that creature.
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void OnCast()
|
||||
{
|
||||
if ( CheckSequence() )
|
||||
{
|
||||
Caster.CheckSkill( SkillName.Concentration, 0.0, 100.0 );
|
||||
|
||||
TimeSpan duration = TimeSpan.FromSeconds( ((2 * Caster.Skills.Magery.Fixed) / 5) + ((2 * Caster.Skills.Concentration.Value) / 5) );
|
||||
|
||||
SpellHelper.Summon( new EarthElemental(), Caster, 0x217, duration, false, false );
|
||||
}
|
||||
|
||||
FinishSequence();
|
||||
}
|
||||
}
|
||||
}
|
||||
66
Scripts/Spells/8th/Earthquake.cs
Normal file
66
Scripts/Spells/8th/Earthquake.cs
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server.Network;
|
||||
using Server.Items;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Spells.Eighth
|
||||
{
|
||||
public class EarthquakeSpell : MagerySpell
|
||||
{
|
||||
private static SpellInfo m_Info = new SpellInfo(
|
||||
"Earthquake", "In Vas Por",
|
||||
233,
|
||||
9012,
|
||||
false,
|
||||
Reagent.Bloodmoss,
|
||||
Reagent.Ginseng,
|
||||
Reagent.MandrakeRoot,
|
||||
Reagent.SulfurousAsh
|
||||
);
|
||||
|
||||
public override SpellCircle Circle { get { return SpellCircle.Eighth; } }
|
||||
|
||||
public EarthquakeSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
|
||||
{
|
||||
}
|
||||
|
||||
public override bool DelayedDamage{ get{ return true; } }
|
||||
|
||||
public override void OnCast()
|
||||
{
|
||||
if ( SpellHelper.CheckTown( Caster, Caster ) && CheckSequence() )
|
||||
{
|
||||
List<Mobile> targets = new List<Mobile>();
|
||||
|
||||
Map map = Caster.Map;
|
||||
|
||||
if ( map != null )
|
||||
foreach ( Mobile m in Caster.GetMobilesInRange( 1 + (int)(Caster.Skills[SkillName.Magery].Value / 15.0) ) )
|
||||
if ( Caster != m && SpellHelper.ValidIndirectTarget( Caster, m ) && Caster.CanBeHarmful( m, false ) )
|
||||
targets.Add( m );
|
||||
|
||||
Caster.PlaySound( 0x220 );
|
||||
|
||||
for ( int i = 0; i < targets.Count; ++i )
|
||||
{
|
||||
Mobile m = targets[i];
|
||||
|
||||
int damage = (m.Hits * 6) / 10;
|
||||
|
||||
damage = (int)(damage * GetDamageScalar( m ) );
|
||||
|
||||
if ( !m.Player && damage < 10 )
|
||||
damage = 10;
|
||||
else if ( damage > 75 )
|
||||
damage = 75;
|
||||
|
||||
Caster.DoHarmful( m );
|
||||
SpellHelper.Damage( TimeSpan.Zero, m, Caster, damage );
|
||||
}
|
||||
}
|
||||
|
||||
FinishSequence();
|
||||
}
|
||||
}
|
||||
}
|
||||
98
Scripts/Spells/8th/EnergyVortex.cs
Normal file
98
Scripts/Spells/8th/EnergyVortex.cs
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Spells.Eighth
|
||||
{
|
||||
public class EnergyVortexSpell : MagerySpell
|
||||
{
|
||||
private static SpellInfo m_Info = new SpellInfo(
|
||||
"Energy Vortex", "Vas Corp Por",
|
||||
260,
|
||||
9032,
|
||||
false,
|
||||
Reagent.Bloodmoss,
|
||||
Reagent.BlackPearl,
|
||||
Reagent.MandrakeRoot,
|
||||
Reagent.Nightshade
|
||||
);
|
||||
|
||||
public override SpellCircle Circle { get { return SpellCircle.Eighth; } }
|
||||
|
||||
public EnergyVortexSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
|
||||
{
|
||||
}
|
||||
|
||||
public override bool CheckCast()
|
||||
{
|
||||
if ( !base.CheckCast() )
|
||||
return false;
|
||||
|
||||
if ( (Caster.Followers + 1) > Caster.FollowersMax )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 1049645 ); // You have too many followers to summon that creature.
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void OnCast()
|
||||
{
|
||||
Caster.Target = new InternalTarget( this );
|
||||
}
|
||||
|
||||
public void Target( IPoint3D p )
|
||||
{
|
||||
Map map = Caster.Map;
|
||||
|
||||
SpellHelper.GetSurfaceTop( ref p );
|
||||
|
||||
if ( map == null || !map.CanSpawnMobile( p.X, p.Y, p.Z ) )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 501942 ); // That location is blocked.
|
||||
}
|
||||
else if ( SpellHelper.CheckTown( p, Caster ) && CheckSequence() )
|
||||
{
|
||||
Caster.CheckSkill( SkillName.Concentration, 0.0, 100.0 );
|
||||
|
||||
TimeSpan duration = TimeSpan.FromSeconds( Utility.Random( 80, 40 ) + (Caster.Skills.Concentration.Value / 5) );
|
||||
|
||||
BaseCreature.Summon( new EnergyVortex(), false, Caster, new Point3D( p ), 0x212, duration );
|
||||
}
|
||||
|
||||
FinishSequence();
|
||||
}
|
||||
|
||||
private class InternalTarget : Target
|
||||
{
|
||||
private EnergyVortexSpell m_Owner;
|
||||
|
||||
public InternalTarget( EnergyVortexSpell owner ) : base( 12, true, TargetFlags.None )
|
||||
{
|
||||
m_Owner = owner;
|
||||
}
|
||||
|
||||
protected override void OnTarget( Mobile from, object o )
|
||||
{
|
||||
if ( o is IPoint3D )
|
||||
m_Owner.Target( (IPoint3D)o );
|
||||
}
|
||||
|
||||
protected override void OnTargetOutOfLOS( Mobile from, object o )
|
||||
{
|
||||
from.SendLocalizedMessage( 501943 ); // Target cannot be seen. Try again.
|
||||
from.Target = new InternalTarget( m_Owner );
|
||||
from.Target.BeginTimeout( from, TimeoutTime - DateTime.Now );
|
||||
m_Owner = null;
|
||||
}
|
||||
|
||||
protected override void OnTargetFinish( Mobile from )
|
||||
{
|
||||
if ( m_Owner != null )
|
||||
m_Owner.FinishSequence();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
55
Scripts/Spells/8th/FireElemental.cs
Normal file
55
Scripts/Spells/8th/FireElemental.cs
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Spells.Eighth
|
||||
{
|
||||
public class FireElementalSpell : MagerySpell
|
||||
{
|
||||
private static SpellInfo m_Info = new SpellInfo(
|
||||
"Fire Elemental", "Kal Vas Xen Flam",
|
||||
269,
|
||||
9050,
|
||||
false,
|
||||
Reagent.Bloodmoss,
|
||||
Reagent.MandrakeRoot,
|
||||
Reagent.SpidersSilk,
|
||||
Reagent.SulfurousAsh
|
||||
);
|
||||
|
||||
public override SpellCircle Circle { get { return SpellCircle.Eighth; } }
|
||||
|
||||
public FireElementalSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
|
||||
{
|
||||
}
|
||||
|
||||
public override bool CheckCast()
|
||||
{
|
||||
if ( !base.CheckCast() )
|
||||
return false;
|
||||
|
||||
if ( (Caster.Followers + 4) > Caster.FollowersMax )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 1049645 ); // You have too many followers to summon that creature.
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void OnCast()
|
||||
{
|
||||
if ( CheckSequence() )
|
||||
{
|
||||
Caster.CheckSkill( SkillName.Concentration, 0.0, 100.0 );
|
||||
|
||||
TimeSpan duration = TimeSpan.FromSeconds( ((2 * Caster.Skills.Magery.Fixed) / 5) + ((2 * Caster.Skills.Concentration.Value) / 5) );
|
||||
|
||||
SpellHelper.Summon( new FireElemental(), Caster, 0x217, duration, false, false );
|
||||
}
|
||||
|
||||
FinishSequence();
|
||||
}
|
||||
}
|
||||
}
|
||||
180
Scripts/Spells/8th/Resurrection.cs
Normal file
180
Scripts/Spells/8th/Resurrection.cs
Normal file
|
|
@ -0,0 +1,180 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Prompts;
|
||||
using Server.Targeting;
|
||||
using Server.Network;
|
||||
using Server.Gumps;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Spells.Eighth
|
||||
{
|
||||
public class ResurrectionSpell : MagerySpell
|
||||
{
|
||||
private static SpellInfo m_Info = new SpellInfo(
|
||||
"Resurrection", "An Corp",
|
||||
245,
|
||||
9062,
|
||||
Reagent.Bloodmoss,
|
||||
Reagent.Garlic,
|
||||
Reagent.Ginseng
|
||||
);
|
||||
|
||||
public override SpellCircle Circle { get { return SpellCircle.Eighth; } }
|
||||
|
||||
public ResurrectionSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnCast()
|
||||
{
|
||||
Caster.Target = new InternalTarget( this );
|
||||
}
|
||||
|
||||
public void Target( Mobile m )
|
||||
{
|
||||
if ( !Caster.CanSee( m ) )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
|
||||
}
|
||||
else if ( !Caster.Alive )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 501040 ); // The resurrecter must be alive.
|
||||
}
|
||||
else if ( m == Caster && CheckBSequence( m, true ) )
|
||||
{
|
||||
ArrayList targets = new ArrayList();
|
||||
foreach ( Item item in World.Items.Values )
|
||||
if ( item is LifeCrystal )
|
||||
{
|
||||
LifeCrystal myOrb = (LifeCrystal)item;
|
||||
if ( myOrb.m_Owner == m )
|
||||
{
|
||||
targets.Add( item );
|
||||
}
|
||||
}
|
||||
for ( int i = 0; i < targets.Count; ++i )
|
||||
{
|
||||
Item item = ( Item )targets[ i ];
|
||||
item.Delete();
|
||||
}
|
||||
|
||||
m.PlaySound( 0x214 );
|
||||
m.FixedEffect( 0x376A, 10, 16, 0, 0 );
|
||||
m.SendMessage( "You conjure yourself a life crystal." );
|
||||
LifeCrystal crystal = new LifeCrystal();
|
||||
crystal.m_Owner = m;
|
||||
m.AddToBackpack( crystal );
|
||||
}
|
||||
else if ( m.Alive )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 501041 ); // Target is not dead.
|
||||
}
|
||||
else if ( !Caster.InRange( m, 1 ) )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 501042 ); // Target is not close enough.
|
||||
}
|
||||
else if ( !m.Player )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 501043 ); // Target is not a being.
|
||||
}
|
||||
else if ( m.Map == null || !m.Map.CanFit( m.Location, 16, false, false ) )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 501042 ); // Target can not be resurrected at that location.
|
||||
m.SendLocalizedMessage( 502391 ); // Thou can not be resurrected there!
|
||||
}
|
||||
else if ( CheckBSequence( m, true ) )
|
||||
{
|
||||
SpellHelper.Turn( Caster, m );
|
||||
|
||||
m.PlaySound( 0x214 );
|
||||
m.FixedEffect( 0x376A, 10, 16 );
|
||||
|
||||
m.CloseGump( typeof( ResurrectGump ) );
|
||||
m.SendGump( new ResurrectGump( m, Caster ) );
|
||||
}
|
||||
|
||||
FinishSequence();
|
||||
}
|
||||
|
||||
private class InternalTarget : Target
|
||||
{
|
||||
private ResurrectionSpell m_Owner;
|
||||
|
||||
public InternalTarget( ResurrectionSpell owner ) : base( 1, false, TargetFlags.Beneficial )
|
||||
{
|
||||
m_Owner = owner;
|
||||
}
|
||||
|
||||
protected override void OnTarget( Mobile from, object o )
|
||||
{
|
||||
if ( o is Mobile )
|
||||
{
|
||||
m_Owner.Target( (Mobile)o );
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnTargetFinish( Mobile from )
|
||||
{
|
||||
m_Owner.FinishSequence();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class LifeCrystal : Item
|
||||
{
|
||||
public override bool DisplayLootType{ get{ return false; } }
|
||||
|
||||
public Mobile m_Owner;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public Mobile Owner
|
||||
{
|
||||
get { return m_Owner; }
|
||||
set { m_Owner = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public LifeCrystal() : base( 0x023F )
|
||||
{
|
||||
Name = "life crystal";
|
||||
LootType = LootType.Blessed;
|
||||
Movable = false;
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile m )
|
||||
{
|
||||
m.SendMessage( "Since you are alive, the crystal vanishes!" );
|
||||
this.Delete();
|
||||
}
|
||||
|
||||
public override void OnDoubleClickDead( Mobile m )
|
||||
{
|
||||
m.Resurrect();
|
||||
m.FixedEffect( 0x376A, 10, 16, 0, 0 );
|
||||
this.Delete();
|
||||
}
|
||||
|
||||
public LifeCrystal(Serial serial) : base(serial){}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write( (int) 0 ); // version
|
||||
writer.Write( (Mobile) m_Owner );
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
m_Owner = reader.ReadMobile();
|
||||
}
|
||||
}
|
||||
}
|
||||
57
Scripts/Spells/8th/SummonDaemon.cs
Normal file
57
Scripts/Spells/8th/SummonDaemon.cs
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
using System;
|
||||
using Server.Misc;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Spells.Eighth
|
||||
{
|
||||
public class SummonDaemonSpell : MagerySpell
|
||||
{
|
||||
private static SpellInfo m_Info = new SpellInfo(
|
||||
"Summon Daemon", "Kal Vas Xen Corp",
|
||||
269,
|
||||
9050,
|
||||
false,
|
||||
Reagent.Bloodmoss,
|
||||
Reagent.MandrakeRoot,
|
||||
Reagent.SpidersSilk,
|
||||
Reagent.SulfurousAsh
|
||||
);
|
||||
|
||||
public override SpellCircle Circle { get { return SpellCircle.Eighth; } }
|
||||
|
||||
public SummonDaemonSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
|
||||
{
|
||||
}
|
||||
|
||||
public override bool CheckCast()
|
||||
{
|
||||
if ( !base.CheckCast() )
|
||||
return false;
|
||||
|
||||
if ( (Caster.Followers + 5) > Caster.FollowersMax )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 1049645 ); // You have too many followers to summon that creature.
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void OnCast()
|
||||
{
|
||||
if ( CheckSequence() )
|
||||
{
|
||||
Caster.CheckSkill( SkillName.Concentration, 0.0, 100.0 );
|
||||
|
||||
TimeSpan duration = TimeSpan.FromSeconds( ((2 * Caster.Skills.Magery.Fixed) / 5) + ((2 * Caster.Skills.Concentration.Value) / 5) );
|
||||
|
||||
SpellHelper.Summon( new Daemon(), Caster, 0x216, duration, false, false );
|
||||
}
|
||||
|
||||
FinishSequence();
|
||||
}
|
||||
}
|
||||
}
|
||||
54
Scripts/Spells/8th/WaterElemental.cs
Normal file
54
Scripts/Spells/8th/WaterElemental.cs
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Spells.Eighth
|
||||
{
|
||||
public class WaterElementalSpell : MagerySpell
|
||||
{
|
||||
private static SpellInfo m_Info = new SpellInfo(
|
||||
"Water Elemental", "Kal Vas Xen An Flam",
|
||||
269,
|
||||
9070,
|
||||
false,
|
||||
Reagent.Bloodmoss,
|
||||
Reagent.MandrakeRoot,
|
||||
Reagent.SpidersSilk
|
||||
);
|
||||
|
||||
public override SpellCircle Circle { get { return SpellCircle.Eighth; } }
|
||||
|
||||
public WaterElementalSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
|
||||
{
|
||||
}
|
||||
|
||||
public override bool CheckCast()
|
||||
{
|
||||
if ( !base.CheckCast() )
|
||||
return false;
|
||||
|
||||
if ( (Caster.Followers + 3) > Caster.FollowersMax )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 1049645 ); // You have too many followers to summon that creature.
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void OnCast()
|
||||
{
|
||||
if ( CheckSequence() )
|
||||
{
|
||||
Caster.CheckSkill( SkillName.Concentration, 0.0, 100.0 );
|
||||
|
||||
TimeSpan duration = TimeSpan.FromSeconds( ((2 * Caster.Skills.Magery.Fixed) / 5) + ((2 * Caster.Skills.Concentration.Value) / 5) );
|
||||
|
||||
SpellHelper.Summon( new WaterElemental(), Caster, 0x217, duration, false, false );
|
||||
}
|
||||
|
||||
FinishSequence();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue