private void DoCounter( Mobile attacker ) { if ( 0.2 > Utility.RandomDouble() ) { Mobile target = null; if ( attacker is BaseCreature ) { Mobile m = ((BaseCreature)attacker).GetMaster(); if ( m != null ) target = m; } if ( target == null || !target.InRange( this, 25 ) ) target = attacker; int roll = Utility.Random( 100 ); if ( roll < 10 ) { Mobile spawn = new ExodusOverseer(); spawn.MoveToWorld( target.Location, target.Map ); spawn.Combatant = target; spawn.Z++; if ( target is PlayerMobile ) target.SendMessage( "Fail Safe summons a minion!" ); } else if ( roll < 30 ) { int dmg = target.Hits / 2; this.MovingParticles( target, 0x36D4, 7, 0, false, true, 9502, 4019, 0x160 ); this.PlaySound( Core.AOS ? 0x15E : 0x44B ); DoHarmful( target ); AOS.Damage( target, this, dmg, true, 50, 0, 0, 0, 50 ); if ( target is PlayerMobile ) target.SendMessage( "Fail Safe uses a fusion attack." ); } else { target.Location = this.Location; target.Map = this.Map; this.FixedParticles( 0x376A, 9, 32, 0x13AF, EffectLayer.Waist ); this.PlaySound( 0x1FE ); if ( target is PlayerMobile ) target.SendMessage( "Fail Safe uses gravity well on you!" ); } } }
private void DoCounter(Mobile attacker) { if (0.2 > Utility.RandomDouble()) { Mobile target = null; if (attacker is BaseCreature) { Mobile m = ((BaseCreature)attacker).GetMaster(); if (m != null) { target = m; } } if (target == null || !target.InRange(this, 25)) { target = attacker; } int roll = Utility.Random(100); if (roll < 10) { Mobile spawn = new ExodusOverseer(); spawn.MoveToWorld(target.Location, target.Map); spawn.Combatant = target; spawn.Z++; if (target is PlayerMobile) { target.SendMessage("Fail Safe summons a minion!"); } } else if (roll < 30) { int dmg = target.Hits / 2; this.MovingParticles(target, 0x36D4, 7, 0, false, true, 9502, 4019, 0x160); this.PlaySound(Core.AOS ? 0x15E : 0x44B); DoHarmful(target); AOS.Damage(target, this, dmg, true, 50, 0, 0, 0, 50); if (target is PlayerMobile) { target.SendMessage("Fail Safe uses a fusion attack."); } } else { target.Location = this.Location; target.Map = this.Map; this.FixedParticles(0x376A, 9, 32, 0x13AF, EffectLayer.Waist); this.PlaySound(0x1FE); if (target is PlayerMobile) { target.SendMessage("Fail Safe uses gravity well on you!"); } } } }