Version: 1.0.0 Category: gameplay Type: decision-tree Description: Decision tree for scouting, assessing, preparing, and executing combat operations
flowchart TD
combatType{"Determine combat type"}
combatType -->|attack| scoutTarget["Step 1: Chart target planet\nto assess defenses"]
scoutTarget --> assessRisk["Step 2: Assess enemy strength\nand required forces"]
assessRisk --> riskCheck{"Risk <= acceptable?"}
riskCheck -->|Yes| prepare["Step 3: Ensure sufficient power,\nforces ready, player online"]
prepare --> executeAttack["Step 4: Execute attack on target"]
riskCheck -->|No| abortAttack["Abort: Risk too high"]
flowchart TD
raidStart["Raid"] --> fleetCheck{"Fleet is away?"}
fleetCheck -->|Yes| csCheck{"Command Ship online?"}
fleetCheck -->|No| errFleet["Error: Fleet must be away\nto raid - move fleet first"]
csCheck -->|Yes| playerCheck{"Player online?"}
csCheck -->|No| errCS["Error: Command Ship\nmust be online to raid"]
playerCheck -->|Yes| executeRaid["Execute raid\n(requires proof-of-work)"]
playerCheck -->|No| errPlayer["Error: Player must\nbe online to raid"]
flowchart TD
defendStart["Defend"] --> autoFire["Step 1: Defensive structures\nfire automatically"]
autoFire --> monitor["Step 2: Monitor\nbattle resolution"]
monitor --> outcome{"Battle outcome\n= victory?"}
outcome -->|Yes| secure["Secure position,\nrebuild if needed"]
outcome -->|No| recover["Rebuild forces,\nstrengthen defenses"]
| Condition | True Path | False Path | Notes |
|---|---|---|---|
| combatType == attack | Scout, assess, prepare, execute | Check other combat types | First branch of combat type evaluation |
| risk <= acceptable | Prepare forces and execute | Abort attack | Assessed after scouting target |
| fleetAway == true | Check Command Ship status | Error: move fleet first | Required for raid initiation |
| commandShipOnline == true | Check player status | Error: CS must be online | Required for raid execution |
| playerOnline == true | Execute raid with PoW | Error: player must be online | Required for raid execution |
| battleOutcome == victory | Secure position | Rebuild and recover | Evaluated after defense resolution |
The attack sequence follows a linear chain of scout, assess, prepare, and execute:
If risk is deemed too high during assessment, the attack is aborted to preserve resources.
Raids have strict prerequisites that must all be satisfied in sequence:
Failure at any step produces a specific error and halts the raid attempt.
Defense operates differently from offensive actions:
| Combat Type | Requirements |
|---|---|
| Attack | playerOnline, sufficientPower, structsOnline, validTarget |
| Raid | playerOnline, fleetAway, commandShipOnline, proofOfWork |
| Defend | defensiveStructuresActive |