STAR CADRE: COMBAT CLASS - GAME TREATMENT

This fleshes out some of the details from the game concept document
and describes how the game will work. Precise details of the game
rules, including numbers and mission generation, will be left to the
game design document.


The Back Story

The year is 2220. The human race has begun to expand across the solar
system, with commercial and scientific settlements appearing on the
Moon, on Mars and on the moons of Jupiter and Saturn. Several space
stations orbit the earth and the major planets.

Most nation states have coalesced into a single world empire, but
conflict continues. When a society loses external threats it
inevitably turns on itself, and so there are rebellions, and areas of
earth and space are given over to anarchy.

To maintain its control, the empire maintains forces with units large
and small. On Earth, the traditional army, navy and air force are
keeping control. In space there is the beginnings of a police force,
as well as a small cadre of elite troops. It is the last of these that
interests us.

The Star Cadre is a force of some of the best troops available,
trained in operations in the most dangerous theatres of conflict:
hostile planets and the void of space. These units are trained at a
base on Earth, and Star Cadre: Combat Class focuses on the missions
used to train these units.


A Typical Game Session

In their first play session, the player is taken straight to their
first mission. Everything is generated at random: the location they
are attacking, their team, the enemies, and the mission objective.
While there are options to set up and create bespoke missions, the
player's first experience will be with core game play: after their
first game, they will have some knowledge of the settings they'd like
to tinker with.

On entering the mission they will see the following things:

* An overhead map view of the mission location, with their four units
  already deployed.

* A text window with a description of the mission: the back story, the
  location, and the objective.

* A window with information about the currently selected character:
  their name, stats, current health and energy, equipment in use and
  equipment carried.

* A text window for game messages.

The player takes their turn by moving their units around the map,
discovering enemies, items or hostages as they come into view. Each
unit has a certain amount of energy to use for movement and
combat. Once that is spent, the player ends their turn and the
computer moves its units.

As the player discovers enemies, there are two things that might
happen. The enemy unit, if not taken by surprise and if the unit has
enough action points remaining, can fire at the player unit. This is
called "opportunity fire". Assuming the player unit survives this, the
player can then opt to fire at the enemy. The player can switch
between units at will, so it's possible to bring up support in the
course of a turn.

When the player has expended as much of their units' action points as
desired, perhaps leaving some for opportunity fire during the
computer's turn, they end the turn and let the computer play.

The computer makes its moves in secret. The player will see what the
computer is doing only when the computer's units come within view of
the player's units. If a player unit has enough action points
remaining, the computer's turn will pause to allow the player unit to
fire at the computer unit. Once the computer has expended all the
action points it wishes to, its turn will end and control will return
to the player.

This turn sequence will continue until the mission is won or lost by
the player. At the end of a successful mission, the player is awarded
a score based on secondary criteria of losses, kills, time taken. How
each of these aspects affects the score depends upon the mission
type. A pretty end screen shows the score in the context of previous
missions (e.g. number of missions completed, won, lost, average score,
etc).

When a mission has ended and the final screen has passed, the new game
menu will be presented. Here the player can opt for another random
mission, or select the various options themselves for a new mission:
the type, the difficulty, the general disposition of the player
team.

The player may opt to go to and from this screen at any time, so that
if they are not enjoying a mission, they may abandon it and start a
new one. This screen will therefore offer the option to resume a game,
save it, load another game, or quit the program.

The player may also quit the game while still in the mission, in which
case the mission is saved. When Star Cadre: Combat Class is reloaded,
action resumes at the point where the player left off.


The Missions

Each mission has a type, a location, and a set of units for each
side. The mission types as as follows:

* Annihilation: take out all the enemy units. The mission ends
  successfully when no more enemy units remain. The score is
  negatively impacted by player unit losses and injuries, and time
  taken.

* Assassination: take out a particular enemy unit. The mission ends
  successfully when a particular enemy unit has been taken out, and
  the player units have all left the mission location. The score is
  negatively impacted by player unit losses and injuries, and time
  taken.

* Hostage: find a hostage and bring them to safety. The mission ends
  successfully when the hostage leaves the mission location. The score
  is negatively impacted by player unit losses and injuries, and time
  taken.

* Rescue: free as many hostages as possible. The mission ends
  successfully when at least one hostage leaves the mission location,
  along with the surviving player units. The score is positively
  impacted by the number of hostages rescued; it is negatively
  impacted by player unit losses and injuries, and time taken.

* Retrieval: find and retrieve some important data. The mission ends
  when a player unit leaves the mission location carrying the data
  card. The score is negatively impacted by player losses and
  injuries, and time taken.

* Heist: find as many data cards as possible and leave the mission
  location. The mission ends successfully when at least one data card
  is found, and the surviving player units have left the mission
  location. Score is positively impacted by the number of cards
  retrieved, and by enemy kills; it is negatively impacted by player
  losses and injuries, and time taken.


The Mission Locations

A mission location is a single level grid based "dungeon" map
generated by the LevelMap library. The grid consists of up to 256
squares, arranged in a rectangle divided into separate spaces by
walls. The rectangle can be of any proportion from 28x9 through 16x16
to 9x28.

Rooms can be any width, from 1 square upwards. They are arranged in a
grid of cells of random sizes, typically 3x3 but with dimensions
possibly going down to 1x1. Adjacent rooms are sometimes conjoined
into one room. Rooms can be linked by doors.

Missions that involve leaving the location will have a door somewhere
along the outer edge; any unit entering that door square will be
deemed to have left the mission and may not return to the location.

Squares on the map may be one of the following:

* Wall: completely impassable and blocks line of sight.

* Door: when closed at the start of a turn, it blocks line of
  sight. It may be opened and closed at will by player or computer
  units. It is impassable when closed.

* Table: obstructs line of sight to and from ducked characters. The
  table itself is impassable.

* Filing cabinet: obstructs line of sight to and from ducked
  characters. It is impassable. It may be opened by an adjacent unit
  to deposit or retrieve the objects within.

* Chair: obstructs line of sight to and from ducked characters. Unlike
  the table, the chair is not impassable.

* Open floor: units may move freely and see through these squares.

Any passable square can hold objects. The most recently deposited
object will be the one shown on the map. In the case of the door, it
cannot be closed when there is an object or a unit in the way. This
means that filing cabinets serve only to keep objects hidden in the
game.


The Units

Units are defined by physical statistics and skills, identified by
class and name, and their state is represented with changing
statistics and inventory. The physical statistics and their effects
are as follows:

* Strength: helps to determine the unit's maximum health, and how much
  a unit can carry before affecting their action points.

* Agility: helps to determine how many action points a unit can start
  with each turn.

* Endurance: helps to determine the unit's maximum health points, and
  their overall resistance to damage.

The changing statistics are as follows:

* Action points: restored to full at the start of each turn, action
  points are "spent" each time a unit moves or performs any other
  action in the game.

* Health points: these are only restored by medical attention, and are
  reduced when a unit is hit by an enemy.

Unit classes broadly determine what skills and equipment a unit has
when they enter a mission. They are an expediency that allows a player
to determine the broad skill set of their team without having to go
through a long and detailed character creation process. They are as
follows:

* Medic: uses a light firearm and/or blade for defence, and carries a
  medikit in order to heal themselves and other units. May or may not
  wear a helmet and body armour. Possesses skills in Medicine, Unarmed
  Combat and their chosen weapon.

* Scout: uses a blade for defence. Does not wear a helmet or body
  armour. Possesses skills of Unarmed and Blade Combat and Stealth.

* Auxiliary: uses a laser pistol and possibly a blade for
  defence. May or may not wear a helmet and or body armour. Possesses
  skills in Light Firearms and Blade and Unarmed Combat.

* Soldier: uses a laser rifle and possibly a laser pistol and/or a
  blade for defence. Will always wear a helmet and body
  armour. Possesses skills in Heavy Firearms, Light Firearms, Blade
  Combat and Unarmed Combat.

Skills are not black and white, but are level based. Units may possess
low levels of skill in areas outside their core expertise, allowing
them to make use of items found during the mission. The skills are:

* Medicine: the level at which, with the aid of a medikit, a unit can
  heal themselves or other units.

* Stealth: the level at which a character can move in the vicinity of
  an enemy without being detected.

* Heavy Firearms: the accuracy with which a unit can make use of heavy
  firearms, which in SCMZ means the laser rifle.

* Light Firearms: the accuracy with which a unit can make use of light
  irearms, which in SCMZ means the laser pistol.

* Blade Combat: the facility with which a unit can fight with a blade.

* Unarmed Combat: the facility with which a unit can fight without a
  weapon.

The inventory is split into two broad sections: items which are at the
ready and items which are put away in the backpack. To be effective,
items must be at the ready and in the appropriate slot.

There are four spaces for items at the ready: the head, the body, the
left hand and the right hand. Only a helmet may be worn on the head,
and only body armour may be worn on the body. The left and right hand
can carry any item, one of which will generally be a weapon.

There are six spaces for items in the backpack. Items here cannot be
used directly. Note that picking up and dropping item generally
requires an empty hand; for convenience, helmets and body armour can
be picked up and dropped, or transferred to and from the backpack,
directly from the head or body.


The Items

Included in the game are weapons, protection, medikits and data
cards. The full list is as follows:

* Laser rifle: a large laser firearm that requires no ammunition and
  is suitable for ranged combat only. It requires at least one empty
  space between the gun and its target, but provides the highest
  firepower. It also requires two hands to be used, so cannot be fired
  unless one hand is empty.

* Laser pistol: a small laser firearm suitable for close and ranged
  combat. It provides less firepower than the laser rifle but is
  suitable for all combat situations.

* Blade: a large combat knife, suitable for close combat only. Unlike
  the laser weapons it is completely silent, and can often be used
  without alerting enemy units not in sight.

* Helmet: offers a level of protection to blows and laser shots, and
  decreases the chance that a blow will render the wearer
  unconscious. It increases the wearer's susceptibility to surprise,
  and slightly decreases the wearer's agility.

* Body armour: offers a level of protection to blows and laser shots
  that augments the player's natural endurance. It decreases the
  wearer's agility.

* Medikit: allows the unit to heal small injuries and return them to
  consciousness if they pass out.

* Data card: this is the objective in some of the missions. It is a
  MacGuffin, and gives the unit carrying it no special ability in its
  own right.


The Action System

Actions in the game all have a cost in action points, and apart from
Prepared Attack are all taken actively by the player in the player's
turn. The list of actions is as follows:

* Movement: movement of a unit from one square to an adjacent
  square. Diagonal movement is possible but is more expensive than
  lateral movement. Also, movement includes crouching and standing
  which have their own costs.

* Attack: attacking an enemy either with a firearm, a blade or with
  bare hands. Cost varies according to the weapon and skill.

* Interact: opening or closing a door, picking up or dropping an item,
  untying a hostage, and opening a cabinet all have an action cost.

* Inventory: all inventory shuffling operations have a minimal action
  cost. These moving items to and from a cabinet as well as the
  player's backpack or between the "ready for use" slots.

* Medical: medical attention has a large cost, and may be required
  over several turns to heal a unit enough for it to continue.

* Prepared attack: takes no action points during the player's turn,
  but instead uses left-over action points from the turn. These must
  be sufficient to cover the cost of the attack if it were done as
  part of the player's turn. The player will specify what kind of
  prepared attack a unit would make, or that a unit refrains from
  attacking if, for instance, they wish it to remain hidden.


The Combat System

When two opposing units come within each other's line of sight, a
decision is made who gets to fire first. The non-moving unit will be
given the opportunity to attack first if:

* it is in attack range with its weapon;

* it has sufficient action points to attack;

* it has not been inhibited from prepared attack;

* it is not surprised.

Then, assuming it survives any attack, the moving unit has the
opportunity to make its attack. The conditions are subtly different,
that:

* it is in attack range with its weapon;

* it has sufficient action points to attack;

* it is aware of the opposing unit because (a) the opposing unit has
  already attacked, or (b) the opposing unit is not crouching behind
  an object or using stealth.

Each party can make only one attack per turn, i.e. one active attack
in its own turn, and one opportunity attack in its opponent's turn.

Attacks are mainly skills based. A unit makes an attack with a basic
chance to land a hit. The chance of a hit is augmented by their skill
in that particular combat type. It can be affected by other factors,
such as crouching or moving stealthily. The amount of damage caused is
determined by the type of weapon, affected in the case of unarmed or
blade combat by strength of agility respectively.

Some of that damage will be absorbed by the defender's natural
endurance and any armour that they are wearing. Any damage that gets
through is deducted from the defender's health. When health falls
below a certain level, there is a chance that the unit will pass out;
this chance is lowered if a helmet is worn. Units that pass out will
need medical attention to recover. If health is reduced to zero then
the unit is dead.

Surprise is an element early in the game, or when stealth plays a
major part in the mission. The player will be on alert from the
beginning, so the chance of surprise is very low. The enemy may not be
expecting the attack, though, so until the first shot is fired the
player has a high chance of surprise on the first attack. The player's
units become susceptible to surprise if:

* they have been unconscious;

* their last action was (a) giving medical attention, (b) looking in
  their inventory or a cabinet, (c) opening a door, (d) freeing a
  hostage.
