public InternalTimer(Mobile mobile, BaseAtomicBomb potion, IPoint3D p) : base(TimeSpan.FromSeconds(1.0)) { m_Mobile = mobile; m_Potion = potion; m_Point = p; m_Map = mobile.Map; }
public DelayTimer(Mobile mobile, BaseAtomicBomb potion) : base(TimeSpan.FromSeconds(0.75), TimeSpan.FromSeconds(1.0)) { Priority = TimerPriority.FiftyMS; m_Mobile = mobile; m_Potion = potion; m_Index = 3; m_Potion.Internalize(); }
public DelayTimer( Mobile mobile, BaseAtomicBomb potion ) : base( TimeSpan.FromSeconds( 0.75 ), TimeSpan.FromSeconds( 1.0 ) ) { Priority = TimerPriority.FiftyMS; m_Mobile = mobile; m_Potion = potion; m_Index = 3; m_Potion.Internalize(); }
public InternalTimer( Mobile mobile, BaseAtomicBomb potion, IPoint3D p ) : base( TimeSpan.FromSeconds( 1.0 ) ) { m_Mobile = mobile; m_Potion = potion; m_Point = p; m_Map = mobile.Map; }
public InternalTarget( BaseAtomicBomb potion ) : base( 12, true, TargetFlags.None ) { m_Potion = potion; }
public void Explode(Mobile from, bool direct, Point3D loc, Map map) { if (Deleted) { return; } Delete(); if (map == null) { return; } Effects.PlaySound(loc, map, 0x207); for (int i = 0; i < 20; i++) { Point3D temp1 = new Point3D(loc.X, loc.Y, (loc.Z + i)); Effects.SendLocationEffect(temp1, map, 0x3709, 60); } int alchemyBonus = direct ? (int)(from.Skills[SkillName.Alchemy].Value / 10) : 0; IPooledEnumerable eable = LeveledExplosion ? map.GetObjectsInRange(loc, ExplosionRange) : map.GetMobilesInRange(loc, ExplosionRange); ArrayList toExplode = new ArrayList(); foreach (object o in eable) { if (o is Mobile) { toExplode.Add(o); } else if (o is BaseAtomicBomb && o != this) { toExplode.Add(o); } } eable.Free(); for (int i = 0; i < toExplode.Count; ++i) { object o = toExplode[i]; if (o is Mobile) { Mobile m = (Mobile)o; if (from == null || (SpellHelper.ValidIndirectTarget(from, m) && from.CanBeHarmful(m, false))) { if (from != null) { from.DoHarmful(m); } int damage = Utility.RandomMinMax(MinDamage, MaxDamage); damage += alchemyBonus; if (damage > 40) { damage = 40; } AOS.Damage(from, damage, 0, 100, 0, 0, 0); } } else if (o is BaseAtomicBomb) { BaseAtomicBomb pot = (BaseAtomicBomb)o; pot.Explode(from, false, pot.GetWorldLocation(), pot.Map); } } if (map != null) { for (int x = -8; x <= 8; ++x) { for (int y = -8; y <= 8; ++y) { double dist = Math.Sqrt(x * x + y * y); if (dist <= 8) { Explotion(loc, map, X + x, Y + y); } } } } }
public InternalTarget(BaseAtomicBomb potion) : base(12, true, TargetFlags.None) { m_Potion = potion; }