protected override void OnTarget(Mobile from, object targeted) { if (targeted is LandTarget) { Server.Misc.Weather weather = Server.Misc.Weather.GetWeather(from.Location); if (!(weather.Cloud == DensityOfCloud.Caverne)) { LandTarget targ = (LandTarget)targeted; SpellHelper.Turn(m_Spell.Caster, targ); double value = Utility.RandomMinMax(0, 4); //value = SpellHelper.AdjustValue(m_Spell.Caster, value, NAptitude.Spiritisme); Server.Misc.Weather.RemoveWeather(from.Location); Server.Misc.Weather.AddWeather((Temperature)value, weather.Cloud, weather.Wind, false, new Rectangle2D(new Point2D(0, 0), new Point2D(6145, 4097))); from.SendMessage(String.Concat("La température est désormais ", ((Temperature)value).ToString())); } else { from.SendMessage("Vous ne pouvez pas faire ça sous terre !"); } } m_Spell.FinishSequence(); }
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); new LightCycle.NightSightTimer(targ).Start(); targ.LightLevel = 100; Effects.SendTargetParticles(targ, 0x376A, 9, 32, 5007, EffectLayer.Waist); targ.PlaySound(0x1E3); } else { from.SendMessage("{0} already have nightsight.", from == targ ? "You" : "They"); } } m_Spell.FinishSequence(); }
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(); }
protected override void OnTarget(Mobile from, object targeted) { if (targeted is PlayerMobile && m_spell.CheckBSequence((Mobile)targeted)) { PlayerMobile targ = (PlayerMobile)targeted; SpellHelper.Turn(m_spell.Caster, targ); TimeSpan duration = TimeSpan.FromSeconds(0); new ArmurePierreSpell.InternalTimer(targ, duration).Start(); //targ.ArmurePierre = true; Effects.SendTargetParticles(targ, 6899, 9, 32, 5007, 2302, 0, EffectLayer.LeftFoot); targ.PlaySound(508); } m_spell.FinishSequence(); }
public virtual void RechargeWand(Mobile from, Spell spell) { if (m_UsedAfterReCharged) { m_MaxCharges--; m_UsedAfterReCharged = false; } if (from.FindItemOnLayer(Layer.OneHanded) != this) { from.SendAsciiMessage("You must have your wand equipped to recharge it"); spell.DoFizzle(); } else if (spell.Name != Name) { from.SendAsciiMessage("That is not a {0} wand", spell.Name); spell.DoFizzle(); } else if (m_Charges >= m_MaxCharges) { from.SendAsciiMessage("That wand is at max charges"); spell.DoFizzle(); } else if (spell.CheckSequence()) { m_Charges++; from.PlaySound(spell.Sound); } spell.FinishSequence(); }