public static void ToogleProtection(Spell spell, Mobile Caster, Mobile m) { if (m != null && !m.Deleted) { StopTimer(m); TimeSpan duration = TimeSpan.FromSeconds(0); double value = (int)(Caster.Skills[SkillName.ArtMagique].Value + Caster.Skills[SkillName.Thaumaturgie].Value); value /= 15; value = SpellHelper.AdjustValue(Caster, value); m.VirtualArmorMod += (int)value; m.UpdateResistances(); Timer t = new InternalTimer(m, (int)value, duration); m_Timers[m] = t; t.Start(); m_Values[m] = (int)value; Effects.SendTargetParticles(m, 0x375A, 9, 20, 5016, EffectLayer.Waist); m.PlaySound(0x1ED); } }
protected override void OnTarget(Mobile from, object targeted) { if (targeted is Mobile && m_Spell.CheckBSequence((Mobile)targeted)) { Mobile targ = (Mobile)targeted; SpellHelper.Turn(m_Spell.Caster, targ); if (targ.BeginAction(typeof(LightCycle))) { double value = Utility.Random(15, 25); value = SpellHelper.AdjustValue(m_Spell.Caster, value); new LightCycle.NightSightTimer(targ).Start(); targ.LightLevel = -100; Effects.SendTargetParticles(targ, 0x376A, 9, 32, 5007, EffectLayer.Waist); targ.PlaySound(0x1E3); } else { from.SendMessage("{0} deja le sort de voile applique.", from == targ ? "Vous avez" : "Ils ont"); } } m_Spell.FinishSequence(); }
public void Target(Mobile m) { if (!(m is BaseCreature || m is PlayerMobile)) { Caster.SendLocalizedMessage(1060508); // You can't curse that. } else if (CheckHSequence(m)) { SpellHelper.Turn(Caster, m); m.PlaySound(0xFC); Effects.SendTargetParticles(m, 14186, 1, 13, 9912, 2062, 7, EffectLayer.Head); Effects.SendTargetParticles(m, 14138, 1, 15, 9502, 1109, 7, EffectLayer.Head); TimeSpan duration = TimeSpan.FromSeconds(0); TimeSpan delay = TimeSpan.FromSeconds(11 - Caster.Skills[CastSkill].Value / 20); int amount = (int)(2 + Caster.Skills[CastSkill].Base / 20); amount = (int)SpellHelper.AdjustValue(m, amount); StopTimer(m); Timer t = new InternalTimer(m, delay, DateTime.Now + duration, amount); m_Timers[m] = t; t.Start(); } FinishSequence(); }
public override bool OnMoveOver(Mobile m) { if (Visible && m_Caster != null && SpellHelper.ValidIndirectTarget(m_Caster, m) && m_Caster.CanBeHarmful(m, false)) { if (m == m_Caster) { return(true); } if (m is BaseCreature) { if (((BaseCreature)m).ControlMaster == m_Caster) { return(true); } } m_Caster.DoHarmful(m); // double damage = Utility.RandomMinMax(5, 8); double damage = Utility.RandomMinMax(3, 4); damage = SpellHelper.AdjustValue(m_Caster, damage); if (m_Spell.CheckResisted(m)) { damage *= 0.75; m.SendLocalizedMessage(501783); // You feel yourself resisting magical energy. } AOS.Damage(m, m_Caster, (int)damage, 0, 100, 0, 0, 0); m.PlaySound(0x208); } return(true); }
public void Target(IPoint3D p) { /*Server.Misc.Weather weather = Server.Misc.Weather.GetWeather(Caster.Location); * * if (weather.Wind == QuantityOfWind.Typhon || weather.Wind == QuantityOfWind.Tornade || weather.Wind == QuantityOfWind.Tempete) * {*/ 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 (CheckSequence()) { double duration = Utility.Random(40, 80); duration = SpellHelper.AdjustValue(Caster, duration); //BaseCreature.Summon(new EnergyVortex(), true, Caster, new Point3D(p), 0x212, TimeSpan.FromSeconds(duration)); } /*} * else * { * Caster.SendMessage("Il n'y a pas assez de vent pour lancer un vortex !"); * }*/ FinishSequence(); }
public void Target(TrapableContainer item) { if (!Caster.CanSee(item)) { Caster.SendLocalizedMessage(500237); // Target can not be seen. } else if (item.TrapType != TrapType.None && item.TrapType != TrapType.MagicTrap) { base.DoFizzle(); } else if (CheckSequence()) { SpellHelper.Turn(Caster, item); item.TrapType = TrapType.MagicTrap; double damage = Utility.Random(10, 50); damage = SpellHelper.AdjustValue(Caster, damage); item.TrapPower = (int)damage; Point3D loc = item.GetWorldLocation(); Effects.SendLocationParticles(EffectItem.Create(new Point3D(loc.X + 1, loc.Y, loc.Z), item.Map, EffectItem.DefaultDuration), 0x376A, 9, 10, 9502); Effects.SendLocationParticles(EffectItem.Create(new Point3D(loc.X, loc.Y - 1, loc.Z), item.Map, EffectItem.DefaultDuration), 0x376A, 9, 10, 9502); Effects.SendLocationParticles(EffectItem.Create(new Point3D(loc.X - 1, loc.Y, loc.Z), item.Map, EffectItem.DefaultDuration), 0x376A, 9, 10, 9502); Effects.SendLocationParticles(EffectItem.Create(new Point3D(loc.X, loc.Y + 1, loc.Z), item.Map, EffectItem.DefaultDuration), 0x376A, 9, 10, 9502); Effects.SendLocationParticles(EffectItem.Create(new Point3D(loc.X, loc.Y, loc.Z), item.Map, EffectItem.DefaultDuration), 0, 0, 0, 5014); Effects.PlaySound(loc, item.Map, 0x1EF); } FinishSequence(); }
public void Target(Mobile m) { if (!Caster.CanSee(m)) { Caster.SendLocalizedMessage(500237); // Target can not be seen. } else if (CheckHSequence(m)) { SpellHelper.Turn(Caster, m); SpellHelper.CheckReflect((int)this.Circle, Caster, ref m); double duration = 5.0 + (Caster.Skills[SkillName.ArtMagique].Value * 0.2); duration = SpellHelper.AdjustValue(Caster, duration); if (CheckResisted(m)) { duration *= 0.75; } m.Paralyze(TimeSpan.FromSeconds(duration)); m.PlaySound(0x204); Effects.SendTargetEffect(m, 0x376A, 6, 1); } FinishSequence(); }
public void Target(Mobile m) { if (!Caster.CanSee(m)) { Caster.SendLocalizedMessage(500237); // Target can not be seen. } else if (CheckBSequence(m)) { SpellHelper.Turn(Caster, m); Effects.SendLocationParticles(EffectItem.Create(new Point3D(m.X, m.Y, m.Z + 16), Caster.Map, EffectItem.DefaultDuration), 0x376A, 10, 15, 5045); m.PlaySound(0x3C4); m.Hidden = true; RemoveTimer(m); double duration = ((120 * Caster.Skills[SkillName.Hallucination].Value) / 50) + 1; duration = SpellHelper.AdjustValue(Caster, duration); Timer t = new InternalTimer(m, TimeSpan.FromSeconds(duration)); m_Table[m] = t; t.Start(); } FinishSequence(); }
public void Target(Mobile m) { if (HasMindRotScalar(m)) { Caster.SendLocalizedMessage(1005559); // This spell is already in effect. } else if (CheckHSequence(m)) { SpellHelper.Turn(Caster, m); SpellHelper.CheckReflect((int)this.Circle, Caster, ref m); /* Attempts to place a curse on the Target that increases the mana cost of any spells they cast, * for a duration based off a comparison between the Caster's Spirit Speak skill and the Target's Resisting Spells skill. * The effect lasts for ((Spirit Speak skill level - target's Resist Magic skill level) / 50 ) + 20 seconds. */ m.PlaySound(0x1FB); m.PlaySound(0x258); Effects.SendTargetParticles(m, 0x373A, 1, 17, 9903, 15, 4, EffectLayer.Head); TimeSpan duration = TimeSpan.FromSeconds(0); double scalar = SpellHelper.AdjustValue(Caster, 1 + (Caster.Skills[SkillName.ArtMagique].Value) / 1000); SetMindRotScalar(Caster, m, scalar, duration); } FinishSequence(); }
public void Target(LockableContainer targ) { if (Multis.BaseHouse.CheckSecured(targ)) { // You cannot cast this on a secure item. Caster.SendLocalizedMessage(503098); } else if (CheckSequence()) { SpellHelper.Turn(Caster, targ); Point3D loc = targ.GetWorldLocation(); Effects.SendLocationParticles( EffectItem.Create(loc, targ.Map, EffectItem.DefaultDuration), 0x376A, 9, 32, 5024); Effects.PlaySound(loc, targ.Map, 0x1FF); if (targ.Locked /* && targ.LockLevel != 0 */) { double level = Caster.Skills[SkillName.Animisme].Value; level = SpellHelper.AdjustValue(Caster, level); if ((int)level >= targ.RequiredSkill) { targ.Locked = false; if (targ.LockLevel == -255) { targ.LockLevel = targ.RequiredSkill - 10; } if (targ.LockLevel == 0) { targ.LockLevel = -1; } } else { // My spell does not seem to have an effect on that lock. Caster.LocalOverheadMessage(MessageType.Regular, 0x3B2, 503099); } } else { // That did not need to be unlocked. Caster.LocalOverheadMessage(MessageType.Regular, 0x3B2, 503101); } } FinishSequence(); }
public override void OnCast() { ArrayList m_target = new ArrayList(); if (SpellHelper.CheckTown(Caster, Caster) && CheckSequence()) { //double damage = GetNewAosDamage(15, 4, 6, true); //double s_damage = damage; m_target.Clear(); Map map = Caster.Map; if (map != null) { foreach (Mobile m in Caster.GetMobilesInRange((int)SpellHelper.AdjustValue(Caster, 1 + Caster.Skills[SkillName.Evocation].Value / 15, true))) { if (Caster != m && SpellHelper.ValidIndirectTarget(Caster, m) && Caster.CanBeHarmful(m, false) && (!Core.AOS || Caster.InLOS(m)) && !(Caster.Party == m.Party)) { m_target.Add(m); } } } for (int i = 0; i < m_target.Count; ++i) { Mobile targ = (Mobile)m_target[i]; if (Caster.CanSee(targ)) { Caster.DoHarmful(targ); targ.Freeze(TimeSpan.FromSeconds(0.25)); //AOS.Damage(targ, Caster, (int)s_damage, 100, 0, 0, 0, 0); } } for (int i = 0; i < 12; i++) { Point3D orig = Caster.Location; Point3D p = new Point3D(orig.X + Utility.Random(-5, 10), orig.Y + Utility.Random(-5, 10), orig.Z - 10); Effects.SendLocationEffect(p, Caster.Map, 7020 + Utility.Random(0, 4), 50); Effects.PlaySound(p, Caster.Map, 0x2F3); Caster.Freeze(TimeSpan.FromSeconds(0.5)); } } FinishSequence(); }
public void Target(IPoint3D p) { if (!Caster.CanSee(p)) { Caster.SendLocalizedMessage(500237); // Target can not be seen. } else if (CheckSequence()) { SpellHelper.Turn(Caster, p); SpellHelper.GetSurfaceTop(ref p); int dx = Caster.Location.X - p.X; int dy = Caster.Location.Y - p.Y; int rx = (dx - dy) * 44; int ry = (dx + dy) * 44; bool eastToWest; if (rx >= 0 && ry >= 0) { eastToWest = false; } else if (rx >= 0) { eastToWest = true; } else if (ry >= 0) { eastToWest = true; } else { eastToWest = false; } Effects.PlaySound(p, Caster.Map, 0x20C); int itemID = eastToWest ? 0x19AB : 0x19AB; double duration = 4.0 + (Caster.Skills[SkillName.Evocation].Value * 0.4); duration = SpellHelper.AdjustValue(Caster, duration); //for ( int i = -3; i <= 3; ++i ) //{ Point3D loc = new Point3D(p.X, p.Y, p.Z); new FlamecheItem(this, itemID, loc, Caster, Caster.Map, TimeSpan.FromSeconds(duration), 1); //} } FinishSequence(); }
public void Target(Mobile m) { Type t = m.GetType(); bool dispellable = false; if (m is BaseCreature) { dispellable = ((BaseCreature)m).Summoned && !((BaseCreature)m).IsAnimatedDead; } if (!Caster.CanSee(m)) { Caster.SendLocalizedMessage(500237); // Target can not be seen. } else if (!dispellable) { Caster.SendLocalizedMessage(1005049); // That cannot be dispelled. } else if (CheckHSequence(m)) { SpellHelper.Turn(Caster, m); BaseCreature bc = m as BaseCreature; double dispelChance = 0; if (bc != null) { dispelChance = (50.0 + ((100 * (Caster.Skills.Animisme.Value - bc.DispelDifficulty)) / (bc.DispelFocus * 2))) / 120; } dispelChance = SpellHelper.AdjustValue(Caster, dispelChance); if (dispelChance > Utility.RandomDouble()) { Effects.SendLocationParticles(EffectItem.Create(m.Location, m.Map, EffectItem.DefaultDuration), 0x3728, 8, 20, 5042); Effects.PlaySound(m, m.Map, 0x201); m.Delete(); } else { Caster.DoHarmful(m); Effects.SendTargetEffect(m, 0x3779, 10, 20); Caster.SendLocalizedMessage(1010084); // The creature resisted the attempt to dispel it! } } FinishSequence(); }
public void Target(Mobile m) { if (CheckHSequence(m)) { SpellHelper.Turn(Caster, m); ExpireTimer timer = (ExpireTimer)m_Table[m]; if (timer != null) { timer.DoExpire(); } else { m.SendLocalizedMessage(1061689); // Your skin turns dry and corpselike. } Effects.SendTargetParticles(m, 0x373A, 1, 15, 9913, 67, 7, EffectLayer.Head); m.PlaySound(0x1BB); double ss = Caster.Skills[DamageSkill].Value; double mr = 0; double value = Caster.Skills[DamageSkill].Value / 2.5; value = SpellHelper.AdjustValue(Caster, value); if (value > 40) { value = 40; } double duration = ((ss - mr) / 2.5) + 30.0; duration = SpellHelper.AdjustValue(Caster, duration); if (duration > 90) { duration = 90; } m.VirtualArmorMod -= (int)value; timer = new ExpireTimer(m, (int)value, TimeSpan.FromSeconds(duration)); timer.Start(); m_Table[m] = timer; } FinishSequence(); }
public void Target(Mobile m) { if (!Caster.CanSee(m)) { Caster.SendLocalizedMessage(500237); // Target can not be seen. } else if (CheckHSequence(m)) { SpellHelper.Turn(Caster, m); SpellHelper.CheckReflect((int)this.Circle, Caster, ref m); if (m.Spell != null) { m.Spell.OnCasterHurt(); } m.Paralyzed = false; double manaLost = 0; if (CheckResisted(m)) { m.SendLocalizedMessage(501783); // You feel yourself resisting magical energy. } else if (m.Mana >= 100) { manaLost = Utility.Random(25, 100); } else { manaLost = Utility.Random(1, m.Mana); } manaLost = SpellHelper.AdjustValue(Caster, manaLost); if (manaLost > 100) { manaLost = 100; } m.Mana -= (int)manaLost; Effects.SendTargetParticles(m, 0x374A, 10, 15, 5032, EffectLayer.Head); m.PlaySound(0x1F8); } FinishSequence(); }
public void Heal(Mobile caster, Mobile m) { double toHeal; toHeal = Caster.Skills[SkillName.ArtMagique].Value / 5; //toHeal += Caster.Skills[SkillName.EvalInt].Value / 10; toHeal += Utility.Random(1, 3); toHeal = SpellHelper.AdjustValue(Caster, toHeal); SpellHelper.Heal(m, (int)toHeal, true); Effects.SendTargetParticles(m, 0x376A, 9, 32, 5005, EffectLayer.Waist); m.PlaySound(0x1F2); }
public override void OnCast() { if (CheckSequence()) { ArrayList targets = new ArrayList(); Map map = Caster.Map; if (map != null) { double tile = 4; SpellHelper.AdjustValue(Caster, tile); if (tile > 12) { tile = 12; } foreach (Mobile m in Caster.GetMobilesInRange((int)tile)) { if (Caster.CanBeBeneficial(m, false)) { targets.Add(m); } } } double toHeal; toHeal = Caster.Skills[CastSkill].Value * 0.15; toHeal += Caster.Skills[DamageSkill].Value * 0.07; toHeal = SpellHelper.AdjustValue(Caster, toHeal); for (int i = 0; i < targets.Count; ++i) { Mobile m = (Mobile)targets[i]; SpellHelper.Heal(m, (int)toHeal + Utility.Random(1, 3), true); Effects.SendTargetParticles(m, 0x376A, 9, 32, 5005, EffectLayer.Waist); m.PlaySound(483); } } FinishSequence(); }
public void Target(IPoint3D p) { if (!Caster.CanSee(p)) { Caster.SendLocalizedMessage(500237); // Target can not be seen. } else if (CheckSequence()) { SpellHelper.Turn(Caster, p); SpellHelper.GetSurfaceTop(ref p); ArrayList targets = new ArrayList(); Map map = Caster.Map; if (map != null) { double tile = 4; tile = SpellHelper.AdjustValue(Caster, tile); IPooledEnumerable eable = map.GetMobilesInRange(new Point3D(p), (int)tile); foreach (Mobile m in eable) { if (m.Hidden && (m.AccessLevel == AccessLevel.Player || Caster.AccessLevel > m.AccessLevel) && Caster.CanBeHarmful(m, false, true) && CheckDifficulty(Caster, m)) { targets.Add(m); } } eable.Free(); } for (int i = 0; i < targets.Count; ++i) { Mobile m = (Mobile)targets[i]; m.RevealingAction(); Effects.SendTargetParticles(m, 0x375A, 9, 20, 5049, EffectLayer.Head); m.PlaySound(0x1FD); } } FinishSequence(); }
public InternalTimer(Mobile owner) : base(TimeSpan.FromSeconds(0)) { m_Owner = owner; double duration = ((int)owner.Skills[SkillName.Hallucination].Value * 800) + 120; duration = SpellHelper.AdjustValue(owner, duration); if (duration > 920) { duration = 920; } Delay = TimeSpan.FromSeconds(duration); Priority = TimerPriority.OneSecond; }
public void Effect(Point3D loc, Map map, bool checkMulti) { if (map == null || Caster.Map != map) { Caster.SendLocalizedMessage(1005570); // You can not gate to another facet. } /*else if ( !SpellHelper.CheckTravel( Caster, TravelCheckType.GateFrom ) ) * { * }*/ else if (!SpellHelper.CheckTravel(Caster, map, loc, TravelCheckType.GateTo)) { } else if (SpellHelper.CheckCombat(Caster)) { Caster.SendLocalizedMessage(1005564, "", 0x22); // Wouldst thou flee during the heat of battle?? } /*else if ( !map.CanSpawnMobile( loc.X, loc.Y, loc.Z ) ) * { * Caster.SendLocalizedMessage( 501942 ); // That location is blocked. * }*/ else if ((checkMulti && SpellHelper.CheckMulti(loc, map))) { Caster.SendLocalizedMessage(501942); // That location is blocked. } else if (CheckSequence()) { Caster.SendLocalizedMessage(501024); // You open a magical gate to another location Effects.PlaySound(Caster.Location, Caster.Map, 0x20E); double duration = 30.0; duration = SpellHelper.AdjustValue(Caster, duration); InternalItem firstGate = new InternalItem(loc, map, duration); firstGate.MoveToWorld(Caster.Location, Caster.Map); Effects.PlaySound(loc, map, 0x20E); InternalItem secondGate = new InternalItem(Caster.Location, Caster.Map, duration); secondGate.MoveToWorld(loc, map); } FinishSequence(); }
public override bool OnMoveOver(Mobile m) { if (Visible && m_Caster != null && SpellHelper.ValidIndirectTarget(m_Caster, m) && m_Caster.CanBeHarmful(m, false)) { m_Caster.DoHarmful(m); int damage = Utility.Random(20, 30); damage = (int)SpellHelper.AdjustValue(m_Caster, damage); AOS.Damage(m, m_Caster, damage, 0, 0, 100, 0, 0); m.PlaySound(0x208); this.Delete(); } return(true); }
public override bool OnMoveOver(Mobile m) { if (Visible && m_Caster != null && SpellHelper.ValidIndirectTarget(m_Caster, m) && m_Caster.CanBeHarmful(m, false)) { m_Caster.DoHarmful(m); double duration = 5.0 + (m_Caster.Skills[SkillName.ArtMagique].Value * 0.2); duration = SpellHelper.AdjustValue(m_Caster, duration); m.Paralyze(TimeSpan.FromSeconds(duration)); m.PlaySound(0x204); Effects.SendTargetEffect(m, 0x376A, 10, 16); } return(true); }
public override void OnCast() { if (CheckSequence()) { ArrayList targets = new ArrayList(); Map map = Caster.Map; if (map != null) { double tile = SpellHelper.AdjustValue(Caster, 1 + (int)(Caster.Skills[CastSkill].Value / 33.0), true); if (tile > 5) { tile = 5; } foreach (Mobile m in Caster.GetMobilesInRange((int)tile)) { if (Caster != m && SpellHelper.ValidIndirectTarget(Caster, m) && Caster.CanBeHarmful(m, false) && !(Caster.Party == m.Party)) { targets.Add(m); } } } Caster.PlaySound(503); Effects.SendTargetParticles(Caster, 14154, 10, 15, 5013, 1108, 0, EffectLayer.CenterFeet); //ID, speed, dura, effect, hue, render, layer TimeSpan duration = TimeSpan.FromSeconds(0); for (int i = 0; i < targets.Count; ++i) { Mobile m = (Mobile)targets[i]; Effects.SendTargetParticles(m, 14154, 10, 15, 5013, 1108, 0, EffectLayer.CenterFeet); //ID, speed, dura, effect, hue, render, layer Disturb(m); m.Freeze(duration); } } FinishSequence(); }
public void Target(LockableContainer targ) { if (Multis.BaseHouse.CheckSecured(targ)) { // You cannot cast this on a secure item. Caster.SendLocalizedMessage(503098); } else if (CheckSequence()) { SpellHelper.Turn(Caster, targ); Point3D loc = targ.GetWorldLocation(); Effects.SendLocationParticles( EffectItem.Create(loc, targ.Map, EffectItem.DefaultDuration), 0x376A, 9, 32, 5024); Effects.PlaySound(loc, targ.Map, 0x1FF); if (targ.Locked && targ.LockLevel == -255) { double level = Caster.Skills[CastSkill].Value; level = SpellHelper.AdjustValue(Caster, level); if ((int)level >= targ.RequiredSkill) { targ.Locked = false; } else { Caster.SendMessage("Vous n'êtes pas assez compétent pour ouvrir ce coffre !"); } } else { // My spell does not seem to have an effect on that lock. Caster.LocalOverheadMessage(MessageType.Regular, 0x3B2, 503099); } } FinishSequence(); }
public void Target(Mobile m) { if (!(m is BaseCreature || m is PlayerMobile)) { Caster.SendLocalizedMessage(1060508); // You can't curse that. } else if (CheckHSequence(m)) { SpellHelper.Turn(Caster, m); /* Curses the target so that the next harmful event that affects them is magnified. * Damage to the target's hit points is increased 25%, * the poison level of the attack will be 1 higher * and the Resist Magic skill of the target will be fixed on 50. * * The effect lasts for one harmful event only. */ m.PlaySound(0xFC); Effects.SendTargetParticles(m, 0x3728, 1, 13, 9912, 1150, 7, EffectLayer.Head); Effects.SendTargetParticles(m, 0x3779, 1, 15, 9502, 67, 7, EffectLayer.Head); if (!m_Table.Contains(m)) { SkillMod mod = new DefaultSkillMod(SkillName.Meditation, false, 50.0); if (m.Skills[SkillName.Meditation].Base > 50.0) { m.AddSkillMod(mod); } m_Table[m] = mod; } double duration = 10.0; duration = SpellHelper.AdjustValue(Caster, duration); Timer.DelayCall(TimeSpan.FromSeconds(duration), new TimerStateCallback(EffectExpire_Callback), m); } FinishSequence(); }
public override void OnCast() { if (CheckSequence()) { ArrayList targets = new ArrayList(); Map map = Caster.Map; if (map != null) { double tile = SpellHelper.AdjustValue(Caster, 1 + (int)(Caster.Skills[CastSkill].Value / 12.0), true); if (tile > 12) { tile = 12; } foreach (Mobile m in Caster.GetMobilesInRange((int)tile)) { if (Caster != m && SpellHelper.ValidIndirectTarget(Caster, m) && Caster.CanBeHarmful(m, false) && !(Caster.Party == m.Party)) { targets.Add(m); } } } Caster.PlaySound(0x2F3); //double damage = GetNewAosDamage(8, 1, 6, true); for (int i = 0; i < targets.Count; ++i) { Mobile m = (Mobile)targets[i]; Disturb(m); Caster.DoHarmful(m); //SpellHelper.Damage( TimeSpan.Zero, m, Caster, damage, 0, 0, 0, 0, 100 ); } } FinishSequence(); }
public void Target(Mobile m) { if (!Caster.CanSee(m)) { Caster.SendLocalizedMessage(500237); // Target can not be seen. } else if (CheckBSequence(m)) { SpellHelper.Turn(Caster, m); Poison p = m.Poison; if (p != null) { double chanceToCure = 10000 + (int)(Caster.Skills[SkillName.Thaumaturgie].Value * 75) - ((p.Level + 1) * 2500); chanceToCure /= 100; chanceToCure = SpellHelper.AdjustValue(Caster, chanceToCure); if ((int)chanceToCure > Utility.Random(100)) { if (m.CurePoison(Caster)) { if (Caster != m) { Caster.SendLocalizedMessage(1010058); // You have cured the target of all poisons! } m.SendLocalizedMessage(1010059); // You have been cured of all poisons. } } else { m.SendLocalizedMessage(1010060); // You have failed to cure your target! } } Effects.SendTargetParticles(m, 0x373A, 10, 15, 5012, EffectLayer.Waist); m.PlaySound(0x1E0); } FinishSequence(); }
public static void ToogleConfession(Spell spell, Mobile Caster, Mobile m, double scale) { SpellHelper.Turn(Caster, m); double toHeal; toHeal = Caster.Hits * (Caster.Skills[spell.CastSkill].Value / 100) * scale; toHeal += Utility.Random(1, 5); toHeal = SpellHelper.AdjustValue(Caster, toHeal); if (toHeal > Caster.Hits) { toHeal = Caster.Hits; } m.Heal((int)toHeal); Effects.SendTargetParticles(m, 0x376A, 9, 32, 5030, EffectLayer.Waist); m.PlaySound(0x202); }
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()) { double duration = Utility.Random(120, 260); duration = SpellHelper.AdjustValue(Caster, duration); //BaseCreature.Summon( new BladeSpirits(), false, Caster, new Point3D( p ), 0x212, TimeSpan.FromSeconds(duration) ); } FinishSequence(); }
public void Target(Mobile m) { if (!Caster.CanSee(m)) { Caster.SendLocalizedMessage(500237); // Target can not be seen. } else if (m.IsDeadBondedPet) { Caster.SendLocalizedMessage(1060177); // You cannot heal a creature that is already dead! } else if (m is BaseCreature && ((BaseCreature)m).IsAnimatedDead) { Caster.SendLocalizedMessage(1061654); // You cannot heal that which is not alive. } else if (m.Poisoned) { Caster.LocalOverheadMessage(MessageType.Regular, 0x22, (Caster == m) ? 1005000 : 1010398); } else if (CheckBSequence(m)) { SpellHelper.Turn(Caster, m); double toHeal; toHeal = Caster.Skills[SkillName.Thaumaturgie].Value * 0.15; toHeal += Utility.Random(1, 3); toHeal += Caster.Skills[SkillName.Soins].Value * 0.15; toHeal = SpellHelper.AdjustValue(Caster, toHeal); SpellHelper.Heal(m, (int)toHeal, true); Effects.SendTargetParticles(m, 0x376A, 9, 32, 5005, EffectLayer.Waist); m.PlaySound(0x1F2); } FinishSequence(); }