Spies

Spies are a pop based system where empires can be mischievous against each other. Spies can gather intel, perform operations, and defend your cities from other spies.

## Spy Basics

To start your spy network, you will want to create some spy pops. To make a spy pop, they will need the following blocks: 1 Cartography table, 1 tnt, and 1 bed. Empires assign spies from its cities collectively either in foreign cities or its own. This means you can have all spy pops in one city and they can still be assigned to your other cities.

While it is easier to have multiple spies, all you need is a single spy to start infiltrating other empires. To do this, you will need to assign the spy to a city. Run the command /spy assign <amount> <city> . Once the spies are assigned, every pop tick they will generate spy points in that city. If you assign more spies to that city, every tick you will get more spy points.

Spy points are used to "buy" operations in enemy cities. If you run the command /spy selectoperation, a menu will appear.

From this menu, you can select the operations to perform in that city. Every operation has a different cost and time to complete, along with a detection chance which gets higher for the more serious operations.

## Operations

### Military Info

* This operation will send you a full military strength report of that city. This report contains the job counts and training status for all military pop job types, as well as the empire's blacksmith level.
* Costs:
	+ 200 Spy Points
	+ 144 Pop Ticks
	+ 1% Detection Chance a Tick

### Spark Diplomatic Incident

* This operation will give the target city a fake message that looks authentic that their spies found a network from an empire of your choosing. This operation is purely RP in nature. Be cautious, if they do not have a spy network in their own city and you send this, they will know it is fake.
* Costs:
	+ 250 Spy Points
	+ 144 Pop Ticks
	+ 1% Detection Chance a Tick

### Economic Info

* This operation will send you a full economic report of that city. This report contains the city balance, that city's merchant overhead, that city's stockpiles, and that city's pop assignments and their wealth if applicable.
* Costs:
	+ 200 Spy Points
	+ 144 Pop Ticks
	+ 0.5% Detection Chance a Tick

### Counter Operation

* This operation is your bread and butter operation inside your own city as well as hostile cities. This operation runs on repeat after you select it. While this operation is ongoing, it will search for enemy spy networks in the city and attempt to destroy them, set them back in progress of an operation, or end the hostile operation. This operation is automatically performed every tick by spies assigned to your own cities, and you do not need to select this operation.
* Costs:
	+ 25 Spy Points
	+ 144 Pop Ticks
	+ 3% Detection Chance a Tick

### Kill Pops

* This operation will kill 5% of a city's pops at random, excluding any military pops. This operation will not let the city drop below the starting population count.
	+ 500 Spy Points
	+ 96 Pop Ticks
	+ 3% Detection Chance a Tick

## Handling Enemy Spies

To stop hostile spies from spying on your empire, you will want to assign spies to your cities. Once assigned to your own cities, they will begin running counter operations automatically. While not guaranteed, the vast majority of operations against you will be caught and dealt with by your spies, with a small chance of them being able to figure out who was behind them. For each spy assigned to one of your own cities, it can thwart one operation or network per tick.

## Planned Features

Not all features of the Spy system are in right now. A few upcoming features are:

Sappers: A placeable device that when placed in an enemy parcel will slowly divert some of the produced resources to your own stockpile.

Lockpicks: A device with a one time use to open a door in a city.

Bombs: A device with a one time use to set off an explosion in a parcel.