Formats UO Content (#201)

This commit is contained in:
Kamron Batman 2020-08-27 18:30:38 -07:00 • committed by GitHub
parent 86b7b3aed1
commit ad3775c4d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3249 changed files with 431083 additions and 440981 deletions

View file

@ -3,50 +3,52 @@ 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 = null) : base(caster, scroll, m_Info)
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 = null) : base(caster, scroll, m_Info)
{
}
public override SpellCircle Circle => SpellCircle.Eighth;
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())
{
var duration = TimeSpan.FromSeconds(2 * Caster.Skills.Magery.Fixed / 5.0);
if (Core.AOS)
SpellHelper.Summon(new SummonedAirElemental(), Caster, 0x217, duration, false, false);
else
SpellHelper.Summon(new AirElemental(), Caster, 0x217, duration, false, false);
}
FinishSequence();
}
}
public override SpellCircle Circle => SpellCircle.Eighth;
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())
{
TimeSpan duration = TimeSpan.FromSeconds(2 * Caster.Skills.Magery.Fixed / 5.0);
if (Core.AOS)
SpellHelper.Summon(new SummonedAirElemental(), Caster, 0x217, duration, false, false);
else
SpellHelper.Summon(new AirElemental(), Caster, 0x217, duration, false, false);
}
FinishSequence();
}
}
}

View file

@ -3,50 +3,52 @@ 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 = null) : base(caster, scroll, m_Info)
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 = null) : base(caster, scroll, m_Info)
{
}
public override SpellCircle Circle => SpellCircle.Eighth;
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())
{
var duration = TimeSpan.FromSeconds(2 * Caster.Skills.Magery.Fixed / 5.0);
if (Core.AOS)
SpellHelper.Summon(new SummonedEarthElemental(), Caster, 0x217, duration, false, false);
else
SpellHelper.Summon(new EarthElemental(), Caster, 0x217, duration, false, false);
}
FinishSequence();
}
}
public override SpellCircle Circle => SpellCircle.Eighth;
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())
{
TimeSpan duration = TimeSpan.FromSeconds(2 * Caster.Skills.Magery.Fixed / 5.0);
if (Core.AOS)
SpellHelper.Summon(new SummonedEarthElemental(), Caster, 0x217, duration, false, false);
else
SpellHelper.Summon(new EarthElemental(), Caster, 0x217, duration, false, false);
}
FinishSequence();
}
}
}

View file

@ -1,73 +1,77 @@
using System;
using System.Collections.Generic;
using System.Linq;
namespace Server.Spells.Eighth
{
public class EarthquakeSpell : MagerySpell
{
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 = null) : base(caster, scroll, m_Info)
public class EarthquakeSpell : MagerySpell
{
}
private static readonly SpellInfo m_Info = new SpellInfo(
"Earthquake",
"In Vas Por",
233,
9012,
false,
Reagent.Bloodmoss,
Reagent.Ginseng,
Reagent.MandrakeRoot,
Reagent.SulfurousAsh
);
public override SpellCircle Circle => SpellCircle.Eighth;
public override bool DelayedDamage => !Core.AOS;
public override void OnCast()
{
if (SpellHelper.CheckTown(Caster, Caster) && CheckSequence())
{
Caster.PlaySound(0x220);
if (Caster.Map == null)
public EarthquakeSpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info)
{
FinishSequence();
return;
}
IEnumerable<Mobile> targets = Caster.GetMobilesInRange(1 + (int)(Caster.Skills.Magery.Value / 15.0))
.Where(m => Caster != m && SpellHelper.ValidIndirectTarget(Caster, m) && Caster.CanBeHarmful(m, false) && (!Core.AOS || Caster.InLOS(m)));
public override SpellCircle Circle => SpellCircle.Eighth;
foreach (Mobile m in targets)
public override bool DelayedDamage => !Core.AOS;
public override void OnCast()
{
int damage;
if (SpellHelper.CheckTown(Caster, Caster) && CheckSequence())
{
Caster.PlaySound(0x220);
if (Core.AOS)
{
damage = m.Hits / 2;
if (Caster.Map == null)
{
FinishSequence();
return;
}
if (!m.Player)
damage = Math.Clamp(damage, 15, 100);
var targets = Caster.GetMobilesInRange(1 + (int)(Caster.Skills.Magery.Value / 15.0))
.Where(
m => Caster != m && SpellHelper.ValidIndirectTarget(Caster, m) && Caster.CanBeHarmful(m, false) &&
(!Core.AOS || Caster.InLOS(m))
);
damage += Utility.RandomMinMax(0, 15);
}
else
{
damage = m.Hits * 6 / 10;
foreach (var m in targets)
{
int damage;
if (!m.Player && damage < 10)
damage = 10;
else if (damage > 75)
damage = 75;
}
if (Core.AOS)
{
damage = m.Hits / 2;
Caster.DoHarmful(m);
SpellHelper.Damage(TimeSpan.Zero, m, Caster, damage, 100, 0, 0, 0, 0);
if (!m.Player)
damage = Math.Clamp(damage, 15, 100);
damage += Utility.RandomMinMax(0, 15);
}
else
{
damage = m.Hits * 6 / 10;
if (!m.Player && damage < 10)
damage = 10;
else if (damage > 75)
damage = 75;
}
Caster.DoHarmful(m);
SpellHelper.Damage(TimeSpan.Zero, m, Caster, damage, 100, 0, 0, 0, 0);
}
}
FinishSequence();
}
}
FinishSequence();
}
}
}

View file

@ -3,66 +3,68 @@ using Server.Mobiles;
namespace Server.Spells.Eighth
{
public class EnergyVortexSpell : MagerySpell, ISpellTargetingPoint3D
{
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 = null) : base(caster, scroll, m_Info)
public class EnergyVortexSpell : MagerySpell, ISpellTargetingPoint3D
{
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 = null) : base(caster, scroll, m_Info)
{
}
public override SpellCircle Circle => SpellCircle.Eighth;
public void Target(IPoint3D p)
{
var map = Caster.Map;
SpellHelper.GetSurfaceTop(ref p);
if (map?.CanSpawnMobile(p.X, p.Y, p.Z) != true)
{
Caster.SendLocalizedMessage(501942); // That location is blocked.
}
else if (SpellHelper.CheckTown(p, Caster) && CheckSequence())
{
TimeSpan duration;
if (Core.AOS)
duration = TimeSpan.FromSeconds(90.0);
else
duration = TimeSpan.FromSeconds(Utility.Random(80, 40));
BaseCreature.Summon(new EnergyVortex(), false, Caster, new Point3D(p), 0x212, duration);
}
FinishSequence();
}
public override bool CheckCast()
{
if (!base.CheckCast())
return false;
if (Caster.Followers + (Core.SE ? 2 : 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 SpellTargetPoint3D(this);
}
}
public override SpellCircle Circle => SpellCircle.Eighth;
public override bool CheckCast()
{
if (!base.CheckCast())
return false;
if (Caster.Followers + (Core.SE ? 2 : 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 SpellTargetPoint3D(this);
}
public void Target(IPoint3D p)
{
Map map = Caster.Map;
SpellHelper.GetSurfaceTop(ref p);
if (map?.CanSpawnMobile(p.X, p.Y, p.Z) != true)
{
Caster.SendLocalizedMessage(501942); // That location is blocked.
}
else if (SpellHelper.CheckTown(p, Caster) && CheckSequence())
{
TimeSpan duration;
if (Core.AOS)
duration = TimeSpan.FromSeconds(90.0);
else
duration = TimeSpan.FromSeconds(Utility.Random(80, 40));
BaseCreature.Summon(new EnergyVortex(), false, Caster, new Point3D(p), 0x212, duration);
}
FinishSequence();
}
}
}

View file

@ -3,51 +3,53 @@ 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 = null) : base(caster, scroll, m_Info)
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 = null) : base(caster, scroll, m_Info)
{
}
public override SpellCircle Circle => SpellCircle.Eighth;
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())
{
var duration = TimeSpan.FromSeconds(2 * Caster.Skills.Magery.Fixed / 5);
if (Core.AOS)
SpellHelper.Summon(new SummonedFireElemental(), Caster, 0x217, duration, false, false);
else
SpellHelper.Summon(new FireElemental(), Caster, 0x217, duration, false, false);
}
FinishSequence();
}
}
public override SpellCircle Circle => SpellCircle.Eighth;
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())
{
TimeSpan duration = TimeSpan.FromSeconds(2 * Caster.Skills.Magery.Fixed / 5);
if (Core.AOS)
SpellHelper.Summon(new SummonedFireElemental(), Caster, 0x217, duration, false, false);
else
SpellHelper.Summon(new FireElemental(), Caster, 0x217, duration, false, false);
}
FinishSequence();
}
}
}

View file

@ -4,75 +4,92 @@ using Server.Targeting;
namespace Server.Spells.Eighth
{
public class ResurrectionSpell : MagerySpell, ISpellTargetingMobile
{
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 = null) : base(caster, scroll, m_Info)
public class ResurrectionSpell : MagerySpell, ISpellTargetingMobile
{
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 = null) : base(caster, scroll, m_Info)
{
}
public override SpellCircle Circle => SpellCircle.Eighth;
public void Target(Mobile m)
{
if (m == null)
return;
if (!Caster.CanSee(m))
{
Caster.SendLocalizedMessage(500237); // Target can not be seen.
}
else if (m == Caster)
{
Caster.SendLocalizedMessage(501039); // Thou can not resurrect thyself.
}
else if (!Caster.Alive)
{
Caster.SendLocalizedMessage(501040); // The resurrecter must be alive.
}
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?.CanFit(m.Location, 16, false, false) != true)
{
Caster.SendLocalizedMessage(501042); // Target can not be resurrected at that location.
m.SendLocalizedMessage(502391); // Thou can not be resurrected there!
}
else if (m.Region?.IsPartOf("Khaldun") == true)
{
Caster.SendLocalizedMessage(
1010395
); // The veil of death in this area is too strong and resists thy efforts to restore life.
}
else if (CheckBSequence(m, true))
{
SpellHelper.Turn(Caster, m);
m.PlaySound(0x214);
m.FixedEffect(0x376A, 10, 16);
m.CloseGump<ResurrectGump>();
m.SendGump(new ResurrectGump(m, Caster));
}
FinishSequence();
}
public override bool CheckCast()
{
if (DuelContext.CheckSuddenDeath(Caster))
{
Caster.SendMessage(0x22, "You cannot cast this spell when in sudden death.");
return false;
}
return base.CheckCast();
}
public override void OnCast()
{
Caster.Target = new SpellTargetMobile(this, TargetFlags.Beneficial, 1);
}
}
public override SpellCircle Circle => SpellCircle.Eighth;
public override bool CheckCast()
{
if (DuelContext.CheckSuddenDeath(Caster))
{
Caster.SendMessage(0x22, "You cannot cast this spell when in sudden death.");
return false;
}
return base.CheckCast();
}
public override void OnCast()
{
Caster.Target = new SpellTargetMobile(this, TargetFlags.Beneficial, 1);
}
public void Target(Mobile m)
{
if (m == null)
return;
if (!Caster.CanSee(m))
Caster.SendLocalizedMessage(500237); // Target can not be seen.
else if (m == Caster)
Caster.SendLocalizedMessage(501039); // Thou can not resurrect thyself.
else if (!Caster.Alive)
Caster.SendLocalizedMessage(501040); // The resurrecter must be alive.
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?.CanFit(m.Location, 16, false, false) != true)
{
Caster.SendLocalizedMessage(501042); // Target can not be resurrected at that location.
m.SendLocalizedMessage(502391); // Thou can not be resurrected there!
}
else if (m.Region?.IsPartOf("Khaldun") == true)
Caster.SendLocalizedMessage(
1010395); // The veil of death in this area is too strong and resists thy efforts to restore life.
else if (CheckBSequence(m, true))
{
SpellHelper.Turn(Caster, m);
m.PlaySound(0x214);
m.FixedEffect(0x376A, 10, 16);
m.CloseGump<ResurrectGump>();
m.SendGump(new ResurrectGump(m, Caster));
}
FinishSequence();
}
}
}

View file

@ -3,57 +3,59 @@ 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 = null) : base(caster, scroll, m_Info)
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 override SpellCircle Circle => SpellCircle.Eighth;
public override bool CheckCast()
{
if (!base.CheckCast())
return false;
if (Caster.Followers + (Core.SE ? 4 : 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())
{
TimeSpan duration = TimeSpan.FromSeconds(2 * Caster.Skills.Magery.Fixed / 5);
if (Core.AOS) /* Why two diff daemons? TODO: solve this */
public SummonDaemonSpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info)
{
BaseCreature m_Daemon = new SummonedDaemon();
SpellHelper.Summon(m_Daemon, Caster, 0x216, duration, false, false);
m_Daemon.FixedParticles(0x3728, 8, 20, 5042, EffectLayer.Head);
}
else
{
SpellHelper.Summon(new Daemon(), Caster, 0x216, duration, false, false);
}
}
FinishSequence();
public override SpellCircle Circle => SpellCircle.Eighth;
public override bool CheckCast()
{
if (!base.CheckCast())
return false;
if (Caster.Followers + (Core.SE ? 4 : 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())
{
var duration = TimeSpan.FromSeconds(2 * Caster.Skills.Magery.Fixed / 5);
if (Core.AOS) /* Why two diff daemons? TODO: solve this */
{
BaseCreature m_Daemon = new SummonedDaemon();
SpellHelper.Summon(m_Daemon, Caster, 0x216, duration, false, false);
m_Daemon.FixedParticles(0x3728, 8, 20, 5042, EffectLayer.Head);
}
else
{
SpellHelper.Summon(new Daemon(), Caster, 0x216, duration, false, false);
}
}
FinishSequence();
}
}
}
}

View file

@ -3,50 +3,52 @@ 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 = null) : base(caster, scroll, m_Info)
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 = null) : base(caster, scroll, m_Info)
{
}
public override SpellCircle Circle => SpellCircle.Eighth;
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())
{
var duration = TimeSpan.FromSeconds(2 * Caster.Skills.Magery.Fixed / 5);
if (Core.AOS)
SpellHelper.Summon(new SummonedWaterElemental(), Caster, 0x217, duration, false, false);
else
SpellHelper.Summon(new WaterElemental(), Caster, 0x217, duration, false, false);
}
FinishSequence();
}
}
public override SpellCircle Circle => SpellCircle.Eighth;
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())
{
TimeSpan duration = TimeSpan.FromSeconds(2 * Caster.Skills.Magery.Fixed / 5);
if (Core.AOS)
SpellHelper.Summon(new SummonedWaterElemental(), Caster, 0x217, duration, false, false);
else
SpellHelper.Summon(new WaterElemental(), Caster, 0x217, duration, false, false);
}
FinishSequence();
}
}
}