public virtual BaseExplodeEffect GetProductionEffect() { var fx = new FireExplodeEffect(this, Map, 0); fx.Effects.ForEach( e => { e.Hue = 65; if (e.EffectID != 13401) { return; } e.Render = EffectRender.SemiTransparent; e.Duration = 40; }); return(fx); }
protected override void OnThrownAt(Mobile from, Mobile target) { if (from == null || from.Deleted || target == null || target.Deleted) { return; } var fx = new FireExplodeEffect(target, target.Map, ExplosionRange) { EffectHandler = e => { if (e.ProcessIndex != 0) { ExplosionDamage(e); } } }; fx.Send(); base.OnThrownAt(from, target); }
public override void Ignite() { var points = new List <Point3D>(); Location.ScanRange( Map, 5, r => { if (!Map.CanSpawnMobile(r.Current)) { r.Exclude(); } if (!r.Excluded) { points.Add(r.Current); } return(false); }); if (points.Count == 0) { return; } var t = this.GetRandomSpawn(); if (t == null) { return; } var m = VitaNexCore.TryCatchGet(() => t.CreateInstance <Mobile>(), DeceitBraziers.CMOptions.ToConsole); if (m == null) { return; } VitaNexCore.TryCatch( () => { Duration = CoolDown; Protected = true; base.Ignite(); var fx = new FireExplodeEffect(this, Map, 5, 2) { Reversed = true, EffectHandler = e => e.Source.GetMobilesInRange(e.Map, 0) .Where(v => v != null && v.CanBeDamaged()) .ForEach(v => AOS.Damage(v, Utility.RandomMinMax(10, 20), 10, 80, 0, 0, 10)) }; fx.Callback = () => { if (fx.CurrentProcess < fx.Repeat) { return; } new SmokeExplodeEffect(Location, Map, 1).Send(); m.MoveToWorld(points.GetRandom(), Map); }; fx.Send(); }, ex => m.Delete()); }
public override void Ignite() { var points = new List<Point3D>(); Location.ScanRange( Map, 5, r => { if (!Map.CanSpawnMobile(r.Current)) { r.Exclude(); } if (!r.Excluded) { points.Add(r.Current); } return false; }); if (points.Count == 0) { return; } var t = this.GetRandomSpawn(); if (t == null) { return; } var m = VitaNexCore.TryCatchGet(() => t.CreateInstance<Mobile>(), DeceitBraziers.CMOptions.ToConsole); if (m == null) { return; } VitaNexCore.TryCatch( () => { Duration = CoolDown; Protected = true; base.Ignite(); var fx = new FireExplodeEffect(this, Map, 5, 2) { Reversed = true, EffectHandler = e => e.Source.GetMobilesInRange(e.Map, 0) .Where(v => v != null && v.CanBeDamaged()) .ForEach(v => AOS.Damage(v, Utility.RandomMinMax(10, 20), 10, 80, 0, 0, 10)) }; fx.Callback = () => { if (fx.CurrentProcess < fx.Repeat) { return; } new SmokeExplodeEffect(Location, Map, 1).Send(); m.MoveToWorld(points.GetRandom(), Map); }; fx.Send(); }, ex => m.Delete()); }
public virtual BaseExplodeEffect GetProductionEffect() { FireExplodeEffect fx = new FireExplodeEffect(this, Map, 0); fx.Effects.ForEach( e => { e.Hue = 65; if (e.EffectID != 13401) { return; } e.Render = EffectRender.SemiTransparent; e.Duration = 40; }); return fx; }