public void SpawnAidons(Mobile target) { Map map = this.Map; if (map == null) { return; } int aidons = 0; foreach (Mobile m in this.GetMobilesInRange(25)) { if (m is AidonCopy) { ++aidons; } } if (aidons < 1) { PlaySound(582); int newAidons = Utility.RandomMinMax(3, 3); for (int i = 0; i < newAidons; ++i) { BaseCreature aidon; switch (Utility.Random(2)) { default: case 0: aidon = new AidonCopy(); break; case 1: aidon = new AidonCopy(); break; } aidon.Team = this.Team; bool validLocation = false; Point3D loc = this.Location; for (int j = 0; !validLocation && j < 10; ++j) { int x = X + Utility.Random(3) - 1; int y = Y + Utility.Random(3) - 1; int z = map.GetAverageZ(x, y); if (validLocation = map.CanFit(x, y, this.Z, 16, false, false)) { loc = new Point3D(x, y, Z); } else if (validLocation = map.CanFit(x, y, z, 16, false, false)) { loc = new Point3D(x, y, z); } } aidon.MoveToWorld(loc, map); aidon.Combatant = target; } } switch (Utility.Random(25)) { case 0: this.Say("You DARE to attack me?!"); break; case 1: this.Say("You will remember this day!"); break; case 2: this.Say("I do not fall easily!"); break; case 3: this.Say("Foolish human! Prepare to die!"); break; case 4: this.Say("Fall into the darkness!"); break; case 5: this.Say("You WILL fall to me!"); break; case 6: this.Say("My magic is beyond anything you have ever seen!"); break; } }
public void SpawnAidons( Mobile target ) { Map map = this.Map; if ( map == null ) return; int aidons = 0; foreach ( Mobile m in this.GetMobilesInRange( 25 ) ) { if ( m is AidonCopy ) ++aidons; } if ( aidons < 1 ) { PlaySound( 582 ); int newAidons = Utility.RandomMinMax( 3, 3 ); for ( int i = 0; i < newAidons; ++i ) { BaseCreature aidon; switch ( Utility.Random( 2 ) ) { default: case 0: aidon = new AidonCopy(); break; case 1: aidon = new AidonCopy(); break; } aidon.Team = this.Team; bool validLocation = false; Point3D loc = this.Location; for ( int j = 0; !validLocation && j < 10; ++j ) { int x = X + Utility.Random( 3 ) - 1; int y = Y + Utility.Random( 3 ) - 1; int z = map.GetAverageZ( x, y ); if ( validLocation = map.CanFit( x, y, this.Z, 16, false, false ) ) loc = new Point3D( x, y, Z ); else if ( validLocation = map.CanFit( x, y, z, 16, false, false ) ) loc = new Point3D( x, y, z ); } aidon.MoveToWorld( loc, map ); aidon.Combatant = target; } } switch ( Utility.Random( 25 ) ) { case 0: this.Say( "You DARE to attack me?!" ); break; case 1: this.Say( "You will remember this day!" ); break; case 2: this.Say( "I do not fall easily!" ); break; case 3: this.Say( "Foolish human! Prepare to die!" ); break; case 4: this.Say( "Fall into the darkness!" ); break; case 5: this.Say( "You WILL fall to me!" ); break; case 6: this.Say( "My magic is beyond anything you have ever seen!" ); break; } }