public void DoEthyBork() { Map map = this.Map; if (map == null) { return; } int newSpawned = 25; for (int i = 0; i < newSpawned; ++i) { IcyMinion spawn = new IcyMinion(); spawn.Team = this.Team; spawn.Map = map; bool validLocation = false; Point3D loc = this.Location; for (int j = 0; !validLocation && j < 10; ++j) { int x = X + Utility.Random(5); int y = Y + Utility.Random(5); 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); } } spawn.MoveToWorld(loc, map); } EthyDragChamp ethy = new EthyDragChamp(); ethy.Hits = this.Hits; ethy.Int = this.Int - 5000; ethy.Hidden = true; ethy.Team = this.Team; ethy.Blessed = true; ethy.Freeze(TimeSpan.FromSeconds(30.0)); ethy.MoveToWorld(this.Location, this.Map); m_MasterActive = true; this.Delete(); }
public void DoEthyBork() { Map map = this.Map; if ( map == null ) return; int newSpawned = 25; for ( int i = 0; i < newSpawned; ++i ) { IcyMinion spawn = new IcyMinion(); spawn.Team = this.Team; spawn.Map = map; bool validLocation = false; Point3D loc = this.Location; for ( int j = 0; !validLocation && j < 10; ++j ) { int x = X + Utility.Random( 5 ); int y = Y + Utility.Random( 5 ); 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 ); } spawn.MoveToWorld( loc, map ); } EthyDragChamp ethy = new EthyDragChamp(); ethy.Hits = this.Hits; ethy.Int = this.Int - 5000; ethy.Hidden = true; ethy.Team = this.Team; ethy.Blessed = true; ethy.Freeze(TimeSpan.FromSeconds(30.0)); ethy.MoveToWorld( this.Location, this.Map ); this.Delete(); }