Here is the complete data architecture for your minimal HTML/JS remake.
Organizing this data structurally before writing functions allows you to map
out your entire game loop using clean, object-oriented JavaScript.
1. Faction Leaders & Characters Data Blueprint
This array of objects defines the characteristics of each leader. The
aiModifiers key dictates how the computer evaluates options if they control
this character.
const CHARACTER_REGISTRY = [ { id: "infidel_castro", name: "Infidel Castro",
title: "Militant Warlord", description: "Aggressive military leader whose
warheads pack an extra punch.", perks: { casualtyMultiplier: 1.10, // +10%
damage propagandaBonus: 1.0, productionDiscount: 0 }, startingInventory: {
short_range_rocket: 2, icbm: 1, warhead_10mt: 2, warhead_50mt: 1, abm_battery:
1, sdi_laser: 0 }, aiModifiers: { aggressiveness: 0.8, propagandaTendency:
0.2, defenseTendency: 0.4 } }, { id: "mao_down", name: "Mao Down", title:
"Cultural Premier", description: "Masters of ideological warfare and
psychological subversion.", perks: { casualtyMultiplier: 1.0, propagandaBonus:
1.25, // +25% propaganda power productionDiscount: 0 }, startingInventory: {
short_range_rocket: 1, icbm: 1, warhead_10mt: 1, warhead_50mt: 0, abm_battery:
2, sdi_laser: 0 }, aiModifiers: { aggressiveness: 0.3, propagandaTendency:
0.8, defenseTendency: 0.5 } }, { id: "col_borstch", name: "Col. Borstch",
title: "Industrial Mogul", description: "An economic powerhouse capable of
manufacturing items cheaply.", perks: { casualtyMultiplier: 1.0,
propagandaBonus: 1.0, productionDiscount: 1 // Reduces item resource point
costs by 1 (min cost: 1) }, startingInventory: { short_range_rocket: 1, icbm:
0, warhead_10mt: 1, warhead_50mt: 0, abm_battery: 1, sdi_laser: 0 },
aiModifiers: { aggressiveness: 0.4, propagandaTendency: 0.3, defenseTendency:
0.7 } } ];
2. Action Registry & Requirements
This registry maps every explicit selection a player can lock in during their
turn. It checks for structural pairing constraints (requiresVehicle) and
updates execution properties.
const ACTION_REGISTRY = { // MILITARY STRIKES LAUNCH_STRIKE: { id:
"LAUNCH_STRIKE", name: "Nuclear Missile Strike", needsTarget: true,
requiresVehicle: true, // Player must choose a delivery system from inventory
requiresPayload: true, // Player must choose a nuclear warhead payload
executionDelay: "dependent_on_vehicle" // Derived dynamically from the weapon
choice }, // CULTURAL WARFARE PROPAGANDA: { id: "PROPAGANDA", name: "Deploy
Propaganda Broadcast", needsTarget: true, requiresVehicle: false,
requiresPayload: false, executionDelay: 0, // Resolves instantly on the
current turn baseMinEffect: 2, // Millions converted baseMaxEffect: 7 //
Millions converted }, // DEFENSIVE POSTURES ACTIVATE_DEFENSE: { id:
"ACTIVATE_DEFENSE", name: "Raise Active Defense Screen", needsTarget: false,
// Targets self automatically requiresVehicle: false, requiresPayload: false,
executionDelay: 0, notes: "Consumes 1 ABM battery from inventory to shield
against arrivals this turn." }, // UTILITY / PASS FORTIFY: { id: "FORTIFY",
name: "Fortify & Stockpile", needsTarget: false, requiresVehicle: false,
requiresPayload: false, executionDelay: 0, productionModifier: 1.20 //
Provides a 20% bonus to Resource Points generated this turn } };
3. Inventory Item & Production Data Blueprint
This structure manages the cost to manufacture items and records their
mechanical properties (such as travel delay time and hit accuracy
percentages).
const ITEM_REGISTRY = { // DELIVERY SYSTEMS (VEHICLES) short_range_rocket: {
name: "Short-Range Rocket", type: "vehicle", cost: 3, travelDelay: 0, //
Impacts the exact same turn it is fired interceptionVulnerability: 0.30 // 30%
chance to bypass standard defenses }, icbm: { name: "ICBM (Intercontinental
Ballistic Missile)", type: "vehicle", cost: 6, travelDelay: 1, // Arrives at
the resolution phase of the next round interceptionVulnerability: 0.50 },
b1_bomber: { name: "B-1 Bomber", type: "vehicle", cost: 5, travelDelay: 2, //
Takes 2 full turns to arrive interceptionVulnerability: 0.70, reusable: true
// Returns to inventory if it isn't intercepted }, // PAYLOADS (WARHEADS)
warhead_10mt: { name: "10 Megaton Tactical Warhead", type: "payload", cost: 2,
baseMinCasualties: 8, // Millions killed baseMaxCasualties: 15 },
warhead_50mt: { name: "50 Megaton City Buster", type: "payload", cost: 5,
baseMinCasualties: 18, baseMaxCasualties: 30 }, warhead_100mt: { name: "100
Megaton Doomsday Device", type: "payload", cost: 10, baseMinCasualties: 35,
baseMaxCasualties: 55, sideEffects: ["fallout_adjacent_players"] }, // DEFENSE
POSTURES abm_battery: { name: "ABM Interceptor Battery", type: "defense",
cost: 3, permanent: false, // Consumed manually via the ACTIVATE_DEFENSE
action interceptionSuccess: 0.70 // 70% chance to stop an incoming threat },
sdi_laser: { name: "SDI Strategic Laser Grid", type: "defense", cost: 8,
permanent: true, // Always active once bought; requires no turn action
interceptionSuccess: 0.40 // Passive 40% defense check against everything } };
4. Economy & Resource Formulas
The economic backbone of the remake uses a two-tiered system derived from a
player's functional infrastructure (Cities) and labor force (Population).
A. Data Mapping for a Player Nation
Each player tracks their total population across individual city structures:
const INITIAL_PLAYER_METRICS = { resourcePoints: 5, // Cash balance cities: [
{ name: "Metropolis Alpha", population: 20, intact: true }, { name:
"Metropolis Beta", population: 15, intact: true }, { name: "Metropolis Gamma",
population: 15, intact: true } ] };
B. Architectural Formulas
The Infrastructure Revenue (City Yield):
Every intact city generates a flat baseline of resource assets regardless of
how crowded it is.
Base City Revenue = Count of Intact Cities 2$
The Workforce Revenue (Population Yield):
Raw population scales production capacity to simulate labor productivity.
Citizens generate 1 Resource Point ($) per complete block of 5 Million living
citizens.
$$\text{Population Revenue} = \lfloor \frac{\text{Total Living Population}}{5}
\rfloor$$
Total Production Formula:
When evaluated at the end of a turn, the combined yield is run through any
active character perks or action modifiers (such as choosing the Fortify
action).
function calculateTurnProduction(playerObject, selectedActionId) { // 1. Sum
up current living population and active cities let totalPopulation = 0; let
intactCityCount = 0; playerObject.cities.forEach(city => { if (city.intact) {
totalPopulation += city.population; intactCityCount++; } }); // 2. Calculate
baseline revenues const cityRevenue = intactCityCount * 2; const
populationRevenue = Math.floor(totalPopulation / 5); let totalGenerated =
cityRevenue + populationRevenue; // 3. Apply Action Modifiers (e.g., Fortify
gives +20%) if (selectedActionId === "FORTIFY") { totalGenerated =
Math.floor(totalGenerated * ACTION_REGISTRY.FORTIFY.productionModifier); }
return totalGenerated; }
Now that your objects, action matrices, item traits, and economic formulas are
fully mapped out, how would you like to proceed? We can construct the
structure of the In-Flight Rocket Queue to handle weapons with multi-turn
travel delays, or design the HTML Layout / CSS Framework UI mockup to fit
these values on screen.