Overwrite
Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
This commit is contained in:
80
Scripts/Services/Ethics/Evil/Powers/Blight.cs
Normal file
80
Scripts/Services/Ethics/Evil/Powers/Blight.cs
Normal file
@@ -0,0 +1,80 @@
|
||||
using System;
|
||||
using Server.Spells;
|
||||
|
||||
namespace Server.Ethics.Evil
|
||||
{
|
||||
public sealed class BlightPower : Power
|
||||
{
|
||||
public BlightPower()
|
||||
{
|
||||
this.m_Definition = new PowerDefinition(
|
||||
15,
|
||||
"Blight",
|
||||
"Velgo Ontawl",
|
||||
"");
|
||||
}
|
||||
|
||||
public override void BeginInvoke(Player from)
|
||||
{
|
||||
from.Mobile.BeginTarget(12, true, Targeting.TargetFlags.None, new TargetStateCallback(Power_OnTarget), from);
|
||||
from.Mobile.SendMessage("Where do you wish to blight?");
|
||||
}
|
||||
|
||||
private void Power_OnTarget(Mobile fromMobile, object obj, object state)
|
||||
{
|
||||
Player from = state as Player;
|
||||
|
||||
IPoint3D p = obj as IPoint3D;
|
||||
|
||||
if (p == null)
|
||||
return;
|
||||
|
||||
if (!this.CheckInvoke(from))
|
||||
return;
|
||||
|
||||
bool powerFunctioned = false;
|
||||
|
||||
SpellHelper.GetSurfaceTop(ref p);
|
||||
IPooledEnumerable eable = from.Mobile.GetMobilesInRange(6);
|
||||
|
||||
foreach (Mobile mob in eable)
|
||||
{
|
||||
if (mob == from.Mobile || !SpellHelper.ValidIndirectTarget(from.Mobile, mob))
|
||||
continue;
|
||||
|
||||
if (mob.GetStatMod("Holy Curse") != null)
|
||||
continue;
|
||||
|
||||
if (!from.Mobile.CanBeHarmful(mob, false))
|
||||
continue;
|
||||
|
||||
from.Mobile.DoHarmful(mob, true);
|
||||
|
||||
mob.AddStatMod(new StatMod(StatType.All, "Holy Curse", -10, TimeSpan.FromMinutes(30.0)));
|
||||
|
||||
mob.FixedParticles(0x374A, 10, 15, 5028, EffectLayer.Waist);
|
||||
mob.PlaySound(0x1FB);
|
||||
|
||||
powerFunctioned = true;
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
|
||||
if (powerFunctioned)
|
||||
{
|
||||
SpellHelper.Turn(from.Mobile, p);
|
||||
|
||||
Effects.PlaySound(p, from.Mobile.Map, 0x1FB);
|
||||
|
||||
from.Mobile.LocalOverheadMessage(Server.Network.MessageType.Regular, 0x3B2, false, "You curse the area.");
|
||||
|
||||
this.FinishInvoke(from);
|
||||
}
|
||||
else
|
||||
{
|
||||
from.Mobile.FixedEffect(0x3735, 6, 30);
|
||||
from.Mobile.PlaySound(0x5C);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
44
Scripts/Services/Ethics/Evil/Powers/SummonFamiliar.cs
Normal file
44
Scripts/Services/Ethics/Evil/Powers/SummonFamiliar.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Ethics.Evil
|
||||
{
|
||||
public sealed class SummonFamiliar : Power
|
||||
{
|
||||
public SummonFamiliar()
|
||||
{
|
||||
this.m_Definition = new PowerDefinition(
|
||||
5,
|
||||
"Summon Familiar",
|
||||
"Trubechs Vingir",
|
||||
"");
|
||||
}
|
||||
|
||||
public override void BeginInvoke(Player from)
|
||||
{
|
||||
if (from.Familiar != null && from.Familiar.Deleted)
|
||||
from.Familiar = null;
|
||||
|
||||
if (from.Familiar != null)
|
||||
{
|
||||
from.Mobile.LocalOverheadMessage(Server.Network.MessageType.Regular, 0x3B2, false, "You already have an unholy familiar.");
|
||||
return;
|
||||
}
|
||||
|
||||
if ((from.Mobile.Followers + 1) > from.Mobile.FollowersMax)
|
||||
{
|
||||
from.Mobile.SendLocalizedMessage(1049645); // You have too many followers to summon that creature.
|
||||
return;
|
||||
}
|
||||
|
||||
UnholyFamiliar familiar = new UnholyFamiliar();
|
||||
|
||||
if (Mobiles.BaseCreature.Summon(familiar, from.Mobile, from.Mobile.Location, 0x217, TimeSpan.FromHours(1.0)))
|
||||
{
|
||||
from.Familiar = familiar;
|
||||
|
||||
this.FinishInvoke(from);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
68
Scripts/Services/Ethics/Evil/Powers/UnholyItem.cs
Normal file
68
Scripts/Services/Ethics/Evil/Powers/UnholyItem.cs
Normal file
@@ -0,0 +1,68 @@
|
||||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Ethics.Evil
|
||||
{
|
||||
public sealed class UnholyItem : Power
|
||||
{
|
||||
public UnholyItem()
|
||||
{
|
||||
this.m_Definition = new PowerDefinition(
|
||||
5,
|
||||
"Unholy Item",
|
||||
"Vidda K'balc",
|
||||
"");
|
||||
}
|
||||
|
||||
public override void BeginInvoke(Player from)
|
||||
{
|
||||
from.Mobile.BeginTarget(12, false, Targeting.TargetFlags.None, new TargetStateCallback(Power_OnTarget), from);
|
||||
from.Mobile.SendMessage("Which item do you wish to imbue?");
|
||||
}
|
||||
|
||||
private void Power_OnTarget(Mobile fromMobile, object obj, object state)
|
||||
{
|
||||
Player from = state as Player;
|
||||
|
||||
Item item = obj as Item;
|
||||
|
||||
if (item == null)
|
||||
{
|
||||
from.Mobile.LocalOverheadMessage(Server.Network.MessageType.Regular, 0x3B2, false, "You may not imbue that.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (item.Parent != from.Mobile)
|
||||
{
|
||||
from.Mobile.LocalOverheadMessage(Server.Network.MessageType.Regular, 0x3B2, false, "You may only imbue items you are wearing.");
|
||||
return;
|
||||
}
|
||||
|
||||
if ((item.SavedFlags & 0x300) != 0)
|
||||
{
|
||||
from.Mobile.LocalOverheadMessage(Server.Network.MessageType.Regular, 0x3B2, false, "That has already beem imbued.");
|
||||
return;
|
||||
}
|
||||
|
||||
bool canImbue = (item is Spellbook || item is BaseClothing || item is BaseArmor || item is BaseWeapon) && (item.Name == null);
|
||||
|
||||
if (canImbue)
|
||||
{
|
||||
if (!this.CheckInvoke(from))
|
||||
return;
|
||||
|
||||
item.Hue = Ethic.Evil.Definition.PrimaryHue;
|
||||
item.SavedFlags |= 0x200;
|
||||
|
||||
from.Mobile.FixedEffect(0x375A, 10, 20);
|
||||
from.Mobile.PlaySound(0x209);
|
||||
|
||||
this.FinishInvoke(from);
|
||||
}
|
||||
else
|
||||
{
|
||||
from.Mobile.LocalOverheadMessage(Server.Network.MessageType.Regular, 0x3B2, false, "You may not imbue that.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
91
Scripts/Services/Ethics/Evil/Powers/UnholySense.cs
Normal file
91
Scripts/Services/Ethics/Evil/Powers/UnholySense.cs
Normal file
@@ -0,0 +1,91 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
|
||||
namespace Server.Ethics.Evil
|
||||
{
|
||||
public sealed class UnholySense : Power
|
||||
{
|
||||
public UnholySense()
|
||||
{
|
||||
this.m_Definition = new PowerDefinition(
|
||||
0,
|
||||
"Unholy Sense",
|
||||
"Drewrok Velgo",
|
||||
"");
|
||||
}
|
||||
|
||||
public override void BeginInvoke(Player from)
|
||||
{
|
||||
Ethic opposition = Ethic.Hero;
|
||||
|
||||
int enemyCount = 0;
|
||||
|
||||
int maxRange = 18 + from.Power;
|
||||
|
||||
Player primary = null;
|
||||
|
||||
foreach (Player pl in opposition.Players)
|
||||
{
|
||||
Mobile mob = pl.Mobile;
|
||||
|
||||
if (mob == null || mob.Map != from.Mobile.Map || !mob.Alive)
|
||||
continue;
|
||||
|
||||
if (!mob.InRange(from.Mobile, Math.Max(18, maxRange - pl.Power)))
|
||||
continue;
|
||||
|
||||
if (primary == null || pl.Power > primary.Power)
|
||||
primary = pl;
|
||||
|
||||
++enemyCount;
|
||||
}
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.Append("You sense ");
|
||||
sb.Append(enemyCount == 0 ? "no" : enemyCount.ToString());
|
||||
sb.Append(enemyCount == 1 ? " enemy" : " enemies");
|
||||
|
||||
if (primary != null)
|
||||
{
|
||||
sb.Append(", and a strong presense");
|
||||
|
||||
switch ( from.Mobile.GetDirectionTo(primary.Mobile) )
|
||||
{
|
||||
case Direction.West:
|
||||
sb.Append(" to the west.");
|
||||
break;
|
||||
case Direction.East:
|
||||
sb.Append(" to the east.");
|
||||
break;
|
||||
case Direction.North:
|
||||
sb.Append(" to the north.");
|
||||
break;
|
||||
case Direction.South:
|
||||
sb.Append(" to the south.");
|
||||
break;
|
||||
case Direction.Up:
|
||||
sb.Append(" to the north-west.");
|
||||
break;
|
||||
case Direction.Down:
|
||||
sb.Append(" to the south-east.");
|
||||
break;
|
||||
case Direction.Left:
|
||||
sb.Append(" to the south-west.");
|
||||
break;
|
||||
case Direction.Right:
|
||||
sb.Append(" to the north-east.");
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.Append('.');
|
||||
}
|
||||
|
||||
from.Mobile.LocalOverheadMessage(Server.Network.MessageType.Regular, 0x59, false, sb.ToString());
|
||||
|
||||
this.FinishInvoke(from);
|
||||
}
|
||||
}
|
||||
}
|
||||
31
Scripts/Services/Ethics/Evil/Powers/UnholyShield.cs
Normal file
31
Scripts/Services/Ethics/Evil/Powers/UnholyShield.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Ethics.Evil
|
||||
{
|
||||
public sealed class UnholyShield : Power
|
||||
{
|
||||
public UnholyShield()
|
||||
{
|
||||
this.m_Definition = new PowerDefinition(
|
||||
20,
|
||||
"Unholy Shield",
|
||||
"Velgo K'blac",
|
||||
"");
|
||||
}
|
||||
|
||||
public override void BeginInvoke(Player from)
|
||||
{
|
||||
if (from.IsShielded)
|
||||
{
|
||||
from.Mobile.LocalOverheadMessage(Server.Network.MessageType.Regular, 0x3B2, false, "You are already under the protection of an unholy shield.");
|
||||
return;
|
||||
}
|
||||
|
||||
from.BeginShield();
|
||||
|
||||
from.Mobile.LocalOverheadMessage(Server.Network.MessageType.Regular, 0x3B2, false, "You are now under the protection of an unholy shield.");
|
||||
|
||||
this.FinishInvoke(from);
|
||||
}
|
||||
}
|
||||
}
|
||||
43
Scripts/Services/Ethics/Evil/Powers/UnholySteed.cs
Normal file
43
Scripts/Services/Ethics/Evil/Powers/UnholySteed.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Ethics.Evil
|
||||
{
|
||||
public sealed class UnholySteed : Power
|
||||
{
|
||||
public UnholySteed()
|
||||
{
|
||||
this.m_Definition = new PowerDefinition(
|
||||
30,
|
||||
"Unholy Steed",
|
||||
"Trubechs Yeliab",
|
||||
"");
|
||||
}
|
||||
|
||||
public override void BeginInvoke(Player from)
|
||||
{
|
||||
if (from.Steed != null && from.Steed.Deleted)
|
||||
from.Steed = null;
|
||||
|
||||
if (from.Steed != null)
|
||||
{
|
||||
from.Mobile.LocalOverheadMessage(Server.Network.MessageType.Regular, 0x3B2, false, "You already have an unholy steed.");
|
||||
return;
|
||||
}
|
||||
|
||||
if ((from.Mobile.Followers + 1) > from.Mobile.FollowersMax)
|
||||
{
|
||||
from.Mobile.SendLocalizedMessage(1049645); // You have too many followers to summon that creature.
|
||||
return;
|
||||
}
|
||||
|
||||
Mobiles.UnholySteed steed = new Mobiles.UnholySteed();
|
||||
|
||||
if (Mobiles.BaseCreature.Summon(steed, from.Mobile, from.Mobile.Location, 0x217, TimeSpan.FromHours(1.0)))
|
||||
{
|
||||
from.Steed = steed;
|
||||
|
||||
this.FinishInvoke(from);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
20
Scripts/Services/Ethics/Evil/Powers/UnholyWord.cs
Normal file
20
Scripts/Services/Ethics/Evil/Powers/UnholyWord.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Ethics.Evil
|
||||
{
|
||||
public sealed class UnholyWord : Power
|
||||
{
|
||||
public UnholyWord()
|
||||
{
|
||||
this.m_Definition = new PowerDefinition(
|
||||
100,
|
||||
"Unholy Word",
|
||||
"Velgo Oostrac",
|
||||
"");
|
||||
}
|
||||
|
||||
public override void BeginInvoke(Player from)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
20
Scripts/Services/Ethics/Evil/Powers/VileBlade.cs
Normal file
20
Scripts/Services/Ethics/Evil/Powers/VileBlade.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Ethics.Evil
|
||||
{
|
||||
public sealed class VileBlade : Power
|
||||
{
|
||||
public VileBlade()
|
||||
{
|
||||
this.m_Definition = new PowerDefinition(
|
||||
10,
|
||||
"Vile Blade",
|
||||
"Velgo Reyam",
|
||||
"");
|
||||
}
|
||||
|
||||
public override void BeginInvoke(Player from)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user