home *** CD-ROM | disk | FTP | other *** search
/ Igromania 1999 August / Igromania_1999-08.iso / Demo / JanesFleetCommand / data1.cab / Doctrines_Files / Torpedo.txt < prev   
Text File  |  1999-07-22  |  955b  |  50 lines

  1. TITLE Torpedo Doctrine
  2. ; VAR1 circle flag (0=snake, 1=circle)
  3. ; VAR2 search axis (preset by launcher)
  4. ; VAR3 enabled flag
  5.  
  6. RULE Init
  7. IF INIT = 1 THEN
  8.     VAR_SET 3 0
  9. ELSE
  10.     RULE Home
  11.     IF NEWTRACK = 1 AND CLASS != WEAP THEN
  12.         DEBUG "Torpedo Acquired"
  13.         SET_TIMER 2 -1
  14.         TACTIC terminal_home
  15.     END
  16.  
  17.     RULE Preenable Steer Or Search
  18.     IF VAR3 = 1 THEN
  19.         RULE Snake Or Circle
  20.         IF VAR1 = 0 THEN
  21.             ; lower priority to make sure we don't interfere with homing
  22.             PRIORITY 224
  23.             SNAKE VAR2
  24.             DEBUG "SNAKE"
  25.         ELSE
  26.             ; lower priority to make sure we don't interfere with homing
  27.             PRIORITY 224
  28.             CIRCLE
  29.             DEBUG "CIRCLE"
  30.         END
  31.     ELSE
  32.         ; lower priority to make sure we don't interfere with homing
  33.         PRIORITY 224    
  34.         SETCRS VAR2
  35.     
  36.         RULE Enable
  37.         IF TIMER1 = 0 THEN
  38.             DEBUG "Torpedo Enabled"
  39.             ENABLE
  40.             VAR_SET 3 1
  41.         END
  42.     END
  43.  
  44.     RULE Shutdown
  45.     IF TIMER2 = 0 THEN
  46.         DEBUG "Torp failed to acquire\n"
  47.         SHUTDOWN
  48.     END
  49.  
  50. END