stratagus-cvs
[Top][All Lists]
Advanced

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

[Stratagus-CVS] demogame ccl/anim.ccl ccl/icons.ccl ccl/stratag...


From: Martin Renold
Subject: [Stratagus-CVS] demogame ccl/anim.ccl ccl/icons.ccl ccl/stratag...
Date: Thu, 09 Oct 2003 15:32:41 -0400

CVSROOT:        /cvsroot/stratagus
Module name:    demogame
Branch:         
Changes by:     Martin Renold <address@hidden>  03/10/09 15:32:41

Modified files:
        ccl            : anim.ccl icons.ccl stratagus.ccl wc2.ccl 
        ccl/alliance   : buttons.ccl 
        ccl/mythical   : ai.ccl buttons.ccl spells.ccl units.ccl 
                         upgrade.ccl 
        graphics/missiles: death_and_decay.png 

Log message:
        merged engine changes; added example spell and research and some 
instructions

Patches:
Index: demogame/ccl/alliance/buttons.ccl
diff -u demogame/ccl/alliance/buttons.ccl:1.3 
demogame/ccl/alliance/buttons.ccl:1.4
--- demogame/ccl/alliance/buttons.ccl:1.3       Thu Oct  9 12:10:35 2003
+++ demogame/ccl/alliance/buttons.ccl   Thu Oct  9 15:32: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: buttons.ccl,v 1.3 2003/10/09 16:10:35 martinxyz Exp $
+;;     $Id: buttons.ccl,v 1.4 2003/10/09 19:32:41 martinxyz Exp $
 
 ;;----------------------------------------------------------------------------
 ;;     Define unit-button.
@@ -41,10 +41,7 @@
   'action 'move
   'key "m" 'hint "~!MOVE"
   'for-unit '(unit-footman unit-knight unit-archer unit-paladin
-    unit-dwarves unit-ranger unit-ballista unit-peasant
-    
-       
-      unit-balloon
+    unit-dwarves unit-ranger unit-ballista unit-peasant unit-balloon
     unit-gryphon-rider unit-mage unit-critter
     alliance-group))
 
@@ -52,10 +49,7 @@
   'action 'stop
   'key "s" 'hint "~!STOP"
   'for-unit '(unit-footman unit-knight unit-archer unit-paladin
-    unit-dwarves unit-ranger unit-ballista unit-peasant
-    
-       
-      unit-balloon
+    unit-dwarves unit-ranger unit-ballista unit-peasant unit-balloon
     unit-gryphon-rider unit-mage unit-critter
     alliance-group))
 
@@ -64,76 +58,67 @@
   'allowed 'check-upgrade 'allow-arg '(upgrade-alliance-shield1)
   'key "s" 'hint "~!STOP"
   'for-unit '(unit-footman unit-knight unit-archer unit-paladin
-    unit-dwarves unit-ranger unit-ballista  
-     ))
+    unit-dwarves unit-ranger unit-ballista))
 
 (define-button 'pos 2 'level 0 'icon 'icon-alliance-shield3
   'action 'stop
   'allowed 'check-upgrade 'allow-arg '(upgrade-alliance-shield2)
   'key "s" 'hint "~!STOP"
   'for-unit '(unit-footman unit-knight unit-archer unit-paladin
-    unit-dwarves unit-ranger unit-ballista  
-     ))
+    unit-dwarves unit-ranger unit-ballista))
 
 (define-button 'pos 3 'level 0 'icon 'icon-sword1
   'action 'attack
   'key "a" 'hint "~!ATTACK"
   'for-unit '(unit-footman unit-knight unit-archer unit-paladin
-    unit-dwarves unit-ranger unit-ballista unit-peasant
-    
-       
-      unit-gryphon-rider alliance-group))
+    unit-dwarves unit-ranger unit-ballista unit-peasant 
+    unit-gryphon-rider alliance-group))
 
 (define-button 'pos 3 'level 0 'icon 'icon-sword2
   'action 'attack
   'allowed 'check-upgrade 'allow-arg '(upgrade-sword1)
   'key "a" 'hint "~!ATTACK"
   'for-unit '(unit-footman unit-knight unit-archer unit-paladin
-    unit-dwarves unit-ranger unit-ballista  
-     ))
+    unit-dwarves unit-ranger unit-ballista))
 
 (define-button 'pos 3 'level 0 'icon 'icon-sword3
   'action 'attack
   'allowed 'check-upgrade 'allow-arg '(upgrade-sword2)
   'key "a" 'hint "~!ATTACK"
   'for-unit '(unit-footman unit-knight unit-archer unit-paladin
-    unit-dwarves unit-ranger unit-ballista  
-     ))
+    unit-dwarves unit-ranger unit-ballista))
 
 (define-button 'pos 3 'level 0 'icon 'icon-arrow1
   'action 'attack
   'key "a" 'hint "~!ATTACK"
-  'for-unit '(unit-archer unit-ranger ))
+  'for-unit '(unit-archer unit-ranger))
 
 (define-button 'pos 3 'level 0 'icon 'icon-arrow2
   'action 'attack
   'allowed 'check-upgrade 'allow-arg '(upgrade-arrow1)
   'key "a" 'hint "~!ATTACK"
-  'for-unit '(unit-archer unit-ranger ))
+  'for-unit '(unit-archer unit-ranger))
 
 (define-button 'pos 3 'level 0 'icon 'icon-arrow3
   'action 'attack
   'allowed 'check-upgrade 'allow-arg '(upgrade-arrow2)
   'key "a" 'hint "~!ATTACK"
-  'for-unit '(unit-archer unit-ranger ))
+  'for-unit '(unit-archer unit-ranger))
 
 (define-button 'pos 4 'level 0 'icon 'icon-alliance-patrol-land
   'action 'patrol
   'key "p" 'hint "~!PATROL"
   'for-unit '(unit-footman unit-knight unit-archer unit-paladin
-    unit-dwarves unit-ranger unit-ballista 
-       
-     unit-gryphon-rider alliance-group
-    unit-balloon))
+    unit-dwarves unit-ranger unit-ballista unit-gryphon-rider 
+    alliance-group unit-balloon))
 
 (define-button 'pos 5 'level 0 'icon 'icon-alliance-stand-ground
   'action 'stand-ground
   'key "t" 'hint "S~!TAND GROUND"
   'for-unit '(unit-footman unit-knight unit-archer unit-paladin
-    unit-dwarves unit-ranger unit-ballista 
-       
-     unit-gryphon-rider alliance-group
-    unit-alliance-submarine unit-battleship unit-alliance-destroyer))
+    unit-dwarves unit-ranger unit-ballista unit-gryphon-rider 
+    alliance-group unit-alliance-submarine unit-battleship
+    unit-alliance-destroyer))
 
 (define-button 'pos 6 'level 0 'icon 'icon-alliance-attack-ground
   'action 'attack-ground
@@ -152,72 +137,68 @@
   'action 'cast-spell 'value 'spell-area-healing
   'allowed 'check-upgrade 'allow-arg '(upgrade-area-healing)
   'key "l" 'hint "AREA HEA~!LING (per 1 HP)"
-  'for-unit '(unit-paladin  
-    ))
+  'for-unit '(unit-paladin))
 
 (define-button 'pos 7 'level 0 'icon 'icon-holy-vision
   'action 'cast-spell 'value 'spell-holy-vision
   'allowed 'check-upgrade 'allow-arg '(upgrade-holy-vision)
   'key "v" 'hint "HOLY ~!VISION"
-  'for-unit '(unit-paladin 
-    ))
+  'for-unit '(unit-paladin))
 
 (define-button 'pos 8 'level 0 'icon 'icon-heal
   'action 'cast-spell 'value 'spell-healing
   'allowed 'check-upgrade 'allow-arg '(upgrade-healing)
   'key "h" 'hint "~!HEALING (per 1 HP)"
-  'for-unit '(unit-paladin  
-    ))
+  'for-unit '(unit-paladin))
 
 (define-button 'pos 9 'level 0 'icon 'icon-exorcism
   'action 'cast-spell 'value 'spell-exorcism
   'allowed 'check-upgrade 'allow-arg '(upgrade-exorcism)
   'key "e" 'hint "~!EXORCISM"
-  'for-unit '(unit-paladin 
-    ))
+  'for-unit '(unit-paladin))
 
 ;; mage specific actions ------------------------------------------------------
 
 (define-button 'pos 3 'level 0 'icon 'icon-lightning
   'action 'attack
   'key "a" 'hint "LIGHTNING ~!ATTACK"
-  'for-unit '(unit-mage ))
+  'for-unit '(unit-mage))
 
 (define-button 'pos 4 'level 0 'icon 'icon-fireball
   'action 'cast-spell 'value 'spell-fireball
   'allowed 'check-upgrade 'allow-arg '(upgrade-fireball)
   'key "f" 'hint "~!FIREBALL"
-  'for-unit '(unit-mage ))
+  'for-unit '(unit-mage))
 
 (define-button 'pos 5 'level 0 'icon 'icon-slow
   'action 'cast-spell 'value 'spell-slow
   'allowed 'check-upgrade 'allow-arg '(upgrade-slow)
   'key "o" 'hint "SL~!OW"
-  'for-unit '(unit-mage ))
+  'for-unit '(unit-mage))
 
 (define-button 'pos 6 'level 0 'icon 'icon-flame-shield
   'action 'cast-spell 'value 'spell-flame-shield
   'allowed 'check-upgrade 'allow-arg '(upgrade-flame-shield)
   'key "l" 'hint "F~!LAME SHIELD"
-  'for-unit '(unit-mage ))
+  'for-unit '(unit-mage))
 
 (define-button 'pos 7 'level 0 'icon 'icon-invisibility
   'action 'cast-spell 'value 'spell-invisibility
   'allowed 'check-upgrade 'allow-arg '(upgrade-invisibility)
   'key "i" 'hint "~!INVISIBILITY"
-  'for-unit '(unit-mage ))
+  'for-unit '(unit-mage))
 
 (define-button 'pos 8 'level 0 'icon 'icon-polymorph
   'action 'cast-spell 'value 'spell-polymorph
   'allowed 'check-upgrade 'allow-arg '(upgrade-polymorph)
   'key "p" 'hint "~!POLYMORPH"
-  'for-unit '(unit-mage ))
+  'for-unit '(unit-mage))
 
 (define-button 'pos 9 'level 0 'icon 'icon-blizzard
   'action 'cast-spell 'value 'spell-blizzard
   'allowed 'check-upgrade 'allow-arg '(upgrade-blizzard)
   'key "b" 'hint "~!BLIZZARD"
-  'for-unit '(unit-mage ))
+  'for-unit '(unit-mage))
 
 ;; peasant specific actions ---------------------------------------------------
 
Index: demogame/ccl/anim.ccl
diff -u demogame/ccl/anim.ccl:1.7 demogame/ccl/anim.ccl:1.8
--- demogame/ccl/anim.ccl:1.7   Thu Oct  9 12:10:34 2003
+++ demogame/ccl/anim.ccl       Thu Oct  9 15:32:40 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: anim.ccl,v 1.7 2003/10/09 16:10:34 martinxyz Exp $
+;;     $Id: anim.ccl,v 1.8 2003/10/09 19:32:40 martinxyz Exp $
 
 ;;------
 ;;     Footman, Grunt, Grom Hellscream, Arthor_Literios, Korgath Bladefist
@@ -59,6 +59,62 @@
     #( 0 0   3  50) #( 0 0   3  55) #( 0 0 100  60) #( 3 0   1  60)))
 
 ;;------
+;;     Critter
+(define-animations 'animations-critter
+  'still '(    ; #5
+    #( 0 0   4   0) #( 3 0   1   0))
+  'move '(     ; #48 P32
+    #( 0 2   2   0) #( 0 2   3   0) #( 0 2   3   0) #( 0 2   3   0)
+    #( 0 2   3   0) #( 0 2   3   0) #( 0 2   3   0) #( 0 2   3   0)
+    #( 0 2   3   0) #( 0 2   3   0) #( 0 2   3   0) #( 0 2   3   0)
+    #( 0 2   3   0) #( 0 2   3   0) #( 0 2   3   0) #( 0 2   3   0)
+    #( 3 0   1   0))
+  'attack '(   ; #1
+    #(11 0   1   0))
+  'die '(      ; #201
+    #( 0 0 200   5) #( 3 0   1   5)))
+
+;;------
+;;     Farm, Pig Farm, Barracks, Barracks, Church, Altar of Storms,
+;;     Scout Tower, Scout Tower, Stables, Ogre Mound, Gnomish Inventor,
+;;     Goblin Alchemist, Gryphon Aviary, Dragon Roost, Shipyard, Shipyard,
+;;     Town Hall, Great Hall, Elven Lumber Mill, Troll Lumber Mill, Foundry,
+;;     Foundry, Mage Tower, Temple of the Damned, Blacksmith, Blacksmith,
+;;     Refinery, Refinery, Oil Platform, Oil Platform, Keep, Stronghold,
+;;     Castle, Fortress, Gold Mine, Oil Patch, Start Location, Start Location,
+;;     Circle of Power, Dark Portal, Runestone, Wall, Wall
+(define-animations 'animations-building
+  'still '(    ; #5
+    #( 0 0   4   0) #( 3 0   1   0)))
+
+;;------
+;;     Dead Body
+(define-animations 'animations-dead-body
+  'die '(      ; #201
+    ;; Corpse:         Orcish
+    #( 0 0 200   5) #(16 0 200  10) #( 0 0 200  15) #( 0 0 200  20)
+    #( 0 0 200  25) #( 3 0   1  25)
+    ;; Corpse:         Human
+    #( 0 0 200   0) #(16 0 200  10) #( 0 0 200  15) #( 0 0 200  20)
+    #( 0 0 200  25) #( 3 0   1  25)
+    ;; Corpse:         Ships
+    #( 0 0 100  30) #(16 0 100  30) #( 3 0   1  30)))
+
+;;------
+;;     Destroyed 1x1 Place, Destroyed 2x2 Place,
+;;     Destroyed 3x3 Place, Destroyed 4x4 Place
+(define-animations 'animations-destroyed-place
+  'die '(      ; #401
+    ;; Destroyed land site
+    #( 0 0 200   0) #(16 0 200   1) #( 3 0   1   1)
+    ;; Destroyed water site
+    #( 0 0 200   2) #(16 0 200   3) #( 3 0   1   3)))
+
+;;------------------------------------------------------------------
+;; the following animations are not needed for the mythical race
+;;------------------------------------------------------------------
+
+;;------
 ;;     Ballista
 (define-animations 'animations-ballista
   'still '(    ; #5
@@ -275,35 +331,6 @@
     #( 3 0   1  65)))
 
 ;;------
-;;     Critter
-(define-animations 'animations-critter
-  'still '(    ; #5
-    #( 0 0   4   0) #( 3 0   1   0))
-  'move '(     ; #48 P32
-    #( 0 2   2   0) #( 0 2   3   0) #( 0 2   3   0) #( 0 2   3   0)
-    #( 0 2   3   0) #( 0 2   3   0) #( 0 2   3   0) #( 0 2   3   0)
-    #( 0 2   3   0) #( 0 2   3   0) #( 0 2   3   0) #( 0 2   3   0)
-    #( 0 2   3   0) #( 0 2   3   0) #( 0 2   3   0) #( 0 2   3   0)
-    #( 3 0   1   0))
-  'attack '(   ; #1
-    #(11 0   1   0))
-  'die '(      ; #201
-    #( 0 0 200   5) #( 3 0   1   5)))
-
-;;------
-;;     Farm, Pig Farm, Barracks, Barracks, Church, Altar of Storms,
-;;     Scout Tower, Scout Tower, Stables, Ogre Mound, Gnomish Inventor,
-;;     Goblin Alchemist, Gryphon Aviary, Dragon Roost, Shipyard, Shipyard,
-;;     Town Hall, Great Hall, Elven Lumber Mill, Troll Lumber Mill, Foundry,
-;;     Foundry, Mage Tower, Temple of the Damned, Blacksmith, Blacksmith,
-;;     Refinery, Refinery, Oil Platform, Oil Platform, Keep, Stronghold,
-;;     Castle, Fortress, Gold Mine, Oil Patch, Start Location, Start Location,
-;;     Circle of Power, Dark Portal, Runestone, Wall, Wall
-(define-animations 'animations-building
-  'still '(    ; #5
-    #( 0 0   4   0) #( 3 0   1   0)))
-
-;;------
 ;;     Guard Tower, Guard Tower
 (define-animations 'animations-alliance-guard-tower
   'still '(    ; #5
@@ -318,27 +345,3 @@
     #( 0 0   4   0) #( 3 0   1   0))
   'attack '(   ; #151
     #(12 0 150   0) #( 3 0   1   0)))
-
-;;------
-;;     Dead Body
-(define-animations 'animations-dead-body
-  'die '(      ; #201
-    ;; Corpse:         Orcish
-    #( 0 0 200   5) #(16 0 200  10) #( 0 0 200  15) #( 0 0 200  20)
-    #( 0 0 200  25) #( 3 0   1  25)
-    ;; Corpse:         Human
-    #( 0 0 200   0) #(16 0 200  10) #( 0 0 200  15) #( 0 0 200  20)
-    #( 0 0 200  25) #( 3 0   1  25)
-    ;; Corpse:         Ships
-    #( 0 0 100  30) #(16 0 100  30) #( 3 0   1  30)))
-
-;;------
-;;     Destroyed 1x1 Place, Destroyed 2x2 Place,
-;;     Destroyed 3x3 Place, Destroyed 4x4 Place
-(define-animations 'animations-destroyed-place
-  'die '(      ; #401
-    ;; Destroyed land site
-    #( 0 0 200   0) #(16 0 200   1) #( 3 0   1   1)
-    ;; Destroyed water site
-    #( 0 0 200   2) #(16 0 200   3) #( 3 0   1   3)))
-
Index: demogame/ccl/icons.ccl
diff -u demogame/ccl/icons.ccl:1.6 demogame/ccl/icons.ccl:1.7
--- demogame/ccl/icons.ccl:1.6  Thu Oct  9 12:10:34 2003
+++ demogame/ccl/icons.ccl      Thu Oct  9 15:32:40 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: icons.ccl,v 1.6 2003/10/09 16:10:34 martinxyz Exp $
+;;     $Id: icons.ccl,v 1.7 2003/10/09 19:32:40 martinxyz Exp $
 
 ;;     NOTE:
 ;;             Splitting this file into races is a problem, because all
@@ -43,6 +43,7 @@
 
 ; FIXME: don't repeat filename and size
 ;        could be done with a helper function
+
 (define-icon 'icon-peasant 'tileset 'tileset-summer
   'size '(46 38) 'normal '(0 "tilesets/summer/icons.png"))
 (define-icon 'icon-faun 'tileset 'tileset-summer
@@ -169,6 +170,8 @@
   'size '(46 38) 'normal '(100 "tilesets/summer/icons.png"))
 (define-icon 'icon-fireball 'tileset 'tileset-summer
   'size '(46 38) 'normal '(101 "tilesets/summer/icons.png"))
+(define-icon 'icon-faun-magic 'tileset 'tileset-summer
+  'size '(46 38) 'normal '(103 "tilesets/summer/icons.png"))
 (define-icon 'icon-blizzard 'tileset 'tileset-summer
   'size '(46 38) 'normal '(105 "tilesets/summer/icons.png"))
 (define-icon 'icon-holy-vision 'tileset 'tileset-summer
@@ -177,7 +180,6 @@
   'size '(46 38) 'normal '(107 "tilesets/summer/icons.png"))
 (define-icon 'icon-exorcism 'tileset 'tileset-summer
   'size '(46 38) 'normal '(110 "tilesets/summer/icons.png"))
-
 (define-icon 'icon-critter 'tileset 'tileset-summer
   'size '(46 38) 'normal '(115 "tilesets/summer/icons.png"))
 (define-icon 'icon-sword1 'tileset 'tileset-summer
@@ -380,6 +382,8 @@
   'size '(46 38) 'normal '(100 "tilesets/winter/icons.png"))
 (define-icon 'icon-fireball 'tileset 'tileset-winter
   'size '(46 38) 'normal '(101 "tilesets/winter/icons.png"))
+(define-icon 'icon-faun-magic 'tileset 'tileset-winter
+  'size '(46 38) 'normal '(103 "tilesets/summer/icons.png"))
 (define-icon 'icon-blizzard 'tileset 'tileset-winter
   'size '(46 38) 'normal '(105 "tilesets/winter/icons.png"))
 (define-icon 'icon-holy-vision 'tileset 'tileset-winter
@@ -388,7 +392,6 @@
   'size '(46 38) 'normal '(107 "tilesets/winter/icons.png"))
 (define-icon 'icon-exorcism 'tileset 'tileset-winter
   'size '(46 38) 'normal '(110 "tilesets/winter/icons.png"))
-
 (define-icon 'icon-critter 'tileset 'tileset-winter
   'size '(46 38) 'normal '(115 "tilesets/winter/icons.png"))
 (define-icon 'icon-sword1 'tileset 'tileset-winter
Index: demogame/ccl/mythical/ai.ccl
diff -u demogame/ccl/mythical/ai.ccl:1.1 demogame/ccl/mythical/ai.ccl:1.2
--- demogame/ccl/mythical/ai.ccl:1.1    Wed Oct  8 05:14:01 2003
+++ demogame/ccl/mythical/ai.ccl        Thu Oct  9 15:32: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: ai.ccl,v 1.1 2003/10/08 09:14:01 martinxyz Exp $
+;;     $Id: ai.ccl,v 1.2 2003/10/09 19:32:41 martinxyz Exp $
 
 ;; This is the minimum AI needed so the computer attacks with grunts only.
 
@@ -46,7 +46,10 @@
        'unit-grunt)
        
     ; no upgrades
-    ; no researches
+
+    ;; researches
+    (list 'research 'unit-pig-farm
+       'upgrade-faun-magic)
 
     ;; Unit can repair which units.
     (list 'repair 'unit-faun
Index: demogame/ccl/mythical/buttons.ccl
diff -u demogame/ccl/mythical/buttons.ccl:1.5 
demogame/ccl/mythical/buttons.ccl:1.6
--- demogame/ccl/mythical/buttons.ccl:1.5       Thu Oct  9 09:52:10 2003
+++ demogame/ccl/mythical/buttons.ccl   Thu Oct  9 15:32: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: buttons.ccl,v 1.5 2003/10/09 13:52:10 martinxyz Exp $
+;;     $Id: buttons.ccl,v 1.6 2003/10/09 19:32:41 martinxyz Exp $
 
 ;; general commands -- almost all units have it -------------------------------
 
@@ -38,7 +38,7 @@
 (define-button 'pos 2 'level 0 'icon 'icon-mythical-shield1
   'action 'stop
   'key "s" 'hint "~!STOP"
-  'for-unit '(unit-grunt mythical-group))
+  'for-unit '(unit-grunt unit-faun mythical-group))
 
 (define-button 'pos 3 'level 0 'icon 'icon-battle-axe1
   'action 'attack
@@ -82,13 +82,17 @@
   'key "g" 'hint "RETURN WITH ~!GOODS"
   'for-unit '(unit-faun))
 
-;; build basic/advanced structs -----------------------------------------------
-
 (define-button 'pos 7 'level 0 'icon 'icon-build-basic
   'action 'button 'value 1
   'key "b" 'hint "~!BUILD BASIC STRUCTURE"
   'for-unit '(unit-faun))
 
+(define-button 'pos 9 'level 0 'icon 'icon-faun-magic
+  'action 'cast-spell 'value 'spell-death-and-decay
+  'allowed 'check-upgrade 'allow-arg '(upgrade-faun-magic)
+  'key "d" 'hint "CAST ~!DEAD AND DECAY"
+  'for-unit '(unit-faun))
+
 ;; simple buildings mythical 
-------------------------------------------------------
 
 (define-button 'pos 1 'level 1 'icon 'icon-pig-farm
@@ -118,9 +122,14 @@
   'key "c" 'hint "TRAIN ~!CRITTER"
   'for-unit '(unit-pig-farm))
 
+(define-button 'pos 2 'level 0 'icon 'icon-faun-magic
+  'action 'research 'value 'upgrade-faun-magic
+  'allowed 'check-single-research
+  'key "f" 'hint "UPGRADE ~!FAUN MAGIC"
+  'for-unit '(unit-pig-farm))
+
 (define-button 'pos 1 'level 0 'icon 'icon-faun
   'action 'train-unit 'value 'unit-faun
-  'allowed 'check-no-research
   'key "p" 'hint "TRAIN ~!FAUN"
   'for-unit '(unit-great-hall))
 
Index: demogame/ccl/mythical/spells.ccl
diff -u demogame/ccl/mythical/spells.ccl:1.1 
demogame/ccl/mythical/spells.ccl:1.2
--- demogame/ccl/mythical/spells.ccl:1.1        Thu Oct  9 12:10:35 2003
+++ demogame/ccl/mythical/spells.ccl    Thu Oct  9 15:32:41 2003
@@ -26,6 +26,20 @@
 ;;      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.1 2003/10/09 16:10:35 martinxyz Exp $
+;;     $Id: spells.ccl,v 1.2 2003/10/09 19:32:41 martinxyz Exp $
 
-;; FIXME: add one example spell
+; Add a new spell:
+; - add it here (and maybe add a missile)
+; - add a button for it with 'action 'cast-spell
+; - add it to 'can-cast-spell for the casting unit
+
+(define-spell "spell-death-and-decay"
+       'showname "death and decay"
+       'manacost 25
+       'range  12
+       'target 'position
+       'action '(area-bombardment fields 5 shards 10 damage 10)
+       'sound-when-cast "death and decay"
+       'missile-when-cast "missile-death-and-decay"
+;;     'autocast '(range 12)
+)
Index: demogame/ccl/mythical/units.ccl
diff -u demogame/ccl/mythical/units.ccl:1.15 
demogame/ccl/mythical/units.ccl:1.16
--- demogame/ccl/mythical/units.ccl:1.15        Thu Oct  9 12:10:35 2003
+++ demogame/ccl/mythical/units.ccl     Thu Oct  9 15:32:41 2003
@@ -26,11 +26,16 @@
 ;;      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.15 2003/10/09 16:10:35 martinxyz Exp $
+;;     $Id: units.ccl,v 1.16 2003/10/09 19:32:41 martinxyz Exp $
 
-;;=============================================================================
-;;     Define unit-types.
-;;
+; To add a new unit type:
+; - add icons for all tilesets in ../icons.ccl
+; - add it here
+; - add a button to produce it
+; - add it to the editor ../editor.ccl
+; - append it to define-unittype-wc-names in ../wc2.ccl (cannot be
+;   saved in a .pud map otherwise)
+; - add the dependency to define-ai-helper in ai.ccl [works without]
 
 (define-unit-type 'unit-grunt 'name "Black_Knight"
   'files '(tileset-summer "mythical/units/black_knight.png")
@@ -81,6 +86,8 @@
   'corpse '(unit-dead-body 0)
   'type-land
   'right-harvest
+  'max-mana 255
+  'can-cast-spell '(spell-death-and-decay)
   'can-attack 'repair-range 1
   'can-target-land
   'land-unit
Index: demogame/ccl/mythical/upgrade.ccl
diff -u demogame/ccl/mythical/upgrade.ccl:1.9 
demogame/ccl/mythical/upgrade.ccl:1.10
--- demogame/ccl/mythical/upgrade.ccl:1.9       Thu Oct  9 09:52:10 2003
+++ demogame/ccl/mythical/upgrade.ccl   Thu Oct  9 15:32:41 2003
@@ -26,7 +26,13 @@
 ;;      along with this program; if not, write to the Free Software
 ;;      Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  
USA
 ;;
-;;     $Id: upgrade.ccl,v 1.9 2003/10/09 13:52:10 martinxyz Exp $
+;;     $Id: upgrade.ccl,v 1.10 2003/10/09 19:32:41 martinxyz Exp $
+
+; When adding a new upgrade:
+; - watch stdout for engine errors, even if it starts ok, order does matter 
here
+; - add it here (define-upgrade, define-allow, define-dependency)
+; - add it to ai.ccl (define-ai-helper) [works without]
+; FIXME: untested
 
 ;;     NOTE: Save can generate this table.
 
@@ -38,4 +44,11 @@
 (define-allow 'unit-mythical-start-location    "AAAAAAAAAAAAAAAA")
 (define-allow 'unit-orc-wall                   "AAAAAAAAAAAAAAAA")
 
-;; No upgrades.
+; FIXME: why is an icon needed here?
+(define-upgrade 'upgrade-faun-magic 'icon 'icon-faun-magic
+  'costs #(     50     100     0     0     0     0     0))
+(define-allow 'upgrade-faun-magic              "AAAAAAAAAAAAAAAA")
+(define-dependency 'upgrade-faun-magic '(unit-mythical-barracks))
+
+; FIXME: needed? if yes, why?
+(define-modifier 'upgrade-faun-magic '(apply-to unit-faun) )
Index: demogame/ccl/stratagus.ccl
diff -u demogame/ccl/stratagus.ccl:1.9 demogame/ccl/stratagus.ccl:1.10
--- demogame/ccl/stratagus.ccl:1.9      Wed Oct  8 05:14:00 2003
+++ demogame/ccl/stratagus.ccl  Thu Oct  9 15:32:40 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: stratagus.ccl,v 1.9 2003/10/08 09:14:00 martinxyz Exp $
+;;     $Id: stratagus.ccl,v 1.10 2003/10/09 19:32:40 martinxyz Exp $
 
 ;; For documentation see stratagus/doc/ccl/ccl.html
 
@@ -425,8 +425,8 @@
 (load "ccl/constructions.ccl" #f #t)
 (load "ccl/spells.ccl" #f #t)
 (load "ccl/units.ccl" #f #t)
-(load "ccl/buttons.ccl" #f #t)
 (load "ccl/upgrade.ccl" #f #t)
+(load "ccl/buttons.ccl" #f #t)
 (load "ccl/fonts.ccl" #f #t)
 (load "ccl/ui.ccl" #f #t)
 (load "ccl/ai.ccl" #f #t)
Index: demogame/ccl/wc2.ccl
diff -u demogame/ccl/wc2.ccl:1.3 demogame/ccl/wc2.ccl:1.4
--- demogame/ccl/wc2.ccl:1.3    Tue Oct  7 15:18:54 2003
+++ demogame/ccl/wc2.ccl        Thu Oct  9 15:32:40 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: wc2.ccl,v 1.3 2003/10/07 19:18:54 martinxyz Exp $
+;;     $Id: wc2.ccl,v 1.4 2003/10/09 19:32:40 martinxyz Exp $
 
 ; FIXME: get rid of this W*rCr*ft stuff
 
@@ -93,7 +93,9 @@
     'unit-destroyed-3x3-place 'unit-destroyed-4x4-place
     'unit-peasant-with-gold 'unit-faun-with-gold 'unit-peasant-with-wood
     'unit-faun-with-wood 'unit-alliance-oil-tanker-full
-    'unit-mythical-oil-tanker-full)
+    'unit-mythical-oil-tanker-full
+    ; append new units here; the index in this list is used in puds (map file 
format)
+    )
 
 ;;=============================================================================
 ;;     Define missiletype mapping from original number to internal symbol
Index: demogame/graphics/missiles/death_and_decay.png




reply via email to

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