Modernization Fixes & Updates to Default Values (#3)
This commit is contained in:
parent
445eddff68
commit
dcf64091b1
768 changed files with 10507 additions and 14196 deletions
|
|
@ -235,15 +235,14 @@ namespace Server.Mobiles
|
|||
PlaySound(0x491);
|
||||
|
||||
if (0.05 > Utility.RandomDouble())
|
||||
Timer.DelayCall(TimeSpan.FromSeconds(1.0), new TimerStateCallback(CreateBones_Callback), from);
|
||||
Timer.DelayCall(TimeSpan.FromSeconds(1.0), CreateBones_Callback, from);
|
||||
|
||||
m_InHere = false;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void CreateBones_Callback(object state)
|
||||
public virtual void CreateBones_Callback(Mobile from)
|
||||
{
|
||||
Mobile from = (Mobile)state;
|
||||
Map map = from.Map;
|
||||
|
||||
if (map == null)
|
||||
|
|
@ -257,11 +256,11 @@ namespace Server.Mobiles
|
|||
int y = from.Y + Utility.RandomMinMax(-1, 1);
|
||||
int z = from.Z;
|
||||
|
||||
if (!map.CanFit(x, y, z, 16, false, true))
|
||||
if (!map.CanFit(x, y, z, 16))
|
||||
{
|
||||
z = map.GetAverageZ(x, y);
|
||||
|
||||
if (z == from.Z || !map.CanFit(x, y, z, 16, false, true))
|
||||
if (z == from.Z || !map.CanFit(x, y, z, 16))
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ namespace Server.Mobiles
|
|||
Hue = 1;
|
||||
// TODO: Sound values?
|
||||
|
||||
double scalar = caster.Skills[SkillName.SpiritSpeak].Value * 0.01;
|
||||
double scalar = caster.Skills.SpiritSpeak.Value * 0.01;
|
||||
|
||||
m_Target = target;
|
||||
m_ExpireTime = DateTime.UtcNow + duration;
|
||||
|
|
|
|||
|
|
@ -128,20 +128,16 @@ namespace Server.Mobiles
|
|||
if (defender.Alive)
|
||||
{
|
||||
defender.Frozen = true;
|
||||
Timer.DelayCall(TimeSpan.FromSeconds(5.0), new TimerStateCallback(Recover_Callback), defender);
|
||||
Timer.DelayCall(TimeSpan.FromSeconds(5.0), Recover_Callback, defender);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void Recover_Callback(object state)
|
||||
private void Recover_Callback(Mobile defender)
|
||||
{
|
||||
if (state is Mobile defender)
|
||||
{
|
||||
defender.Frozen = false;
|
||||
defender.Combatant = null;
|
||||
defender.LocalOverheadMessage(MessageType.Regular, 0x3B2, false, "You recover your senses.");
|
||||
}
|
||||
|
||||
defender.Frozen = false;
|
||||
defender.Combatant = null;
|
||||
defender.LocalOverheadMessage(MessageType.Regular, 0x3B2, false, "You recover your senses.");
|
||||
m_Stunning = false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Server.Items;
|
||||
using Server.Spells;
|
||||
|
||||
|
|
@ -118,11 +120,11 @@ namespace Server.Mobiles
|
|||
if (Map == null)
|
||||
return;
|
||||
|
||||
ArrayList list = new ArrayList();
|
||||
List<SavageShaman> list = new List<SavageShaman>();
|
||||
|
||||
foreach (Mobile m in GetMobilesInRange(8))
|
||||
if (m != this && m is SavageShaman)
|
||||
list.Add(m);
|
||||
if (m != this && m is SavageShaman ss)
|
||||
list.Add(ss);
|
||||
|
||||
Animate(111, 5, 1, true, false, 0); // Do a little dance...
|
||||
|
||||
|
|
@ -133,7 +135,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
for (int i = 0; i < list.Count; ++i)
|
||||
{
|
||||
SavageShaman dancer = (SavageShaman)list[i];
|
||||
SavageShaman dancer = list[i];
|
||||
|
||||
dancer.Animate(111, 5, 1, true, false, 0); // Get down tonight...
|
||||
|
||||
|
|
@ -150,120 +152,118 @@ namespace Server.Mobiles
|
|||
if (Deleted)
|
||||
return;
|
||||
|
||||
ArrayList list = new ArrayList();
|
||||
|
||||
foreach (Mobile m in GetMobilesInRange(8))
|
||||
list.Add(m);
|
||||
|
||||
if (list.Count > 0)
|
||||
switch (Utility.Random(3))
|
||||
IPooledEnumerable<Mobile> eable = GetMobilesInRange(8);
|
||||
|
||||
switch (Utility.Random(3))
|
||||
{
|
||||
case 0: /* greater heal */
|
||||
{
|
||||
case 0: /* greater heal */
|
||||
foreach (Mobile m in eable)
|
||||
{
|
||||
foreach (Mobile m in list)
|
||||
{
|
||||
bool isFriendly = m is Savage || m is SavageRider || m is SavageShaman || m is SavageRidgeback;
|
||||
bool isFriendly = m is Savage || m is SavageRider || m is SavageShaman || m is SavageRidgeback;
|
||||
|
||||
if (!isFriendly)
|
||||
continue;
|
||||
if (!isFriendly)
|
||||
continue;
|
||||
|
||||
if (m.Poisoned || MortalStrike.IsWounded(m) || !CanBeBeneficial(m))
|
||||
continue;
|
||||
if (m.Poisoned || MortalStrike.IsWounded(m) || !CanBeBeneficial(m))
|
||||
continue;
|
||||
|
||||
DoBeneficial(m);
|
||||
DoBeneficial(m);
|
||||
|
||||
// Algorithm: (40% of magery) + (1-10)
|
||||
// Algorithm: (40% of magery) + (1-10)
|
||||
|
||||
int toHeal = (int)(Skills[SkillName.Magery].Value * 0.4);
|
||||
toHeal += Utility.Random(1, 10);
|
||||
int toHeal = (int)(Skills.Magery.Value * 0.4);
|
||||
toHeal += Utility.Random(1, 10);
|
||||
|
||||
m.Heal(toHeal, this);
|
||||
m.Heal(toHeal, this);
|
||||
|
||||
m.FixedParticles(0x376A, 9, 32, 5030, EffectLayer.Waist);
|
||||
m.PlaySound(0x202);
|
||||
}
|
||||
|
||||
break;
|
||||
m.FixedParticles(0x376A, 9, 32, 5030, EffectLayer.Waist);
|
||||
m.PlaySound(0x202);
|
||||
}
|
||||
case 1: /* lightning */
|
||||
{
|
||||
foreach (Mobile m in list)
|
||||
{
|
||||
bool isFriendly = m is Savage || m is SavageRider || m is SavageShaman || m is SavageRidgeback;
|
||||
|
||||
if (isFriendly)
|
||||
continue;
|
||||
|
||||
if (!CanBeHarmful(m))
|
||||
continue;
|
||||
|
||||
DoHarmful(m);
|
||||
|
||||
double damage;
|
||||
|
||||
if (Core.AOS)
|
||||
{
|
||||
int baseDamage = 6 + (int)(Skills[SkillName.EvalInt].Value / 5.0);
|
||||
|
||||
damage = Utility.RandomMinMax(baseDamage, baseDamage + 3);
|
||||
}
|
||||
else
|
||||
{
|
||||
damage = Utility.Random(12, 9);
|
||||
}
|
||||
|
||||
m.BoltEffect(0);
|
||||
|
||||
SpellHelper.Damage(TimeSpan.FromSeconds(0.25), m, this, damage, 0, 0, 0, 0, 100);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 2: /* poison */
|
||||
{
|
||||
foreach (Mobile m in list)
|
||||
{
|
||||
bool isFriendly = m is Savage || m is SavageRider || m is SavageShaman || m is SavageRidgeback;
|
||||
|
||||
if (isFriendly)
|
||||
continue;
|
||||
|
||||
if (!CanBeHarmful(m))
|
||||
continue;
|
||||
|
||||
DoHarmful(m);
|
||||
|
||||
m.Spell?.OnCasterHurt();
|
||||
|
||||
m.Paralyzed = false;
|
||||
|
||||
double total = Skills[SkillName.Magery].Value + Skills[SkillName.Poisoning].Value;
|
||||
|
||||
double dist = GetDistanceToSqrt(m);
|
||||
|
||||
if (dist >= 3.0)
|
||||
total -= (dist - 3.0) * 10.0;
|
||||
|
||||
int level;
|
||||
|
||||
if (total >= 200.0 && Utility.Random(1, 100) <= 10)
|
||||
level = 3;
|
||||
else if (total > 170.0)
|
||||
level = 2;
|
||||
else if (total > 130.0)
|
||||
level = 1;
|
||||
else
|
||||
level = 0;
|
||||
|
||||
m.ApplyPoison(this, Poison.GetPoison(level));
|
||||
|
||||
m.FixedParticles(0x374A, 10, 15, 5021, EffectLayer.Waist);
|
||||
m.PlaySound(0x474);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 1: /* lightning */
|
||||
{
|
||||
foreach (Mobile m in eable)
|
||||
{
|
||||
bool isFriendly = m is Savage || m is SavageRider || m is SavageShaman || m is SavageRidgeback;
|
||||
|
||||
if (isFriendly)
|
||||
continue;
|
||||
|
||||
if (!CanBeHarmful(m))
|
||||
continue;
|
||||
|
||||
DoHarmful(m);
|
||||
|
||||
double damage;
|
||||
|
||||
if (Core.AOS)
|
||||
{
|
||||
int baseDamage = 6 + (int)(Skills.EvalInt.Value / 5.0);
|
||||
|
||||
damage = Utility.RandomMinMax(baseDamage, baseDamage + 3);
|
||||
}
|
||||
else
|
||||
{
|
||||
damage = Utility.Random(12, 9);
|
||||
}
|
||||
|
||||
m.BoltEffect(0);
|
||||
|
||||
SpellHelper.Damage(TimeSpan.FromSeconds(0.25), m, this, damage, 0, 0, 0, 0, 100);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 2: /* poison */
|
||||
{
|
||||
foreach (Mobile m in eable)
|
||||
{
|
||||
bool isFriendly = m is Savage || m is SavageRider || m is SavageShaman || m is SavageRidgeback;
|
||||
|
||||
if (isFriendly)
|
||||
continue;
|
||||
|
||||
if (!CanBeHarmful(m))
|
||||
continue;
|
||||
|
||||
DoHarmful(m);
|
||||
|
||||
m.Spell?.OnCasterHurt();
|
||||
|
||||
m.Paralyzed = false;
|
||||
|
||||
double total = Skills.Magery.Value + Skills.Poisoning.Value;
|
||||
|
||||
double dist = GetDistanceToSqrt(m);
|
||||
|
||||
if (dist >= 3.0)
|
||||
total -= (dist - 3.0) * 10.0;
|
||||
|
||||
int level;
|
||||
|
||||
if (total >= 200.0 && Utility.Random(1, 100) <= 10)
|
||||
level = 3;
|
||||
else if (total > 170.0)
|
||||
level = 2;
|
||||
else if (total > 130.0)
|
||||
level = 1;
|
||||
else
|
||||
level = 0;
|
||||
|
||||
m.ApplyPoison(this, Poison.GetPoison(level));
|
||||
|
||||
m.FixedParticles(0x374A, 10, 15, 5021, EffectLayer.Waist);
|
||||
m.PlaySound(0x474);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
|
|
|
|||
|
|
@ -58,21 +58,15 @@ namespace Server.Mobiles
|
|||
|
||||
public void DrainLife()
|
||||
{
|
||||
ArrayList list = new ArrayList();
|
||||
IPooledEnumerable<Mobile> eable = GetMobilesInRange(2);
|
||||
|
||||
foreach (Mobile m in GetMobilesInRange(2))
|
||||
foreach (Mobile m in eable)
|
||||
{
|
||||
if (m == this || !CanBeHarmful(m))
|
||||
if (m == this || !CanBeHarmful(m) ||
|
||||
!(m is BaseCreature creature && (creature.Controlled || creature.Summoned || creature.Team != Team) ||
|
||||
m.Player))
|
||||
continue;
|
||||
|
||||
if (m is BaseCreature creature && (creature.Controlled || creature.Summoned || creature.Team != Team))
|
||||
list.Add(m);
|
||||
else if (m.Player)
|
||||
list.Add(m);
|
||||
}
|
||||
|
||||
foreach (Mobile m in list)
|
||||
{
|
||||
|
||||
DoHarmful(m);
|
||||
|
||||
m.FixedParticles(0x374A, 10, 15, 5013, 0x496, 0, EffectLayer.Waist);
|
||||
|
|
@ -85,6 +79,8 @@ namespace Server.Mobiles
|
|||
Hits += toDrain;
|
||||
m.Damage(toDrain, this);
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
}
|
||||
|
||||
public override void OnGaveMeleeAttack(Mobile defender)
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
SpeechHue = Utility.RandomDyedHue();
|
||||
Title = "the brigand";
|
||||
Hue = Utility.RandomSkinHue();
|
||||
Hue = Race.Human.RandomSkinHue();
|
||||
|
||||
if (Female = Utility.RandomBool())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
SpeechHue = Utility.RandomDyedHue();
|
||||
Title = "the executioner";
|
||||
Hue = Utility.RandomSkinHue();
|
||||
Hue = Race.Human.RandomSkinHue();
|
||||
|
||||
if (Female = Utility.RandomBool())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ namespace Server.Mobiles
|
|||
|
||||
SpeechHue = Utility.RandomDyedHue();
|
||||
|
||||
Hue = Utility.RandomSkinHue();
|
||||
Hue = Race.Human.RandomSkinHue();
|
||||
|
||||
if (Female = Utility.RandomBool())
|
||||
{
|
||||
|
|
@ -58,11 +58,11 @@ namespace Server.Mobiles
|
|||
PackItem(new Arrow(250));
|
||||
PackGold(250, 500);
|
||||
|
||||
Skills[SkillName.Anatomy].Base = 120.0;
|
||||
Skills[SkillName.Tactics].Base = 120.0;
|
||||
Skills[SkillName.Archery].Base = 120.0;
|
||||
Skills[SkillName.MagicResist].Base = 120.0;
|
||||
Skills[SkillName.DetectHidden].Base = 100.0;
|
||||
Skills.Anatomy.Base = 120.0;
|
||||
Skills.Tactics.Base = 120.0;
|
||||
Skills.Archery.Base = 120.0;
|
||||
Skills.MagicResist.Base = 120.0;
|
||||
Skills.DetectHidden.Base = 100.0;
|
||||
}
|
||||
|
||||
public Guardian(Serial serial) : base(serial)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ namespace Server.Mobiles
|
|||
public HeadlessOne() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 31;
|
||||
Hue = Utility.RandomSkinHue() & 0x7FFF;
|
||||
Hue = Race.Human.RandomSkinHue() & 0x7FFF;
|
||||
BaseSoundID = 0x39D;
|
||||
|
||||
SetStr(26, 50);
|
||||
|
|
|
|||
|
|
@ -124,20 +124,16 @@ namespace Server.Mobiles
|
|||
if (defender.Alive)
|
||||
{
|
||||
defender.Frozen = true;
|
||||
Timer.DelayCall(TimeSpan.FromSeconds(5.0), new TimerStateCallback(Recover_Callback), defender);
|
||||
Timer.DelayCall(TimeSpan.FromSeconds(5.0), Recover_Callback, defender);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void Recover_Callback(object state)
|
||||
private void Recover_Callback(Mobile defender)
|
||||
{
|
||||
if (state is Mobile defender)
|
||||
{
|
||||
defender.Frozen = false;
|
||||
defender.Combatant = null;
|
||||
defender.LocalOverheadMessage(MessageType.Regular, 0x3B2, false, "You recover your senses.");
|
||||
}
|
||||
|
||||
defender.Frozen = false;
|
||||
defender.Combatant = null;
|
||||
defender.LocalOverheadMessage(MessageType.Regular, 0x3B2, false, "You recover your senses.");
|
||||
m_Stunning = false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class KhaldunRevenant : BaseCreature
|
||||
{
|
||||
private static Hashtable m_Table = new Hashtable();
|
||||
private static HashSet<Mobile> m_Set = new HashSet<Mobile>();
|
||||
private DateTime m_ExpireTime;
|
||||
|
||||
private Mobile m_Target;
|
||||
|
|
@ -47,9 +48,7 @@ namespace Server.Mobiles
|
|||
|
||||
VirtualArmor = 60;
|
||||
|
||||
Halberd weapon = new Halberd();
|
||||
weapon.Hue = 0x41CE;
|
||||
weapon.Movable = false;
|
||||
Halberd weapon = new Halberd { Hue = 0x41CE, Movable = false };
|
||||
|
||||
AddItem(weapon);
|
||||
}
|
||||
|
|
@ -81,7 +80,7 @@ namespace Server.Mobiles
|
|||
if (lastKiller is BaseCreature)
|
||||
lastKiller = ((BaseCreature)lastKiller).GetMaster();
|
||||
|
||||
if (IsInsideKhaldun(m) && IsInsideKhaldun(lastKiller) && lastKiller.Player && !m_Table.Contains(lastKiller))
|
||||
if (IsInsideKhaldun(m) && IsInsideKhaldun(lastKiller) && lastKiller.Player && !m_Set.Contains(lastKiller))
|
||||
foreach (AggressorInfo ai in m.Aggressors)
|
||||
if (ai.Attacker == lastKiller && ai.CanReportMurder)
|
||||
{
|
||||
|
|
@ -99,12 +98,12 @@ namespace Server.Mobiles
|
|||
revenant.FixedParticles(0, 0, 0, 0x13A7, EffectLayer.Waist);
|
||||
Effects.PlaySound(revenant.Location, revenant.Map, 0x29);
|
||||
|
||||
m_Table.Add(killer, null);
|
||||
m_Set.Add(killer);
|
||||
}
|
||||
|
||||
public static bool IsInsideKhaldun(Mobile from)
|
||||
{
|
||||
return from?.Region != null && from.Region.IsPartOf("Khaldun");
|
||||
return from?.Region?.IsPartOf("Khaldun") == true;
|
||||
}
|
||||
|
||||
public override void DisplayPaperdollTo(Mobile to)
|
||||
|
|
@ -152,7 +151,7 @@ namespace Server.Mobiles
|
|||
public override void OnDelete()
|
||||
{
|
||||
if (m_Target != null)
|
||||
m_Table.Remove(m_Target);
|
||||
m_Set.Remove(m_Target);
|
||||
|
||||
base.OnDelete();
|
||||
}
|
||||
|
|
@ -173,4 +172,4 @@ namespace Server.Mobiles
|
|||
Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
using System.Linq;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
|
|
@ -108,35 +109,15 @@ namespace Server.Mobiles
|
|||
if (map == null)
|
||||
return;
|
||||
|
||||
int orcs = 0;
|
||||
|
||||
foreach (Mobile m in GetMobilesInRange(10))
|
||||
if (m is OrcishLord)
|
||||
++orcs;
|
||||
IPooledEnumerable<OrcishLord> eable = GetMobilesInRange<OrcishLord>(10);
|
||||
int orcs = eable.Count();
|
||||
eable.Free();
|
||||
|
||||
if (orcs < 10)
|
||||
{
|
||||
BaseCreature orc = new SpawnedOrcishLord();
|
||||
|
||||
orc.Team = Team;
|
||||
|
||||
Point3D loc = target.Location;
|
||||
bool validLocation = false;
|
||||
|
||||
for (int j = 0; !validLocation && j < 10; ++j)
|
||||
{
|
||||
int x = target.X + Utility.Random(3) - 1;
|
||||
int y = target.Y + Utility.Random(3) - 1;
|
||||
int z = map.GetAverageZ(x, y);
|
||||
|
||||
if (validLocation = map.CanFit(x, y, Z, 16, false, false))
|
||||
loc = new Point3D(x, y, Z);
|
||||
else if (validLocation = map.CanFit(x, y, z, 16, false, false))
|
||||
loc = new Point3D(x, y, z);
|
||||
}
|
||||
|
||||
orc.MoveToWorld(loc, map);
|
||||
BaseCreature orc = new SpawnedOrcishLord{ Team = Team };
|
||||
|
||||
orc.MoveToWorld(map.GetRandomNearbyLocation(target.Location), map);
|
||||
orc.Combatant = target;
|
||||
}
|
||||
}
|
||||
|
|
@ -153,4 +134,4 @@ namespace Server.Mobiles
|
|||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ namespace Server.Mobiles
|
|||
public ChaosDragoon() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.15, 0.4)
|
||||
{
|
||||
Body = 0x190;
|
||||
Hue = Utility.RandomSkinHue();
|
||||
Hue = Race.Human.RandomSkinHue();
|
||||
|
||||
SetStr(176, 225);
|
||||
SetDex(81, 95);
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ namespace Server.Mobiles
|
|||
: base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.15, 0.4)
|
||||
{
|
||||
Body = 0x190;
|
||||
Hue = Utility.RandomSkinHue();
|
||||
Hue = Race.Human.RandomSkinHue();
|
||||
|
||||
SetStr(276, 350);
|
||||
SetDex(66, 90);
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ namespace Server.Mobiles
|
|||
|
||||
foreach (Mobile m in GetMobilesInRange(8))
|
||||
if (m is JukaLord lord && IsFriend(lord) && lord.Combatant != null && CanBeBeneficial(lord) &&
|
||||
lord.CanBeginAction(typeof(JukaMage)) && InLOS(lord))
|
||||
lord.CanBeginAction<JukaMage>() && InLOS(lord))
|
||||
{
|
||||
toBuff = lord;
|
||||
break;
|
||||
|
|
@ -121,7 +121,7 @@ namespace Server.Mobiles
|
|||
|
||||
if (toBuff != null)
|
||||
{
|
||||
if (CanBeBeneficial(toBuff) && toBuff.BeginAction(typeof(JukaMage)))
|
||||
if (CanBeBeneficial(toBuff) && toBuff.BeginAction<JukaMage>())
|
||||
{
|
||||
m_NextAbilityTime = DateTime.UtcNow + TimeSpan.FromSeconds(Utility.RandomMinMax(30, 60));
|
||||
|
||||
|
|
@ -130,8 +130,6 @@ namespace Server.Mobiles
|
|||
|
||||
DoBeneficial(toBuff);
|
||||
|
||||
object[] state = { toBuff, toBuff.HitsMaxSeed, toBuff.RawStr, toBuff.RawDex };
|
||||
|
||||
SpellHelper.Turn(this, toBuff);
|
||||
|
||||
int toScale = toBuff.HitsMaxSeed;
|
||||
|
|
@ -161,7 +159,7 @@ namespace Server.Mobiles
|
|||
toBuff.FixedParticles(0x375A, 10, 15, 5017, EffectLayer.Waist);
|
||||
toBuff.PlaySound(0x1EE);
|
||||
|
||||
Timer.DelayCall(TimeSpan.FromSeconds(20.0), new TimerStateCallback(Unbuff), state);
|
||||
Timer.DelayCall(TimeSpan.FromSeconds(20.0), () => Unbuff(toBuff, toBuff.HitsMaxSeed, toBuff.RawStr, toBuff.RawDex));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -173,20 +171,16 @@ namespace Server.Mobiles
|
|||
base.OnThink();
|
||||
}
|
||||
|
||||
private void Unbuff(object state)
|
||||
private void Unbuff(JukaLord toDebuff, int hitsMaxSeed, int rawStr, int rawDex)
|
||||
{
|
||||
object[] states = (object[])state;
|
||||
|
||||
JukaLord toDebuff = (JukaLord)states[0];
|
||||
|
||||
toDebuff.EndAction(typeof(JukaMage));
|
||||
toDebuff.EndAction<JukaMage>();
|
||||
|
||||
if (toDebuff.Deleted)
|
||||
return;
|
||||
|
||||
toDebuff.HitsMaxSeed = (int)states[1];
|
||||
toDebuff.RawStr = (int)states[2];
|
||||
toDebuff.RawDex = (int)states[3];
|
||||
toDebuff.HitsMaxSeed = hitsMaxSeed;
|
||||
toDebuff.RawStr = rawStr;
|
||||
toDebuff.RawDex = rawDex;
|
||||
|
||||
toDebuff.Hits = toDebuff.Hits;
|
||||
toDebuff.Stam = toDebuff.Stam;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Server.Items;
|
||||
using Server.Spells;
|
||||
|
||||
|
|
@ -136,17 +138,14 @@ namespace Server.Mobiles
|
|||
{
|
||||
m_NextAbilityTime = DateTime.UtcNow + TimeSpan.FromSeconds(Utility.RandomMinMax(10, 15));
|
||||
|
||||
ArrayList list = new ArrayList();
|
||||
IPooledEnumerable<Mobile> eable = GetMobilesInRange(8);
|
||||
|
||||
foreach (Mobile m in GetMobilesInRange(8))
|
||||
if (m is MeerWarrior && IsFriend(m) && CanBeBeneficial(m) && m.Hits < m.HitsMax && !m.Poisoned &&
|
||||
!MortalStrike.IsWounded(m))
|
||||
list.Add(m);
|
||||
|
||||
for (int i = 0; i < list.Count; ++i)
|
||||
foreach (Mobile m in eable)
|
||||
{
|
||||
Mobile m = (Mobile)list[i];
|
||||
|
||||
if (!(m is MeerWarrior) || !IsFriend(m) || !CanBeBeneficial(m) || m.Hits >= m.HitsMax || m.Poisoned ||
|
||||
MortalStrike.IsWounded(m))
|
||||
continue;
|
||||
|
||||
DoBeneficial(m);
|
||||
|
||||
int toHeal = Utility.RandomMinMax(20, 30);
|
||||
|
|
@ -158,6 +157,8 @@ namespace Server.Mobiles
|
|||
m.FixedParticles(0x376A, 9, 32, 5030, EffectLayer.Waist);
|
||||
m.PlaySound(0x202);
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
}
|
||||
|
||||
base.OnThink();
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
|
|
@ -92,11 +94,11 @@ namespace Server.Mobiles
|
|||
|
||||
private void DoAreaLeech_Finish()
|
||||
{
|
||||
ArrayList list = new ArrayList();
|
||||
IPooledEnumerable<Mobile> eable = GetMobilesInRange(6);
|
||||
|
||||
foreach (Mobile m in GetMobilesInRange(6))
|
||||
if (CanBeHarmful(m) && IsEnemy(m))
|
||||
list.Add(m);
|
||||
List<Mobile> list = eable.Where(m => CanBeHarmful(m) && IsEnemy(m)).ToList();
|
||||
|
||||
eable.Free();
|
||||
|
||||
if (list.Count == 0)
|
||||
{
|
||||
|
|
@ -115,20 +117,15 @@ namespace Server.Mobiles
|
|||
|
||||
for (int i = 0; i < list.Count; ++i)
|
||||
{
|
||||
Mobile m = (Mobile)list[i];
|
||||
Mobile m = list[i];
|
||||
|
||||
int damage = (int)(m.Hits * scalar);
|
||||
|
||||
damage += Utility.RandomMinMax(-5, 5);
|
||||
|
||||
if (damage < 1)
|
||||
damage = 1;
|
||||
int damage = (int)(m.Hits * scalar) + Utility.RandomMinMax(-5, 5);
|
||||
|
||||
m.MovingParticles(this, 0x36F4, 1, 0, false, false, 32, 0, 9535, 1, 0, (EffectLayer)255, 0x100);
|
||||
m.MovingParticles(this, 0x0001, 1, 0, false, true, 32, 0, 9535, 9536, 0, (EffectLayer)255, 0);
|
||||
|
||||
DoHarmful(m);
|
||||
Hits += AOS.Damage(m, this, damage, 100, 0, 0, 0, 0);
|
||||
Hits += AOS.Damage(m, this, Math.Max(damage, 1), 100, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
Say(true, "If I cannot cleanse thy soul, I will destroy it!");
|
||||
|
|
@ -139,27 +136,23 @@ namespace Server.Mobiles
|
|||
{
|
||||
Say(true, message);
|
||||
|
||||
Timer.DelayCall(TimeSpan.FromSeconds(0.5), new TimerStateCallback(DoFocusedLeech_Stage1), combatant);
|
||||
Timer.DelayCall(TimeSpan.FromSeconds(0.5), DoFocusedLeech_Stage1, combatant);
|
||||
}
|
||||
|
||||
private void DoFocusedLeech_Stage1(object state)
|
||||
private void DoFocusedLeech_Stage1(Mobile combatant)
|
||||
{
|
||||
Mobile combatant = (Mobile)state;
|
||||
|
||||
if (CanBeHarmful(combatant))
|
||||
{
|
||||
MovingParticles(combatant, 0x36FA, 1, 0, false, false, 1108, 0, 9533, 1, 0, (EffectLayer)255, 0x100);
|
||||
MovingParticles(combatant, 0x0001, 1, 0, false, true, 1108, 0, 9533, 9534, 0, (EffectLayer)255, 0);
|
||||
PlaySound(0x1FB);
|
||||
|
||||
Timer.DelayCall(TimeSpan.FromSeconds(1.0), new TimerStateCallback(DoFocusedLeech_Stage2), combatant);
|
||||
Timer.DelayCall(TimeSpan.FromSeconds(1.0), DoFocusedLeech_Stage2, combatant);
|
||||
}
|
||||
}
|
||||
|
||||
private void DoFocusedLeech_Stage2(object state)
|
||||
private void DoFocusedLeech_Stage2(Mobile combatant)
|
||||
{
|
||||
Mobile combatant = (Mobile)state;
|
||||
|
||||
if (CanBeHarmful(combatant))
|
||||
{
|
||||
combatant.MovingParticles(this, 0x36F4, 1, 0, false, false, 32, 0, 9535, 1, 0, (EffectLayer)255, 0x100);
|
||||
|
|
@ -218,4 +211,4 @@ namespace Server.Mobiles
|
|||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
|
||||
|
|
@ -7,7 +8,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
public class MeerMage : BaseCreature
|
||||
{
|
||||
private static Hashtable m_Table = new Hashtable();
|
||||
private static Dictionary<Mobile, Timer> m_Table = new Dictionary<Mobile, Timer>();
|
||||
|
||||
private DateTime m_NextAbilityTime;
|
||||
|
||||
|
|
@ -145,9 +146,11 @@ namespace Server.Mobiles
|
|||
}
|
||||
else if (combatant.Player)
|
||||
{
|
||||
int count = 0;
|
||||
|
||||
Say(true, "I call a plague of insects to sting your flesh!");
|
||||
m_Table[combatant] = Timer.DelayCall(TimeSpan.FromSeconds(0.5), TimeSpan.FromSeconds(7.0),
|
||||
new TimerStateCallback(DoEffect), new object[] { combatant, 0 });
|
||||
() => DoEffect(combatant, count++));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -157,29 +160,26 @@ namespace Server.Mobiles
|
|||
|
||||
public static bool UnderEffect(Mobile m)
|
||||
{
|
||||
return m_Table.Contains(m);
|
||||
return m_Table.ContainsKey(m);
|
||||
}
|
||||
|
||||
public static void StopEffect(Mobile m, bool message)
|
||||
{
|
||||
if (m_Table[m] is Timer t)
|
||||
Timer timer = m_Table[m];
|
||||
|
||||
if (timer != null)
|
||||
{
|
||||
if (message)
|
||||
m.PublicOverheadMessage(MessageType.Emote, m.SpeechHue, true,
|
||||
"* The open flame begins to scatter the swarm of insects *");
|
||||
|
||||
t.Stop();
|
||||
timer.Stop();
|
||||
m_Table.Remove(m);
|
||||
}
|
||||
}
|
||||
|
||||
public void DoEffect(object state)
|
||||
public void DoEffect(Mobile m, int count)
|
||||
{
|
||||
object[] states = (object[])state;
|
||||
|
||||
Mobile m = (Mobile)states[0];
|
||||
int count = (int)states[1];
|
||||
|
||||
if (!m.Alive)
|
||||
{
|
||||
StopEffect(m, false);
|
||||
|
|
@ -206,8 +206,6 @@ namespace Server.Mobiles
|
|||
|
||||
AOS.Damage(m, this, Utility.RandomMinMax(30, 40) - (Core.AOS ? 0 : 10), 100, 0, 0, 0, 0);
|
||||
|
||||
states[1] = count + 1;
|
||||
|
||||
if (!m.Alive)
|
||||
StopEffect(m, false);
|
||||
}
|
||||
|
|
@ -226,4 +224,4 @@ namespace Server.Mobiles
|
|||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,8 +96,8 @@ namespace Server.Mobiles
|
|||
{
|
||||
AnimalTaming.ScaleStats(this, 0.50);
|
||||
AnimalTaming.ScaleSkills(this, 0.80, 0.90); // 90% * 80% = 72% of original skills trainable to 90%
|
||||
Skills[SkillName.Magery].Base =
|
||||
Skills[SkillName.Magery]
|
||||
Skills.Magery.Base =
|
||||
Skills.Magery
|
||||
.Cap; // Greater dragons have a 90% cap reduction and 90% skill reduction on magery
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,9 +9,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
public class Ilhenir : BaseChampion
|
||||
{
|
||||
private static Hashtable m_Table;
|
||||
|
||||
private DateTime m_NextDrop = DateTime.UtcNow;
|
||||
private static Dictionary<Mobile, Timer> m_Table = new Dictionary<Mobile, Timer>();
|
||||
|
||||
[Constructible]
|
||||
public Ilhenir()
|
||||
|
|
@ -232,41 +230,25 @@ namespace Server.Mobiles
|
|||
|
||||
public virtual void CacophonicAttack(Mobile to)
|
||||
{
|
||||
if (m_Table == null)
|
||||
m_Table = new Hashtable();
|
||||
|
||||
if (to.Alive && to.Player && m_Table[to] == null)
|
||||
if (to.Alive && to.Player && !m_Table.ContainsKey(to))
|
||||
{
|
||||
to.Send(SpeedControl.WalkSpeed);
|
||||
to.SendLocalizedMessage(1072069); // A cacophonic sound lambastes you, suppressing your ability to move.
|
||||
to.PlaySound(0x584);
|
||||
|
||||
m_Table[to] = Timer.DelayCall(TimeSpan.FromSeconds(30), new TimerStateCallback(EndCacophonic_Callback), to);
|
||||
m_Table[to] = Timer.DelayCall(TimeSpan.FromSeconds(30), CacophonicEnd, to);
|
||||
}
|
||||
}
|
||||
|
||||
private void EndCacophonic_Callback(object state)
|
||||
{
|
||||
if (state is Mobile mobile)
|
||||
CacophonicEnd(mobile);
|
||||
}
|
||||
|
||||
public virtual void CacophonicEnd(Mobile from)
|
||||
{
|
||||
if (m_Table == null)
|
||||
m_Table = new Hashtable();
|
||||
|
||||
m_Table[from] = null;
|
||||
|
||||
m_Table.Remove(from);
|
||||
from.Send(SpeedControl.Disable);
|
||||
}
|
||||
|
||||
public static bool UnderCacophonicAttack(Mobile from)
|
||||
{
|
||||
if (m_Table == null)
|
||||
m_Table = new Hashtable();
|
||||
|
||||
return m_Table[from] != null;
|
||||
return m_Table.ContainsKey(from);
|
||||
}
|
||||
|
||||
public virtual void DropOoze()
|
||||
|
|
@ -336,14 +318,7 @@ namespace Server.Mobiles
|
|||
private Timer m_Timer;
|
||||
|
||||
[Constructible]
|
||||
public StainedOoze()
|
||||
: this(false)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public StainedOoze(bool corrosive)
|
||||
: base(0x122A)
|
||||
public StainedOoze(bool corrosive = false) : base(0x122A)
|
||||
{
|
||||
Movable = false;
|
||||
Hue = 0x95;
|
||||
|
|
@ -447,4 +422,4 @@ namespace Server.Mobiles
|
|||
m_Ticks = ItemID == 0x122A ? 0 : 30;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -128,34 +128,35 @@ namespace Server.Mobiles
|
|||
{
|
||||
base.OnDeath(c);
|
||||
|
||||
if (Core.ML)
|
||||
if (!Core.ML)
|
||||
return;
|
||||
|
||||
c.DropItem(new MalletAndChisel());
|
||||
|
||||
switch (Utility.Random(3))
|
||||
{
|
||||
c.DropItem(new MalletAndChisel());
|
||||
|
||||
switch (Utility.Random(3))
|
||||
{
|
||||
case 0:
|
||||
c.DropItem(new MinotaurHedge());
|
||||
break;
|
||||
case 1:
|
||||
c.DropItem(new BonePile());
|
||||
break;
|
||||
case 2:
|
||||
c.DropItem(new LightYarn());
|
||||
break;
|
||||
}
|
||||
|
||||
if (Utility.RandomBool())
|
||||
c.DropItem(new TormentedChains());
|
||||
|
||||
if (Utility.RandomDouble() < 0.025)
|
||||
c.DropItem(new CrimsonCincture());
|
||||
case 0:
|
||||
c.DropItem(new MinotaurHedge());
|
||||
break;
|
||||
case 1:
|
||||
c.DropItem(new BonePile());
|
||||
break;
|
||||
case 2:
|
||||
c.DropItem(new LightYarn());
|
||||
break;
|
||||
}
|
||||
|
||||
if (Utility.RandomBool())
|
||||
c.DropItem(new TormentedChains());
|
||||
|
||||
if (Utility.RandomDouble() < 0.025)
|
||||
c.DropItem(new CrimsonCincture());
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
if (Core.ML) AddLoot(LootPack.AosSuperBoss, 5); // Need to verify
|
||||
if (Core.ML)
|
||||
AddLoot(LootPack.AosSuperBoss, 5); // Need to verify
|
||||
}
|
||||
|
||||
public override int GetAngerSound()
|
||||
|
|
@ -186,43 +187,36 @@ namespace Server.Mobiles
|
|||
public override void OnGaveMeleeAttack(Mobile defender)
|
||||
{
|
||||
base.OnGaveMeleeAttack(defender);
|
||||
|
||||
if (0.2 >= Utility.RandomDouble())
|
||||
Earthquake();
|
||||
}
|
||||
|
||||
public void Earthquake()
|
||||
{
|
||||
Map map = Map;
|
||||
if (map == null)
|
||||
return;
|
||||
ArrayList targets = new ArrayList();
|
||||
foreach (Mobile m in GetMobilesInRange(8))
|
||||
{
|
||||
if (m == this || !CanBeHarmful(m))
|
||||
continue;
|
||||
if (m is BaseCreature creature && (creature.Controlled || creature.Summoned || creature.Team != Team))
|
||||
targets.Add(m);
|
||||
else if (m.Player)
|
||||
targets.Add(m);
|
||||
}
|
||||
IPooledEnumerable<Mobile> eable = GetMobilesInRange(8);
|
||||
|
||||
PlaySound(0x2F3);
|
||||
for (int i = 0; i < targets.Count; ++i)
|
||||
foreach (Mobile m in eable)
|
||||
{
|
||||
Mobile m = (Mobile)targets[i];
|
||||
if (m != null && !m.Deleted && m is PlayerMobile pm)
|
||||
if (pm.Mounted)
|
||||
if (m == this || !CanBeHarmful(m) || m.Deleted || !m.Player &&
|
||||
!(m is BaseCreature creature && (creature.Controlled || creature.Summoned || creature.Team != Team)))
|
||||
continue;
|
||||
|
||||
if (m is PlayerMobile pm && pm.Mounted)
|
||||
pm.Mount.Rider = null;
|
||||
double damage = m.Hits * 0.6; //was .6
|
||||
if (damage < 10.0)
|
||||
damage = 10.0;
|
||||
else if (damage > 75.0)
|
||||
damage = 75.0;
|
||||
|
||||
int damage = (int)(m.Hits * 0.6);
|
||||
if (damage < 10)
|
||||
damage = 10;
|
||||
else if (damage > 75)
|
||||
damage = 75;
|
||||
DoHarmful(m);
|
||||
AOS.Damage(m, this, (int)damage, 100, 0, 0, 0, 0);
|
||||
AOS.Damage(m, this, damage, 100, 0, 0, 0, 0);
|
||||
if (m.Alive && m.Body.IsHuman && !m.Mounted)
|
||||
m.Animate(20, 7, 1, true, false, 0); // take hit
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
|
|
@ -256,4 +250,4 @@ namespace Server.Mobiles
|
|||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,27 +92,9 @@ namespace Server.Mobiles
|
|||
|
||||
for (int i = 0; i < newPixies; ++i)
|
||||
{
|
||||
Pixie pixie = new Pixie();
|
||||
Pixie pixie = new Pixie { Team = Team, FightMode = FightMode.Closest };
|
||||
|
||||
pixie.Team = Team;
|
||||
pixie.FightMode = FightMode.Closest;
|
||||
|
||||
bool validLocation = false;
|
||||
Point3D loc = Location;
|
||||
|
||||
for (int j = 0; !validLocation && j < 10; ++j)
|
||||
{
|
||||
int x = X + Utility.Random(3) - 1;
|
||||
int y = Y + Utility.Random(3) - 1;
|
||||
int z = map.GetAverageZ(x, y);
|
||||
|
||||
if (validLocation = map.CanFit(x, y, Z, 16, false, false))
|
||||
loc = new Point3D(x, y, Z);
|
||||
else if (validLocation = map.CanFit(x, y, z, 16, false, false))
|
||||
loc = new Point3D(x, y, z);
|
||||
}
|
||||
|
||||
pixie.MoveToWorld(loc, map);
|
||||
pixie.MoveToWorld(map.GetRandomNearbyLocation(Location), map);
|
||||
pixie.Combatant = target;
|
||||
}
|
||||
}
|
||||
|
|
@ -153,4 +135,4 @@ namespace Server.Mobiles
|
|||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,12 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Swoop : Eagle
|
||||
{
|
||||
private static Hashtable m_Table = new Hashtable();
|
||||
private static Dictionary<Mobile, ExpireTimer> m_Table = new Dictionary<Mobile, ExpireTimer>();
|
||||
|
||||
[Constructible]
|
||||
public Swoop()
|
||||
|
|
@ -102,7 +103,7 @@ namespace Server.Mobiles
|
|||
|
||||
if (0.1 > Utility.RandomDouble())
|
||||
{
|
||||
ExpireTimer timer = (ExpireTimer)m_Table[defender];
|
||||
ExpireTimer timer = m_Table[defender];
|
||||
|
||||
if (timer != null)
|
||||
{
|
||||
|
|
@ -169,4 +170,4 @@ namespace Server.Mobiles
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ namespace Server.Mobiles
|
|||
Direction = GetDirectionTo(from);
|
||||
from.PlaySound(0x1F2);
|
||||
from.FixedEffect(0x376A, 10, 16);
|
||||
from.CloseGump(typeof(ResurrectGump));
|
||||
from.CloseGump<ResurrectGump>();
|
||||
from.SendGump(new ResurrectGump(from, ResurrectMessage.Healer));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,8 +47,8 @@ namespace Server.Mobiles
|
|||
|
||||
SetSkill(SkillName.MagicResist, level);
|
||||
SetSkill(SkillName.Wrestling, level);
|
||||
SetSkill(SkillName.Anatomy, caster.Skills[SkillName.Anatomy].Value / 2);
|
||||
SetSkill(SkillName.Tactics, caster.Skills[SkillName.Tactics].Value / 2);
|
||||
SetSkill(SkillName.Anatomy, caster.Skills.Anatomy.Value / 2);
|
||||
SetSkill(SkillName.Tactics, caster.Skills.Tactics.Value / 2);
|
||||
|
||||
Fame = 0;
|
||||
Karma = 0;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
|
|
@ -42,8 +44,7 @@ namespace Server.Mobiles
|
|||
ControlSlots = Core.SE ? 2 : 1;
|
||||
}
|
||||
|
||||
public BladeSpirits(Serial serial)
|
||||
: base(serial)
|
||||
public BladeSpirits(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -61,7 +62,7 @@ namespace Server.Mobiles
|
|||
|
||||
public override double GetFightModeRanking(Mobile m, FightMode acqType, bool bPlayerOnly)
|
||||
{
|
||||
return (m.Str + m.Skills[SkillName.Tactics].Value) / Math.Max(GetDistanceToSqrt(m), 1.0);
|
||||
return (m.Str + m.Skills.Tactics.Value) / Math.Max(GetDistanceToSqrt(m), 1.0);
|
||||
}
|
||||
|
||||
public override int GetAngerSound()
|
||||
|
|
@ -83,18 +84,17 @@ namespace Server.Mobiles
|
|||
{
|
||||
if (Core.SE && Summoned)
|
||||
{
|
||||
ArrayList spirtsOrVortexes = new ArrayList();
|
||||
IPooledEnumerable<Mobile> eable = GetMobilesInRange(5);
|
||||
List<Mobile> spiritsOrVortexes = eable
|
||||
.Where(m => (m is EnergyVortex || m is BladeSpirits) && ((BaseCreature)m).Summoned).ToList();
|
||||
|
||||
foreach (Mobile m in GetMobilesInRange(5))
|
||||
if (m is EnergyVortex || m is BladeSpirits)
|
||||
if (((BaseCreature)m).Summoned)
|
||||
spirtsOrVortexes.Add(m);
|
||||
eable.Free();
|
||||
|
||||
while (spirtsOrVortexes.Count > 6)
|
||||
while (spiritsOrVortexes.Count > 6)
|
||||
{
|
||||
int index = Utility.Random(spirtsOrVortexes.Count);
|
||||
Dispel((Mobile)spirtsOrVortexes[index]);
|
||||
spirtsOrVortexes.RemoveAt(index);
|
||||
int index = Utility.Random(spiritsOrVortexes.Count);
|
||||
Dispel(spiritsOrVortexes[index]);
|
||||
spiritsOrVortexes.RemoveAt(index);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -115,4 +115,4 @@ namespace Server.Mobiles
|
|||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
|
|
@ -70,7 +72,7 @@ namespace Server.Mobiles
|
|||
|
||||
public override double GetFightModeRanking(Mobile m, FightMode acqType, bool bPlayerOnly)
|
||||
{
|
||||
return (m.Int + m.Skills[SkillName.Magery].Value) / Math.Max(GetDistanceToSqrt(m), 1.0);
|
||||
return (m.Int + m.Skills.Magery.Value) / Math.Max(GetDistanceToSqrt(m), 1.0);
|
||||
}
|
||||
|
||||
public override int GetAngerSound()
|
||||
|
|
@ -87,19 +89,17 @@ namespace Server.Mobiles
|
|||
{
|
||||
if (Core.SE && Summoned)
|
||||
{
|
||||
ArrayList spirtsOrVortexes = new ArrayList();
|
||||
IPooledEnumerable<Mobile> eable = GetMobilesInRange(5);
|
||||
List<Mobile> spiritsOrVortexes = eable
|
||||
.Where(m => (m is EnergyVortex || m is BladeSpirits) && ((BaseCreature)m).Summoned).ToList();
|
||||
|
||||
foreach (Mobile m in GetMobilesInRange(5))
|
||||
if (m is EnergyVortex || m is BladeSpirits)
|
||||
if (((BaseCreature)m).Summoned)
|
||||
spirtsOrVortexes.Add(m);
|
||||
eable.Free();
|
||||
|
||||
while (spirtsOrVortexes.Count > 6)
|
||||
while (spiritsOrVortexes.Count > 6)
|
||||
{
|
||||
int index = Utility.Random(spirtsOrVortexes.Count);
|
||||
//TODO: Confirm if it's the dispel with all the pretty effects or just a deletion of it.
|
||||
Dispel((Mobile)spirtsOrVortexes[index]);
|
||||
spirtsOrVortexes.RemoveAt(index);
|
||||
int index = Utility.Random(spiritsOrVortexes.Count);
|
||||
Dispel(spiritsOrVortexes[index]);
|
||||
spiritsOrVortexes.RemoveAt(index);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -123,4 +123,4 @@ namespace Server.Mobiles
|
|||
BaseSoundID = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -175,20 +175,16 @@ namespace Server.Mobiles
|
|||
if (defender.Alive)
|
||||
{
|
||||
defender.Frozen = true;
|
||||
Timer.DelayCall(TimeSpan.FromSeconds(5.0), new TimerStateCallback(Recover_Callback), defender);
|
||||
Timer.DelayCall(TimeSpan.FromSeconds(5.0), Recover_Callback, defender);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void Recover_Callback(object state)
|
||||
private void Recover_Callback(Mobile defender)
|
||||
{
|
||||
if (state is Mobile defender)
|
||||
{
|
||||
defender.Frozen = false;
|
||||
defender.Combatant = null;
|
||||
defender.LocalOverheadMessage(MessageType.Regular, 0x3B2, false, "You recover your senses.");
|
||||
}
|
||||
|
||||
defender.Frozen = false;
|
||||
defender.Combatant = null;
|
||||
defender.LocalOverheadMessage(MessageType.Regular, 0x3B2, false, "You recover your senses.");
|
||||
m_Stunning = false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server.Engines.Plants;
|
||||
using Server.Items;
|
||||
|
||||
|
|
@ -82,47 +83,33 @@ namespace Server.Mobiles
|
|||
if (map == null)
|
||||
return;
|
||||
|
||||
Bogling spawned = new Bogling();
|
||||
Bogling spawned = new Bogling { Team = Team };
|
||||
|
||||
spawned.Team = Team;
|
||||
|
||||
bool validLocation = false;
|
||||
Point3D loc = Location;
|
||||
|
||||
for (int j = 0; !validLocation && j < 10; ++j)
|
||||
{
|
||||
int x = X + Utility.Random(3) - 1;
|
||||
int y = Y + Utility.Random(3) - 1;
|
||||
int z = map.GetAverageZ(x, y);
|
||||
|
||||
if (validLocation = map.CanFit(x, y, Z, 16, false, false))
|
||||
loc = new Point3D(x, y, Z);
|
||||
else if (validLocation = map.CanFit(x, y, z, 16, false, false))
|
||||
loc = new Point3D(x, y, z);
|
||||
}
|
||||
|
||||
spawned.MoveToWorld(loc, map);
|
||||
spawned.MoveToWorld(map.GetRandomNearbyLocation(Location), map);
|
||||
spawned.Combatant = m;
|
||||
}
|
||||
|
||||
public void EatBoglings()
|
||||
{
|
||||
ArrayList toEat = new ArrayList();
|
||||
IPooledEnumerable<Bogling> eable = GetMobilesInRange<Bogling>(2);
|
||||
bool sound = true;
|
||||
|
||||
foreach (Mobile m in GetMobilesInRange(2))
|
||||
if (m is Bogling)
|
||||
toEat.Add(m);
|
||||
|
||||
if (toEat.Count > 0)
|
||||
foreach (Bogling bogling in eable)
|
||||
{
|
||||
PlaySound(Utility.Random(0x3B, 2)); // Eat sound
|
||||
if (Hits >= HitsMax)
|
||||
break;
|
||||
|
||||
foreach (Mobile m in toEat)
|
||||
if (sound)
|
||||
{
|
||||
Hits += m.Hits / 2;
|
||||
m.Delete();
|
||||
PlaySound(Utility.Random(0x3B, 2)); // Eat sound
|
||||
sound = false;
|
||||
}
|
||||
|
||||
Hits += bogling.Hits / 2;
|
||||
bogling.Delete();
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
}
|
||||
|
||||
public override void OnGotMeleeAttack(Mobile attacker)
|
||||
|
|
@ -135,9 +122,7 @@ namespace Server.Mobiles
|
|||
SpawnBogling(attacker);
|
||||
}
|
||||
else if (0.25 >= Utility.RandomDouble())
|
||||
{
|
||||
EatBoglings();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,7 +83,6 @@ namespace Server.Mobiles
|
|||
public override double BreathMinDelay => 5.0;
|
||||
public override double BreathMaxDelay => 7.5;
|
||||
|
||||
public override double TreasureMapChance => 0.25;
|
||||
public override int TreasureMapLevel => 5;
|
||||
|
||||
public static Type[] Artifacts{ get; } =
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server.Engines.Plants;
|
||||
using Server.Items;
|
||||
|
||||
|
|
@ -7,7 +8,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
public class BakeKitsune : BaseCreature
|
||||
{
|
||||
private static Hashtable m_Table = new Hashtable();
|
||||
private static Dictionary<Mobile, ExpireTimer> m_Table = new Dictionary<Mobile, ExpireTimer>();
|
||||
|
||||
[Constructible]
|
||||
public BakeKitsune() : base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
|
|
@ -88,9 +89,10 @@ namespace Server.Mobiles
|
|||
{
|
||||
base.OnGaveMeleeAttack(defender);
|
||||
|
||||
if (0.1 > Utility.RandomDouble())
|
||||
{
|
||||
/* Blood Bath
|
||||
if (!(0.1 > Utility.RandomDouble()))
|
||||
return;
|
||||
|
||||
/* Blood Bath
|
||||
* Start cliloc 1070826
|
||||
* Sound: 0x52B
|
||||
* 2-3 blood spots
|
||||
|
|
@ -98,22 +100,21 @@ namespace Server.Mobiles
|
|||
* End cliloc: 1070824
|
||||
*/
|
||||
|
||||
ExpireTimer timer = (ExpireTimer)m_Table[defender];
|
||||
ExpireTimer timer = m_Table[defender];
|
||||
|
||||
if (timer != null)
|
||||
{
|
||||
timer.DoExpire();
|
||||
defender.SendLocalizedMessage(1070825); // The creature continues to rage!
|
||||
}
|
||||
else
|
||||
{
|
||||
defender.SendLocalizedMessage(1070826); // The creature goes into a rage, inflicting heavy damage!
|
||||
}
|
||||
|
||||
timer = new ExpireTimer(defender, this);
|
||||
timer.Start();
|
||||
m_Table[defender] = timer;
|
||||
if (timer != null)
|
||||
{
|
||||
timer.DoExpire();
|
||||
defender.SendLocalizedMessage(1070825); // The creature continues to rage!
|
||||
}
|
||||
else
|
||||
{
|
||||
defender.SendLocalizedMessage(1070826); // The creature goes into a rage, inflicting heavy damage!
|
||||
}
|
||||
|
||||
timer = new ExpireTimer(defender, this);
|
||||
timer.Start();
|
||||
m_Table[defender] = timer;
|
||||
}
|
||||
|
||||
public override int GetAngerSound()
|
||||
|
|
@ -286,4 +287,4 @@ namespace Server.Mobiles
|
|||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ namespace Server.Mobiles
|
|||
public EliteNinja() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
SpeechHue = Utility.RandomDyedHue();
|
||||
Hue = Utility.RandomSkinHue();
|
||||
Hue = Race.Human.RandomSkinHue();
|
||||
Female = Utility.RandomBool();
|
||||
|
||||
Body = Female ? 0x191 : 0x190;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server.Engines.Plants;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
|
|
@ -8,7 +9,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
public class FanDancer : BaseCreature
|
||||
{
|
||||
private static Hashtable m_Table = new Hashtable();
|
||||
private static Dictionary<Mobile, ExpireTimer> m_Table = new Dictionary<Mobile, ExpireTimer>();
|
||||
|
||||
[Constructible]
|
||||
public FanDancer() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
|
|
@ -148,7 +149,7 @@ namespace Server.Mobiles
|
|||
|
||||
public bool IsFanned(Mobile m)
|
||||
{
|
||||
return m_Table.Contains(m);
|
||||
return m_Table.ContainsKey(m);
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
|
|
@ -186,4 +187,4 @@ namespace Server.Mobiles
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server.Engines.Plants;
|
||||
using Server.Items;
|
||||
|
||||
|
|
@ -7,7 +8,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
public class Kappa : BaseCreature
|
||||
{
|
||||
private static Hashtable m_Table = new Hashtable();
|
||||
private static Dictionary<Mobile, InternalTimer> m_Table = new Dictionary<Mobile, InternalTimer>();
|
||||
|
||||
[Constructible]
|
||||
public Kappa() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
|
|
@ -110,19 +111,17 @@ namespace Server.Mobiles
|
|||
|
||||
public static bool IsBeingDrained(Mobile m)
|
||||
{
|
||||
return m_Table.Contains(m);
|
||||
return m_Table.ContainsKey(m);
|
||||
}
|
||||
|
||||
public static void BeginLifeDrain(Mobile m, Mobile from)
|
||||
{
|
||||
Timer t = (Timer)m_Table[m];
|
||||
InternalTimer timer = m_Table[m];
|
||||
|
||||
t?.Stop();
|
||||
timer?.Stop();
|
||||
m_Table[m] = timer = new InternalTimer(from, m);
|
||||
|
||||
t = new InternalTimer(from, m);
|
||||
m_Table[m] = t;
|
||||
|
||||
t.Start();
|
||||
timer.Start();
|
||||
}
|
||||
|
||||
public static void DrainLife(Mobile m, Mobile from)
|
||||
|
|
@ -140,9 +139,8 @@ namespace Server.Mobiles
|
|||
|
||||
public static void EndLifeDrain(Mobile m)
|
||||
{
|
||||
Timer t = (Timer)m_Table[m];
|
||||
|
||||
t?.Stop();
|
||||
Timer timer = m_Table[m];
|
||||
timer?.Stop();
|
||||
|
||||
m_Table.Remove(m);
|
||||
|
||||
|
|
@ -169,7 +167,6 @@ namespace Server.Mobiles
|
|||
from.SendLocalizedMessage(1070820);
|
||||
if (Mana > 14)
|
||||
Mana -= 15;
|
||||
amt ^= amt;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -215,4 +212,4 @@ namespace Server.Mobiles
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class KazeKemono : BaseCreature
|
||||
{
|
||||
private static Hashtable m_FlurryOfTwigsTable = new Hashtable();
|
||||
private static Hashtable m_ChlorophylBlastTable = new Hashtable();
|
||||
private static Dictionary<Mobile, ExpireTimer> m_FlurryOfTwigsTable = new Dictionary<Mobile, ExpireTimer>();
|
||||
private static Dictionary<Mobile, ExpireTimer> m_ChlorophylBlastTable = new Dictionary<Mobile, ExpireTimer>();
|
||||
|
||||
[Constructible]
|
||||
public KazeKemono()
|
||||
|
|
@ -73,7 +74,7 @@ namespace Server.Mobiles
|
|||
* Effect: Type: "3" From: "0x57D4F5B" To: "0x0" ItemId: "0x37B9" ItemIdName: "glow" FromLocation: "(1048 779, 6)" ToLocation: "(1048 779, 6)" Speed: "10" Duration: "5" FixedDirection: "True" Explode: "False"
|
||||
*/
|
||||
|
||||
ExpireTimer timer = (ExpireTimer)m_FlurryOfTwigsTable[defender];
|
||||
ExpireTimer timer = m_FlurryOfTwigsTable[defender];
|
||||
|
||||
if (timer != null)
|
||||
{
|
||||
|
|
@ -106,7 +107,7 @@ namespace Server.Mobiles
|
|||
* Effect: Type: "3" From: "0x57D4F5B" To: "0x0" ItemId: "0x37B9" ItemIdName: "glow" FromLocation: "(1048 779, 6)" ToLocation: "(1048 779, 6)" Speed: "10" Duration: "5" FixedDirection: "True" Explode: "False"
|
||||
*/
|
||||
|
||||
ExpireTimer timer = (ExpireTimer)m_ChlorophylBlastTable[defender];
|
||||
ExpireTimer timer = m_ChlorophylBlastTable[defender];
|
||||
|
||||
if (timer != null)
|
||||
{
|
||||
|
|
@ -148,9 +149,9 @@ namespace Server.Mobiles
|
|||
{
|
||||
private Mobile m_Mobile;
|
||||
private ResistanceMod m_Mod;
|
||||
private Hashtable m_Table;
|
||||
private Dictionary<Mobile, ExpireTimer> m_Table;
|
||||
|
||||
public ExpireTimer(Mobile m, ResistanceMod mod, Hashtable table, TimeSpan delay)
|
||||
public ExpireTimer(Mobile m, ResistanceMod mod, Dictionary<Mobile, ExpireTimer> table, TimeSpan delay)
|
||||
: base(delay)
|
||||
{
|
||||
m_Mobile = m;
|
||||
|
|
@ -177,4 +178,4 @@ namespace Server.Mobiles
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server.Engines.Plants;
|
||||
using Server.Items;
|
||||
|
||||
|
|
@ -7,7 +8,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
public class LadyOfTheSnow : BaseCreature
|
||||
{
|
||||
private static Hashtable m_Table = new Hashtable();
|
||||
private static Dictionary<Mobile, ExpireTimer> m_Table = new Dictionary<Mobile, ExpireTimer>();
|
||||
|
||||
[Constructible]
|
||||
public LadyOfTheSnow()
|
||||
|
|
@ -90,7 +91,7 @@ namespace Server.Mobiles
|
|||
* Reset cliloc: 1070831
|
||||
*/
|
||||
|
||||
ExpireTimer timer = (ExpireTimer)m_Table[defender];
|
||||
ExpireTimer timer = m_Table[defender];
|
||||
|
||||
if (timer != null)
|
||||
{
|
||||
|
|
@ -162,4 +163,4 @@ namespace Server.Mobiles
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,12 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class RaiJu : BaseCreature
|
||||
{
|
||||
private static Hashtable m_Table = new Hashtable();
|
||||
private static Dictionary<Mobile, ExpireTimer> m_Table = new Dictionary<Mobile, ExpireTimer>();
|
||||
|
||||
[Constructible]
|
||||
public RaiJu() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
|
|
@ -86,7 +87,7 @@ namespace Server.Mobiles
|
|||
|
||||
public bool IsStunned(Mobile m)
|
||||
{
|
||||
return m_Table.Contains(m);
|
||||
return m_Table.ContainsKey(m);
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
|
|
@ -127,4 +128,4 @@ namespace Server.Mobiles
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ namespace Server.Mobiles
|
|||
public Ronin() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
SpeechHue = Utility.RandomDyedHue();
|
||||
Hue = Utility.RandomSkinHue();
|
||||
Hue = Race.Human.RandomSkinHue();
|
||||
Female = Utility.RandomBool();
|
||||
Body = Female ? 0x191 : 0x190;
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
public class RuneBeetle : BaseCreature
|
||||
{
|
||||
private static Hashtable m_Table = new Hashtable();
|
||||
private static Dictionary<Mobile, ExpireTimer> m_Table = new Dictionary<Mobile, ExpireTimer>();
|
||||
|
||||
[Constructible]
|
||||
public RuneBeetle() : base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
|
|
@ -146,7 +146,7 @@ namespace Server.Mobiles
|
|||
* End ASCII: "The corruption of your armor has worn off"
|
||||
*/
|
||||
|
||||
ExpireTimer timer = (ExpireTimer)m_Table[defender];
|
||||
ExpireTimer timer = m_Table[defender];
|
||||
|
||||
if (timer != null)
|
||||
{
|
||||
|
|
@ -259,4 +259,4 @@ namespace Server.Mobiles
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server.Engines.Plants;
|
||||
using Server.Items;
|
||||
|
||||
|
|
@ -7,7 +8,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
public class TsukiWolf : BaseCreature
|
||||
{
|
||||
private static Hashtable m_Table = new Hashtable();
|
||||
private static Dictionary<Mobile, ExpireTimer> m_Table = new Dictionary<Mobile, ExpireTimer>();
|
||||
|
||||
[Constructible]
|
||||
public TsukiWolf()
|
||||
|
|
@ -112,7 +113,7 @@ namespace Server.Mobiles
|
|||
* End cliloc: 1070824
|
||||
*/
|
||||
|
||||
ExpireTimer timer = (ExpireTimer)m_Table[defender];
|
||||
ExpireTimer timer = m_Table[defender];
|
||||
|
||||
if (timer != null)
|
||||
{
|
||||
|
|
@ -209,4 +210,4 @@ namespace Server.Mobiles
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,22 +117,15 @@ namespace Server.Mobiles
|
|||
|
||||
Animate(10, 4, 1, true, false, 0);
|
||||
|
||||
ArrayList targets = new ArrayList();
|
||||
IPooledEnumerable<Mobile> eable = target.GetMobilesInRange<Mobile>(8);
|
||||
|
||||
foreach (Mobile m in target.GetMobilesInRange(8))
|
||||
foreach (Mobile m in eable)
|
||||
{
|
||||
if (m == this || !CanBeHarmful(m))
|
||||
if (m == this || !(CanBeHarmful(m) || m.Player && m.Alive))
|
||||
continue;
|
||||
|
||||
if (m is BaseCreature bc && (bc.Controlled || bc.Summoned || bc.Team != Team))
|
||||
targets.Add(m);
|
||||
else if (m.Player && m.Alive)
|
||||
targets.Add(m);
|
||||
}
|
||||
|
||||
for (int i = 0; i < targets.Count; ++i)
|
||||
{
|
||||
Mobile m = (Mobile)targets[i];
|
||||
if (!(m is BaseCreature bc) || !(bc.Controlled || bc.Summoned || bc.Team != Team))
|
||||
continue;
|
||||
|
||||
DoHarmful(m);
|
||||
|
||||
|
|
@ -141,6 +134,8 @@ namespace Server.Mobiles
|
|||
m.FixedParticles(0x36BD, 1, 10, 0x1F78, 0xA6, 0, (EffectLayer)255);
|
||||
m.ApplyPoison(this, Poison.Lethal);
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -183,4 +178,4 @@ namespace Server.Mobiles
|
|||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue