Stage 3-5 server (military, expansion, social), web client for stages 1-2, ops/deploy
Built: units/research/training, movements (scan, raid, attack, takeover, reinforce, settle, transport), deterministic combat resolved in the event queue, reports, power/offline units, founding + conquest + incumbent sites; alliances, roles, diplomacy (24h pact cancel via events), messages, rankings; vanilla-JS phone-first client (auth, POP, map, alerts, settings, en/nb); systemd units, backup timer, DEPLOY.md, tools/admin.js. Tested: npm test 96/96 (fake clock, in-memory db, a few real-HTTP tests); client checked with headless Chromium screenshots only. NOT done: marketplace/transport trade, client screens for military/social, WebSocket push, bots/balance, e2e suite. All unit stats and costs are unbalanced first guesses. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2MJaQ5LXAHzGnTDgceT14
This commit is contained in:
parent
b56b13880e
commit
249818a7aa
111 changed files with 17472 additions and 13 deletions
|
|
@ -28,6 +28,34 @@ const CODES = {
|
|||
already_queued: [409, 'That building is already being built.'],
|
||||
queue_full: [409, 'All build slots are busy.'],
|
||||
not_enough_resources: [409, 'Not enough resources.'],
|
||||
// social: alliances, diplomacy, messages
|
||||
peering_office_required: [409, 'A Peering office (level 1 or higher) is needed to found or join an alliance.'],
|
||||
already_in_alliance: [409, 'That operator is already in an alliance.'],
|
||||
not_in_alliance: [409, 'You are not in that alliance.'],
|
||||
alliance_name_taken: [409, 'That alliance name is taken.'],
|
||||
alliance_tag_taken: [409, 'That alliance tag is taken.'],
|
||||
alliance_full: [409, 'The alliance has no room for more members.'],
|
||||
invite_expired: [409, 'The invite has expired.'],
|
||||
leader_must_transfer: [409, 'The leader must hand over leadership before leaving.'],
|
||||
notes_full: [409, 'The alliance has reached its pinned-note limit.'],
|
||||
diplomacy_invalid: [409, 'That diplomatic move is not allowed from the current state.'],
|
||||
diplomacy_pending: [409, 'A diplomatic change between these alliances is already scheduled.'],
|
||||
proposal_exists: [409, 'The other alliance already proposed this; accept their proposal instead.'],
|
||||
proposal_expired: [409, 'The proposal has expired.'],
|
||||
// military and expansion
|
||||
unknown_unit: [404, 'No such unit type.'],
|
||||
not_researchable: [409, 'That unit stat cannot be researched.'],
|
||||
not_enough_units: [409, 'Not enough units at home.'],
|
||||
units_offline: [409, 'Those units are offline (the battery is empty).'],
|
||||
invalid_target: [409, 'That target is not valid for this kind of movement.'],
|
||||
target_protected: [409, 'The target is under beginner protection.'],
|
||||
protection_active: [409, 'Attacking ends your beginner protection; confirm to go ahead.'],
|
||||
out_of_range: [409, 'The target is too far from your POPs.'],
|
||||
footprint_too_low: [409, 'Your footprint is too low for another POP.'],
|
||||
cannot_takeover: [409, 'That POP cannot be taken over.'],
|
||||
recall_expired: [409, 'The recall window (first 90 seconds) has passed.'],
|
||||
capacity_exceeded: [409, 'More than one transport link can carry.'],
|
||||
no_transport_link: [409, 'All transport links are busy (or there is no Internet exchange).'],
|
||||
};
|
||||
|
||||
class GameError extends Error {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue