stratagus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Stratagus-CVS] stratagus data/ccl/spells.ccl data/ccl/human/un...


From: Crestez Leonard
Subject: [Stratagus-CVS] stratagus data/ccl/spells.ccl data/ccl/human/un...
Date: Thu, 09 Oct 2003 07:31:49 -0400

CVSROOT:        /cvsroot/stratagus
Module name:    stratagus
Branch:         
Changes by:     Crestez Leonard <address@hidden>        03/10/09 07:31:48

Modified files:
        data/ccl       : spells.ccl 
        data/ccl/human : units.ccl 
        data/ccl/orc   : units.ccl 
        doc/ccl        : ai.html ccl-index.html ccl.html config.html 
                         game.html icon.html research.html tileset.html 
                         unittype.html 
        src/clone      : ccl_spell.c spells.c 
        src/include    : missile.h spells.h unittype.h 
        src/missile    : missile.c 
        src/network    : network.c 
        src/unit       : ccl_unittype.c unittype.c 

Log message:
        Wrote some unitype and spell/missile docs.
        Separated wc2-specific config in a separate doc file.
        Removed weapon-upgrdeable armor-upgradeable and magic flags
        Compacted raise dead into summon with a require-corpse flag.
        Removed 'none target, it didn't really make sense.

Patches:
Index: stratagus/data/ccl/human/units.ccl
diff -u stratagus/data/ccl/human/units.ccl:1.39 
stratagus/data/ccl/human/units.ccl:1.40
--- stratagus/data/ccl/human/units.ccl:1.39     Mon Sep 22 15:13:08 2003
+++ stratagus/data/ccl/human/units.ccl  Thu Oct  9 07:31:42 2003
@@ -26,7 +26,7 @@
 ;;      along with this program; if not, write to the Free Software
 ;;      Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  
USA
 ;;
-;;     $Id: units.ccl,v 1.39 2003/09/22 19:13:08 n0body Exp $
+;;     $Id: units.ccl,v 1.40 2003/10/09 11:31:42 n0body Exp $
 
 ;;=============================================================================
 ;;     Define unit-types.
@@ -46,7 +46,6 @@
   'sight-range 4 'computer-reaction-range 6 'person-reaction-range 4
   'armor 2 'basic-damage 6 'piercing-damage 3 'missile 'missile-none
   'max-attack-range 1
-  'weapons-upgradable 1 'armor-upgradable 1
   'priority 60
   'points 50
   'demand 1
@@ -126,7 +125,6 @@
   'sight-range 9 'computer-reaction-range 11 'person-reaction-range 9
   'basic-damage 80 'piercing-damage 0 'missile 'missile-ballista-bolt
   'min-attack-range 2 'max-attack-range 8
-  'weapons-upgradable 1
   'priority 70
   'points 100
   'demand 1
@@ -157,7 +155,6 @@
   'sight-range 4 'computer-reaction-range 6 'person-reaction-range 4
   'armor 4 'basic-damage 8 'piercing-damage 4 'missile 'missile-none
   'max-attack-range 1
-  'weapons-upgradable 1 'armor-upgradable 1
   'priority 63
   'points 100
   'demand 1
@@ -189,7 +186,6 @@
   'sight-range 5 'computer-reaction-range 7 'person-reaction-range 5
   'basic-damage 3 'piercing-damage 6 'missile 'missile-arrow
   'max-attack-range 4
-  'weapons-upgradable 1
   'priority 55
   'points 60
   'demand 1
@@ -218,7 +214,6 @@
   'hit-points 60
   'draw-level 40
   'max-mana 255
-  'magic 1
   'tile-size '(1 1) 'box-size '(33 33)
   'sight-range 9 'computer-reaction-range 11 'person-reaction-range 9
   'basic-damage 0 'piercing-damage 9 'missile 'missile-lightning
@@ -262,7 +257,6 @@
   'sight-range 5 'computer-reaction-range 7 'person-reaction-range 5
   'armor 4 'basic-damage 8 'piercing-damage 4 'missile 'missile-none
   'max-attack-range 1
-  'weapons-upgradable 1 'armor-upgradable 1
   'priority 65
   'points 110
   'demand 1
@@ -295,7 +289,6 @@
   'sight-range 4 'computer-reaction-range 4 'person-reaction-range 2
   'basic-damage 4 'piercing-damage 2 'missile 'missile-none
   'max-attack-range 1
-  'weapons-upgradable 1
   'priority 55
   'points 100
   'demand 1
@@ -329,7 +322,6 @@
   'sight-range 6 'computer-reaction-range 9 'person-reaction-range 6
   'basic-damage 3 'piercing-damage 6 'missile 'missile-arrow
   'max-attack-range 4
-  'weapons-upgradable 1
   'priority 57
   'points 70
   'demand 1
@@ -361,7 +353,6 @@
   'sight-range 9 'computer-reaction-range 7 'person-reaction-range 5
   'armor 5 'basic-damage 10 'piercing-damage 18 'missile 'missile-arrow
   'max-attack-range 7
-  'weapons-upgradable 1
   'priority 55
   'points 60
   'demand 1
@@ -422,7 +413,6 @@
   'hit-points 120
   'draw-level 40
   'max-mana 255
-  'magic 1
   'tile-size '(1 1) 'box-size '(33 33)
   'sight-range 9 'computer-reaction-range 11 'person-reaction-range 9
   'armor 3 'basic-damage 0 'piercing-damage 16 'missile 'missile-lightning
@@ -503,7 +493,6 @@
   'sight-range 4
   'basic-damage 0 'piercing-damage 0 'missile 'missile-none
   'max-attack-range 1
-  'armor-upgradable 1
   'priority 70 'annoy-computer-factor 15
   'points 50
   'demand 1
@@ -533,7 +522,6 @@
   'sight-range 8 'computer-reaction-range 10 'person-reaction-range 8
   'armor 10 'basic-damage 35 'piercing-damage 0 'missile 'missile-small-cannon
   'max-attack-range 4
-  'weapons-upgradable 1 'armor-upgradable 1
   'priority 65 'annoy-computer-factor 20
   'points 150
   'demand 1
@@ -564,7 +552,6 @@
   'sight-range 8 'computer-reaction-range 10 'person-reaction-range 8
   'armor 15 'basic-damage 130 'piercing-damage 0 'missile 'missile-big-cannon
   'max-attack-range 6
-  'weapons-upgradable 1 'armor-upgradable 1
   'priority 63 'annoy-computer-factor 25
   'points 300
   'demand 1
@@ -691,7 +678,6 @@
   'sight-range 6 'computer-reaction-range 7 'person-reaction-range 5
   'armor 10 'basic-damage 14 'piercing-damage 5 'missile 'missile-none
   'max-attack-range 1
-  'weapons-upgradable 1 'armor-upgradable 1
   'priority 65
   'points 110
   'demand 1
@@ -723,7 +709,6 @@
   'sight-range 6 'computer-reaction-range 6 'person-reaction-range 4
   'armor 8 'basic-damage 15 'piercing-damage 8 'missile 'missile-none
   'max-attack-range 1
-  'weapons-upgradable 1 'armor-upgradable 1
   'priority 60
   'points 50
   'demand 1
@@ -756,7 +741,6 @@
   'sight-range 5 'computer-reaction-range 7 'person-reaction-range 5
   'armor 4 'basic-damage 8 'piercing-damage 4 'missile 'missile-none
   'max-attack-range 1
-  'weapons-upgradable 1 'armor-upgradable 1
   'priority 65
   'points 120
   'demand 1
@@ -790,7 +774,6 @@
   'sight-range 5 'computer-reaction-range 7 'person-reaction-range 5
   'armor 4 'basic-damage 8 'piercing-damage 4 'missile 'missile-none
   'max-attack-range 1
-  'weapons-upgradable 1 'armor-upgradable 1
   'priority 65
   'points 120
   'demand 1
Index: stratagus/data/ccl/orc/units.ccl
diff -u stratagus/data/ccl/orc/units.ccl:1.43 
stratagus/data/ccl/orc/units.ccl:1.44
--- stratagus/data/ccl/orc/units.ccl:1.43       Wed Sep 24 12:03:23 2003
+++ stratagus/data/ccl/orc/units.ccl    Thu Oct  9 07:31:42 2003
@@ -26,7 +26,7 @@
 ;;      along with this program; if not, write to the Free Software
 ;;      Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  
USA
 ;;
-;;     $Id: units.ccl,v 1.43 2003/09/24 16:03:23 n0body Exp $
+;;     $Id: units.ccl,v 1.44 2003/10/09 11:31:42 n0body Exp $
 
 ;;=============================================================================
 ;;     Define unit-types.
@@ -43,7 +43,6 @@
   'sight-range 4 'computer-reaction-range 6 'person-reaction-range 4
   'armor 2 'basic-damage 6 'piercing-damage 3 'missile 'missile-none
   'max-attack-range 1
-  'weapons-upgradable 1 'armor-upgradable 1
   'priority 60
   'points 50
   'demand 1
@@ -122,7 +121,6 @@
   'sight-range 9 'computer-reaction-range 11 'person-reaction-range 9
   'basic-damage 80 'piercing-damage 0 'missile 'missile-catapult-rock
   'min-attack-range 2 'max-attack-range 8
-  'weapons-upgradable 1
   'priority 70
   'points 100
   'demand 1
@@ -153,7 +151,6 @@
   'sight-range 4 'computer-reaction-range 6 'person-reaction-range 4
   'armor 4 'basic-damage 8 'piercing-damage 4 'missile 'missile-none
   'max-attack-range 1
-  'weapons-upgradable 1 'armor-upgradable 1
   'priority 63
   'points 100
   'demand 1
@@ -185,7 +182,6 @@
   'sight-range 5 'computer-reaction-range 7 'person-reaction-range 5
   'basic-damage 3 'piercing-damage 6 'missile 'missile-axe
   'max-attack-range 4
-  'weapons-upgradable 1
   'priority 55
   'points 60
   'demand 1
@@ -214,7 +210,6 @@
   'hit-points 60
   'draw-level 40
   'max-mana 255
-  'magic 1
   'tile-size '(1 1) 'box-size '(39 39)
   'sight-range 9 'computer-reaction-range 11 'person-reaction-range 9
   'basic-damage 0 'piercing-damage 9 'missile 'missile-touch-of-death
@@ -259,7 +254,6 @@
   'sight-range 5 'computer-reaction-range 7 'person-reaction-range 5
   'armor 4 'basic-damage 8 'piercing-damage 4 'missile 'missile-none
   'max-attack-range 1
-  'weapons-upgradable 1 'armor-upgradable 1
   'priority 65
   'points 110
   'demand 1
@@ -292,7 +286,6 @@
   'sight-range 4 'computer-reaction-range 4 'person-reaction-range 2
   'basic-damage 4 'piercing-damage 2 'missile 'missile-none
   'max-attack-range 1
-  'weapons-upgradable 1
   'priority 55
   'points 100
   'demand 1
@@ -326,7 +319,6 @@
   'sight-range 6 'computer-reaction-range 9 'person-reaction-range 6
   'basic-damage 3 'piercing-damage 6 'missile 'missile-axe
   'max-attack-range 4
-  'weapons-upgradable 1
   'priority 57
   'points 70
   'demand 1
@@ -355,7 +347,6 @@
   'hit-points 180
   'draw-level 40
   'max-mana 255
-  'magic 1
   'tile-size '(1 1) 'box-size '(39 39)
   'sight-range 9 'computer-reaction-range 11 'person-reaction-range 9
   'armor 2 'basic-damage 0 'piercing-damage 16 'missile 'missile-touch-of-death
@@ -390,12 +381,10 @@
   'hit-points 300
   'draw-level 40
   'max-mana 255
-  'magic 1
   'tile-size '(1 1) 'box-size '(42 42)
   'sight-range 6 'computer-reaction-range 6 'person-reaction-range 4
   'armor 8 'basic-damage 18 'piercing-damage 6 'missile 'missile-none
   'max-attack-range 1
-  'weapons-upgradable 1 'armor-upgradable 1
   'priority 63
   'points 100
   'demand 1
@@ -427,7 +416,6 @@
   'sight-range 5 'computer-reaction-range 6 'person-reaction-range 4
   'armor 8 'basic-damage 16 'piercing-damage 6 'missile 'missile-none
   'max-attack-range 1
-  'weapons-upgradable 1 'armor-upgradable 1
   'priority 60
   'points 50
   'demand 1
@@ -497,7 +485,6 @@
   'sight-range 4
   'basic-damage 0 'piercing-damage 0 'missile 'missile-none
   'max-attack-range 1
-  'armor-upgradable 1
   'priority 70 'annoy-computer-factor 15
   'points 50
   'demand 1
@@ -527,7 +514,6 @@
   'sight-range 8 'computer-reaction-range 10 'person-reaction-range 8
   'armor 10 'basic-damage 35 'piercing-damage 0 'missile 'missile-small-cannon
   'max-attack-range 4
-  'weapons-upgradable 1 'armor-upgradable 1
   'priority 65 'annoy-computer-factor 20
   'points 150
   'demand 1
@@ -558,7 +544,6 @@
   'sight-range 8 'computer-reaction-range 10 'person-reaction-range 8
   'armor 15 'basic-damage 130 'piercing-damage 0 'missile 'missile-big-cannon
   'max-attack-range 6
-  'weapons-upgradable 1 'armor-upgradable 1
   'priority 63 'annoy-computer-factor 25
   'points 300
   'demand 1
@@ -741,7 +726,6 @@
   'sight-range 5 'computer-reaction-range 6 'person-reaction-range 4
   'armor 8 'basic-damage 16 'piercing-damage 6 'missile 'missile-none
   'max-attack-range 1
-  'weapons-upgradable 1 'armor-upgradable 1
   'priority 60
   'points 50
   'demand 1
@@ -774,7 +758,6 @@
   'sight-range 5 'computer-reaction-range 7 'person-reaction-range 5
   'basic-damage 10 'piercing-damage 5 'missile 'missile-none
   'max-attack-range 1
-  'weapons-upgradable 1 'armor-upgradable 1
   'priority 65
   'points 120
   'demand 1
@@ -804,7 +787,6 @@
   'hit-points 40
   'draw-level 40
   'max-mana 255
-  'magic 1
   'tile-size '(1 1) 'box-size '(33 33)
   'sight-range 8 'computer-reaction-range 10 'person-reaction-range 8
   'basic-damage 0 'piercing-damage 3 'missile 'missile-touch-of-death
@@ -841,7 +823,6 @@
   'sight-range 6 'computer-reaction-range 8 'person-reaction-range 6
   'basic-damage 3 'piercing-damage 6 'missile 'missile-axe
   'max-attack-range 5
-  'weapons-upgradable 1
   'priority 55
   'points 120
   'demand 1
Index: stratagus/data/ccl/spells.ccl
diff -u stratagus/data/ccl/spells.ccl:1.7 stratagus/data/ccl/spells.ccl:1.8
--- stratagus/data/ccl/spells.ccl:1.7   Fri Oct  3 06:37:05 2003
+++ stratagus/data/ccl/spells.ccl       Thu Oct  9 07:31:41 2003
@@ -26,7 +26,7 @@
 ;;      along with this program; if not, write to the Free Software

 ;;      Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  
USA

 ;;

-;;     $Id: spells.ccl,v 1.7 2003/10/03 10:37:05 n0body Exp $

+;;     $Id: spells.ccl,v 1.8 2003/10/09 11:31:41 n0body Exp $

 

 ;; For documentation see stratagus/doc/ccl/ccl.html ;; FIXME write and move 
doc.

 

@@ -143,7 +143,7 @@
        'showname "eye of vision"

        'manacost 70

        'range  6

-       'target 'none

+       'target 'position

        'action '(summon unit-type unit-eye-of-vision time-to-live 5000)

        'sound-when-cast "eye of vision"

        'missile-when-cast "missile-normal-spell"

@@ -317,8 +317,8 @@
        'showname "raise dead"

        'manacost 50

        'range  6

-       'target 'none

-       'action '(raise-dead unit-raised unit-skeleton time-to-live 100)

+       'target 'position

+       'action '(summon unit-type unit-skeleton time-to-live 100 
require-corpse)

        'sound-when-cast "raise dead"

        'missile-when-cast "missile-normal-spell"

 ;;     'autocast '(range 6)

Index: stratagus/doc/ccl/ai.html
diff -u stratagus/doc/ccl/ai.html:1.15 stratagus/doc/ccl/ai.html:1.16
--- stratagus/doc/ccl/ai.html:1.15      Wed Oct  8 04:47:41 2003
+++ stratagus/doc/ccl/ai.html   Thu Oct  9 07:31:43 2003
@@ -45,13 +45,13 @@
 <a href="../faq.html">FAQ</a> 
 <a href="ccl.html">CCL</a> 
 <a href="unittype.html">PREV</a> 
-<a href="ccl.html">NEXT</a> 
+<a href="config.html">NEXT</a> 
 <a href="ccl-index.html">Index</a> 
 <hr>
 <a href="#define-ai">define-ai</a>
 <a href="#define-ai-helper">define-ai-helper</a>
 <a href="#define-ai-player">define-ai-player</a>
-<a href="#define-ai-wc-names">define-ai-wc-names</a>
+<a href="pud.html#define-ai-wc-names">define-ai-wc-names</a>
 <a href="#ai:attack-with-force">ai:attack-with-force</a>
 <a href="#ai:check-force">ai:check-force</a>
 <a href="#ai:debug">ai:debug</a>
@@ -188,25 +188,6 @@
   </dl>
   <b>Note:</b> If more units can repair the same units you need the same list
        for all units.
- <li><code>(list 'collect 'worker 'resource-1 ... 'resource-n)</code>
-  <dl>
-  <dt>worker</dt>
-  <dd>Name of the unit-type that can collect resources.
-  </dd>
-  <dt>resource-1</dt>
-  <dt>resource-n</dt>
-  <dd>Names of the resources that can be collected by the worker.
-  </dd>
-  </dl>
- <li><code>(list 'with-goods 'unit 'resource)</code>
-  <dl>
-  <dt>unit</dt>
-  <dd>Name of the unit-type that is carring a resource.
-  </dd>
-  <dt>resource</dt>
-  <dd>Name of the resource that is carried by the unit.
-  </dd>
-  </dl>
  <li><code>(list 'equiv 'unit 'unit-1 ... 'unit-n)</code>
   <dl>
   <dt>unit</dt>
@@ -242,8 +223,6 @@
   (list 'upgrade 'unit-town-hall 'unit-keep)
   (list 'research 'unit-human-blacksmith 'upgrade-sword1)
   (list 'repair 'unit-peasant 'unit-town-hall)
-  (list 'collect 'unit-peasant 'gold)
-  (list 'with-goods 'unit-peasant-with-gold 'gold)
   (list 'unit-limit 'unit-farm 'food)
   (list 'unit-equiv 'unit-town-hall 'unit-keep))
 </pre>
@@ -253,8 +232,6 @@
 <p>A town hall can be upgraded to a keep.
 <p>The blacksmith can reasearch the upgrade sword1.
 <p>A peasant can repair the town hall.
-<p>A peasant can collect gold.
-<p>A the peasant with gold carries gold.
 <p>To fix the food shortage the AI must build farms.
 <p>For the AI is a keep equivalent to a town hall.
 
@@ -284,35 +261,6 @@
 
 <h4>Not Used</h4>
 
-<a name="define-ai-wc-names"></a>
-<h3>(define-ai-wc-names 'land-attack 'passive ... )</h3>
-
-Define AI mapping from original number to internal symbol.
-
-
-
-<dl>
-<dt></dt>
-<dd>
-</dd>
-</dl>
-
-<h4>Example</h4>
-
-<pre>
-    (define-ai-wc-names
-      'land-attack 'passive 'orc-03 'hum-04 'orc-04 'hum-05 'orc-05
-      'hum-06 'orc-06 'hum-07 'orc-07 'hum-08 'orc-08 'hum-09 'orc-09
-      'hum-10 'orc-10 'hum-11 'orc-11 'hum-12 'orc-12 'hum-13 'orc-13
-      'hum-14-orange 'orc-14-blue 'sea-attack 'air-attack 'hum-14-red
-      'hum-14-white 'hum-14-black 'orc-14-green 'orc-14-white 'orc-exp-04
-      'orc-exp-05 'orc-exp-07a 'orc-exp-09 'orc-exp-10 'orc-exp-12 'orc-exp-06a
-      'orc-exp-06b 'orc-exp-11a 'orc-exp-11b 'hum-exp-02a-red 
'hum-exp-02b-black
-      ...
-</pre>
-
-<h4>Not Used</h4>
-
 <a name="ai:attack-with-force"></a>
 <h3>(ai:attack-with-force force)</h3>
 
@@ -876,7 +824,7 @@
 FIXME: need some complex examples.
 
 <hr>
-Last changed: $Id: ai.html,v 1.15 2003/10/08 08:47:41 martinxyz Exp $<br>
+Last changed: $Id: ai.html,v 1.16 2003/10/09 11:31:43 n0body Exp $<br>
 All trademarks and copyrights on this page are owned by their respective 
owners.
 <address>(c) 2002-2003 by <a href="http://stratagus.org";>
 The Stratagus Project</a></address></body></html>
Index: stratagus/doc/ccl/ccl-index.html
diff -u stratagus/doc/ccl/ccl-index.html:1.45 
stratagus/doc/ccl/ccl-index.html:1.46
--- stratagus/doc/ccl/ccl-index.html:1.45       Tue Oct  7 08:03:36 2003
+++ stratagus/doc/ccl/ccl-index.html    Thu Oct  9 07:31:43 2003
@@ -49,6 +49,8 @@
 <a href="config.html">Config</a>
 <a href="game.html">Game</a>
 <a href="icon.html">Icon</a>
+<a href="magic.html">Magic</a>
+<a href="pud.html">PUD</a>
 <a href="research.html">Research</a>
 <a href="sound.html">Sound</a>
 <a href="tileset.html">Tileset</a>
@@ -150,7 +152,7 @@
 <dd></dd>
 <dt><a href="ai.html#define-ai-player">define-ai-player</a></dt>
 <dd></dd>
-<dt><a href="ai.html#define-ai-wc-names">define-ai-wc-names</a></dt>
+<dt><a href="pud.html#define-ai-wc-names">define-ai-wc-names</a></dt>
 <dd></dd>
 <dt><a href="research.html#define-allow">define-allow</a></dt>
 <dd></dd>
@@ -164,7 +166,7 @@
 <dd></dd>
 <dt><a href="game.html#define-construction">define-construction</a></dt>
 <dd></dd>
-<dt><a 
href="game.html#define-construction-wc-names">define-construction-wc-names</a></dt>
+<dt><a 
href="pud.html#define-construction-wc-names">define-construction-wc-names</a></dt>
 <dd></dd>
 <dt><a href="ui.html#define-cursor">define-cursor</a></dt>
 <dd></dd>
@@ -182,7 +184,7 @@
 <dd></dd>
 <dt><a href="icon.html#define-icon-alias">define-icon-alias</a></dt>
 <dd></dd>
-<dt><a href="icon.html#define-icon-wc-names">define-icon-wc-names</a></dt>
+<dt><a href="pud.html#define-icon-wc-names">define-icon-wc-names</a></dt>
 <dd></dd>
 <dt><a href="game.html#define-map">define-map</a></dt>
 <dd></dd>
@@ -194,7 +196,7 @@
 <dd></dd>
 <dt><a href="game.html#define-missile-type">define-missile-type</a></dt>
 <dd></dd>
-<dt><a 
href="game.html#define-missiletype-wc-names">define-missiletype-wc-names</a></dt>
+<dt><a 
href="pud.html#define-missiletype-wc-names">define-missiletype-wc-names</a></dt>
 <dd></dd>
 <dt><a href="research.html#define-modifier">define-modifier</a></dt>
 <dd></dd>
@@ -204,7 +206,7 @@
 <dd></dd>
 <dt><a href="tileset.html#define-tileset">define-tileset</a></dt>
 <dd></dd>
-<dt><a 
href="tileset.html#define-tileset-wc-names">define-tileset-wc-names</a></dt>
+<dt><a href="pud.html#define-tileset-wc-names">define-tileset-wc-names</a></dt>
 <dd></dd>
 <dt><a href="ui.html#define-ui">define-ui</a></dt>
 <dd></dd>
@@ -212,11 +214,11 @@
 <dd></dd>
 <dt><a href="unittype.html#define-unit-type">define-unit-type</a></dt>
 <dd></dd>
-<dt><a 
href="unittype.html#define-unittype-wc-names">define-unittype-wc-names</a></dt>
+<dt><a 
href="pud.html#define-unittype-wc-names">define-unittype-wc-names</a></dt>
 <dd></dd>
 <dt><a href="research.html#define-upgrade">define-upgrade</a></dt>
 <dd></dd>
-<dt><a 
href="research.html#define-upgrade-wc-names">define-upgrade-wc-names</a></dt>
+<dt><a href="pud.html#define-upgrade-wc-names">define-upgrade-wc-names</a></dt>
 <dd></dd>
 <dt><a href="ui.html#define-viewports">define-viewports</a></dt>
 <dd></dd>
@@ -346,6 +348,8 @@
 <dd></dd>
 <dt><a href="config.html#set-click-missile!">set-click-missile!</a></dt>
 <dd></dd>
+<dt><a href="config.html#set-click-missile!">set-click-missile!</a></dt>
+<dd></dd>
 <dt><a href="config.html#set-color-cycle-all!">set-color-cycle-all!</a></dt>
 <dd></dd>
 <dt><a href="config.html#set-contrast!">set-contrast!</a></dt>
@@ -541,7 +545,7 @@
 <!-- SCRIPT END -->
 </dl>
 
-Last changed: $Id: ccl-index.html,v 1.45 2003/10/07 12:03:36 martinxyz Exp 
$<br>
+Last changed: $Id: ccl-index.html,v 1.46 2003/10/09 11:31:43 n0body Exp $<br>
 All trademarks and copyrights on this page are owned by their respective 
owners.
 <address>(c) 2002-2003 by <a href="http://stratagus.org";>
 The Stratagus Project</a></address></body></html>
Index: stratagus/doc/ccl/ccl.html
diff -u stratagus/doc/ccl/ccl.html:1.19 stratagus/doc/ccl/ccl.html:1.20
--- stratagus/doc/ccl/ccl.html:1.19     Mon Sep  1 16:02:07 2003
+++ stratagus/doc/ccl/ccl.html  Thu Oct  9 07:31:43 2003
@@ -58,6 +58,8 @@
 <a href="config.html">Config</a> <br>
 <a href="game.html">Game</a> <br>
 <a href="icon.html">Icon</a> <br>
+<a href="magic.html">Magic</a> <br>
+<a href="pud.html">Pud format support</a> <br>
 <a href="research.html">Research and Upgrades</a> <br>
 <a href="sound.html">Sound</a> <br>
 <a href="tileset.html">Tileset</a> <br>
@@ -68,7 +70,7 @@
 <a href="ccl-index.html">Index</a> of all the ccl functions.
 
 <hr>
-Last changed: $Id: ccl.html,v 1.19 2003/09/01 20:02:07 martinxyz Exp $<br>
+Last changed: $Id: ccl.html,v 1.20 2003/10/09 11:31:43 n0body Exp $<br>
 All trademarks and copyrights on this page are owned by their respective 
owners.
 <address>(c) 2002-2003 by <a href="http://stratagus.org";>
 The Stratagus Project</a></address></body></html>
Index: stratagus/doc/ccl/config.html
diff -u stratagus/doc/ccl/config.html:1.28 stratagus/doc/ccl/config.html:1.29
--- stratagus/doc/ccl/config.html:1.28  Sat Sep 27 02:16:37 2003
+++ stratagus/doc/ccl/config.html       Thu Oct  9 07:31:43 2003
@@ -43,7 +43,7 @@
 <a href="../readme.html">Readme</a> 
 <a href="../faq.html">FAQ</a> 
 <a href="ccl.html">CCL</a> 
-<a href="ccl.html">PREV</a> 
+<a href="ai.html">PREV</a> 
 <a href="game.html">NEXT</a> 
 <a href="ccl-index.html">Index</a> 
 <hr>
@@ -1620,7 +1620,7 @@
 <a href="../../data/ccl/stratagus.ccl"> $LIBARYPATH/ccl/stratagus.ccl </a>
 
 <hr>
-Last changed: $Id: config.html,v 1.28 2003/09/27 06:16:37 mr-russ Exp $<br>
+Last changed: $Id: config.html,v 1.29 2003/10/09 11:31:43 n0body Exp $<br>
 All trademarks and copyrights on this page are owned by their respective 
owners.
 <address>(c) 2002-2003 by <a href="http://stratagus.org";>
 The Stratagus Project</a></address></body></html>
Index: stratagus/doc/ccl/game.html
diff -u stratagus/doc/ccl/game.html:1.32 stratagus/doc/ccl/game.html:1.33
--- stratagus/doc/ccl/game.html:1.32    Fri Sep 26 16:49:24 2003
+++ stratagus/doc/ccl/game.html Thu Oct  9 07:31:43 2003
@@ -44,7 +44,7 @@
 <a href="../faq.html">FAQ</a> 
 <a href="ccl.html">CCL</a> 
 <a href="config.html">PREV</a> 
-<a href="research.html">NEXT</a> 
+<a href="icon.html">NEXT</a> 
 <a href="ccl-index.html">Index</a> 
 <hr>
 <a href="#add-keystroke-help">add-keystroke-help</a>
@@ -59,11 +59,9 @@
 <a href="#define-burning-building">define-burning-building</a>
 <a href="#define-campaign">define-campaign</a>
 <a href="#define-construction">define-construction</a>
-<a href="#define-construction-wc-names">define-construction-wc-names</a>
+<a 
href="pud.html#define-construction-wc-names">define-construction-wc-names</a>
 <a href="#define-editor-unittypes">define-editor-unittypes</a>
 <a href="#define-map">define-map</a>
-<a href="#define-missile-type">define-missile-type</a>
-<a href="#define-missiletype-wc-names">define-missiletype-wc-names</a>
 <a href="#define-race-names">define-race-names</a>
 <a href="#define-ranks">define-ranks</a>
 <a href="#diplomacy">diplomacy</a>
@@ -82,7 +80,6 @@
 <a href="#load-pud">load-pud</a>
 <a href="#log">log</a>
 <a href="#make-unit">make-unit</a>
-<a href="#missile">missile</a>
 <a href="#new-colors">new-colors</a>
 <a href="#pf-show-groupids!">pf-show-groupids!</a>
 <a href="#pf-show-regids!">pf-show-regids!</a>
@@ -460,26 +457,6 @@
 <a href="../../data/ccl/human/constructions.ccl"> 
$LIBARYPATH/ccl/human/constructions.ccl </a><br>
 <a href="../../data/ccl/orc/constructions.ccl"> 
$LIBARYPATH/ccl/orc/constructions.ccl </a>
 
-<a name="define-construction-wc-names"></a>
-<h3>(define-construction-wc-names)</h3>
-
-Define construction mapping from original number to internal symbol
-
-<dl>
-<dt></dt>
-<dd>.
-</dd>
-</dl>
-
-<h4>Example</h4>
-
-<pre>
-    (define-construction-wc-names human-shipyard orc-shipyard ... )
-</pre>
-<h4>Used</h4>
-
-<a href="../../data/ccl/wc2.ccl"> $LIBARYPATH/ccl/wc2.ccl </a>
-
 <a name="define-editor-unittypes"></a>
 <h3>(define-editor-unittypes)</h3>
 
@@ -522,48 +499,6 @@
 
 <a href="../../data/ccl/wc2.ccl"> $LIBARYPATH/ccl/wc2.ccl </a>
 
-<a name="define-missile-type"></a>
-<h3>(define-missile-type)</h3>
-
-.
-
-
-<dl>
-<dt></dt>
-<dd>.
-</dd>
-</dl>
-
-<h4>Example</h4>
-
-<pre>
-    (define-missile-type)
-</pre>
-<h4>Used</h4>
-
-<a href="../../data/ccl/wc2.ccl"> $LIBARYPATH/ccl/wc2.ccl </a>
-
-<a name="define-missiletype-wc-names"></a>
-<h3>(define-missiletype-wc-names)</h3>
-
-Define missiletype mapping from original number to internal symbol
-
-
-<dl>
-<dt></dt>
-<dd>.
-</dd>
-</dl>
-
-<h4>Example</h4>
-
-<pre>
-    (define-missiletype-wc-names lightning griffon-hammer ... )
-</pre>
-<h4>Used</h4>
-
-<a href="../../data/ccl/wc2.ccl"> $LIBARYPATH/ccl/wc2.ccl </a>
-
 <a name="define-race-names"></a>
 <h3>(define-race-names 'race '(...) 'race '(...) ...</h3>
 
@@ -1027,27 +962,6 @@
 
 <a href="../../data/ccl/wc2.ccl"> $LIBARYPATH/ccl/wc2.ccl </a>
 
-<a name="missile"></a>
-<h3>(missile)</h3>
-
-.
-
-
-<dl>
-<dt></dt>
-<dd>.
-</dd>
-</dl>
-
-<h4>Example</h4>
-
-<pre>
-    (missile)
-</pre>
-<h4>Used</h4>
-
-<a href="../../data/ccl/wc2.ccl"> $LIBARYPATH/ccl/wc2.ccl </a>
-
 <a name="new-colors"></a>
 <h3>(new-colors)</h3>
 
@@ -1589,7 +1503,7 @@
 <a href="../../data/ccl/wc2.ccl"> $LIBARYPATH/ccl/wc2.ccl </a>
 
 <hr>
-Last changed: $Id: game.html,v 1.32 2003/09/26 20:49:24 jsalmon3 Exp $<br>
+Last changed: $Id: game.html,v 1.33 2003/10/09 11:31:43 n0body Exp $<br>
 All trademarks and copyrights on this page are owned by their respective 
owners.
 <address>(c) 2002-2003 by <a href="http://stratagus.org";>
 The Stratagus Project</a></address></body></html>
Index: stratagus/doc/ccl/icon.html
diff -u stratagus/doc/ccl/icon.html:1.17 stratagus/doc/ccl/icon.html:1.18
--- stratagus/doc/ccl/icon.html:1.17    Wed Sep 10 11:33:43 2003
+++ stratagus/doc/ccl/icon.html Thu Oct  9 07:31:45 2003
@@ -44,12 +44,12 @@
 <a href="../faq.html">FAQ</a> 
 <a href="ccl.html">CCL</a> 
 <a href="game.html">PREV</a> 
-<a href="research.html">NEXT</a> 
+<a href="magic.html">NEXT</a> 
 <a href="ccl-index.html">Index</a> 
 <hr>
 <a href="#define-icon">define-icon</a>
 <a href="#define-icon-alias">define-icon-alias</a>
-<a href="#define-icon-wc-names">define-icon-wc-names</a>
+<a href="pud.html#define-icon-wc-names">define-icon-wc-names</a>
 <a href="#set-icon-size!">set-icon-size!</a>
 <a href="#set-icons-per-row!">set-icons-per-row!</a>
 <hr>
@@ -133,36 +133,6 @@
 Now it is possible to get the icon "skeleton" also with the name
 "icon-raise-dead".
 
-<a name="define-icon-wc-names"></a>
-<h3>(define-icon-wc-names icon-0 icon-1 ... icon-195)</h3>
-
-Define icon mapping from original number to internal symbol.
-
-<dl>
-<dt>icon-0</dt>
-<dd>Name of the icon assigned to index 0 (peasant).
-</dd>
-<dt>icon-1</dt>
-<dd>Name of the icon assigned to index 1 (peon).
-</dd>
-<dt>icon-195</dt>
-<dd>Name of the icon assigned to index 195. In the original only until this
-number are icons defined.
-</dd>
-</dl>
-
-<h4>Example</h4>
-
-<pre>
-    ;; This is the default icon mapping.
-    (define-icon-wc-names 
-      'icon-peasant 'icon-peon 'icon-footman ... )
-</pre>
-
-<h4>Used</h4>
-
-<a href="../../data/ccl/wc2.ccl"> $LIBARYPATH/ccl/wc2.ccl </a>
-
 <a name="set-icon-size!"></a>
 <h3>(set-icon-size! width height)</h3>
 
@@ -213,7 +183,7 @@
 <a href="../../data/ccl/icons.ccl"> $LIBARYPATH/ccl/icons.ccl </a>
 
 <hr>
-Last changed: $Id: icon.html,v 1.17 2003/09/10 15:33:43 martinxyz Exp $<br>
+Last changed: $Id: icon.html,v 1.18 2003/10/09 11:31:45 n0body Exp $<br>
 All trademarks and copyrights on this page are owned by their respective 
owners.
 <address>(c) 2002-2003 by <a href="http://stratagus.org";>
 The Stratagus Project</a></address></body></html>
Index: stratagus/doc/ccl/research.html
diff -u stratagus/doc/ccl/research.html:1.14 
stratagus/doc/ccl/research.html:1.15
--- stratagus/doc/ccl/research.html:1.14        Sun Sep 21 08:13:42 2003
+++ stratagus/doc/ccl/research.html     Thu Oct  9 07:31:45 2003
@@ -43,7 +43,7 @@
 <a href="../readme.html">Readme</a> 
 <a href="../faq.html">FAQ</a> 
 <a href="ccl.html">CCL</a> 
-<a href="icon.html">PREV</a> 
+<a href="pud.html">PREV</a> 
 <a href="sound.html">NEXT</a> 
 <a href="ccl-index.html">Index</a> 
 <hr>
@@ -52,7 +52,7 @@
 <a href="#define-dependency">define-dependency</a>
 <a href="#define-modifier">define-modifier</a>
 <a href="#define-upgrade">define-upgrade</a>
-<a href="#define-upgrade-wc-names">define-upgrade-wc-names</a>
+<a href="pud.html#define-upgrade-wc-names">define-upgrade-wc-names</a>
 <a href="#get-dependency">get-dependency</a>
 <hr>
 <h2>Intro - Introduction to research functions and variables</h2>
@@ -328,28 +328,6 @@
 <a href="../../data/ccl/human/upgrade.ccl"> 
$LIBARYPATH/ccl/human/upgrade.ccl</a> ,
 <a href="../../data/ccl/orc/upgrade.ccl"> $LIBARYPATH/ccl/orc/upgrade.ccl</a>
 
-<a name="define-upgrade-wc-names"></a>
-<h3>(define-upgrade-wc-names sword1 sword2 ...)</h3>
-
-Define upgrade mapping from original number to internal symbol
-
-<dl>
-<dt>.</dt>
-<dd>.
-</dd>
-</dl>
-
-<h4>Example</h4>
-
-<pre>
-    (define-upgrade-wc-names 'upgrade-sword1 'upgrade-sword2 ...)
-</pre>
-<h4>Used</h4>
-
-<a href="../../data/ccl/upgrade.ccl"> $LIBARYPATH/ccl/upgrade.ccl</a> ,
-<a href="../../data/ccl/human/upgrade.ccl"> 
$LIBARYPATH/ccl/human/upgrade.ccl</a> ,
-<a href="../../data/ccl/orc/upgrade.ccl"> $LIBARYPATH/ccl/orc/upgrade.ccl</a>
-
 <a name="get-dependency"></a>
 <h3>(get-dependency)</h3>
 
@@ -374,7 +352,7 @@
 <a href="../../data/ccl/orc/upgrade.ccl"> $LIBARYPATH/ccl/orc/upgrade.ccl</a>
 
 <hr>
-Last changed: $Id: research.html,v 1.14 2003/09/21 12:13:42 mr-russ Exp $<br>
+Last changed: $Id: research.html,v 1.15 2003/10/09 11:31:45 n0body Exp $<br>
 All trademarks and copyrights on this page are owned by their respective 
owners.
 <address>(c) 2002-2003 by<a href="http://stratagus.org";>
 The Stratagus Project</a></address></body></html>
Index: stratagus/doc/ccl/tileset.html
diff -u stratagus/doc/ccl/tileset.html:1.19 stratagus/doc/ccl/tileset.html:1.20
--- stratagus/doc/ccl/tileset.html:1.19 Wed Sep 10 11:33:43 2003
+++ stratagus/doc/ccl/tileset.html      Thu Oct  9 07:31:45 2003
@@ -48,7 +48,7 @@
 <a href="ccl-index.html">Index</a> 
 <hr>
 <a href="#define-tileset">define-tileset</a>
-<a href="#define-tileset-wc-names">define-tileset-wc-names</a>
+<a href="pud.html#define-tileset-wc-names">define-tileset-wc-names</a>
 <hr>
 <h2>Intro - Introduction to tileset functions and variables</h2>
 
@@ -94,40 +94,8 @@
     (define-tileset
 </pre>
 
-<a name="define-tileset-wc-names"></a>
-<h3>(define-tileset-wc-names tileset0 tileset1 tileset2 tileset3)</h3>
-
-    Define tileset mapping from original number to internal symbol
-
-<dl>
-<dt>tileset0</dt>
-<dd>Name of the tileset assigned to index 0 (summer).
-</dd>
-<dt>tileset1</dt>
-<dd>Name of the tileset assigned to index 1 (winter).
-</dd>
-<dt>tileset2</dt>
-<dd>Name of the tileset assigned to index 2 (wasteland).
-</dd>
-<dt>tileset3</dt>
-<dd>Name of the tileset assigned to index 3 (orc swamp).
-</dd>
-</dl>
-
-<h4>Example</h4>
-
-<pre>
-    ;; This is the default tileset mapping.
-    (define-tileset-wc-names 
-      'tileset-summer 'tileset-winter 'tileset-wasteland 'tileset-swamp )
-</pre>
-
-<h4>Used</h4>
-
-<a href="../../data/ccl/wc2.ccl"> $LIBARYPATH/ccl/wc2.ccl </a>
-
 <hr>
-Last changed: $Id: tileset.html,v 1.19 2003/09/10 15:33:43 martinxyz Exp $<br>
+Last changed: $Id: tileset.html,v 1.20 2003/10/09 11:31:45 n0body Exp $<br>
 All trademarks and copyrights on this page are owned by their respective 
owners.
 <address>(c) 2002-2003 by <a href="http://stratagus.org";>
 The Stratagus Project</a></address></body></html>
Index: stratagus/doc/ccl/unittype.html
diff -u stratagus/doc/ccl/unittype.html:1.32 
stratagus/doc/ccl/unittype.html:1.33
--- stratagus/doc/ccl/unittype.html:1.32        Sun Sep 21 08:13:42 2003
+++ stratagus/doc/ccl/unittype.html     Thu Oct  9 07:31:45 2003
@@ -50,7 +50,7 @@
 <a href="#define-animations">define-animations</a>
 <a href="#define-unit-stats">define-unit-stats</a>
 <a href="#define-unit-type">define-unit-type</a>
-<a href="#define-unittype-wc-names">define-unittype-wc-names</a>
+<a href="pud.html#define-unittype-wc-names">define-unittype-wc-names</a>
 <a href="#get-unit-type-ident">get-unit-type-ident</a>
 <a href="#get-unit-type-name">get-unit-type-name</a>
 <a href="#get-unit-type-property">get-unit-type-property</a>
@@ -75,24 +75,31 @@
 <dd>Name of the animation to define.
 </dd>
 <dt>script</dt>
-<dd><pre>
-        A script has this format:
-                (#(Flags Pixel Sleep Frame)
-                 #(Flags Pixel Sleep Frame)
-                ...)
-        o Flags are the sum of the following:
-                1 Restart - restart animation
-                2 Reset   - animation could here be aborted (switch to another)
-                4 Sound   - play a sound with the animation
-                8 Missile - fire a missile at this point
-        o Pixel is the number of pixels to move (if this is a moving animation)
-          the sum of a walking animation should be 16 (the tile size in pixels)
-        o Sleep is the number of frames to wait for the next animation
-          (this seems to be a way to control the unit speed)
-         FIXME: what is the speed tag from the unittype definition used for 
then?
-        o Frame is the tile position on the image. Usually 5*tilerows.
-          The engine will add something between 0 and 4 for the heading.
-</pre></dd>
+<dd>
+    A script is a bunch of frames and has this format:
+    <pre>
+       (#(Flags Pixel Sleep Frame)
+        #(Flags Pixel Sleep Frame)
+        ...)</pre>
+<dd>
+
+<dt>Here is a more detailed description of a frame.</dt>
+    <ul>
+       <li>Flags are the sum of the following:
+       <ul>
+           <li>1 Restart - restart animation
+           <li>2 Reset   - animation could here be aborted (switch to another)
+           <li>4 Sound   - play a sound with the animation
+           <li>8 Missile - fire a missile at this point
+       </ul>
+       <li>Pixel is the number of pixels to move (if this is a moving 
animation)
+           the sum of a walking animation should be 16 (the tile size in 
pixels)
+       <li>Sleep is the number of game cycles to wait unit the next animation 
frame.
+       this is the way unit speed is controlled, unit-speed in unit type is
+       only used for showing. This should be fixed sometime in the future.
+       <li>Frame is the tile position on the image. Usually 5*tilerows.
+         The engine will add something between 0 and 4 for the heading.
+    </ul>
 </dl>
 
 <h4>Example</h4>
@@ -115,53 +122,59 @@
 <a name="define-unit-stats"></a>
 <h3>(define-unit-stats ident player 'tag1 value1 'tag2 value2 ...)</h3>
 
-Define unit stats.
+Define unit stats. This is mostly only used in savegames, but included
+here for completeness. In the game every unit of the same type of one
+player have the same stats, affected by upgrades.
 
 <dl>
 <dt>ident</dt>
-<dd>Ident of the unit.
+<dd>Ident of the unit. This obviousely means that it should be defined after 
units.
 </dd>
 <dt>player</dt>
 <dd>Player number.
 </dd>
-</dl>
-Possible tags:
+<p>
+<dt>Possible tags:</dt>
 <dl>
 <dt>level</dt>
-<dd>.
+<dd>The level of the unit. It is equal to the number of upgrades of a
+certain unit and is purely cosmetic. It doesn't affect the game in any way.
 </dd>
 <dt>speed</dt>
-<dd>.
+<dd>The speed of the unit. This is not used, just shown. Unit speed is
+controlled by animation length, see define-animation.
 </dd>
-<dt>arange</dt>
-<dd>.
+<dt>attack-range</dt>
+<dd>The unit's attack range(circular). Use 1 for melee units.
 </dd>
-<dt>srange</dt>
-<dd>.
+<dt>sight-range</dt>
+<dd>The unit's sight range(circular).
 </dd>
 <dt>armor</dt>
-<dd>.
+<dd>Unit's armor. FIXME calculations?
 </dd>
-<dt>bdamage</dt>
-<dd>.
+<dt>basic-damage</dt>
+<dd>Unit's basic damage. FIXME calculations?
 </dd>
-<dt>pdamage</dt>
-<dd>.
+<dt>piercing-damage</dt>
+<dd>Unit's piercing damage. FIXME calculations?
 </dd>
-<dt>hp</dt>
-<dd>.
+<dt>hit-points</dt>
+<dd>The unit's maximum hit points.
 </dd>
 <dt>regeneration-rate</dt>
-<dd>amount of HP a unit gains per seconds</dt>
+<dd>amount of HP a unit gains per seconds
+</dt>
 <dt>costs</dt>
-<dd>.
+<dd>The cost to train this unit. This is a standard resource/value list.
+A special 'resource' is time, the time to train the unit in cycles.
 </dd>
 </dl>
+</dl>
 
 <h4>Example</h4>
 
 <pre>
-    ;; seems to be used only in savegames
     (define-unit-stats 'unit-archer 14
       'level 1 'speed 10 'attack-range 4 'sight-range 5
       'armor 0 'basic-damage 3 'piercing-damage 6 'hit-points 40
@@ -172,13 +185,15 @@
 <a name="define-unit-type"></a>
 <h3>(define-unit-type ident 'tag1 value1 'tag2 value2 ...)</h3>
 
-    Define the unit types in game it is based on the UDTA (FIXME:
-    what is UDTA?)<p>
+    Define the unit types in game. A lot of the data in this struct used to be
+    based on the UDTA section of puds, with unit statistics, but it is now a 
lot
+    bigger and more configurable<p>
 
 <dl>
 <dt>ident</dt>
 <dd>The unit-type unique identifier.  It is used to reference unit-types in
-game. F.E: "unit-knight", "unit-gold-mine".
+game. F.E: "unit-knight", "unit-gold-mine". Please use all-lowercase names
+prefixed with unit-, it is easier to read this way.
 </dd>
 </dl>
 Possible tags:
@@ -209,227 +224,361 @@
        this unit-type (here paladin).</dd>
     </dl>
 </dd>
-<dt>pixel-size</dt>
-<dd>Size of the unit-type graphic in pixeln. A list of X (width) and Y (height)
-sizes.  F.E. '( 72 72 ), '( 96 96 ).<p></dd>
+<dt>draw-level</dt>
+<dd>This is used when sorting units and missiles for drawing. Units with a 
higher draw
+order will always be on top of units with lower draw order. Units are also 
sorted from
+top to the bottom of the screen.
+</dd>
 <dt>animations</dt>
 <dd>Identifier to reference the animation sequences (scripts) for the
-unit-type. F.E. "animations-knight", "animations-gold-mine".<p></dd>
-<dt>icon</dt>
-<dd>Identifier to reference the icon shown in game for this unit-type.
-F.E. "icon-knight", "icon-gold-mine".<p></dd>
-<dt>speed</dt>
-<dd>The speed shown for this unit-type in game. (NOTE: this is
-only shown and *not* used). F.E. 10, 13.<p></dd>
-<dt>overlay</dt>
-<dd>Define the overlay shown if this unit is constructed (build).
-Currently are available:
-<ul>
-<li> 6 land construction site
-<li> 7 human shipyard construction site
-<li> 8 orc shipyard construction site
-<li> 9 human oil well construction site
-<li>10 orc oil well construction site
-<li>11 human refinery construction site
-<li>12 orc refinery construction site
-<li>13 human foundry construction site
-<li>14 orc foundry construction site
-<li>15 wall construction site
-</ul>
-NOTE: this will be changed to identifiers sometime.
-<p></dd>
-<dt>sight-range</dt>
-<dd>Sight range (in tiles) of this unit. F.E. 6, 14.<p></dd>
-<dt>hitpoints</dt>
-<dd>Hitpoints for this Unit. F.E. 90, 1000<p></dd>
-<dt>magic</dt>
-<dd>Flag to determine whether this unit is a spell user. 0 = false (not a magic
-user), 1 = true (magic user).  F.E. 1, 0<p>
+unit-type. F.E. "animations-knight", "animations-gold-mine".
 </dd>
-<dt>costs</dt>
-<dd>Define the costs to build (or aquire) this unit. It is an array of '(
-resource-name amount) pairs. Time is in frames to build this unit.
-Gold is the amount required to build this unit. Wood is the amount required
-to build this unit.  Oil is the amount required to build this unit.
-F.E.: '( time 200 gold 2000 wood 1000 oil 200 ).<p>
+<dt>pixel-size</dt>
+<dd>Size of the unit-type graphic in pixels. A list of X (width) and Y (height)
+sizes.  F.E. '( 72 72 ), '( 96 96 ).
 </dd>
-<dt>improve-production</dt>
-<dd>Define the production increase from defaults that this unit adds. It is an
-array of '(resource-name amount) pairs. Gold is the amount it increase the
-default gold by. All other defined resources are treated the same way. The
-values are treated like percents. Improvement from multiple buildings do
-not stack, but the maximum is what matters.
-F.E.: 'improve-production '( gold 20 wood 5 ) will give 120% gold and 105% 
wood.<p>
+<dt>tile-size</dt>
+<dd>Define the unit-type size in tiles. NOTE: currently only buildings could
+be bigger than one tile. A list of X (width) and Y (height) sizes.
+F.E. '( 1 1 ), '( 2 2 ).
 </dd>
-<dt>repair-range</dt>
-<dd>Range that a unit can repair from, eg. repair-range 1.</dd>
-<dt>repair-hp</dt>
-<dd>Defines the amount of hp a unit gain for each repair animation.  Units can 
only be
-repaired if this value is non-zero.
-F.E.: 'repair-hp 4.<p>
+<dt>box-size</dt>
+<dd>Define the size of the unit selection box. This is drawn centered around
+the unit and most of the time it is equal to the tile size of the unit* the 
size
+of a terrain tile, for an almost perfect fit. It's a list of X (width) and Y 
(height)
+too. F.E. '(32 32) '(64 64)
 </dd>
-<dt>repair-costs</dt>
-<dd>Define the costs to repair this unit. It is an array of '(
-resource-name amount) pairs.
-Gold is the amount required to repair repair-hp above.
-Wood and Oil are the same.
-F.E.: '( gold 2 wood 1 oil 1 ).<p>
+<dt>icon</dt>
+<dd>Identifier to reference the icon shown in game for this unit-type.
+F.E. "icon-knight", "icon-gold-mine".
 </dd>
-<dt>can-gather-resource</dt>
-<dd>This will begin a block of resoure gathering information. The folowing 
tags are available in this section:<p></dd>
+<p>
+    <dt>sound</dt>
+    <dd>After this tag there is a list of event/sound-name pairs. The 
following events
+    are supported:</dd>
     <dl>
+    <ul>
+    <li>selected: Happens when the unit is selected.
+    <li>acknowledge: Happens when the unit received an order.
+    <li>attack: Attack sound of the unit. Used when giving an attack order, it
+    can override the acknowledge sound.
+    <li>ready: Happens when the unit finished training (and it's ready) 
+    <li>help: Happens when the unit is under attack.
+    <li>dead: Happens when the unit is killed.
+    </ul>
+    </dl>
+    <dd>
+    You can use the same help or ready sound for all units if you want generic
+    "Your unit is under attack", "Some unit was trained" sounds. The actual 
sound
+    files are not declared here. Please see the documentation on <a 
href="sound.html#make-sound">sounds</a>
+    </dd>
+<p>
+<dt>The following stats are also included in a unit stats struct and are 
upgradeable, see
+<a href="#define-unit-stats">define-unit-stats</a>
+</dt>
+<dl>
+    <dt>speed</dt>
+    <dd>The speed shown for this unit-type in game. (NOTE: this is
+    only shown and *not* used). F.E. 10, 13.
+    </dd>
+    <dt>max-attack-range</dt>
+    <dd>Attack range (in tiles) of this unit. Use 1 for melee units.
+    </dd>
+    <dt>min-attack-range</dt>
+    <dd>Minimum attack range (in tiles) of this unit. This is usefull for 
siege units you
+    want to make vulnerable to close range attacks.
+    </dd>
+    <dt>sight-range</dt>
+    <dd>Sight range (in tiles) of this unit.
+    </dd>
+    <dt>armor</dt>
+    <dd>Basic armor of the unit.
+    </dd>
+    <dt>basic-damage</dt>
+    <dd>Unit's basic damage. FIXME calculations?
+    </dd>
+    <dt>piercing-damage</dt>
+    <dd>Unit's piercing damage. FIXME calculations?
+    </dd>
+    <dt>regeneration-rate</dt>
+    <dd>amount of HP a unit gains per seconds
+    </dd>
+    <dt>hit-points</dt>
+    <dd>Maximum hitpoints for this Unit.
+    </dd>
+    <dt>costs</dt>
+    <dd>Define the costs to build (or aquire) this unit. It is an array of '(
+    resource-name amount) pairs. Time is in frames to build this unit.
+    Gold is the amount required to build this unit. Wood is the amount required
+    to build this unit.  Oil is the amount required to build this unit.
+    F.E.: '( time 200 gold 2000 wood 1000 oil 200 ).
+    </dd>
+<p></dl>
+<dt>The following flags affect the same value. Somebody somewhere should 
really clean this up.</dt>
+<dl>
+    <dt>right-attack</dt>
+    <dd>Right clicking defaults to attack. This should be used for most combat 
units.
+    </dd>
+    <dt>right-move</dt>
+    <dd>Right clicking defaults to move. This should be used for unit's that 
can't attack.
+    </dd>
+    <dt>right-harvest</dt>
+    <dd>This should be used for resource gathering units. It will return goods 
when
+    on a deposit and mine when on a resource.
+    </dd>
+    <dt>right-demolish</dt>
+    <dd>This is for demolishing units. It will try to demolish instead of 
attack (since
+    demolishing units can still have a normal attack, but it really shouldn't 
be used)
+    </dd>
+<p></dl>
+<dt>can-gather-resource</dt>
+<dd>This will begin a block of resoure gathering information. The folowing 
tags are available in this section:</dd>
+<dl>
     <dt>resource-id</dt>
-    <dd>The resource identification. Has to be a resource-name defined 
before.<p></dd>
-    
+    <dd>The resource identification. Has to be a resource-name defined before.
+    </dd>    
     <dt>final-resource</dt>
     <dd>The resource is converted to this at the depot. Usefull for a 
fisherman who harvests fish,
-    but it all turns to food at the depot. Warning: curently ignored by the 
Ai.<p></dd>
-    
+    but it all turns to food at the depot. Warning: curently ignored by the Ai.
+    </dd>    
     <dt>wait-at-resource</dt>
     <dd>Cycles the unit waits while inside at a resource to get one resource 
step
-    (see below). This is completely independent of animation length and 
such.<p></dd>
-    
+    (see below). This is completely independent of animation length and such.
+    </dd>    
     <dt>wait-at-depot</dt>
-    <dd>Cycles the unit waits while inside the depot to unload.<p></dd>
-
+    <dd>Cycles the unit waits while inside the depot to unload.
+    </dd>
     <dt>resource-step</dt>
     <dd>The unit makes so-caled mining cycles. Each mining cycle it does some 
sort
     of animation and gains resource-step resources. You can stop after any 
number of
     steps. When the quantity in the harvester reaches the maximum 
(resource-capacity)
     it will return home. If this is not included then it's considered 
infinity, and
-    resource-capacity will be the limit.<p></dd>
-   
+    resource-capacity will be the limit.
+    </dd>   
     <dt>resource-capacity</dt>
     <dd>Maximum amount of resources a harvester can carry. The actual amount 
can be
-    modified while unloading, with improve-incomes.<p></dd>
-    
+    modified while unloading, with improve-incomes.
+    </dd>    
     <dt>file-when-loaded</dt>
-    <dd>The harvester's animation file will change when it's loaded.<p></dd>
-    
+    <dd>The harvester's animation file will change when it's loaded.
+    </dd>    
     <dt>file-when-empty</dt>
     <dd>The harvester's animation file will change when it's empty.The 
standard animation
-    is used only when building/repairing.<p></dd>
-    
+    is used only when building/repairing.
+    </dd>    
     <dt>harvest-from-outside</dt>
     <dd>Unit will harvest from the outside. The unit will use it's attack 
animation
-    (seems it turned into a generic Action anim.)<p></dd>
-    
+    (seems it turned into a generic Action anim.)
+    </dd>    
     <dt>lose-resources</dt>
     <dd>Special lossy behaviour for loaded harvesters. Harvesters with loads 
other
-    than 0 and ResourceCapacity will lose their cargo on any new order.<p></dd>
-    
+    than 0 and ResourceCapacity will lose their cargo on any new order.
+    </dd>    
     <dt>terrain-harvester</dt>
-    <dd>The unit will harvest terrain. For now this only works for 
wood.<p></dd>
-    </dl>
-<dt>tile-size</dt>
-<dd>Define the unit-type size in tiles. NOTE: currently only buildings could
-be bigger than one tile. A list of X (width) and Y (height) sizes.
-F.E. '( 1 1 ), '( 2 2 ).<p></dd>
+    <dd>The unit will harvest terrain. For now this only works for wood.
+    </dd>
+<p></dl>
+<dt>gives-resource</dt>
+<dd>This will make the unit (normally a building) a resource (sugar mine, 
geyser, etc).
+It's followed by a resource ident F.E. 'gives-resource 'gold
+</dd>
+<dt>can-harvest</dt>
+<dd>This is a flag for harvestable resource buildings. You can ommit it, and 
give every
+race a building that is built on top of this (see below) and has the 
can-harvest flag.
+</dd>
+<dt>can-store<dt>
+<dd>This flag makes the unit a resource storage, units will come here and 
unload their cargo.
+It's followed by a list of accepted resource identifiers. F.E. can-store 
'(stone coal)
+</dd>
+<dt>building</dt>
+<dd>Unit is a building, and imobile. Available as a spell target check.
+</dd>
+<dt>shore-building</dt>
+<dd>Unit is a shore building, and imobile. This is used for those unique 
buildings
+that have to be build on sea and have at least one point on coast.
+</dd>
+<dt>must-build-on-top</dt>
+<dd>This is for buildings that must be built on top of other buildings, as an
+upgrade of sorts. FIXME: This is <b>NOT COMPLETE</b> and only implements the
+behaviour of wc2 oil platforms. It is followed by the building type it must
+be built on.
+</dd>
+<dt>volatile</dt>
+<dd>This should be true for suicide bombers, a bit of a hack. Available as a
+target check for spells, making those invisible would ruin the game.
+</dd>
+<dt>organic</dt>
+<dd>This is a flag for spell target check.
+</dd>
+<dt>hero</dt>
+<dd>This is a flag for spell target check. Prevent instant kills for instance.
+</dd>
+<dt>coward</dt>
+<dd>Unit will not attack on sight, and will run away instead of retaliating.
+Use this for units that can't attack or are next to useless in combat (like
+resource workers) Available as a spell target check.
+</dd>
+<dt>can-cast-spell</dt>
+<dd>This is used to determine what spells can this unit cast. It is followed 
by a
+list of spell names. Spells have to be declared already. Since some spells also
+rely on units being defined this can lead to a chicken and egg problem. It's
+better to declare an unit type in advance with just (define-unit-type 
'unit-whatever).
+Please see the documentation on spells, not written. F.E. 'can-cast-spell 
'(spell-reveal-map)
+</dd>
+<dt>supply<dt>
+<dd>This is the amount of food supplied by the unit. Food is a global 
per-player
+counter that signifies the maximum amount of units.
+</dd>
+<dt>demand</dt>
+<dd>This is the amount of food required by the unit. It should be 0 for 
buildings.
+It can have values greater than one, for bigger units.
+</dd>
+<dt>improve-production</dt>
+<dd>Define the production increase from defaults that this unit adds. It is an
+array of '(resource-name amount) pairs. Gold is the amount it increase the
+default gold by. All other defined resources are treated the same way. The
+values are treated like percents. Improvement from multiple buildings do
+not stack, but the maximum is what matters.
+F.E.: 'improve-production '( gold 20 wood 5 ) will give 120% gold and 105% 
wood.
+</dd>
+<dt>repair-range</dt>
+<dd>Range that a unit can repair from, eg. repair-range 1.
+</dd>
+<dt>repair-hp</dt>
+<dd>Defines the amount of hp a unit gain for each repair animation.  Units can 
only be
+repaired if this value is non-zero.
+F.E.: 'repair-hp 4.
+</dd>
+<dt>repair-costs</dt>
+<dd>Define the costs to repair this unit. It is an array of '(
+resource-name amount) pairs.
+Gold is the amount required to repair repair-hp above.
+Wood and Oil are the same.
+F.E.: '( gold 2 wood 1 oil 1 ).
+</dd>
 <dt>permanent-cloak</dt>
-<dd>Unit is permanently cloaked, and can only be seen by detectors (see 
below.)<p></dd>
+<dd>Unit is permanently cloaked, and can only be seen by detectors (see below.)
+</dd>
 <dt>detect-cloak</dt>
-<dd>Unit can detect cloaked units. If an unit is detected other units can 
attack it as well<p></dd>
+<dd>Unit can detect cloaked units. If an unit is detected other units can 
attack it as well\
+</dd>
 <dt>demolish-range</dt>
-<dd>If non-zero this is the range for units that can demolish.The demolished 
area is a square, sorry.<p></dd>
+<dd>If non-zero this is the range for units that can demolish.The demolished 
area is a square, sorry.
+</dd>
 <dt>demolish-damage</dt>
 <dd>Damage dealt to unit affected by demolition. This can be 0, in this case
-only terrain will be affected. Units have to be in demolish-range to be 
affected.<p></dd>
+only terrain will be affected. Units have to be in demolish-range to be 
affected.
+</dd>
 <dt>random-movement-probablitity</dt>
 <dd>When the unit is idle this is the probability that it will take a
-step in a random direction, in percents. Usefull for netural animals.<p></dd>
+step in a random direction, in percents. Usefull for netural animals.
+</dd>
 <dt>clicks-to-explode</dt>
 <dd>If this is non-zero, then after that many clicks the unit will commit
 suicide. Doesn't work with resource workers/resources. It can even be used
 in combination with demolish-damage and demolish-range, though it wouldn't
-be very fair.<p></dd>
+be very fair.
+</dd>
 <dt>sniper</dt>
-<dd>Unit can only target organic units</dd>
-<dt>box-size</dt>
-<dd></dd>
-<dt>attack-range</dt>
-<dd></dd>
+<dd>Unit can only target organic units.
+</dd>
 <dt>computer-reaction-range</dt>
-<dd></dd>
-<dt>human-reaction-range</dt>
-<dd></dd>
-<dt>armor</dt>
-<dd></dd>
-<dt>priorty</dt>
-<dd></dd>
-<dt>damage</dt>
-<dd></dd>
-<dt>piercing-damge</dt>
-<dd></dd>
-<dt>weapon-upgradable</dt>
-<dd></dd>
-<dt>armor-upgradeable</dt>
-<dd></dd>
+<dd>This is supossed to be the reaction range for AI units, but it is not used.
+</dd>
+<dt>person-reaction-range</dt>
+<dd>This is supossed to be the reaction range for human player units, but it 
is not used.
+</dd>
+<dt>priority</dt>
+<dd>This is the ai priority level. High damage low-hp units for instancce 
should have
+higher priorities than say a peasant. It can be safely ignored.
+</dd>
+<dt>annoy-computer-factor<F12></dt>
+<dd>This is another ai priority level. This is not used, but included in wc2 
data. Maybe
+it should be used to attack resource buildings first? You can safely ignore it.
+</dd>
 <dt>decay</dt>
-<dd></dd>
-<dt>annoy-factor</dt>
-<dd></dd>
+<dd>This is the unit's decay rate, in 1/6 seconds. It should be really really 
really changed to
+cycles. If you set this the unit will die by itself after a while. Don't use 
it for spells,
+spells will override this with their own ttl setting.
+</dd>
 <dt>points</dt>
-<dd></dd>
-<dt>regeneration-rate</dt>
-<dd>amount of HP a unit gains per seconds</dt>
+<dd>This is the score value of an unit. Used for the final score.
+</dd>
 <dt>missile</dt>
-<dd></dd>
+<dd>Some units fire by throwing missiles, this is the missile thrown. You can 
use it for
+close range units as well, but I can't really see the point.
+</dd>
 <dt>corpse</dt>
-<dd></dd>
+<dd>This is the corpse of the unit. When the unit dies and passes through it's
+death animation it turns into this. It's a list of an unit-name and a a corpse 
frame
+number. As you can see in <a href="#define-animations">define-animations</a>,
+an animation is composed out of several script frames, this is the frame to
+start the script from. FE: 'corpse '(unit-dead-body 0)
+</dd>
 <dt>explode-when-killed</dt>
 <dd>Sets unit to explode when killed, syntax is followed by the missile to use.
-    eg. 'explode-when-killed 'missile-explosion</dd>
-<dt>type</dt>
-<dd></dd>
-<dt>right-mouse</dt>
-<dd></dd>
-<dt>can-target</dt>
-<dd></dd>
-<dt>flags</dt>
-<dd></dd>
-<dt>sounds</dt>
-<dd></dd>
-<dt>attack-sound</dt>
-<dd></dd>
+eg. 'explode-when-killed 'missile-explosion
+</dd>
+<dt>transporter</dt>
+<dd>Unit is a transporter, you can place units inside. Note: you really should 
add
+an unload button for transporters.
+</dd>
+<dt>max-on-board</dt>
+<dd>This is only used for transporters, It's the maximum allowed on board. 
Curently the
+you can't have more that 6, or you won't get any buttons for the rest.
+</dd>
+<dt>revealer</dt>
+<dd>This is a special flag to use for reveal map spells. A reveal map smell is
+in fact a summon spell with an infinite range, that summons an unit with the
+revealer flag. Revealer are summoned and marked removed, but they still keep
+their sight. This way a revealer unit can't be attacked, won't show on the 
minimap
+and can't be interacted with. Please see the documentation on spells.</dd>
+<dt>FIXME: continue documentation.</dt>
+<dd></dd>
+<dt>selectable-by-rectangle</dt>
+<dd>Most units should have this flag. When false the unit will only get 
selected
+alone, use this for buildings. Enemy units are never selectable by rectangle.
+</dd>
+<!--IDEA:<dt>force-minimap-color<dt>
+<dd>An unit with this flag will ignore any friend/foe/owning player 
considerations
+for the minimap color, and will force this. It takes a number from the palette 
here.
+</dd>-->
 </dl>
 
-<h4>Example</h4>
 
-<pre>
-    (define-unit-type "unit-footman"           "Footman"
-      ;; graphic data
-      #("footman.png"
-       ()
-       ()
-       () )
-      '(  72  72 )                     ;; graphic size
-      "animations-footman"     ;; animations
-      "icon-footman"
-      ;;Speed OvFrame SightR Hitpnt Magic  BTime       Gold    Wood    Oil
-         10       0      4     60      0 #(   60    600       0      0 )
-      ;;Tile    Box Size    Attack     ReactC  ReactH
-      '( 1 1 ) '(  31  31 )     1       6       4
-      ;;Armor Prior    Damage  Pierc   WUpgr   AUpgr
-          2    60      6      3       1       1
-      ;;Decay Annoy    Points
-         0      0      50
-      "missile-none"
-      'corpse-human
+<h4>Example</h4>
+Sorry, but due to the huge number of available flags we can only show a 
limited example.
+<pre>
+    (define-unit-type 'unit-footman 'name "Footman"
+      'files '(tileset-summer "human/units/footman.png")
+      'size '(72 72)
+      'animations 'animations-footman 'icon 'icon-footman
+      'costs '(time 60 gold 600)
+      'speed 10
+      'hit-points 60
+      'draw-level 40
+      'tile-size '(1 1) 'box-size '(31 31)
+      'sight-range 4 'computer-reaction-range 6 'person-reaction-range 4
+      'armor 2 'basic-damage 6 'piercing-damage 3 'missile 'missile-none
+      'max-attack-range 1
+      'priority 60
+      'points 50
+      'demand 1
+      'corpse '(unit-dead-body 6)
       'type-land
       'right-attack
+      'can-attack 'repair-range 1
       'can-target-land
-      ;; flags
       'land-unit
-      'can-attack
       'organic
       'selectable-by-rectangle
-      ;; sounds
-      #("footman-selected"
-       "footman-acknowledge"
-       "footman-ready"
-       "footman-help"
-       "footman-dead" )
-      "footman-attack" )
+      'sounds '(
+       selected "footman-selected"
+       acknowledge "footman-acknowledge"
+       ready "footman-ready"
+       help "basic human voices help 1"
+       dead "basic human voices dead"
+       attack "footman-attack"))
 </pre>
 
 <!--
@@ -464,20 +613,6 @@
     Get the identifier of the unit type peon.<p>
 -->
 
-<a name="define-unittype-wc-names"></a>
-<h3>(define-unittype-wc-names footman grunt ...)</h3>
-
-Define unit-type mapping from original number to internal symbol.
-
-<h4>Example</h4>
-
-<pre>
-    (define-unittype-wc-names)
-</pre>
-<h4>Used</h4>
-
-<a href="../../data/ccl/wc2.ccl"> $LIBRARYPATH/ccl/wc2.ccl </a>
-
 <a name="get-unit-type-ident"></a>
 <h3>(get-unit-type-ident unit-type)</h3>
 
@@ -614,7 +749,7 @@
 <h4>Not Used</h4>
 
 <hr>
-Last changed: $Id: unittype.html,v 1.32 2003/09/21 12:13:42 mr-russ Exp $<br>
+Last changed: $Id: unittype.html,v 1.33 2003/10/09 11:31:45 n0body Exp $<br>
 All trademarks and copyrights on this page are owned by their respective 
owners.
 <address>(c) 2002-2003 by <a href="http://stratagus.org";>
 The Stratagus Project</a></address></body></html>
Index: stratagus/src/clone/ccl_spell.c
diff -u stratagus/src/clone/ccl_spell.c:1.13 
stratagus/src/clone/ccl_spell.c:1.14
--- stratagus/src/clone/ccl_spell.c:1.13        Tue Oct  7 03:49:03 2003
+++ stratagus/src/clone/ccl_spell.c     Thu Oct  9 07:31:45 2003
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: ccl_spell.c,v 1.13 2003/10/07 07:49:03 martinxyz Exp $
+//     $Id: ccl_spell.c,v 1.14 2003/10/09 11:31:45 n0body Exp $
 //@{
 
 /*----------------------------------------------------------------------------
@@ -194,6 +194,8 @@
            } else if (gh_eq_p(value, gh_symbol2scm("time-to-live"))) {
                spellaction->Data.Summon.TTL = gh_scm2int(gh_car(list));
                list = gh_cdr(list);
+           } else if (gh_eq_p(value, gh_symbol2scm("require-corpse"))) {
+               spellaction->Data.Summon.RequireCorpse = 1;
            } else {
                errl("Unsupported summon tag",value);
            }
@@ -216,27 +218,6 @@
                errl("Unsupported spawn-portal tag",value);
            }
        }
-    } else if (gh_eq_p(value,gh_symbol2scm("raise-dead"))) {
-       spellaction->CastFunction=CastRaiseDead;
-       while (!gh_null_p(list)) {
-           value = gh_car(list);
-           list = gh_cdr(list);
-           if (gh_eq_p(value, gh_symbol2scm("unit-raised"))) {
-               str = gh_scm2newstr(gh_car(list),0);
-               spellaction->Data.RaiseDead.UnitRaised = UnitTypeByIdent(str);
-               if (!spellaction->Data.RaiseDead.UnitRaised) {
-                   spellaction->Data.RaiseDead.UnitRaised = 0;
-                   DebugLevel0("unit type \"%s\" not found for summon 
spell.\n" _C_ str);
-               }
-               free(str);
-               list = gh_cdr(list);
-           } else if (gh_eq_p(value, gh_symbol2scm("time-to-live"))) {
-               spellaction->Data.RaiseDead.TTL = gh_scm2int(gh_car(list));
-               list = gh_cdr(list);
-           } else {
-               errl("Unsupported raise-dead tag",value);
-           }
-       }
     } else if (gh_eq_p(value,gh_symbol2scm("polymorph"))) {
        spellaction->CastFunction=CastPolymorph;
        while (!gh_null_p(list)) {
@@ -247,7 +228,7 @@
                spellaction->Data.Summon.UnitType = UnitTypeByIdent(str);
                if (!spellaction->Data.Summon.UnitType) {
                    spellaction->Data.Summon.UnitType = 0;
-                   DebugLevel0("unit type \"%s\" not found for summon 
spell.\n" _C_ str);
+                   DebugLevel0("unit type \"%s\" not found for polymorph 
spell.\n" _C_ str);
                }
                free(str);
                list = gh_cdr(list);
@@ -343,6 +324,9 @@
        } else if (gh_eq_p(value,gh_symbol2scm("organic"))) {
            condition->Organic=Scm2Condition(gh_car(list));
            list=gh_cdr(list);
+       } else if (gh_eq_p(value,gh_symbol2scm("volatile"))) {
+           condition->Volatile=Scm2Condition(gh_car(list));
+           list=gh_cdr(list);
        } else if (gh_eq_p(value,gh_symbol2scm("hero"))) {
            condition->Hero=Scm2Condition(gh_car(list));
            list=gh_cdr(list);
@@ -474,9 +458,7 @@
            list=gh_cdr(list);
        } else if (gh_eq_p(value,gh_symbol2scm("target"))) {
            value=gh_car(list);
-           if (gh_eq_p(value,gh_symbol2scm("none"))) {
-               spell->Target=TargetNone;
-           } else if (gh_eq_p(value,gh_symbol2scm("self"))) {
+           if (gh_eq_p(value,gh_symbol2scm("self"))) {
                spell->Target=TargetSelf;
            } else if (gh_eq_p(value,gh_symbol2scm("unit"))) {
                spell->Target=TargetUnit;
@@ -587,9 +569,13 @@
        }
        CLprintf(file,")\n");
     } else if (action->CastFunction==CastSummon) {
-       CLprintf(file,"(summon unit-type %s time-to-live %d)",
+       CLprintf(file,"(summon unit-type %s time-to-live %d",
                action->Data.Summon.UnitType->Ident,
                action->Data.Summon.TTL);
+       if (action->Data.Summon.RequireCorpse) {
+           CLprintf(file," require-corpse ");
+       }
+       CLprintf(file,")\n");
     } else if (action->CastFunction==CastAdjustBuffs) {
        CLprintf(file,"(adjust-buffs");
        if (action->Data.AdjustBuffs.HasteTicks!=BUFF_NOT_AFFECTED) {
@@ -611,10 +597,6 @@
     } else if (action->CastFunction==CastPolymorph) {
        CLprintf(file,"(polymorph new-form %s)",
                action->Data.Polymorph.NewForm->Ident);
-    } else if (action->CastFunction==CastRaiseDead) {
-       CLprintf(file,"(raise-dead unit-raised %s time-to-live %d)",
-               action->Data.RaiseDead.UnitRaised->Ident,
-               action->Data.RaiseDead.TTL);
     } else if (action->CastFunction==CastFlameShield) {
        CLprintf(file,"(flame-shield duration %d)",
                action->Data.FlameShield.TTL);
@@ -663,6 +645,9 @@
     if (condition->Organic!=CONDITION_TRUE) {
        CLprintf(file,"organic %s ",condstrings[(int)condition->Organic]);
     }
+    if (condition->Volatile!=CONDITION_TRUE) {
+       CLprintf(file,"volatile %s ",condstrings[(int)condition->Volatile]);
+    }
     if (condition->Hero!=CONDITION_TRUE) {
        CLprintf(file,"hero %s ",condstrings[(int)condition->Hero]);
     }
@@ -757,9 +742,6 @@
        switch (spell->Target) {
            case TargetSelf:
                CLprintf(file,"self\n");
-               break;
-           case TargetNone:
-               CLprintf(file,"none\n");
                break;
            case TargetPosition:
                CLprintf(file,"position\n");
Index: stratagus/src/clone/spells.c
diff -u stratagus/src/clone/spells.c:1.106 stratagus/src/clone/spells.c:1.107
--- stratagus/src/clone/spells.c:1.106  Fri Oct  3 06:37:07 2003
+++ stratagus/src/clone/spells.c        Thu Oct  9 07:31:46 2003
@@ -27,7 +27,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: spells.c,v 1.106 2003/10/03 10:37:07 n0body Exp $
+//     $Id: spells.c,v 1.107 2003/10/09 11:31:46 n0body Exp $
 
 /*
 **     And when we cast our final spell
@@ -870,69 +870,6 @@
 }
 
 /**
-**     Cast raise dead.
-**
-**     @param caster   Unit that casts the spell
-**     @param spell    Spell-type pointer
-**     @param target   Target unit that spell is addressed to
-**     @param x        X coord of target spot when/if target does not exist
-**     @param y        Y coord of target spot when/if target does not exist
-**
-**     @return         =!0 if spell should be repeated, 0 if not
-*/
-global int CastRaiseDead(Unit *caster, const SpellType *spell, Unit *target,
-    int x, int y)
-{
-    Unit **corpses;
-    Unit *tempcorpse;
-    UnitType *skeleton;
-
-    DebugCheck(!caster);
-    DebugCheck(!spell);
-    DebugCheck(!spell->Action);
-//  assert(x in range, y in range);
-
-    skeleton = spell->Action->Data.RaiseDead.UnitRaised;
-    DebugCheck(!skeleton);
-
-    corpses = &CorpseList;
-
-    while (*corpses) {
-       // FIXME: this tries to raise all corps, ohje
-       // FIXME: I can raise ships?
-       if ((*corpses)->Orders[0].Action == UnitActionDie
-               && !(*corpses)->Type->Building
-               && (*corpses)->X >= x - 1 && (*corpses)->X <= x + 1
-               && (*corpses)->Y >= y - 1 && (*corpses)->Y <= y + 1) {
-           // FIXME: did they count on food?
-           // nobody: unlikely.
-           // Can there be more than 1 skeleton created on the same tile? yes
-           target = MakeUnit(skeleton, caster->Player);
-           target->X = (*corpses)->X;
-           target->Y = (*corpses)->Y;
-           DropOutOnSide(target,LookingW,0,0);
-           // set life span
-           target->TTL = GameCycle + target->Type->DecayRate * 6 * 
CYCLES_PER_SECOND;
-           CheckUnitToBeDrawn(target);
-           tempcorpse = *corpses;
-           corpses = &(*corpses)->Next;
-           ReleaseUnit(tempcorpse);
-           caster->Mana -= spell->ManaCost;
-           if (caster->Mana<spell->ManaCost) {
-               break;
-           }
-       } else {
-           corpses=&(*corpses)->Next;
-       }
-    }
-    PlayGameSound(spell->SoundWhenCast.Sound, MaxSampleVolume);
-    MakeMissile(spell->Missile,
-           x*TileSizeX+TileSizeX/2, y*TileSizeY+TileSizeY/2,
-           x*TileSizeX+TileSizeX/2, y*TileSizeY+TileSizeY/2 );
-    return 0;
-}
-
-/**
 **     Cast runes.
 **
 **     @param caster   Unit that casts the spell
@@ -996,36 +933,76 @@
     int x, int y)
 {
     int ttl;
+    int cansummon;
+    Unit **corpses;
+    Unit *tempcorpse;
+    UnitType* unittype;
 
     DebugCheck(!caster);
     DebugCheck(!spell);
     DebugCheck(!spell->Action);
     DebugCheck(!spell->Action->Data.Summon.UnitType);
 
-    DebugLevel0("Summoning\n");
+    unittype=spell->Action->Data.Summon.UnitType;
     ttl=spell->Action->Data.Summon.TTL;
-    caster->Mana -= spell->ManaCost;
-    // FIXME: johns: the unit is placed on the wrong position
-    target = MakeUnit(spell->Action->Data.Summon.UnitType, caster->Player);
-    target->X = x;
-    target->Y = y;
-    // set life span
-    if (ttl) {
-       target->TTL=GameCycle+ttl;
-    } else {
-       target->TTL=GameCycle+target->Type->DecayRate * 6 * CYCLES_PER_SECOND;
+
+    if (spell->Action->Data.Summon.RequireCorpse) {
+       corpses = &CorpseList;
+       cansummon=0;
+       while (*corpses) {
+           // FIXME: this tries to raise all corps, I can raise ships?
+           if ((*corpses)->Orders[0].Action == UnitActionDie
+                   && !(*corpses)->Type->Building
+                   && (*corpses)->X >= x - 1 && (*corpses)->X <= x + 1
+                   && (*corpses)->Y >= y - 1 && (*corpses)->Y <= y + 1) {
+               //
+               //  Found a corpse. eliminate it and proceed to summoning.
+               //  
+               x=(*corpses)->X;
+               y=(*corpses)->Y;
+               tempcorpse = *corpses;
+               corpses = &(*corpses)->Next;
+               ReleaseUnit(tempcorpse);
+               cansummon=1;
+               break;
+           } else {
+               corpses=&(*corpses)->Next;
+           }
+       }
+    } else { 
+       cansummon=1;
     }
-    //
-    // Revealers are always removed, since they don't have graphics
-    //
-    if (target->Type->Revealer) {
-       DebugLevel0Fn("new unit is a revealer, removed.\n");
-       target->Removed=1;
-       target->CurrentSightRange = target->Stats->SightRange;
-       MapMarkUnitSight(target);
-    } else {
-       DropOutOnSide(target, LookingW, 0, 0);
-       CheckUnitToBeDrawn(target);
+
+    if (cansummon) {
+       DebugLevel0("Summoning a %s\n" _C_ unittype->Name);
+
+       //
+       //      Create units.
+       //      FIXME: do summoned units count on food?
+       //
+       target = MakeUnit(unittype, caster->Player);
+       target->X = x;
+       target->Y = y;
+       //
+       //  set life span. ttl=0 results in a permanent unit.
+       //  
+       if (ttl) {
+           target->TTL=GameCycle+ttl;
+       }
+       //
+       //      Revealers are always removed, since they don't have graphics
+       //
+       if (target->Type->Revealer) {
+           DebugLevel0Fn("summoned unit is a revealer, removed.\n");
+           target->Removed=1;
+           target->CurrentSightRange = target->Stats->SightRange;
+           MapMarkUnitSight(target);
+       } else {
+           DropOutOnSide(target, LookingW, 0, 0);
+           CheckUnitToBeDrawn(target);
+       }
+       
+       caster->Mana -= spell->ManaCost;
     }
 
     PlayGameSound(spell->SoundWhenCast.Sound,MaxSampleVolume);
@@ -1095,14 +1072,6 @@
 /**
 **     FIXME: docu
 */
-local Target *NewTargetNone(void)
-{
-    return NewTarget(TargetNone, NULL, 0, 0);
-}
-
-/**
-**     FIXME: docu
-*/
 local Target *NewTargetUnit(const Unit *unit)
 {
     DebugCheck(!unit);
@@ -1169,6 +1138,11 @@
                return 0;
            }
        }
+       if (condition->Volatile!=CONDITION_TRUE) {
+           if ((condition->Volatile==CONDITION_ONLY)^(target->Type->Volatile)) 
{
+               return 0;
+           }
+       }
        if (condition->Building!=CONDITION_TRUE) {
            if ((condition->Building==CONDITION_ONLY)^(target->Type->Building)) 
{
                return 0;
@@ -1301,9 +1275,6 @@
     }
 
     switch (spell->Target) {
-       case TargetNone :
-           // TargetNone?
-           return NewTargetNone();
        case TargetSelf :
            if (PassCondition(caster, spell, caster, x, y, spell->Condition) &&
                    PassCondition(caster, spell, caster, x, y, 
autocast->Condition)) {
Index: stratagus/src/include/missile.h
diff -u stratagus/src/include/missile.h:1.66 
stratagus/src/include/missile.h:1.67
--- stratagus/src/include/missile.h:1.66        Sun Oct  5 22:56:07 2003
+++ stratagus/src/include/missile.h     Thu Oct  9 07:31:46 2003
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: missile.h,v 1.66 2003/10/06 02:56:07 jsalmon3 Exp $
+//     $Id: missile.h,v 1.67 2003/10/09 11:31:46 n0body Exp $
 
 #ifndef __MISSILE_H__
 #define __MISSILE_H__
@@ -144,21 +144,21 @@
 **             move, 1 is the slowest speed and 32 s the fastest supported
 **             speed. This is how many pixels the missiles moves with each
 **             animation step.  The real use of this member depends on the
-**             MisleType::Class or Missile::Controller.
+**             MissileType::Class or Missile::Controller.
 **             @note This is currently only used by the point-to-point
 **             missiles (::MissileClassPointToPoint, ...).  Perhaps we should
 **             later allow animation scripts for more complex animations.
 **
 **     MissileType::Range
 **
-**             Determines the range that a projectile will deal its damage.
-**             A range of 0 will mean that the damage will be limited to only
-**             where the missile was directed towards.  So if you shot a
-**             missile at a unit, it would only damage that unit.  A value of
-**             1 only effects the field on that the missile is shot.  A value
-**             of 2  would mean that for a range of 1 around the impact spot,
-**             the damage for that particular missile would be dealt.
-**             All fields that aren't the center get only 50% of the damage.
+**             Determines the range in which a projectile will deal its damage.
+**             A range of 0 will mean that the damage will be limited to the
+**             targetted unit only.  So if you shot a missile at a unit, it
+**             would only damage that unit.  A value of 1 only affects the 
+**             field where the missile hits.  A value of 2  would mean that
+**             the damage for that particular missile would be dealt for a 
range
+**             of 1 around the impact spot. All fields that aren't the center
+**             get only 50% of the damage.
 **             @note Can this value be higher? 3 (3x3 area with 25%),
 **             4 (4x4 area with 12.5%)! Yes, but is currently not written.
 **
@@ -216,7 +216,7 @@
 **
 **     Missile::SpriteFrame
 **
-**             Current sprite frame of the missile.  The rang is from 0
+**             Current sprite frame of the missile.  The range is from 0
 **             to MissileType::SpriteFrames-1.  The topmost bit (128) is
 **             used as flag to mirror the sprites in X direction.
 **             Animation scripts aren't currently supported for missiles,
Index: stratagus/src/include/spells.h
diff -u stratagus/src/include/spells.h:1.29 stratagus/src/include/spells.h:1.30
--- stratagus/src/include/spells.h:1.29 Fri Oct  3 06:37:08 2003
+++ stratagus/src/include/spells.h      Thu Oct  9 07:31:46 2003
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: spells.h,v 1.29 2003/10/03 10:37:08 n0body Exp $
+//     $Id: spells.h,v 1.30 2003/10/09 11:31:46 n0body Exp $
 
 #ifndef __SPELLS_H__
 #define __SPELLS_H__
@@ -80,7 +80,6 @@
 */
 typedef enum {
        TargetSelf,
-       TargetNone,
        TargetPosition,
        TargetUnit
 #if 0
@@ -100,9 +99,9 @@
     union {
 // FIXME time information doesn't work as it should.
        struct {
-           int Fields;         /// The size of the affected square
-           int Shards;         /// Number of shards thrown.
-           int Damage;         /// Damage for every shard.
+           int Fields;                 /// The size of the affected square
+           int Shards;                 /// Number of shards thrown.
+           int Damage;                 /// Damage for every shard.
            /// The offset of the missile start point to the hit location.
            int StartOffsetX;
            int StartOffsetY;
@@ -113,54 +112,50 @@
        } SpawnPortal;
        
        struct {
-           int TTL;            /// time to live (ticks)
-           int Damage;         /// Damage.
+           int TTL;                    /// time to live (ticks)
+           int Damage;                 /// Damage.
        } Fireball;
        
        struct {
-           int TTL;            /// time to live (ticks)
+           int TTL;                    /// time to live (ticks)
        } FlameShield;
 
        struct {
            int HasteTicks;             /// Number of ticks to set Haste to.
            int SlowTicks;              /// Number of ticks to set Slow to.
-           int BloodlustTicks; /// Number of ticks to set Bloodlust to.
+           int BloodlustTicks;         /// Number of ticks to set Bloodlust to.
            int InvisibilityTicks;      /// Number of ticks to set Invisibility 
to.
            int InvincibilityTicks;     /// Number of ticks to set UnholyArmor 
to.
-#define BUFF_NOT_AFFECTED 0xC0FF33 /// Don't like the value? The value doesn't 
like you!
+#define BUFF_NOT_AFFECTED 0xC0FF33     /// Don't like the value? The value 
doesn't like you!
        } AdjustBuffs;
        
        struct {
            int HP;                     /// Target HP gain.(can be negative)
-           int Mana;           /// Target Mana gain.(can be negative)
+           int Mana;                   /// Target Mana gain.(can be negative)
            /// This spell is designed to be used wit very small amounts. The 
spell
            /// can scale up to MaxMultiCast times. Use 0 for infinite.
            int MaxMultiCast; 
        } AdjustVitals;
        
        struct {
-           UnitType *NewForm;  /// The new form
+           UnitType *NewForm;          /// The new form
            //  TODO: temporary polymorphs would be awesome, but hard to 
implement
        } Polymorph;
        
        struct {
-           UnitType *UnitType; /// Type of unit to be summoned.
-           int TTL;            /// Time to live for summoned unit. 0 means 
infinite
+           UnitType *UnitType;         /// Type of unit to be summoned.
+           int TTL;                    /// Time to live for summoned unit. 0 
means infinite
+           int RequireCorpse;          /// Corpse consumed while summoning.
        } Summon;
-       
-       struct {
-           UnitType *UnitRaised;       /// The unit to spawn from corpses
-           int TTL;            /// Time to live for summon. 0 means infinite.
-       } RaiseDead;
        //  What about a resurection spell?
 
        struct {
-           int TTL;            /// time to live (ticks)
-           int Damage;         /// Damage.
+           int TTL;                    /// time to live (ticks)
+           int Damage;                 /// Damage.
        } Runes;
        
        struct {
-           int  TTL;           /// time to live (ticks)
+           int  TTL;                   /// time to live (ticks)
            // FIXME: more configurations
        } Whirlwind;
     } Data;
@@ -198,6 +193,7 @@
 #define CONDITION_TRUE  0
 #define CONDITION_ONLY  2
     char Undead;               /// Target is undead.
+    char Volatile;             /// Target is volatile (suicide bomber).
     char Organic;              /// Target is organic.
     char Hero;                 /// Target is hero. Set this to false for 
instant-kill spells.
     char Coward;               /// Target is coward. Don't bloodlust them.
@@ -347,7 +343,6 @@
 SpellFunc CastSummon;
 SpellFunc CastRunes;
 SpellFunc CastDeathCoil;
-SpellFunc CastRaiseDead;
 SpellFunc CastWhirlwind;
 SpellFunc CastSpawnPortal;
 
Index: stratagus/src/include/unittype.h
diff -u stratagus/src/include/unittype.h:1.117 
stratagus/src/include/unittype.h:1.118
--- stratagus/src/include/unittype.h:1.117      Tue Oct  7 08:03:40 2003
+++ stratagus/src/include/unittype.h    Thu Oct  9 07:31:46 2003
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: unittype.h,v 1.117 2003/10/07 12:03:40 martinxyz Exp $
+//     $Id: unittype.h,v 1.118 2003/10/09 11:31:46 n0body Exp $
 
 #ifndef __UNITTYPE_H__
 #define __UNITTYPE_H__
@@ -233,14 +233,6 @@
 **
 **             Regeneration rate in HP per second
 **
-**     UnitType::WeaponsUpgradable
-**
-**             Weapons could be upgraded
-**
-**     UnitType::ArmorUpgradable
-**
-**             Armor could be upgraded
-**
 **     UnitType::UnitType
 **
 **             Land / fly / naval
@@ -429,15 +421,13 @@
 **
 **     UnitType::Hero
 **
-**             FIXME:  Unit is a hero. Where is this used?
 **             FIXME:  I don't think w*rcr*ft 2 exp heroes have this flag.
-**             In st*rcr*ft heroes seem to be imune to spawn broodlings,
-**             maybe we could use it in the same way. Spawn broodlings is
-**             an instant kill for many units.
+**             This is should be used for spells, to make heroes imune to
+**             instant kill spells (like polymorph)
 **
 **     UnitType::Volatile
 **
-**             Invisiblity/unholy armor kills unit
+**             Unit is a suicide bomber        
 **
 **     UnitType::Organic
 **
@@ -721,8 +711,6 @@
     int                _BasicDamage;           /// Basic damage dealt
     int                _PiercingDamage;        /// Piercing damage dealt
     int                _RegenerationRate;      /// HP regeneration HP per sec
-    int                WeaponsUpgradable;      /// Weapons could be upgraded
-    int                ArmorUpgradable;        /// Armor could be upgraded
     int        DemolishRange;          /// Unit will Demolish around when dead.
     int        DemolishDamage;         /// Damage dealt to unit affected by 
demolition.
     int        RepairRange;            /// Units repair range.
@@ -754,7 +742,6 @@
 #define CanTargetSea   2                       /// Can attack sea units
 #define CanTargetAir   4                       /// Can attack air units
 
-    unsigned EquivType : 1;            /// 
     unsigned Revealer : 1;             /// reveal the fog of war
     unsigned LandUnit : 1;             /// Land animated
     unsigned AirUnit : 1;              /// Air animated
@@ -775,7 +762,7 @@
     unsigned BuilderOutside : 1;       /// The builder stays outside during 
the build.
     unsigned BuilderLost : 1;          /// The builder is lost after the build.
     unsigned Hero : 1;                 /// Is hero only used for triggers .
-    unsigned Volatile : 1;             /// Invisiblity/unholy armor kills unit.
+    unsigned Volatile : 1;             /// Unit is a suicide bomber.
     unsigned Organic : 1;              /// Organic can be healed.
     unsigned CanHarvest : 1;           /// Resource can be harvested.
     unsigned Harvester : 1;            /// unit is a resource harvester.
Index: stratagus/src/missile/missile.c
diff -u stratagus/src/missile/missile.c:1.84 
stratagus/src/missile/missile.c:1.85
--- stratagus/src/missile/missile.c:1.84        Tue Oct  7 04:57:20 2003
+++ stratagus/src/missile/missile.c     Thu Oct  9 07:31:47 2003
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: missile.c,v 1.84 2003/10/07 08:57:20 mr-russ Exp $
+//     $Id: missile.c,v 1.85 2003/10/09 11:31:47 n0body Exp $
 
 //@{
 
@@ -427,15 +427,15 @@
 **     damage is multiplied by random between 1 and 2.
 **
 **     @todo NOTE: different targets (big are hit by some missiles better)
-**     @todo NOTE: hidden targets are hit worser.
-**     @todo NOTE: targets higher are hit worser.
+**     @todo NOTE: lower damage for hidden targets.
+**     @todo NOTE: lower damage for targets on higher ground.
 **
 **     @param attacker_stats   Attacker attributes.
 **     @param goal_stats       Goal attributes.
 **     @param bloodlust        If attacker has bloodlust
-**     @param xp               Experience of attack.
+**     @param xp               Experience of attacker.
 **
-**     @return                 damage produces on goal.
+**     @return                 damage inflicted to goal.
 */
 local int CalculateDamageStats(const UnitStats* attacker_stats,
     const UnitStats* goal_stats, int bloodlust, int xp)
@@ -449,9 +449,10 @@
     if (bloodlust) {
        basic_damage *= 2;
        piercing_damage *= 2;
-       DebugLevel0Fn("bloodlust\n");
+       DebugLevel3Fn("bloodlust\n");
     }
 
+#if 0
     damage = basic_damage - goal_stats->Armor;
     if (damage < 0) {
        // Use minimum damage
@@ -464,6 +465,10 @@
        damage += piercing_damage;
        damage -= SyncRand() % ((damage + 2) / 2);
     }
+#else
+    damage = min(basic_damage-goal_stats->Armor,1)+piercing_damage;
+    damage -= SyncRand() % ((damage+2)/2);
+#endif
     DebugLevel3Fn("\nDamage done [%d] %d %d ->%d\n" _C_ goal_stats->Armor _C_
            basic_damage _C_ piercing_damage _C_ damage);
 
@@ -526,7 +531,7 @@
     }
 
     //
-    // None missile hits immediately!
+    // No missile hits immediately!
     //
     if (((MissileType*)unit->Type->Missile.Missile)->Class == 
MissileClassNone) {
        // No goal, take target coordinates
@@ -1701,7 +1706,7 @@
     int i;
 
     CLprintf(file,"\n;;; -----------------------------------------\n");
-    CLprintf(file,";;; MODULE: missile-types $Id: missile.c,v 1.84 2003/10/07 
08:57:20 mr-russ Exp $\n\n");
+    CLprintf(file,";;; MODULE: missile-types $Id: missile.c,v 1.85 2003/10/09 
11:31:47 n0body Exp $\n\n");
 
     //
     // Original number to internal missile-type name.
@@ -1796,7 +1801,7 @@
     Missile* const* missiles;
 
     CLprintf(file,"\n;;; -----------------------------------------\n");
-    CLprintf(file,";;; MODULE: missiles $Id: missile.c,v 1.84 2003/10/07 
08:57:20 mr-russ Exp $\n\n");
+    CLprintf(file,";;; MODULE: missiles $Id: missile.c,v 1.85 2003/10/09 
11:31:47 n0body Exp $\n\n");
 
     for (missiles = GlobalMissiles; *missiles; ++missiles) {
        SaveMissile(*missiles, file);
Index: stratagus/src/network/network.c
diff -u stratagus/src/network/network.c:1.118 
stratagus/src/network/network.c:1.119
--- stratagus/src/network/network.c:1.118       Thu Oct  2 00:38:18 2003
+++ stratagus/src/network/network.c     Thu Oct  9 07:31:47 2003
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: network.c,v 1.118 2003/10/02 04:38:18 jsalmon3 Exp $
+//     $Id: network.c,v 1.119 2003/10/09 11:31:47 n0body Exp $
 
 //@{
 
@@ -475,7 +475,13 @@
     }
 #endif
 
-    MasterInit();
+//     This goes to all of you networking programmers out there.
+//     People are not always on the net. Traffic congestion, low
+//     speed links, unplugged cables or an bad adress can result
+//     in long wait times for gethostbyname. So here is the catch:
+//     Don't get the master server adress until you need it. Or we
+//     will make sure that horrible horrible things happen to you.
+//    MasterInit();
 
     dl_init(CommandsIn);
     dl_init(CommandsOut);
Index: stratagus/src/unit/ccl_unittype.c
diff -u stratagus/src/unit/ccl_unittype.c:1.93 
stratagus/src/unit/ccl_unittype.c:1.94
--- stratagus/src/unit/ccl_unittype.c:1.93      Tue Oct  7 09:58:21 2003
+++ stratagus/src/unit/ccl_unittype.c   Thu Oct  9 07:31:47 2003
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: ccl_unittype.c,v 1.93 2003/10/07 13:58:21 martinxyz Exp $
+//     $Id: ccl_unittype.c,v 1.94 2003/10/09 11:31:47 n0body Exp $
 
 //@{
 
@@ -240,7 +240,7 @@
                sublist = gh_cdr(sublist);
            }
        } else if (gh_eq_p(value, gh_symbol2scm("construction"))) {
-           // FIXME: What if constructions arn't yet loaded?
+           // FIXME: What if constructions aren't yet loaded?
            str = gh_scm2newstr(gh_car(list), NULL);
            type->Construction = ConstructionByIdent(str);
            list = gh_cdr(list);
@@ -263,9 +263,6 @@
        } else if (gh_eq_p(value, gh_symbol2scm("max-mana"))) {
            type->_MaxMana = gh_scm2int(gh_car(list));
            list = gh_cdr(list);
-       } else if (gh_eq_p(value, gh_symbol2scm("magic"))) {
-           type->Magic = gh_scm2int(gh_car(list));
-           list = gh_cdr(list);
        } else if (gh_eq_p(value, gh_symbol2scm("tile-size"))) {
            sublist = gh_car(list);
            list = gh_cdr(list);
@@ -319,12 +316,6 @@
        } else if (gh_eq_p(value, gh_symbol2scm("max-attack-range"))) {
            type->_AttackRange = gh_scm2int(gh_car(list));
            list = gh_cdr(list);
-       } else if (gh_eq_p(value, gh_symbol2scm("weapons-upgradable"))) {
-           type->WeaponsUpgradable = gh_scm2int(gh_car(list));
-           list = gh_cdr(list);
-       } else if (gh_eq_p(value, gh_symbol2scm("armor-upgradable"))) {
-           type->ArmorUpgradable = gh_scm2int(gh_car(list));
-           list = gh_cdr(list);
        } else if (gh_eq_p(value, gh_symbol2scm("priority"))) {
            type->Priority = gh_scm2int(gh_car(list));
            list = gh_cdr(list);
@@ -528,10 +519,12 @@
            }
            sublist = gh_car(list);
            list = gh_cdr(list);
+           type->Magic=0;
            while (!gh_null_p(sublist)) {
                DebugLevel3Fn("%d \n" _C_ CclGetSpellByIdent(gh_car(sublist)));
                type->CanCastSpell[CclGetSpellByIdent(gh_car(sublist))] = 1;
                sublist = gh_cdr(sublist);
+               type->Magic=1;
            }
        } else if (gh_eq_p(value, gh_symbol2scm("organic"))) {
            type->Organic = 1;
Index: stratagus/src/unit/unittype.c
diff -u stratagus/src/unit/unittype.c:1.108 stratagus/src/unit/unittype.c:1.109
--- stratagus/src/unit/unittype.c:1.108 Tue Oct  7 08:03:44 2003
+++ stratagus/src/unit/unittype.c       Thu Oct  9 07:31:48 2003
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: unittype.c,v 1.108 2003/10/07 12:03:44 martinxyz Exp $
+//     $Id: unittype.c,v 1.109 2003/10/09 11:31:48 n0body Exp $
 
 //@{
 
@@ -381,6 +381,10 @@
        v = Fetch8(udta);
        unittype->_PiercingDamage = v;
     }
+    /*
+     * This is not used in stratagus. so it was simply removed.
+     * We use our own upgrade methods that are a lot more flexible.
+     * Maybe we could use this one day, not sure.
     for (i = 0; i < 110; ++i) {                // Weapons upgradable
        unittype = UnitTypeByWcNum(i);
        v = Fetch8(udta);
@@ -390,7 +394,7 @@
        unittype = UnitTypeByWcNum(i);
        v = Fetch8(udta);
        unittype->ArmorUpgradable = v;
-    }
+    }*/
     for (i = 0; i < 110; ++i) {                // Missile Weapon
        unittype = UnitTypeByWcNum(i);
        v = Fetch8(udta);
@@ -746,9 +750,6 @@
     if (all || type->_MaxMana) {
        CLprintf(file, "  'max-mana %d\n", type->_MaxMana);
     }
-    if (all || type->Magic) {
-       CLprintf(file, "  'magic %d\n", type->Magic);
-    }
     CLprintf(file, "  'tile-size '(%d %d)", type->TileWidth, type->TileHeight);
     CLprintf(file, "  'box-size '(%d %d)\n", type->BoxWidth, type->BoxHeight);
     CLprintf(file, "  'sight-range %d", type->_SightRange);
@@ -775,16 +776,6 @@
     } else if (type->_AttackRange) {
        CLprintf(file, "  'max-attack-range %d\n", type->_AttackRange);
     }
-    if (all || type->WeaponsUpgradable) {
-       CLprintf(file, "  'weapons-upgradable %d", type->WeaponsUpgradable);
-       if (all || type->ArmorUpgradable) {
-           CLprintf(file, " 'armor-upgradable %d\n", type->ArmorUpgradable);
-       } else {
-           CLprintf(file, "\n");
-       }
-    } else if (type->ArmorUpgradable) {
-       CLprintf(file, "  'armor-upgradable %d\n", type->ArmorUpgradable);
-    }
     CLprintf(file, "  'priority %d", type->Priority);
     if (all || type->AnnoyComputerFactor) {
        CLprintf(file, "  'annoy-computer-factor %d", 
type->AnnoyComputerFactor);
@@ -1145,7 +1136,7 @@
     char** sp;
 
     CLprintf(file, "\n;;; -----------------------------------------\n");
-    CLprintf(file, ";;; MODULE: unittypes $Id: unittype.c,v 1.108 2003/10/07 
12:03:44 martinxyz Exp $\n\n");
+    CLprintf(file, ";;; MODULE: unittypes $Id: unittype.c,v 1.109 2003/10/09 
11:31:48 n0body Exp $\n\n");
 
     // Original number to internal unit-type name.
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]