[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stratagus-CVS] demogame ccl/icons.ccl ccl/units.ccl ccl/upgrad...
From: |
Martin Renold |
Subject: |
[Stratagus-CVS] demogame ccl/icons.ccl ccl/units.ccl ccl/upgrad... |
Date: |
Sat, 11 Oct 2003 05:00:16 -0400 |
CVSROOT: /cvsroot/stratagus
Module name: demogame
Branch:
Changes by: Martin Renold <address@hidden> 03/10/11 05:00:16
Modified files:
ccl : icons.ccl units.ccl upgrade.ccl
ccl/alliance : upgrade.ccl
ccl/mythical : upgrade.ccl
graphics/missiles: death_and_decay.png
scripts : overview.py removeunit.py
Log message:
removed unit-nothing-*; added some missing things back; more
instructive death-and-decay graphic
Patches:
Index: demogame/ccl/alliance/upgrade.ccl
diff -u demogame/ccl/alliance/upgrade.ccl:1.7
demogame/ccl/alliance/upgrade.ccl:1.8
--- demogame/ccl/alliance/upgrade.ccl:1.7 Thu Oct 9 12:10:35 2003
+++ demogame/ccl/alliance/upgrade.ccl Sat Oct 11 05:00:15 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: upgrade.ccl,v 1.7 2003/10/09 16:10:35 martinxyz Exp $
+;; $Id: upgrade.ccl,v 1.8 2003/10/11 09:00:15 martinxyz Exp $
;; NOTE: Save can generate this table.
@@ -86,6 +86,11 @@
(define-upgrade 'upgrade-blizzard 'icon 'icon-blizzard
'costs #( 200 2000 0 0 0 0 0))
+(define-upgrade 'upgrade-ballista1 'icon 'icon-ballista1
+ 'costs #( 250 1500 0 0 0 0 0))
+(define-upgrade 'upgrade-ballista2 'icon 'icon-ballista2
+ 'costs #( 250 4000 0 0 0 0 0))
+
;; NOTE: Save can generate this table.
(define-modifier 'upgrade-sword1
@@ -189,6 +194,14 @@
(define-modifier 'upgrade-blizzard
'(apply-to unit-mage) )
+(define-modifier 'upgrade-ballista1
+ '(piercing-damage 15)
+ '(apply-to unit-ballista))
+
+(define-modifier 'upgrade-ballista2
+ '(piercing-damage 15)
+ '(apply-to unit-ballista))
+
;; NOTE: Save can generate this table.
;; - units
@@ -260,6 +273,8 @@
(define-allow 'upgrade-invisibility "AAAAAAAAAAAAAAAA")
(define-allow 'upgrade-polymorph "AAAAAAAAAAAAAAAA")
(define-allow 'upgrade-blizzard "AAAAAAAAAAAAAAAA")
+(define-allow 'upgrade-ballista1 "AAAAAAAAAAAAAAAA")
+(define-allow 'upgrade-ballista2 "AAAAAAAAAAAAAAAA")
;; NOTE: Save can generate this table.
Index: demogame/ccl/icons.ccl
diff -u demogame/ccl/icons.ccl:1.7 demogame/ccl/icons.ccl:1.8
--- demogame/ccl/icons.ccl:1.7 Thu Oct 9 15:32:40 2003
+++ demogame/ccl/icons.ccl Sat Oct 11 05:00:15 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.7 2003/10/09 19:32:40 martinxyz Exp $
+;; $Id: icons.ccl,v 1.8 2003/10/11 09:00:15 martinxyz Exp $
;; NOTE:
;; Splitting this file into races is a problem, because all
@@ -465,3 +465,4 @@
(define-icon 'icon-alliance-patrol-naval 'tileset 'tileset-winter
'size '(46 38) 'normal '(184 "tilesets/winter/icons.png"))
+(define-icon-alias 'icon-polymorph 'icon-critter)
Index: demogame/ccl/mythical/upgrade.ccl
diff -u demogame/ccl/mythical/upgrade.ccl:1.10
demogame/ccl/mythical/upgrade.ccl:1.11
--- demogame/ccl/mythical/upgrade.ccl:1.10 Thu Oct 9 15:32:41 2003
+++ demogame/ccl/mythical/upgrade.ccl Sat Oct 11 05:00:15 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: upgrade.ccl,v 1.10 2003/10/09 19:32:41 martinxyz Exp $
+;; $Id: upgrade.ccl,v 1.11 2003/10/11 09:00:15 martinxyz Exp $
; When adding a new upgrade:
; - watch stdout for engine errors, even if it starts ok, order does matter
here
@@ -44,7 +44,6 @@
(define-allow 'unit-mythical-start-location "AAAAAAAAAAAAAAAA")
(define-allow 'unit-orc-wall "AAAAAAAAAAAAAAAA")
-; 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")
Index: demogame/ccl/units.ccl
diff -u demogame/ccl/units.ccl:1.9 demogame/ccl/units.ccl:1.10
--- demogame/ccl/units.ccl:1.9 Tue Oct 7 09:28:00 2003
+++ demogame/ccl/units.ccl Sat Oct 11 05:00:15 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.9 2003/10/07 13:28:00 martinxyz Exp $
+;; $Id: units.ccl,v 1.10 2003/10/11 09:00:15 martinxyz Exp $
;; Load the animations for the units.
(load "ccl/anim.ccl" #f #t)
@@ -36,85 +36,15 @@
;;
;; NOTE: Save can generate this table.
;;
-(define-unit-type 'unit-nothing-22 'name "Nothing 22"
- 'files '()
- 'size '(0 0)
- 'animations 'animations-building 'icon 'icon-cancel
- 'speed 99
- 'hit-points 10
- 'draw-level 0
- 'tile-size '(0 0) 'box-size '(0 0)
- 'sight-range 0
- 'basic-damage 0 'piercing-damage 0 'missile 'missile-none
- 'priority 0
- 'type-land
- 'sounds '())
-
-(define-unit-type 'unit-nothing-24 'name "Nothing 24"
- 'files '()
- 'size '(32 32)
- 'animations 'animations-building 'icon 'icon-cancel
- 'costs '(time 60 gold 400)
- 'speed 99
- 'hit-points 60
- 'draw-level 10
- 'tile-size '(1 1) 'box-size '(63 63)
- 'sight-range 4 'computer-reaction-range 20 'person-reaction-range 10
- 'armor 2 'basic-damage 9 'piercing-damage 1 'missile 'missile-none
- 'max-attack-range 1
- 'priority 40
- 'type-naval
- 'right-attack
- 'sea-unit
- 'selectable-by-rectangle
- 'sounds '())
-
-(define-unit-type 'unit-nothing-25 'name "Nothing 25"
- 'files '()
- 'size '(32 32)
- 'animations 'animations-building 'icon 'icon-cancel
- 'costs '(time 60 gold 400)
- 'speed 99
- 'hit-points 60
- 'draw-level 10
- 'tile-size '(1 1) 'box-size '(63 63)
- 'sight-range 4 'computer-reaction-range 20 'person-reaction-range 10
- 'armor 2 'basic-damage 9 'piercing-damage 1 'missile 'missile-none
- 'max-attack-range 1
- 'priority 40
- 'type-naval
- 'right-attack
- 'sea-unit
- 'selectable-by-rectangle
- 'sounds '())
-
-(define-unit-type 'unit-nothing-30 'name "Nothing 30"
- 'files '()
- 'size '(0 0)
- 'animations 'animations-building 'icon 'icon-cancel
- 'speed 99
- 'hit-points 0
- 'draw-level 10
- 'tile-size '(0 0) 'box-size '(0 0)
- 'sight-range 0
- 'basic-damage 0 'piercing-damage 0 'missile 'missile-none
- 'priority 0
- 'type-land
- 'sounds '())
-
-(define-unit-type 'unit-nothing-36 'name "Nothing 36"
- 'files '()
- 'size '(0 0)
- 'animations 'animations-building 'icon 'icon-cancel
- 'speed 99
- 'hit-points 0
- 'draw-level 10
- 'tile-size '(0 0) 'box-size '(0 0)
- 'sight-range 0
- 'basic-damage 0 'piercing-damage 0 'missile 'missile-none
- 'priority 0
- 'type-land
- 'sounds '())
+
+
+
+
+
+
+
+
+
(define-unit-type 'unit-daemon 'name "Daemon"
'files '(tileset-summer "neutral/units/daemon.png")
Index: demogame/ccl/upgrade.ccl
diff -u demogame/ccl/upgrade.ccl:1.2 demogame/ccl/upgrade.ccl:1.3
--- demogame/ccl/upgrade.ccl:1.2 Thu Oct 9 09:52:09 2003
+++ demogame/ccl/upgrade.ccl Sat Oct 11 05:00:15 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: upgrade.ccl,v 1.2 2003/10/09 13:52:09 martinxyz Exp $
+;; $Id: upgrade.ccl,v 1.3 2003/10/11 09:00:15 martinxyz Exp $
;; Load the different races
(load "ccl/alliance/upgrade.ccl" #f #t)
@@ -43,11 +43,6 @@
;; NOTE: Save can generate this table.
;;
-(define-allow 'unit-nothing-22 "AAAAAAAAAAAAAAAA")
-(define-allow 'unit-nothing-24 "AAAAAAAAAAAAAAAA")
-(define-allow 'unit-nothing-25 "AAAAAAAAAAAAAAAA")
-(define-allow 'unit-nothing-30 "AAAAAAAAAAAAAAAA")
-(define-allow 'unit-nothing-36 "AAAAAAAAAAAAAAAA")
(define-allow 'unit-critter "AAAAAAAAAAAAAAAA")
(define-allow 'unit-daemon "AAAAAAAAAAAAAAAA")
Index: demogame/graphics/missiles/death_and_decay.png
Index: demogame/scripts/overview.py
diff -u demogame/scripts/overview.py:1.3 demogame/scripts/overview.py:1.4
--- demogame/scripts/overview.py:1.3 Thu Oct 9 12:09:42 2003
+++ demogame/scripts/overview.py Sat Oct 11 05:00:15 2003
@@ -34,7 +34,7 @@
for statement in statements:
l = List(filename, statement)
lists.append(l)
- if l.command == 'define-unit-type':
+ if l.command == 'define-unit-type' and len(l.list) > 2:
l.race = ''
for race in races:
if race in filename: l.race = race
@@ -53,8 +53,7 @@
os.path.walk(join(datadir, 'ccl'), visit, None)
if __name__ == '__main__':
- print 'Alliance units remaining:'
+ print 'Units defined:'
for u in units:
- if u.race == 'alliance':
- print u.type.ljust(30) + u.get("'name")
+ print u.type.ljust(30) + u.get("'name")
Index: demogame/scripts/removeunit.py
diff -u demogame/scripts/removeunit.py:1.1 demogame/scripts/removeunit.py:1.2
--- demogame/scripts/removeunit.py:1.1 Wed Oct 8 12:47:48 2003
+++ demogame/scripts/removeunit.py Sat Oct 11 05:00:16 2003
@@ -4,67 +4,68 @@
import os, sys, re
join = os.path.join
-if len(sys.argv) != 2:
- print 'Usage:', sys.argv[0], 'unittype'
+if len(sys.argv) < 2:
+ print 'Usage:', sys.argv[0], 'unittype [unttype ...]'
sys.exit(1)
-type = sys.argv[1]
-type_quoted = "'" + type
-
import overview
datadir = overview.datadir
-unit = None
-for u in overview.units:
- if u.type == type:
- assert not unit
- unit = u
-if not unit:
- print 'unittype not found'
- sys.exit(1)
-
-assert type.startswith('unit-')
-
-def replace_words(s, search, replace):
- return replace.join(re.split('\\b' + search + '\\b', s))
-
-#
-# careful search and replace, do nothing if it does not look as expected
-#
-
-filename = join(datadir, 'ccl', unit.race, 'buttons.ccl')
-s = open(filename).read()
-s = replace_words(s, type, '') # FIXME: screws up build button instead of
removing it
-open(filename, 'w').write(s)
-
-filename = join(datadir, 'ccl', unit.race, 'units.ccl')
-s = open(filename).read()
-pre, post = s.split(unit.string)
-open(filename, 'w').write(pre + post)
-
-filename = join(datadir, 'ccl', unit.race, 'upgrade.ccl')
-s = ''
-for line in open(filename).readlines():
- if line.startswith("(define-allow") and type_quoted in line.split():
- pass # remove
- else:
- s += line.replace("'(apply-to %s)" % type, "")
-open(filename, 'w').write(s)
-
-filename = join(datadir, 'ccl', 'editor.ccl')
-lines = open(filename).readlines()
-f = open(filename, 'w')
-for line in lines:
- if line.strip() != type_quoted:
- f.write(line)
-f.close()
-
-print 'Remaining lines containing', type
-for f in overview.files:
- i = 0
- for line in open(f).readlines():
- i += 1
- if type in line:
- print '%s:%d %s' % (f, i, line) ,
+types = sys.argv[1:]
+for type in types:
+ type_quoted = "'" + type
+
+ unit = None
+ for u in overview.units:
+ if u.type == type:
+ assert not unit
+ unit = u
+ if not unit:
+ print 'unittype not found'
+ sys.exit(1)
+
+ assert type.startswith('unit-')
+
+ def replace_words(s, search, replace):
+ return replace.join(re.split('\\b' + search + '\\b', s))
+
+ #
+ # careful search and replace, do nothing if it does not look as expected
+ #
+
+ filename = join(datadir, 'ccl', unit.race, 'buttons.ccl')
+ s = open(filename).read()
+ s = replace_words(s, type, '') # FIXME: screws up build button instead of
removing it
+ open(filename, 'w').write(s)
+
+ filename = join(datadir, 'ccl', unit.race, 'units.ccl')
+ s = open(filename).read()
+ pre, post = s.split(unit.string)
+ open(filename, 'w').write(pre + post)
+
+ filename = join(datadir, 'ccl', unit.race, 'upgrade.ccl')
+ s = ''
+ for line in open(filename).readlines():
+ if line.startswith("(define-allow") and type_quoted in line.split():
+ pass # remove
+ else:
+ s += line.replace("'(apply-to %s)" % type, "")
+ open(filename, 'w').write(s)
+
+ filename = join(datadir, 'ccl', 'editor.ccl')
+ lines = open(filename).readlines()
+ f = open(filename, 'w')
+ for line in lines:
+ if line.strip() != type_quoted:
+ f.write(line)
+ f.close()
+
+ print 'Remaining lines containing', type
+ for f in overview.files:
+ i = 0
+ for line in open(f).readlines():
+ i += 1
+ if type in line:
+ print '%s:%d %s' % (f, i, line) ,
print 'Done.'
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Stratagus-CVS] demogame ccl/icons.ccl ccl/units.ccl ccl/upgrad...,
Martin Renold <=