home *** CD-ROM | disk | FTP | other *** search
/ c't freeware shareware 2001 January / CT_SW0101.ISO / pc / software / spiele / strat / fcraft.tgz / fcraft.tar / clone-000402 / data / ccl / ai.ccl next >
Text File  |  2000-04-02  |  3KB  |  108 lines

  1. ;;   ___________             _________              _____  __
  2. ;;   \_      _____/______   ____   ____ \_   ___ \____________ _/ ____\/  |_
  3. ;;    |    __) \_  __ \_/ __ \_/ __ \/    \  \/\_  __ \__  \\   __\\   __\ 
  4. ;;    |     \   |  | \/\  ___/\  ___/\     \____|  | \// __ \|  |   |  |
  5. ;;    \___  /   |__|    \___  >\___  >\______  /|__|  (____  /__|   |__|
  6. ;;      \/            \/       \/         \/           \/
  7. ;;  ______________________                           ______________________
  8. ;;              T H E   W A R   B E G I N S
  9. ;;       FreeCraft - A free fantasy real time strategy game engine
  10. ;;
  11. ;;    ai.ccl        -    Define the AI.
  12. ;;
  13. ;;    (c) Copyright 2000 by Lutz Sammer
  14. ;;
  15. ;;    $Id: ai.ccl,v 1.3 2000/04/02 15:57:36 root Exp $
  16. ;;
  17.  
  18. ;;=============================================================================
  19. ;;
  20. ;;    AI helper table, the AI must know where to build units,
  21. ;;    where to research spells, where to upgrade units.
  22. ;;
  23. ;;    (define-ai-helper (list))
  24. ;;
  25. (define-ai-helper
  26.     ;;
  27.     ;;    Unit can build which buildings.
  28.     ;;
  29.     (list 'build 'unit-peasant 'unit-town-hall)
  30.     ;;
  31.     ;;    Building can train which units.
  32.     ;;
  33.     (list 'train 'unit-town-hall 'unit-peasant)
  34.     ;;
  35.     ;;    Building can upgrade which upgrades.
  36.     ;;
  37.     (list 'upgrade 'unit-town-hall 'unit-keep 'unit-castle)
  38.     ;;
  39.     ;;    Building can research which spells.
  40.     ;;
  41.     )
  42.  
  43. ;;
  44. ;;    Define an AI engine.
  45. ;;
  46. ;;    (define-ai name race class script)
  47. ;;        
  48. ;;    name    name of the AI for selection.
  49. ;;    class    class of the AI for map editor.
  50. ;;    script    Main AI script.
  51. ;;
  52. (define-ai "my-ai" "human" "land-attack"
  53.   '(
  54.     ;;
  55.     ;;    Enable or disable the AI cheating on unexplored area.
  56.     ;;        (set-cheat-unexplored! #t)
  57.     ;;        The AI sees all area explored.
  58.     ;;        (set-cheat-unexplored! #f)
  59.     ;;        The AI sees unexplored area as it is.
  60.     ;;
  61.     (set-cheat-unexplored! #t) 
  62.     ;;
  63.     ;;    Enable or disable the AI cheating on visibile area.
  64.     ;;        (set-cheat-visibile! #t)
  65.     ;;        The AI sees all area visibile.
  66.     ;;        (set-cheat-visibile! #f)
  67.     ;;        The AI sees visibile area as it is.
  68.     ;;
  69.     (set-cheat-visible! #t) 
  70.     ;;
  71.     ;;    Need a building.
  72.     ;;        (need building)
  73.     ;;        Build a building position selected from the AI, if not
  74.     ;;        already available.
  75.     ;;
  76.     (need 'unit-town-hall)
  77.     ;;
  78.     ;;    Train an unit.
  79.     ;;        (train unit)
  80.     ;;        Train a units.
  81.     ;;        (train unit count)
  82.     ;;        Train count units.
  83.     (need 'unit-peasant 3)
  84.     ;;
  85.     ;;    Wait until the units are ready.
  86.     ;;        (wait unit count)
  87.     ;;
  88.     (wait 'unit-peasant 3)
  89.  
  90.  
  91.     ;;
  92.     ;;    Build a building.
  93.     ;;        (build building x y)
  94.     ;;        Build a building at position x,y.
  95.     ;;        (build building)
  96.     ;;        Build a building position selected from the AI.
  97.     ;;
  98.     (build 'unit-town-hall)
  99.  
  100.     ;;
  101.     ;;    Train an unit.
  102.     ;;        (train unit)
  103.     ;;        Train a units.
  104.     ;;        (train unit count)
  105.     ;;        Train count units.
  106.     (train 'unit-peasant 3)
  107.     ))
  108.