private void FinishEffect( Point3D p ) { int count = Utility.RandomMinMax( 1, 3 ); if ( Hue != 0x8A0 ) count += Utility.RandomMinMax( 1, 2 ); Map map = this.Map; for ( int i = 0; map != null && i < count; ++i ) { BaseCreature spawn; switch ( Utility.Random( 4 ) ) { default: case 0: spawn = new SeaSerpent(); break; case 1: spawn = new DeepSeaSerpent(); break; case 2: spawn = new WaterElemental(); break; case 3: spawn = new Kraken(); break; } int x = p.X, y = p.Y; for ( int j = 0; j < 20; ++j ) { int tx = p.X - 5 + Utility.Random( 11 ); int ty = p.Y - 5 + Utility.Random( 11 ); Tile t = map.Tiles.GetLandTile( tx, ty ); if ( t.Z == p.Z && ( (t.ID >= 0xA8 && t.ID <= 0xAB) || (t.ID >= 0x136 && t.ID <= 0x137) ) && !Spells.SpellHelper.CheckMulti( new Point3D( tx, ty, p.Z ), map ) ) { x = tx; y = ty; break; } } spawn.MoveToWorld( new Point3D( x, y, p.Z ), map ); if ( spawn is Kraken && 0.2 > Utility.RandomDouble() ) spawn.PackItem( new MessageInABottle( map == Map.Felucca ? Map.Felucca : Map.Trammel ) ); } Delete(); }
protected virtual void FinishEffect( Point3D p, Map map, Mobile from ) { from.RevealingAction(); int count = GetSpawnCount(); for ( int i = 0; map != null && i < count; ++i ) { BaseCreature spawn; switch ( Utility.Random( 4 ) ) { default: case 0: spawn = new SeaSerpent(); break; case 1: spawn = new DeepSeaSerpent(); break; case 2: spawn = new WaterElemental(); break; case 3: spawn = new Kraken(); break; } Spawn( p, map, spawn ); spawn.Combatant = from; } Delete(); }