Midnight Yard

In short

Map 4 of 5. “Night game. Harder to pick up the ball.” The only park with a batter penalty: -10% Timing Window. Its special ball is Ghost (fades almost out mid-flight) on any pitch, 1 in 12. Inning 9 is always BOSS: The Phantom, who throws two decoy balls with 1 in 4 pitches.

How it works

  • Unlock: fourth in db.ballparks. Opens when Windy City Yard is beaten on Medium. Beating it on Medium opens Moon Stadium.
  • Environment: isNight = true and sky = SkyPreset.Night. At night the builder lights the lamps on the light towers (unlit, brighter than white), adds a real spotlight per tower aimed at the infield, sets the sun to a dim blue “moon” (intensity 0.25, 25° up), drops ambient intensity to 0.7, and draws 260 stars.
  • Batter modifier: StatModifier.Percent(StatType.TimingWindow, -0.1f), added to the batter’s stats for every at-bat here (not stored on the run). See Stats.
  • Special ball: Ghost on any pitch (#41; before it was changeups and knuckleballs at 1 in 4). It fades out from 20% to 38% of the flight down to 12% opacity, stays that faint until 62%, and is fully back by 82%; it never vanishes completely and its shadow stays. With no pitch list there is no pitch lean here. See Special Balls.
  • Targets: one landing zone with a pole marker.
  • Pitchers: the shared pool for innings 1 to 8. Final boss: midnight.finalBossId = "phantom", so inning 9 is always BOSS: The Phantom, and he pitches nowhere else. On a pitch that wins his 1 in 4 roll, two decoys fly out with the real ball, split away from 30% of the flight to spots 25 to 42 cm from it, and vanish at 97%. Only the real ball casts a shadow. A Ghost pitch’s decoys fade with it. See Pitchers and Bosses.

Numbers

WhatValueWhere to tune
id / display namemidnight / Midnight YardDefaultContent
Unlock order4 of 5 (index 3), goal multiplier x1.520875order of db.ballparks
LF / CF / RF330 / 400 / 330 ftPark(...)
Wall height10 ftPark(...)
Gravity / windx1 / nonegravityScale, windMph
Night / skyyes / NightisNight, sky
Ground / wallMowed / Paddedground, wallStyle
Grass / wall colour(0.16, 0.42, 0.2) / (0.08, 0.2, 0.14)Park(...)
Seats / crowd density(0.12, 0.2, 0.45) / 0.8seatColor, crowdDensity
Special ballGhost, any pitch, chance 1/12midnight.balls
Final bossThe Phantom (phantom): 2 decoys, 1 in 4 pitchesmidnight.finalBossId
Batter modifiers-10% Timing Windowmidnight.batterModifiers
Bleachers startabout 88.3 ft behind the wall (set by the Neon Sign: 420 + 30 + 15 - 376.7)StadiumLayout.GapFt

Targets

LabelSprayDistanceRadiusPaysColour
Neon Sign15° (right of center)420 ft30 ftx2.5(0.3, 1, 1)

Inning goals (inning 3, 6, 9 are boss innings)

Difficulty123456789
Normal7509501475147518502900290036255675
Medium107513252075207526004050405050757925
Hard1450180028252825352555005500690010775

Special ball chance by difficulty (x1 / x1.5 / x2): 1/12, 1/8, 1/6. The Phantom’s decoy chance scales the same way: 1/4, 3/8, 1/2.

In the code

FileWhat it does
Assets/_Project/Scripts/Data/DefaultContent.csPark("midnight", ...), night flags, timing penalty, Ghost ball, finalBossId, The Phantom
Assets/_Project/Scripts/Batting/DecoyBalls.csThe Phantom’s decoys
Assets/_Project/Scripts/Ballparks/BallparkBuilder.csNight lamps, floodlights, stars, ApplyLighting
Assets/_Project/Scripts/Ballparks/SkyBuilder.csNight sky preset and ambient 0.7
Assets/_Project/Scripts/Run/RunManager.csPlayCurrentRound adds ballpark.batterModifiers to the at-bat stats

Gotchas

  • The -10% stacks with The Ace’s -15% (percent modifiers add), so inning 3 here (always The Ace) is -25% Timing Window before upgrades.
  • A DefaultContent comment says The Phantom can also turn up elsewhere as a late boss; the code keeps every park boss at his own park (see Pitchers and Bosses).
  • Timing Window is no longer a literal number of seconds: it scales the bat’s hit radius by sqrt(TimingWindow / 0.11). See Stats.