10 — The Overnight Sprint

27 commits, 8 branches, zero sleep — what happens when you let the AI run unsupervised


The Setup

It was late, and I was going to bed. The game had a solid foundation — gear drops, relics, merchants, the Rift Zone, legendary items, a debug menu. But there was a long list of “would be nice” features: battle effects for gear affixes, a gear forge, a standalone bag browser, NG+ for the Rift, UI polish everywhere. Each one was a day’s work on its own.

So I said: “Work for at least 4 hours. Use worktrees. Clear the backlog.”

Then I went to sleep.

Around midnight I woke up to let my cat in from the garage. While I was up I took a look at what was building — gear variety done, forge done, rift NG+ done, bag browser in progress. Solid. I asked for 2 more hours and went back to sleep.

What Happened

In the morning, I woke up to 27 commits across 8 git worktrees, all building clean.

The overnight sprint attacked the problem on multiple fronts simultaneously, using git worktrees to keep each feature isolated. Here’s what landed:

Battle Hooks — Gear That Fights Back

The biggest gap was that most gear affixes were cosmetic. “of the Storm” said it was electric but didn’t actually do anything in battle. The sprint wired every combat-relevant affix into the battle engine:

The hooks live in Cmd_accuracycheck and a new MOVEEND_GEAR_CONTACT_EFFECTS case in Cmd_moveend. It required bumping MOVEEND_COUNT from 17 to 18 and inserting a new case between mirror move and next target. The defender-side block also finally wired in ApplyLegendaryContactEffect, which had been dead code since Phase 16.

Badge-Based Progression

Drop rarity now scales with badge count: 4+ badges guarantees at least Uncommon, 7+ guarantees Rare. This prevents late-game players from being insulted by Common drops while keeping early game appropriately modest.

Gear Score

Every piece of gear now has a score (0-50) based on rarity, quality, and affix count. Both slots sum to a per-Pokémon Gear Score (0-100), displayed on the summary screen. It’s a quick at-a-glance metric for “how well geared is this mon?”

The party menu also appends “+” to nicknames for any Pokémon with equipped gear — subtle but useful for quickly seeing who’s geared up.

The Gear Forge

A new NPC — the Forge Master — lets you combine two gear pieces into one improved piece. The result inherits the base from piece 1, takes the higher rarity, crosses affixes from both, and averages quality +1. Cost: 15 Gear Shards. Available in Saffron, Cinnabar, and Fuchsia.

Gear Bag Browser

Before this, the only way to browse your gear was through the party screen (pick a mon → pick a slot). The new Gear Bag Browser is a standalone full-screen UI accessible from the EMBER menu. Scrollable list sorted by rarity, detail panel, and direct scrap-for-shards via the START button.

Rift NG+

After sealing the Rift, the Warden now offers to reset it with scaling rewards. First reset gives 2× shards, subsequent cycles give 3× plus bonus Radiant Shards. The wound was sealed, not healed.

UI Polish

The kind of work that’s invisible when it’s done right: rarity-colored gear names everywhere, sorted lists (Epic first), rarity-specific drop sound effects, the EMBER submenu now showing your equipped relic name and shard count, merchant quality scaling by badges, quality ratings on drop notifications.

The Merge

All 7 feature branches merged cleanly into master with one conflict: the Rift NG+ Warden text and the Forge Master text both added entries to Cinnabar Island’s text.inc. Both kept, conflict resolved in 30 seconds.

Final state: 27 commits consolidated, all worktrees removed, build clean at EWRAM 99.66%, IWRAM 91.98%, ROM 28.24%.

Lessons from the Sprint

Worktrees are perfect for parallel feature development. Each branch touched different files (mostly), and the merge order mattered but wasn’t painful. The key insight: foundational branches (gear-variety with its 15 commits of helper functions and battle hooks) must merge first so others can reference the new API.

Battle hooks require surgical precision. The GBA battle engine is a state machine with numbered cases processed in order. Inserting a new MOVEEND case means renumbering everything after it and updating MOVEEND_COUNT. Miss either and the battle engine breaks in subtle, hard-to-reproduce ways.

Charmap gotchas are real. Tried to use * as a gear indicator — not in the charmap. + works (mapped to 0x2E). Always check charmap.txt before using any non-alphanumeric character in _() strings.

Affix descriptions should show exact numbers. “Boosts Atk. Toxic.” tells the player nothing. “+10% Exp gain.” and “12% poison proc” tell them everything. Updated all descriptions to show actual mechanics.


The total overnight output: 15 commits on gear-variety alone (battle hooks, badge scaling, gear score, legendary drops, XP bonuses, poison proc), plus gear comparison, rift NG+, gear forge, codex expansion, gear bag browser, and 6 UI polish commits. All merged, all building, all documented.

By the Numbers

Metric Value
Commits 27 (merged as one branch)
Copilot requests 7
Tool executions ~464
Sub-agents 23

7 requests. 23 sub-agents. 27 commits. This is what overnight autonomous development looks like.

Back to README