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 >
Wrap
Text File
|
2000-04-02
|
3KB
|
108 lines
;; ___________ _________ _____ __
;; \_ _____/______ ____ ____ \_ ___ \____________ _/ ____\/ |_
;; | __) \_ __ \_/ __ \_/ __ \/ \ \/\_ __ \__ \\ __\\ __\
;; | \ | | \/\ ___/\ ___/\ \____| | \// __ \| | | |
;; \___ / |__| \___ >\___ >\______ /|__| (____ /__| |__|
;; \/ \/ \/ \/ \/
;; ______________________ ______________________
;; T H E W A R B E G I N S
;; FreeCraft - A free fantasy real time strategy game engine
;;
;; ai.ccl - Define the AI.
;;
;; (c) Copyright 2000 by Lutz Sammer
;;
;; $Id: ai.ccl,v 1.3 2000/04/02 15:57:36 root Exp $
;;
;;=============================================================================
;;
;; AI helper table, the AI must know where to build units,
;; where to research spells, where to upgrade units.
;;
;; (define-ai-helper (list))
;;
(define-ai-helper
;;
;; Unit can build which buildings.
;;
(list 'build 'unit-peasant 'unit-town-hall)
;;
;; Building can train which units.
;;
(list 'train 'unit-town-hall 'unit-peasant)
;;
;; Building can upgrade which upgrades.
;;
(list 'upgrade 'unit-town-hall 'unit-keep 'unit-castle)
;;
;; Building can research which spells.
;;
)
;;
;; Define an AI engine.
;;
;; (define-ai name race class script)
;;
;; name name of the AI for selection.
;; class class of the AI for map editor.
;; script Main AI script.
;;
(define-ai "my-ai" "human" "land-attack"
'(
;;
;; Enable or disable the AI cheating on unexplored area.
;; (set-cheat-unexplored! #t)
;; The AI sees all area explored.
;; (set-cheat-unexplored! #f)
;; The AI sees unexplored area as it is.
;;
(set-cheat-unexplored! #t)
;;
;; Enable or disable the AI cheating on visibile area.
;; (set-cheat-visibile! #t)
;; The AI sees all area visibile.
;; (set-cheat-visibile! #f)
;; The AI sees visibile area as it is.
;;
(set-cheat-visible! #t)
;;
;; Need a building.
;; (need building)
;; Build a building position selected from the AI, if not
;; already available.
;;
(need 'unit-town-hall)
;;
;; Train an unit.
;; (train unit)
;; Train a units.
;; (train unit count)
;; Train count units.
(need 'unit-peasant 3)
;;
;; Wait until the units are ready.
;; (wait unit count)
;;
(wait 'unit-peasant 3)
;;
;; Build a building.
;; (build building x y)
;; Build a building at position x,y.
;; (build building)
;; Build a building position selected from the AI.
;;
(build 'unit-town-hall)
;;
;; Train an unit.
;; (train unit)
;; Train a units.
;; (train unit count)
;; Train count units.
(train 'unit-peasant 3)
))