Overwrite

Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
This commit is contained in:
Unstable Kitsune
2023-11-28 23:20:26 -05:00
parent 3cd54811de
commit b918192e4e
11608 changed files with 2644205 additions and 47 deletions

View File

@@ -0,0 +1,57 @@
using System;
using Server.Mobiles;
namespace Server.Spells.Eighth
{
public class AirElementalSpell : MagerySpell
{
private static readonly SpellInfo m_Info = new SpellInfo(
"Air Elemental", "Kal Vas Xen Hur",
269,
9010,
false,
Reagent.Bloodmoss,
Reagent.MandrakeRoot,
Reagent.SpidersSilk);
public AirElementalSpell(Mobile caster, Item scroll)
: base(caster, scroll, m_Info)
{
}
public override SpellCircle Circle
{
get
{
return SpellCircle.Eighth;
}
}
public override bool CheckCast()
{
if (!base.CheckCast())
return false;
if ((this.Caster.Followers + 2) > this.Caster.FollowersMax)
{
this.Caster.SendLocalizedMessage(1049645); // You have too many followers to summon that creature.
return false;
}
return true;
}
public override void OnCast()
{
if (this.CheckSequence())
{
TimeSpan duration = TimeSpan.FromSeconds((2 * this.Caster.Skills.Magery.Fixed) / 5);
if (Core.AOS)
SpellHelper.Summon(new SummonedAirElemental(), this.Caster, 0x217, duration, false, false);
else
SpellHelper.Summon(new AirElemental(), this.Caster, 0x217, duration, false, false);
}
this.FinishSequence();
}
}
}

View File

@@ -0,0 +1,57 @@
using System;
using Server.Mobiles;
namespace Server.Spells.Eighth
{
public class EarthElementalSpell : MagerySpell
{
private static readonly SpellInfo m_Info = new SpellInfo(
"Earth Elemental", "Kal Vas Xen Ylem",
269,
9020,
false,
Reagent.Bloodmoss,
Reagent.MandrakeRoot,
Reagent.SpidersSilk);
public EarthElementalSpell(Mobile caster, Item scroll)
: base(caster, scroll, m_Info)
{
}
public override SpellCircle Circle
{
get
{
return SpellCircle.Eighth;
}
}
public override bool CheckCast()
{
if (!base.CheckCast())
return false;
if ((this.Caster.Followers + 2) > this.Caster.FollowersMax)
{
this.Caster.SendLocalizedMessage(1049645); // You have too many followers to summon that creature.
return false;
}
return true;
}
public override void OnCast()
{
if (this.CheckSequence())
{
TimeSpan duration = TimeSpan.FromSeconds((2 * this.Caster.Skills.Magery.Fixed) / 5);
if (Core.AOS)
SpellHelper.Summon(new SummonedEarthElemental(), this.Caster, 0x217, duration, false, false);
else
SpellHelper.Summon(new EarthElemental(), this.Caster, 0x217, duration, false, false);
}
this.FinishSequence();
}
}
}

View File

@@ -0,0 +1,75 @@
using System;
using System.Collections.Generic;
namespace Server.Spells.Eighth
{
public class EarthquakeSpell : MagerySpell
{
public override DamageType SpellDamageType { get { return DamageType.SpellAOE; } }
private static readonly SpellInfo m_Info = new SpellInfo(
"Earthquake", "In Vas Por",
233,
9012,
false,
Reagent.Bloodmoss,
Reagent.Ginseng,
Reagent.MandrakeRoot,
Reagent.SulfurousAsh);
public EarthquakeSpell(Mobile caster, Item scroll)
: base(caster, scroll, m_Info)
{
}
public override SpellCircle Circle
{
get
{
return SpellCircle.Eighth;
}
}
public override bool DelayedDamage
{
get
{
return !Core.AOS;
}
}
public override void OnCast()
{
if (SpellHelper.CheckTown(Caster, Caster) && CheckSequence())
{
foreach (var id in AcquireIndirectTargets(Caster.Location, 1 + (int)(Caster.Skills[SkillName.Magery].Value / 15.0)))
{
Mobile m = id as Mobile;
int damage;
if (Core.AOS)
{
damage = id.Hits / 2;
if (m == null || !m.Player)
damage = Math.Max(Math.Min(damage, 100), 15);
damage += Utility.RandomMinMax(0, 15);
}
else
{
damage = (id.Hits * 6) / 10;
if ((m == null || !m.Player) && damage < 10)
damage = 10;
else if (damage > 75)
damage = 75;
}
Caster.DoHarmful(id);
SpellHelper.Damage(this, id, damage, 100, 0, 0, 0, 0);
}
}
FinishSequence();
}
}
}

View File

@@ -0,0 +1,104 @@
using System;
using Server.Mobiles;
using Server.Targeting;
namespace Server.Spells.Eighth
{
public class EnergyVortexSpell : MagerySpell
{
private static readonly SpellInfo m_Info = new SpellInfo(
"Energy Vortex", "Vas Corp Por",
260,
9032,
false,
Reagent.Bloodmoss,
Reagent.BlackPearl,
Reagent.MandrakeRoot,
Reagent.Nightshade);
public EnergyVortexSpell(Mobile caster, Item scroll)
: base(caster, scroll, m_Info)
{
}
public override SpellCircle Circle
{
get
{
return SpellCircle.Eighth;
}
}
public override bool CheckCast()
{
if (!base.CheckCast())
return false;
if ((this.Caster.Followers + (Core.SE ? 2 : 1)) > this.Caster.FollowersMax)
{
this.Caster.SendLocalizedMessage(1049645); // You have too many followers to summon that creature.
return false;
}
return true;
}
public override void OnCast()
{
this.Caster.Target = new InternalTarget(this);
}
public void Target(IPoint3D p)
{
Map map = this.Caster.Map;
SpellHelper.GetSurfaceTop(ref p);
if (map == null || !map.CanSpawnMobile(p.X, p.Y, p.Z))
{
this.Caster.SendLocalizedMessage(501942); // That location is blocked.
}
else if (SpellHelper.CheckTown(p, this.Caster) && this.CheckSequence())
{
TimeSpan duration;
if (Core.AOS)
duration = TimeSpan.FromSeconds(90.0);
else
duration = TimeSpan.FromSeconds(Utility.Random(80, 40));
BaseCreature.Summon(new EnergyVortex(true), false, this.Caster, new Point3D(p), 0x212, duration);
}
this.FinishSequence();
}
public class InternalTarget : Target
{
private EnergyVortexSpell m_Owner;
public InternalTarget(EnergyVortexSpell owner)
: base(Core.ML ? 10 : 12, true, TargetFlags.None)
{
this.m_Owner = owner;
}
protected override void OnTarget(Mobile from, object o)
{
if (o is IPoint3D)
this.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(this.m_Owner);
from.Target.BeginTimeout(from, this.TimeoutTime - DateTime.UtcNow);
this.m_Owner = null;
}
protected override void OnTargetFinish(Mobile from)
{
if (this.m_Owner != null)
this.m_Owner.FinishSequence();
}
}
}
}

View File

@@ -0,0 +1,58 @@
using System;
using Server.Mobiles;
namespace Server.Spells.Eighth
{
public class FireElementalSpell : MagerySpell
{
private static readonly SpellInfo m_Info = new SpellInfo(
"Fire Elemental", "Kal Vas Xen Flam",
269,
9050,
false,
Reagent.Bloodmoss,
Reagent.MandrakeRoot,
Reagent.SpidersSilk,
Reagent.SulfurousAsh);
public FireElementalSpell(Mobile caster, Item scroll)
: base(caster, scroll, m_Info)
{
}
public override SpellCircle Circle
{
get
{
return SpellCircle.Eighth;
}
}
public override bool CheckCast()
{
if (!base.CheckCast())
return false;
if ((this.Caster.Followers + 4) > this.Caster.FollowersMax)
{
this.Caster.SendLocalizedMessage(1049645); // You have too many followers to summon that creature.
return false;
}
return true;
}
public override void OnCast()
{
if (this.CheckSequence())
{
TimeSpan duration = TimeSpan.FromSeconds((2 * this.Caster.Skills.Magery.Fixed) / 5);
if (Core.AOS)
SpellHelper.Summon(new SummonedFireElemental(), this.Caster, 0x217, duration, false, false);
else
SpellHelper.Summon(new FireElemental(), this.Caster, 0x217, duration, false, false);
}
this.FinishSequence();
}
}
}

View File

@@ -0,0 +1,106 @@
using System;
using Server.Gumps;
using Server.Targeting;
namespace Server.Spells.Eighth
{
public class ResurrectionSpell : MagerySpell
{
private static readonly SpellInfo m_Info = new SpellInfo(
"Resurrection", "An Corp",
245,
9062,
Reagent.Bloodmoss,
Reagent.Garlic,
Reagent.Ginseng);
public ResurrectionSpell(Mobile caster, Item scroll)
: base(caster, scroll, m_Info)
{
}
public override SpellCircle Circle
{
get
{
return SpellCircle.Eighth;
}
}
public override void OnCast()
{
this.Caster.Target = new InternalTarget(this);
}
public void Target(Mobile m)
{
if (!this.Caster.CanSee(m))
{
this.Caster.SendLocalizedMessage(500237); // Target can not be seen.
}
else if (m == this.Caster)
{
this.Caster.SendLocalizedMessage(501039); // Thou can not resurrect thyself.
}
else if (!this.Caster.Alive)
{
this.Caster.SendLocalizedMessage(501040); // The resurrecter must be alive.
}
else if (m.Alive)
{
this.Caster.SendLocalizedMessage(501041); // Target is not dead.
}
else if (!this.Caster.InRange(m, 1))
{
this.Caster.SendLocalizedMessage(501042); // Target is not close enough.
}
else if (!m.Player)
{
this.Caster.SendLocalizedMessage(501043); // Target is not a being.
}
else if (m.Map == null || !m.Map.CanFit(m.Location, 16, false, false))
{
this.Caster.SendLocalizedMessage(501042); // Target can not be resurrected at that location.
m.SendLocalizedMessage(502391); // Thou can not be resurrected there!
}
else if (m.Region != null && m.Region.IsPartOf("Khaldun"))
{
this.Caster.SendLocalizedMessage(1010395); // The veil of death in this area is too strong and resists thy efforts to restore life.
}
else if (this.CheckBSequence(m, true))
{
SpellHelper.Turn(this.Caster, m);
m.PlaySound(0x214);
m.FixedEffect(0x376A, 10, 16);
m.CloseGump(typeof(ResurrectGump));
m.SendGump(new ResurrectGump(m, this.Caster));
}
this.FinishSequence();
}
private class InternalTarget : Target
{
private readonly ResurrectionSpell m_Owner;
public InternalTarget(ResurrectionSpell owner)
: base(1, false, TargetFlags.Beneficial)
{
this.m_Owner = owner;
}
protected override void OnTarget(Mobile from, object o)
{
if (o is Mobile)
{
this.m_Owner.Target((Mobile)o);
}
}
protected override void OnTargetFinish(Mobile from)
{
this.m_Owner.FinishSequence();
}
}
}
}

View File

@@ -0,0 +1,62 @@
using System;
using Server.Mobiles;
namespace Server.Spells.Eighth
{
public class SummonDaemonSpell : MagerySpell
{
private static readonly SpellInfo m_Info = new SpellInfo(
"Summon Daemon", "Kal Vas Xen Corp",
269,
9050,
false,
Reagent.Bloodmoss,
Reagent.MandrakeRoot,
Reagent.SpidersSilk,
Reagent.SulfurousAsh);
public SummonDaemonSpell(Mobile caster, Item scroll)
: base(caster, scroll, m_Info)
{
}
public override SpellCircle Circle
{
get
{
return SpellCircle.Eighth;
}
}
public override bool CheckCast()
{
if (!base.CheckCast())
return false;
if ((this.Caster.Followers + (Core.SE ? 4 : 5)) > this.Caster.FollowersMax)
{
this.Caster.SendLocalizedMessage(1049645); // You have too many followers to summon that creature.
return false;
}
return true;
}
public override void OnCast()
{
if (this.CheckSequence())
{
TimeSpan duration = TimeSpan.FromSeconds((2 * this.Caster.Skills.Magery.Fixed) / 5);
if (Core.AOS) /* Why two diff daemons? TODO: solve this */
{
BaseCreature m_Daemon = new SummonedDaemon();
SpellHelper.Summon(m_Daemon, this.Caster, 0x216, duration, false, false);
m_Daemon.FixedParticles(0x3728, 8, 20, 5042, EffectLayer.Head);
}
else
SpellHelper.Summon(new Daemon(), this.Caster, 0x216, duration, false, false);
}
this.FinishSequence();
}
}
}

View File

@@ -0,0 +1,57 @@
using System;
using Server.Mobiles;
namespace Server.Spells.Eighth
{
public class WaterElementalSpell : MagerySpell
{
private static readonly SpellInfo m_Info = new SpellInfo(
"Water Elemental", "Kal Vas Xen An Flam",
269,
9070,
false,
Reagent.Bloodmoss,
Reagent.MandrakeRoot,
Reagent.SpidersSilk);
public WaterElementalSpell(Mobile caster, Item scroll)
: base(caster, scroll, m_Info)
{
}
public override SpellCircle Circle
{
get
{
return SpellCircle.Eighth;
}
}
public override bool CheckCast()
{
if (!base.CheckCast())
return false;
if ((this.Caster.Followers + 3) > this.Caster.FollowersMax)
{
this.Caster.SendLocalizedMessage(1049645); // You have too many followers to summon that creature.
return false;
}
return true;
}
public override void OnCast()
{
if (this.CheckSequence())
{
TimeSpan duration = TimeSpan.FromSeconds((2 * this.Caster.Skills.Magery.Fixed) / 5);
if (Core.AOS)
SpellHelper.Summon(new SummonedWaterElemental(), this.Caster, 0x217, duration, false, false);
else
SpellHelper.Summon(new WaterElemental(), this.Caster, 0x217, duration, false, false);
}
this.FinishSequence();
}
}
}