Reorganizes Project (#41)
This commit is contained in:
parent
08bf44af9a
commit
3614a66aee
3499 changed files with 79 additions and 55 deletions
53
Projects/Scripts/Spells/Eighth/AirElemental.cs
Normal file
53
Projects/Scripts/Spells/Eighth/AirElemental.cs
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
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 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())
|
||||
{
|
||||
TimeSpan duration = TimeSpan.FromSeconds(2 * Caster.Skills.Magery.Fixed / 5);
|
||||
|
||||
if (Core.AOS)
|
||||
SpellHelper.Summon(new SummonedAirElemental(), Caster, 0x217, duration, false, false);
|
||||
else
|
||||
SpellHelper.Summon(new AirElemental(), Caster, 0x217, duration, false, false);
|
||||
}
|
||||
|
||||
FinishSequence();
|
||||
}
|
||||
}
|
||||
}
|
||||
53
Projects/Scripts/Spells/Eighth/EarthElemental.cs
Normal file
53
Projects/Scripts/Spells/Eighth/EarthElemental.cs
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
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 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())
|
||||
{
|
||||
TimeSpan duration = TimeSpan.FromSeconds(2 * Caster.Skills.Magery.Fixed / 5);
|
||||
|
||||
if (Core.AOS)
|
||||
SpellHelper.Summon(new SummonedEarthElemental(), Caster, 0x217, duration, false, false);
|
||||
else
|
||||
SpellHelper.Summon(new EarthElemental(), Caster, 0x217, duration, false, false);
|
||||
}
|
||||
|
||||
FinishSequence();
|
||||
}
|
||||
}
|
||||
}
|
||||
73
Projects/Scripts/Spells/Eighth/Earthquake.cs
Normal file
73
Projects/Scripts/Spells/Eighth/Earthquake.cs
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
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 EarthquakeSpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info)
|
||||
{
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
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)));
|
||||
|
||||
foreach (Mobile m in targets)
|
||||
{
|
||||
int damage;
|
||||
|
||||
if (Core.AOS)
|
||||
{
|
||||
damage = m.Hits / 2;
|
||||
|
||||
if (!m.Player)
|
||||
damage = Math.Max(Math.Min(damage, 100), 15);
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
69
Projects/Scripts/Spells/Eighth/EnergyVortex.cs
Normal file
69
Projects/Scripts/Spells/Eighth/EnergyVortex.cs
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Spells.Eighth
|
||||
{
|
||||
public class EnergyVortexSpell : MagerySpell, ISpellTargetingPoint3D
|
||||
{
|
||||
private static 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 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 == null || !map.CanSpawnMobile(p.X, p.Y, p.Z))
|
||||
{
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
54
Projects/Scripts/Spells/Eighth/FireElemental.cs
Normal file
54
Projects/Scripts/Spells/Eighth/FireElemental.cs
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
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 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())
|
||||
{
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
79
Projects/Scripts/Spells/Eighth/Resurrection.cs
Normal file
79
Projects/Scripts/Spells/Eighth/Resurrection.cs
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
using Server.Engines.ConPVP;
|
||||
using Server.Gumps;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Spells.Eighth
|
||||
{
|
||||
public class ResurrectionSpell : MagerySpell, ISpellTargetingMobile
|
||||
{
|
||||
private static 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 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 == 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 (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();
|
||||
}
|
||||
}
|
||||
}
|
||||
60
Projects/Scripts/Spells/Eighth/SummonDaemon.cs
Normal file
60
Projects/Scripts/Spells/Eighth/SummonDaemon.cs
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
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 SummonDaemonSpell(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 + (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 */
|
||||
{
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
53
Projects/Scripts/Spells/Eighth/WaterElemental.cs
Normal file
53
Projects/Scripts/Spells/Eighth/WaterElemental.cs
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
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 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())
|
||||
{
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue