Adding the bones of the drafting system by removing the wall and siege towers from the base set and adding them temporarily as choices for the draft. Also adding Project_Context and Project_Roadmap documents to use with Claude

This commit is contained in:
Matt F 2026-06-24 00:15:17 -07:00
parent 1d03689dad
commit 3ceebed8f6
22 changed files with 1060 additions and 431 deletions

View file

@ -3,6 +3,7 @@ using System.Collections;
using Unity.Netcode;
using UnityEngine;
using TD.Core;
using TD.Gameplay.Draft;
using TD.Levels;
using TD.UI;
@ -318,6 +319,11 @@ namespace TD.Gameplay
activeEnemyCount = 0;
spawningComplete = false;
heldEnemies.Clear();
// Force-advancing interrupts the prep phase, so resolve any drafts the players
// had open before skipping ahead.
DraftService.Instance?.ServerAutoResolveAll();
StartNextWave(skipPrep: true);
}
@ -330,6 +336,10 @@ namespace TD.Gameplay
// observe the value via NetworkVariable replication.
if (!skipPrep)
{
// Open a draft for every player at the start of the build phase. They pick
// during prep; any unpicked draft is auto-resolved when the timer expires.
DraftService.Instance?.ServerOfferToAll();
prepCountdown.Value = def.PrepTime;
float remaining = def.PrepTime;
// Throttle network sync to ~10 Hz. NetworkVariable replicates on every
@ -348,6 +358,10 @@ namespace TD.Gameplay
nextSync = remaining - NetworkSyncInterval;
}
}
// Prep timer expired — auto-resolve any draft the player didn't pick so
// the free reward isn't wasted.
DraftService.Instance?.ServerAutoResolveAll();
}
// Ensure the countdown reads zero entering the spawn phase, regardless of
// whether prep was skipped or just expired.