Purpose: AI-readable reference for Structs combat. Consolidates formulas, requirements, outcomes, and edge cases.
| Action | Message | Description |
|---|---|---|
| Attack | struct-attack |
Direct struct-to-struct combat |
| Defend | struct-defense-set |
Set struct to defense mode (blocking) |
| Raid | planet-raid-complete |
Planet assault; steals unrefined ore |
damage = sum(successful_shots) - damageReduction
if damage >= health then health = 0
else health = health - damage
| Variable | Description |
|---|---|
| weaponShots | Number of shots per attack |
| weaponShotSuccessRate | Per-shot success (Numerator/Denominator) |
| weaponDamage | Damage per successful shot |
| damageReduction | Defense reduction |
| health | Target current health |
Algorithm: For each shot, IsSuccessful(weaponShotSuccessRate); if true, add weaponDamage. Apply damageReduction to total. Cap at target health.
if weaponControl == guided then successRate = guidedDefensiveSuccessRate
else successRate = unguidedDefensiveSuccessRate
canEvade = IsSuccessful(successRate) if successRate.Numerator != 0
Attacker takes damage after firing: health = health - weaponRecoilDamage.
If health == 0 and postDestructionDamage > 0, damage applies to surrounding structs.
if defender exists and defender.operatingAmbit == attacker.operatingAmbit then
canBlock = IsSuccessful(defender.blockingSuccessRate)
Requires: defender assigned, defender online, same ambit as target.
| Scenario | Damage |
|---|---|
| Same ambit | counterAttackDamage (full) |
| Different ambit | counterAttackDamage / 2 |
damage = planetaryShieldBase + sum(defenseCannon.damage for each cannon on planet)
| Requirement | Attack | Raid |
|---|---|---|
| Player online | ✓ | ✓ |
| Sufficient power | ✓ | ✓ |
| Sufficient charge | ✓ | ✓ |
| Fleet away | — | ✓ |
| Command Ship online | — | ✓ |
| Proof-of-work | — | ✓ |
| Outcome | Description |
|---|---|
| victory | Attacker/raider wins |
| defeat | Defender wins |
| attackerRetreated | Attacker withdrew |
IsSuccessful uses hash(blockHash, playerNonce) % Denominator < Numeratorschemas/formulas.md — Verified formula definitionsreference/action-quick-reference.md — Combat action endpointsprotocols/action-protocol.md — Transaction flow