# Space Empires Reference

The full rulebook is here.It is incredibly long and complex, so I've come up with a high-level summary below.

There are 2 players on a 7-by-7 grid. Each player starts on their home Planet with 1 Colony and 4 Shipyards on that Planet, as well as a fleet of 3 Scouts and 3 Colonyships. The players also have 0 Construction Points (CPs) to begin with.

Scouts and Colonyships each have several attributes: CP cost (i.e. the number of CPs needed to build the ship), hull size, attack class, attack strength, defense strength, attack technology level, defense technology level, health level. Regardless of the number needed to hit, a roll of 1 will always score a hit.

On each turn, there 3 phases: economic, movement, and combat.

Economic Phase

During the economic phase, each player gets 20 Construction Points (CPs) from the Colony on their home Planet, as well as 5 CPs from any other colonies ("other colonies" will be defined in a later rule). However, each player must pay a maintenance cost (in CPs) for each ship. The maintenance cost of a ship is equal to the hull size of the ship, and if a player is unable to pay a maintenance cost, it must remove the ship.

A player can also build ships with any CPs it has remaining, but the ships must be built at a planet with one or more Shipyards, and the sum of the hull sizes of the ships built at a planet cannot exceed the number of Shipyards at that planet.

Movement Phase

The movement phase consists of 3 rounds of movement. During each round of movement, each player can move each ship by one square in any direction. If a Colonyship lands on a planet, then it can "colonize" the planet by turning into a Colony. Combat phase

Combat Phase

During the combat phase, a combat occurs at each square containing ships from both players. Each combat proceeds in rounds until only one player's ships remain at that spot.

Each round of combat starts with "ship screening", in which a player with more ships is given the opportunity to remove its ships from the combat round (but the number of ships that are left in combat must be at least the number of ships that the opponent has in that square).

Then, a "combat order" is constructed, in which ships are sorted by their attack class. The first ship in the combat order can attack any other ship. A 10-sided die is rolled, and if the attacker's (attack strength + attack technology) minus the defender's (defense strength + defense technology) is greater than or equal to the die roll, then a hit is scored. Once a ship sustains a number of hits equal to its hull size, it is destroyed.

The above procedure is repeated for each ship in the combat order. Then, if there are still ships from both teams left over, another round of combat begins. Combat continues until only one team's ships occupy the square.

1. If a player is unable to pay the maintenance cost for one of it ships, what must the player do?
2. Even if a player has a lot of CPs, that doesn't necessarily mean it can build a lot of ships on a single turn. Why not?
3. How many spaces, in total, can a player move a ship during a turn? (Remember that the movement phase consists of multiple rounds of movement)
4. If Player A has 5 ships and Player B has 3 ships in the same square, up to how many ships can Player A screen from combat?
5. Is it possible for any of the losing player's ships to survive a combat?

There are a couple additional rules:
• In order to build a ship, not only must you have enough CPs and shipyards, but you must also have the necessary shipsize technology.
• The combat order is constructed according to ships' tactics level: ships with tactics 0 are destroyed immediately, and ships with higher tactics fire first. If two ships have the same tactics, then the defending ship fires first (the defending ship is the ship that was the first to occupy the grid space).
• Previously, I said that the maintenance cost is equal to the hullsize. This is usually true, but there are some special types of ships (Decoy, Colonyship, Base) that don't have a maintenance cost.

Ship Types/Attributes

Different ships have different values for the following attributes:
• cp_cost - the number of CPs required to build the ship
• hullsize - the number of shipyards needed to build the ship (assuming shipyard technology level 1)
• shipsize_needed - the level of shipsize technology required to build the ship
• tactics - determines the combat order; ships with tactics 0 are destroyed immediately
• attack and defense - as usual
• maintenance - the number of CPs that must be paid during each Economic phase to retain the ship

'unit_data': {
'Battleship': {'cp_cost': 20, 'hullsize': 3, 'shipsize_needed': 5, 'tactics': 5, 'attack': 5, 'defense': 2, 'maintenance': 3},
'Battlecruiser': {'cp_cost': 15, 'hullsize': 2, 'shipsize_needed': 4, 'tactics': 4, 'attack': 5, 'defense': 1, 'maintenance': 2},
'Cruiser': {'cp_cost': 12, 'hullsize': 2, 'shipsize_needed': 3, 'tactics': 3, 'attack': 4, 'defense': 1, 'maintenance': 2},
'Destroyer': {'cp_cost': 9, 'hullsize': 1, 'shipsize_needed': 2, 'tactics': 2, 'attack': 4, 'defense': 0, 'maintenance': 1},
'Dreadnaught': {'cp_cost': 24, 'hullsize': 3, 'shipsize_needed': 6, 'tactics': 5, 'attack': 6, 'defense': 3, 'maintenance': 3},
'Scout': {'cp_cost': 6, 'hullsize': 1, 'shipsize_needed': 1, 'tactics': 1, 'attack': 3, 'defense': 0, 'maintenance': 1},
'Shipyard': {'cp_cost': 3, 'hullsize': 1, 'shipsize_needed': 1, 'tactics': 3, 'attack': 3, 'defense': 0,, 'maintenance': 0},
'Decoy': {'cp_cost': 1, 'hullsize': 0, 'shipsize_needed': 1, 'tactics': 0, 'attack': 0, 'defense': 0, 'maintenance': 0},
'Colonyship': {'cp_cost': 8, 'hullsize': 1, 'shipsize_needed': 1, 'tactics': 0, 'attack': 0, 'defense': 0, 'maintenance': 0},
'Base': {'cp_cost': 12, 'hullsize': 3, 'shipsize_needed': 2, 'tactics': 5, 'attack': 7, 'defense': 2, 'maintenance': 0},
}


Technology

Here are the specifics regarding technology:
• attack, defense - determines the amount that gets added to a ship's attack or defense during battle
• shipsize - determines what kinds of ships can be built (provided you have enough CP and shipyards)

Level  | Upgrade Cost | Benefit
----------------------------------------------------------------------
1   |       -      | Can build Scout, Colony Ship, Ship Yard, Decoy
2   |      10      | Can build Destroyer, Base
3   |      15      | Can build Cruiser
4   |      20      | Can build Battlecruiser
5   |      25      | Can build Battleship
6   |      30      | Can build Dreadnaught

• movement - determines how many spaces each ship can move during each movement phase

Level | Upgrade Cost | Benefit
---------------------------------------------------------
1   |       -      | Can move one space per movement
2   |      20      | Can move 1 space in each of the
first 2 movements and 2 spaces in
the third movement
3   |      30      | Can move 1 space in the first movement
and 2 spaces in each of the second and
third movements
4   |      40      | Can move 2 spaces per movement
5   |      40      | Can move 2 spaces in each of the first 2
movements and 3 spaces in the third movement
6   |      40      | Can move 2 spaces in the first movement and 3
spaces in each of the second and third movements

• shipyard - determines how much "hull size" each shipyard can build

Level | Upgrade Cost | Hull Size Building Capacity of Each Ship Yard
------------------------------------------------------------
1  |      -       |     1
2  |      20      |     1.5
3  |      30      |     2


The information is summarized as follows:

'technology_data': {
'shipsize':
{'upgrade_cost': [10, 15, 20, 25, 30],
'starting_level': 1},
'attack':
'starting_level': 0},
'defense':
'starting_level': 0},
'movement':
{'upgrade_cost': [20, 30, 40, 40, 40],
'starting_level': 1},
'shipyard':