TerryEbdon / Trk21

A Groovy version of the 1973 BASIC-PLUS program TREK.BAS, originally written on a PDP-11 running RSTS/E
Apache License 2.0
0 stars 0 forks source link

Should it be possible to run out of energy while docked? #12

Open TerryEbdon opened 5 years ago

TerryEbdon commented 5 years ago

When docked the star base will always protect the ship from enemy fire and top-up the ship's energy. Under which circumstances should a docked ship's energy be exhausted?

  STARDATE:  2608        CONDITION: DOCKED
  QUADRANT: 5 - 7           SECTOR: 5 - 7
    ENERGY:  3000  PHOTON TORPEDOS: 10
  KLINGONS:    19

Command: p
  Number of units to fire: 3000
  Phasers locked in on target. Energy available 3000
  1137 unit hit on Enemy ship No. 1 at sector 3 - 2
  Enemy ship destroyed!
  3000 unit hit on Enemy ship No. 2 at sector 6 - 8
  Enemy ship destroyed!
  987 unit hit on Enemy ship No. 3 at sector 8 - 1
  Enemy ship destroyed!
  It is stardate 2608

 Your ship has been destroyed after 8 years.
 Your civilisation will be conquered.
 There are still 16 enemy ships.
 You are dead.
TerryEbdon commented 5 years ago

Log fragment corresponding to the issue's example game-play:

… INFO Trek Phasers locked in on target. Energy available 3000
… INFO FederationShip Firing phasers used 3000 units of energy.
… INFO FederationShip Energy reserves reduced to 0
… INFO FederationShip Ship is dead in space.
  ⋮
… INFO Trek Fire phasers completed - available energy: 0
… INFO FederationShip Ship is dead in space.