;;   ___________		     _________		      _____  __
;;   \_	  _____/______   ____   ____ \_   ___ \____________ _/ ____\/  |_
;;    |    __) \_  __ \_/ __ \_/ __ \/    \  \/\_  __ \__  \\   __\\   __|
;;    |     \   |  | \/\  ___/\  ___/\     \____|  | \// __ \|  |   |  |
;;    \___  /   |__|    \___  >\___  >\______  /|__|  (____  /__|   |__|
;;	  \/		    \/	   \/	     \/		   \/
;;  ______________________                           ______________________
;;			  T H E   W A R   B E G I N S
;;	   FreeCraft - A free fantasy real time strategy game engine
;;
;;	units.ccl	-	Define the used unit-types.
;;
;;	(c) Copyright 1998,2000-2002 by Lutz Sammer
;;
;;	FreeCraft is free software; you can redistribute it and/or modify
;;	it under the terms of the GNU General Public License as published
;;	by the Free Software Foundation; only version 2 of the License.
;;
;;	FreeCraft is distributed in the hope that it will be useful,
;;	but WITHOUT ANY WARRANTY; without even the implied warranty of
;;	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;	GNU General Public License for more details.
;;
;;	$Id: units.ccl,v 1.31 2003/02/06 07:14:44 mr-russ Exp $

;; Load the animations for the units.
(load "ccl/anim.ccl" #f #t)

;; Load the different races
(load "ccl/alliance/units.ccl" #f #t)
(load "ccl/mythical/units.ccl" #f #t)

;;=============================================================================
;;	Define unit-types.
;;
;;	NOTE: Save can generate this table.
;;
(define-unit-type 'unit-nothing-22 'name "Nothing 22"
  'files '()
  'size '(0 0)
  'animations 'animations-building 'icon 'icon-cancel
  'speed 99
  'hit-points 0
  'tile-size '(0 0) 'box-size '(0 0)
  'sight-range 0
  'basic-damage 0 'piercing-damage 0 'missile 'missile-none
  'priority 0
  'type-land
  'sounds '())

(define-unit-type 'unit-nothing-24 'name "Nothing 24"
  'files '()
  'size '(32 32)
  'animations 'animations-building 'icon 'icon-cancel
  'costs '(time 60 gold 400)
  'speed 99
  'hit-points 60
  'tile-size '(1 1) 'box-size '(63 63)
  'sight-range 4 'computer-reaction-range 20 'person-reaction-range 10
  'armor 2 'basic-damage 9 'piercing-damage 1 'missile 'missile-none
  'max-attack-range 1
  'priority 40
  'type-naval
  'right-attack
  'sea-unit
  'selectable-by-rectangle
  'sounds '())

(define-unit-type 'unit-nothing-25 'name "Nothing 25"
  'files '()
  'size '(32 32)
  'animations 'animations-building 'icon 'icon-cancel
  'costs '(time 60 gold 400)
  'speed 99
  'hit-points 60
  'tile-size '(1 1) 'box-size '(63 63)
  'sight-range 4 'computer-reaction-range 20 'person-reaction-range 10
  'armor 2 'basic-damage 9 'piercing-damage 1 'missile 'missile-none
  'max-attack-range 1
  'priority 40
  'type-naval
  'right-attack
  'sea-unit
  'selectable-by-rectangle
  'sounds '())

(define-unit-type 'unit-nothing-30 'name "Nothing 30"
  'files '()
  'size '(0 0)
  'animations 'animations-building 'icon 'icon-cancel
  'speed 99
  'hit-points 0
  'tile-size '(0 0) 'box-size '(0 0)
  'sight-range 0
  'basic-damage 0 'piercing-damage 0 'missile 'missile-none
  'priority 0
  'type-land
  'sounds '())

(define-unit-type 'unit-nothing-36 'name "Nothing 36"
  'files '()
  'size '(0 0)
  'animations 'animations-building 'icon 'icon-cancel
  'speed 99
  'hit-points 0
  'tile-size '(0 0) 'box-size '(0 0)
  'sight-range 0
  'basic-damage 0 'piercing-damage 0 'missile 'missile-none
  'priority 0
  'type-land
  'sounds '())

(define-unit-type 'unit-daemon 'name "Daemon"
  'files '(tileset-summer "neutral/units/daemon.png")
  'size '(72 72)
  'animations 'animations-daemon 'icon 'icon-daemon
  'costs '(time 70 gold 500 oil 50)
  'speed 14
  'hit-points 60
  'tile-size '(1 1) 'box-size '(31 31)
  'sight-range 5 'computer-reaction-range 7 'person-reaction-range 5
  'armor 3 'basic-damage 10 'piercing-damage 2 'missile 'missile-daemon-fire
  'max-attack-range 3
  'priority 63
  'points 100
  'demand 1
  'type-fly
  'right-attack
  'can-attack
  'can-target-land 'can-target-sea 'can-target-air
  'air-unit
  'critter
  'can-see-submarine
  'organic
  'selectable-by-rectangle
  'sounds '(
    selected "daemon-selected"
    acknowledge "daemon-acknowledge"
    ready "daemon-ready"
    help "basic mythical voices help 1"
    dead "basic mythical voices dead"
    attack "daemon-attack"))

(define-unit-type 'unit-critter 'name "Critter"
  'files '(tileset-summer "tilesets/summer/neutral/units/critter.png"
    tileset-winter "tilesets/winter/neutral/units/critter.png"
    tileset-wasteland "tilesets/wasteland/neutral/units/critter.png"
    tileset-swamp "tilesets/swamp/neutral/units/critter.png")
  'size '(32 32)
  'animations 'animations-critter 'icon 'icon-critter
  'speed 3
  'hit-points 5
  'tile-size '(1 1) 'box-size '(31 31)
  'sight-range 2 'computer-reaction-range 20 'person-reaction-range 10
  'basic-damage 80 'piercing-damage 0 'missile 'missile-critter-explosion
  'max-attack-range 1
  'priority 37
  'points 1
  'demand 1
  'type-land
  'right-move
  'can-target-land
  'land-unit
  'critter
  'organic
  'sounds '(
    selected "critter-selected"
    acknowledge "critter-acknowledge"
    ready "critter-ready"
    help "critter-help"
    dead "critter-dead"
    attack "critter-attack"))

(define-unit-type 'unit-gold-mine 'name "Gold Mine"
  'files '(tileset-summer "tilesets/summer/neutral/buildings/gold mine.png"
    tileset-winter "tilesets/winter/neutral/buildings/gold mine.png"
    tileset-wasteland "tilesets/wasteland/neutral/buildings/gold mine.png"
    tileset-swamp "tilesets/swamp/neutral/buildings/gold mine.png")
  'size '(96 96)
  'animations 'animations-building 'icon 'icon-gold-mine
  'costs '(time 150)
  'construction 'construction-land
  'speed 0
  'hit-points 25500
  'tile-size '(3 3) 'box-size '(95 95)
  'sight-range 3
  'armor 20 'basic-damage 0 'piercing-damage 0 'missile 'missile-none
  'priority 0
  'corpse '(unit-destroyed-3x3-place 0)
  'type-land
  'building
  'gives-gold
  'sounds '(
    selected "gold-mine-selected"
    acknowledge "gold-mine-acknowledge"
    ready "gold-mine-ready"
    help "gold-mine-help"
    dead "building destroyed"
    attack "gold-mine-attack"))

(define-unit-type 'unit-oil-patch 'name "Oil Patch"
  'files '(tileset-summer "tilesets/summer/neutral/buildings/oil patch.png"
    tileset-wasteland "tilesets/wasteland/neutral/buildings/oil patch.png"
    tileset-swamp "tilesets/swamp/neutral/buildings/oil patch.png")
  'size '(96 96)
  'animations 'animations-building 'icon 'icon-oil-patch
  'speed 0
  'hit-points 0
  'tile-size '(3 3) 'box-size '(95 95)
  'sight-range 0
  'basic-damage 0 'piercing-damage 0 'missile 'missile-none
  'priority 0
  'type-naval
  'building
  'oil-patch
  'sounds '(
    selected "oil-patch-selected"
    acknowledge "oil-patch-acknowledge"
    ready "oil-patch-ready"
    help "oil-patch-help"
    dead "building destroyed"
    attack "oil-patch-attack"))

(define-unit-type 'unit-circle-of-power 'name "Circle of Power"
  'files '(tileset-summer "neutral/buildings/circle of power.png")
  'size '(64 64)
  'animations 'animations-building 'icon 'icon-circle-of-power
  'speed 0
  'hit-points 0
  'tile-size '(2 2) 'box-size '(63 63)
  'sight-range 0
  'basic-damage 0 'piercing-damage 0 'missile 'missile-none
  'priority 0
  'corpse '(unit-destroyed-2x2-place 0)
  'type-land
  'building
  'sounds '(
    selected "circle-of-power-selected"
    acknowledge "circle-of-power-acknowledge"
    ready "circle-of-power-ready"
    help "basic alliance voices help 2"
    dead "building destroyed"
    attack "circle-of-power-attack"))

(define-unit-type 'unit-dark-portal 'name "Dark Portal"
  'files '(tileset-summer "tilesets/summer/neutral/buildings/dark portal.png"
    tileset-winter "tilesets/winter/neutral/buildings/dark portal.png"
    tileset-wasteland "tilesets/wasteland/neutral/buildings/dark portal.png"
    tileset-swamp "tilesets/swamp/neutral/buildings/dark portal.png")
  'size '(128 128)
  'animations 'animations-building 'icon 'icon-dark-portal
  'costs '(time 100 gold 3000 wood 3000 oil 1000)
  'construction 'construction-land
  'speed 0
  'hit-points 5000
  'max-mana 255
  'tile-size '(4 4) 'box-size '(127 127)
  'sight-range 4
  'basic-damage 0 'piercing-damage 0 'missile 'missile-none
  'priority 0
  'corpse '(unit-destroyed-4x4-place 0)
  'type-land
  'building
  'can-cast-spell
  'teleporter
  'sounds '(
    selected "dark-portal-selected"
    acknowledge "dark-portal-acknowledge"
    ready "dark-portal-ready"
    help "basic mythical voices help 2"
    dead "building destroyed"
    attack "dark-portal-attack"))

(define-unit-type 'unit-runestone 'name "Runestone"
  'files '(tileset-summer "neutral/buildings/runestone.png"
    tileset-winter "tilesets/winter/neutral/buildings/runestone.png"
    tileset-swamp "tilesets/swamp/neutral/buildings/runestone.png")
  'size '(64 64)
  'animations 'animations-building 'icon 'icon-runestone
  'costs '(time 175 gold 900 wood 500)
  'construction 'construction-land
  'speed 0
  'hit-points 5000
  'max-mana 255
  'tile-size '(2 2) 'box-size '(63 63)
  'sight-range 4
  'armor 20 'basic-damage 0 'piercing-damage 0 'missile 'missile-none
  'priority 15 'annoy-computer-factor 35
  'points 150
  'corpse '(unit-destroyed-2x2-place 0)
  'type-land
  'building
  'can-cast-spell
  'sounds '(
    selected "runestone-selected"
    acknowledge "runestone-acknowledge"
    ready "runestone-ready"
    help "basic mythical voices help 2"
    dead "building destroyed"
    attack "runestone-attack"))

(define-unit-type 'unit-dead-body 'name "Dead Body"
  'files '(tileset-summer "neutral/units/corpses.png")
  'size '(72 72)
  'animations 'animations-dead-body 'icon 'icon-peasant
  'speed 0
  'hit-points 255
  'tile-size '(1 1) 'box-size '(31 31)
  'sight-range 1
  'basic-damage 0 'piercing-damage 0 'missile 'missile-none
  'priority 0
  'type-land
  'vanishes
  'sounds '())

(define-unit-type 'unit-destroyed-1x1-place 'name "Destroyed 1x1 Place"
  'files '(
    tileset-summer "tilesets/summer/neutral/buildings/small destroyed site.png"
    tileset-winter "tilesets/winter/neutral/buildings/small destroyed site.png"
    tileset-wasteland
      "tilesets/wasteland/neutral/buildings/small destroyed site.png"
    tileset-swamp "tilesets/swamp/neutral/buildings/small destroyed site.png")
  'size '(32 32)
  'animations 'animations-destroyed-place 'icon 'icon-peasant
  'speed 0
  'hit-points 255
  'tile-size '(1 1) 'box-size '(31 31)
  'sight-range 2
  'basic-damage 0 'piercing-damage 0 'missile 'missile-none
  'priority 0
  'type-land
  'building
  'vanishes
  'sounds '())

(define-unit-type 'unit-destroyed-2x2-place 'name "Destroyed 2x2 Place"
  'files '(tileset-summer "tilesets/summer/neutral/buildings/destroyed site.png"
    tileset-winter "tilesets/winter/neutral/buildings/destroyed site.png"
    tileset-wasteland "tilesets/wasteland/neutral/buildings/destroyed site.png"
    tileset-swamp "tilesets/swamp/neutral/buildings/destroyed site.png")
  'size '(64 64)
  'animations 'animations-destroyed-place 'icon 'icon-peasant
  'speed 0
  'hit-points 255
  'tile-size '(2 2) 'box-size '(63 63)
  'sight-range 2
  'basic-damage 0 'piercing-damage 0 'missile 'missile-none
  'priority 0
  'type-land
  'building
  'vanishes
  'sounds '())

(define-unit-type 'unit-destroyed-3x3-place 'name "Destroyed 3x3 Place"
  'use 'unit-destroyed-2x2-place
  'size '(96 96)
  'animations 'animations-destroyed-place 'icon 'icon-peasant
  'speed 0
  'hit-points 255
  'tile-size '(3 3) 'box-size '(95 95)
  'sight-range 3
  'basic-damage 0 'piercing-damage 0 'missile 'missile-none
  'priority 0
  'type-land
  'building
  'vanishes
  'sounds '())

(define-unit-type 'unit-destroyed-4x4-place 'name "Destroyed 4x4 Place"
  'use 'unit-destroyed-2x2-place
  'size '(128 128)
  'animations 'animations-destroyed-place 'icon 'icon-peasant
  'speed 0
  'hit-points 255
  'tile-size '(4 4) 'box-size '(127 127)
  'sight-range 3
  'basic-damage 0 'piercing-damage 0 'missile 'missile-none
  'priority 0
  'type-land
  'building
  'vanishes
  'sounds '())

(define-unit-type 'unit-revealer 'name "Dummy unit"
  'size '(0 0)
  'animations 'animations-building 'icon 'icon-holy-vision
  'speed 0
  'hit-points 0
  'tile-size '(1 1) 'box-size '(1 1)
  'sight-range 12
  'basic-damage 0 'piercing-damage 0 'missile 'missile-none
  'priority 0
  'decay-rate 1
  'type-land
  'building
  'critter
  'can-see-submarine
  'sounds '())

(define-unit-type 'unit-reveal-attacker 'name "Dummy unit"
  'size '(0 0)
  'animations 'animations-building 'icon 'icon-holy-vision
  'speed 0
  'hit-points 0
  'tile-size '(1 1) 'box-size '(1 1)
  'sight-range 1
  'basic-damage 0 'piercing-damage 0 'missile 'missile-none
  'priority 0
  'decay-rate 1
  'type-land
  'building
  'critter
  'sounds '())