  System Variables, Flags, Object Types  [Omega Ref. Sheet Side 1/2]

Forty-six of the 51 system variables are formed by combining a prefix and a
suffix, per the "x"s in the large and small tables below. 

                SUFFIX                                        SUFFIX
           ----------------------------------                ----------
PREFIX     ! X  Y  DIST  DIR  TYPE  NUM  CODE        PREFIX  ! DAMAGE          
  
---------------------------------------------        ------------------
TANK       ! x  x         x          x               INT     !   x          
ENEMY      ! x  x    x                               ARMOR   !   x
OBJ        ! x  x    x         x                     TREAD   !   x
OBSTACLE   ! x  x    x         x                     SCAN    !   x    
SCAN       !              x                          WEAP    !   x    
                                                     
ALLYHQ     ! x  x                                 MISCELLANEOUS VARIABLES
ENEMYHQ    ! x  x    x                               
                                                     FUELLEVEL
ALLY       ! x  x    x    x          x    x          
ALLYENEMY  ! x  x    x    x                          KITSLEFT  
                                                     REMOTESLEFT
COPY       ! x  x    x    x          x    x          XYDIST      
COPYENEMY  ! x  x    x    x                          RANDOMNUM

   PREFIX DEFINITIONS                   SUFFIX DEFINITIONS

TANK     = YOUR TANK                X,Y    = X AND Y COORDINATES (1-62, INIT 0)
ENEMY    = LAST ENEMY SCANNED       DIST   = CURRENT DISTANCE,  TANK TO X,Y (?)
OBJ      = LAST OBJECT SCANNED      DIR    = CURRENT DIRECTION, TANK TO X,Y (?)
OBSTACLE = LAST OBSTACLE DETECTED   TYPE   = TYPE OF OBJ/OBSTACLE: TABLE BELOW
SCAN     = SCANNER DISH (CCS)       NUM    = IDENTIFICATION NUMBER (1-15)   (?)
                                    CODE   = LAST CODE TRANSMITTED BY ALLY
INT      = INTERNAL                 DAMAGE = CURRENT DAMAGE: 0 = AOK, 100 = GONE
WEAP     = WEAPON (CWS)                        (Version of 9/16/89, R.A.Fowell)

--------------------------------------------------------------------------------
   SYSTEM FLAGS: TO USE IN:  IF <SYSTEM FLAG> THEN [BRANCH TO:DO] <LABEL>

       SYSTEM FLAG                          SYSTEM FLAG DESCRIPTION

 TANK ( :NOT) FACING "X" "Y"           TANKDIR (=:<>) DIRECTION "X" "Y"
(TANK:OBJECT:ENEMY HQ) ( :NOT) FOUND   DID LAST SCAN FIND WHAT IT SOUGHT?
(LOCKED:UNLOCKED)                      SL: IS OUR SCANNER LOCKED ONTO
SOMETHING?
 SHIELD (UP:DOWN)                      DS: IS OUR DEFENSE SHIELD UP OR DOWN? 
( :NOT) BEING SCANNED                  LD: IS ENEMY SCAN LOCKED ONTO US?
(OBSTRUCTION:OBJECT) (ENEMY:ALLY) HQ   IS LATEST OBS/OBJ OUR/THEIR HEADQUARTERS
 ALLY TANK "#" (ACTIVE:INACTIVE)       DOES ALLY "#" (STILL) EXIST?
 KEY ( := <SINGLE CHARACTER>)          HAS KEY BEEN PRESSED?

OBJECT TYPE TABLE

 0  NO OBJECT                  DETECTION (MOS)
 1  ROADS, GRASS, ETC.            TYPES 2 AND ABOVE ARE DETECTABLE AS OBSTACLES
 2  WATER                      SCANNING  (CCS)
 3  DAMAGED TANK OR TREES         TYPES 3 AND ABOVE ARE SCANNED AS OBJECTS
 4  TREES                      SHOOTING (CWS); COLLISIONS  
 5  HOUSES OR HEADQUARTERS        TYPES 0-2,6 CANNOT BE DAMAGED; TYPES >2 DO DMG
 6  BUILDINGS OR BARRIERS      SCAN BLOCKAGE
 6  CYBERTANKS                    TYPES 4-6 BLOCK SCANNER SET TO FIND TANK/HQ
           OMEGA Programming Language Summary   [ Omega Ref. Sheet Side 2/2 ]


             Syntax description conventions

 <class>    Angle brackets indicate that a string of type "class" is to be used.
 (<string1>:<string2>) Parentheses enclose a list of strings separated by colons.
                    One and only one of the strings is to be used.
 [string 1] Square brackets enclose optional strings. 
 <sys var>  Replace with one of the 51 system variables from Ref. Sheet Side 1.
 <user var> A user variable. (up to 32 may be used, contents are in 0..100)
 <var>      Replace with a system or user variable.
 "#"        Replace with a system/user variable, or an integer in the range 0:100
 <comp op>  Replace with one of the 6 comparision operators: <,<=,<>,=,>=,>.
 <exp>      Replace with an expression of the form: [<var> (+:-)] "#"
 <sys flag> Replace with a system flag from Ref. Sheet Side 1.
 "x" "y"    Replace with "#" "#", (separate with space), each between 0 and 63.
 'angle'    Replace with a "#" in the range 0 to 7 (one of the eight directions).



        Summary of OMEGA Cybertank Language Sufficient Command Set


Cycles   Syntax                                              Comments

 60   REPAIR (INTERNAL:ARMOR:TREADS:SCANNER:WEAPON)      Fixes __ points on avg.
 40   MOVE (FORWARD:BACKWARD) "#"                        Direction from TANKDIR
 40   FIRE AT ("X" "Y":TANK DIRECTION:SCANNER DIRECTION) No generic FIRE AT <dir>
 16   TURN   (LEFT "#":RIGHT "#":TO 'angle':TO "X" "Y")  Turn means turn tank
 16   ROTATE (LEFT "#":RIGHT "#":TO 'angle':TO "X" "Y")  Rotate == rotate scanner
 15   LAUNCH                                             Launch a remote scanner   
 10   RAISE                                              Raise defensive shield
  8   SCAN FOR (TANK:OBJECT:ENEMY HQ)                    Using scanner (CSS)
  8   JAM                                                Break enemy scan locks
  5   LOWER                                              Lower defensive shield
  5  (LOCK:UNLOCK)                                       Lock scanner on item
  4   DETECT AT 'ANGLE'                                  Use detector, range 1-3
  1   SELF DESTRUCT                                      Nobody gets 2 pts for me!
  1   <user var> = <exp>                                 Assignment statement
  1   IF (<sys flag>:<var><comp op><exp>)                Whole IF..THEN on 1 line.
         THEN ( :BRANCH TO:DO) <label>
  1  (GOTO:BRANCH TO) <label>                            Goto, no return mechanism
  1  (DO:GOSUB) <label>                                  Gosub, returns on resume
  1   RESUME                                             Return to line after gosub
  1   GET DISTANCE "X" "Y"                               Puts distance in XYDIST
  1   GET RANDOM [TO "#"]                                Puts 1:"#" in RANDOMNUM
  1   BEEP                                               Beeps for debugging
  0   BREAK                                              Halts in testbench only
  1   SWITCH (ON:OFF)                                    Turn commlink on/off
  1  (COPY:CLEAR) DATA                                   Copy/clear commlink data
  1   TRANSMIT "#"                                       "#" to team's ALLYCODE
  0   INCLUDE <AI capsule filename>                      File include, 1 level 
                
  0   *                                                  In col.1, comment line

(Version of 9/23/89, R.A. Fowell) Note: special case commands are often terser.


