[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stratagus-CVS] stratagus data/ccl/human/units.ccl data/ccl/orc...
From: |
Russell Smith |
Subject: |
[Stratagus-CVS] stratagus data/ccl/human/units.ccl data/ccl/orc... |
Date: |
Sun, 31 Aug 2003 06:47:03 -0400 |
CVSROOT: /cvsroot/stratagus
Module name: stratagus
Branch:
Changes by: Russell Smith <address@hidden> 03/08/31 06:47:02
Modified files:
data/ccl/human : units.ccl
data/ccl/orc : units.ccl
doc : ChangeLog.html
doc/ccl : unittype.html
src/unit : ccl_unittype.c unittype.c
Log message:
Added Income improvements to ccl, removed hard coded versions
Patches:
Index: stratagus/data/ccl/human/units.ccl
diff -u stratagus/data/ccl/human/units.ccl:1.28
stratagus/data/ccl/human/units.ccl:1.29
--- stratagus/data/ccl/human/units.ccl:1.28 Thu Aug 28 18:51:41 2003
+++ stratagus/data/ccl/human/units.ccl Sun Aug 31 06:46:59 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.28 2003/08/28 22:51:41 n0body Exp $
+;; $Id: units.ccl,v 1.29 2003/08/31 10:46:59 mr-russ Exp $
;;=============================================================================
;; Define unit-types.
@@ -1115,6 +1115,7 @@
'size '(96 96)
'animations 'animations-building 'icon 'icon-elven-lumber-mill
'costs '(time 150 gold 600 wood 450)
+ 'improve-production '(wood 25)
'construction 'construction-land
'speed 0
'hit-points 600
@@ -1254,6 +1255,7 @@
'size '(96 96)
'animations 'animations-building 'icon 'icon-alliance-refinery
'costs '(time 225 gold 800 wood 350 oil 200)
+ 'improve-production '(oil 25)
'construction 'construction-alliance-refinery
'speed 0
'hit-points 600
@@ -1313,6 +1315,7 @@
'size '(128 128)
'animations 'animations-building 'icon 'icon-keep
'costs '(time 200 gold 2000 wood 1000 oil 200)
+ 'improve-production '(gold 10)
'construction 'construction-land
'speed 0
'hit-points 1400
@@ -1342,6 +1345,7 @@
'size '(128 128)
'animations 'animations-building 'icon 'icon-castle
'costs '(time 200 gold 2500 wood 1200 oil 500)
+ 'improve-production '(gold 20)
'construction 'construction-land
'speed 0
'hit-points 1600
Index: stratagus/data/ccl/orc/units.ccl
diff -u stratagus/data/ccl/orc/units.ccl:1.32
stratagus/data/ccl/orc/units.ccl:1.33
--- stratagus/data/ccl/orc/units.ccl:1.32 Thu Aug 28 18:51:41 2003
+++ stratagus/data/ccl/orc/units.ccl Sun Aug 31 06:47:01 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.32 2003/08/28 22:51:41 n0body Exp $
+;; $Id: units.ccl,v 1.33 2003/08/31 10:47:01 mr-russ Exp $
;;=============================================================================
;; Define unit-types.
@@ -1232,6 +1232,7 @@
'size '(96 96)
'animations 'animations-building 'icon 'icon-troll-lumber-mill
'costs '(time 150 gold 600 wood 450)
+ 'improve-production '(wood 25)
'construction 'construction-land
'speed 0
'hit-points 600
@@ -1342,6 +1343,7 @@
'size '(96 96)
'animations 'animations-building 'icon 'icon-mythical-refinery
'costs '(time 225 gold 800 wood 350 oil 200)
+ 'improve-production '(oil 25)
'construction 'construction-mythical-refinery
'speed 0
'hit-points 600
@@ -1401,6 +1403,7 @@
'size '(128 128)
'animations 'animations-building 'icon 'icon-stronghold
'costs '(time 200 gold 2000 wood 1000 oil 200)
+ 'improve-production '(gold 10)
'construction 'construction-land
'speed 0
'hit-points 1400
@@ -1430,6 +1433,7 @@
'size '(128 128)
'animations 'animations-building 'icon 'icon-fortress
'costs '(time 200 gold 2500 wood 1200 oil 500)
+ 'improve-production '(gold 20)
'construction 'construction-land
'speed 0
'hit-points 1600
Index: stratagus/doc/ChangeLog.html
diff -u stratagus/doc/ChangeLog.html:1.517 stratagus/doc/ChangeLog.html:1.518
--- stratagus/doc/ChangeLog.html:1.517 Sun Aug 31 04:01:20 2003
+++ stratagus/doc/ChangeLog.html Sun Aug 31 06:47:01 2003
@@ -2,7 +2,7 @@
<html>
<head>
<!--
----- $Id: ChangeLog.html,v 1.517 2003/08/31 08:01:20 mr-russ Exp $
+---- $Id: ChangeLog.html,v 1.518 2003/08/31 10:47:01 mr-russ Exp $
---- (c) Copyright 1998-2003 by Lutz Sammer
@@ -36,6 +36,7 @@
<li>Future 1.19 Release<p>
<ul>
<li>++
+ <li>Added Income improvements to ccl, removed hard coded versions (from
Russell Smith).
<li>Fixed Pathfinder cost bug, which stopped units from moving (from
Russell Smith).
<li>Fixed Pathfinder bug and cleaned up vision table management (from
Russell Smith).
<li>Added Circular Goal support, Major vision and pathfinding changes
(from Russell Smith).
Index: stratagus/doc/ccl/unittype.html
diff -u stratagus/doc/ccl/unittype.html:1.20
stratagus/doc/ccl/unittype.html:1.21
--- stratagus/doc/ccl/unittype.html:1.20 Thu Jul 3 13:40:05 2003
+++ stratagus/doc/ccl/unittype.html Sun Aug 31 06:47:01 2003
@@ -197,8 +197,8 @@
<h4>Syntax</h4>
<code>(define-unit-type ident name graphics pixel_size animations icon
- speed overlay sight_range hitpoints magic costs tile_size box_size
- attack_range computer_reaction_range human_reaction_range armor
+ speed overlay sight_range hitpoints magic costs improve_production
tile_size
+ box_size attack_range computer_reaction_range human_reaction_range armor
priorty damage piercing_damge weapon_upgradable armor_upgradeable
decay annoy_factor points missle corpse type right_mouse can_target
flags sounds attack_sound)</code>
@@ -271,14 +271,18 @@
<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</dd>
<dt>costs</dt>
-<dd>Define the costs to build (or aquire) this unit. It is an array of #(
-time gold wood oil) or #(time gold wood oil ore stone coal). Time is in frames
-to build this unit.
+<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.: #( 200 2000 1000 200 ).<p>
-NOTE: This is extendable more costs could be added. (using 6 resources insteed
-of 3. Or redefining the gold resource into a crytal resource)
+F.E.: '( time 200 gold 2000 wood 1000 oil 200 ).<p>
+</dd>
+<dt>improve_production</dt>
+<dd>Define the production increase from defaults that this unit adds. It is an
array of '(
+rosource-name amount) pairs.
+Gold is the amount it increase the default gold by. All other defined
resources are
+treated the same way.
+F.E.: 'improve-production '( gold 20 wood 5 ).<p>
</dd>
<dt>tile_size</dt>
<dd>Define the unit-type size in tiles. NOTE: currently only buildings could
@@ -616,7 +620,7 @@
<h4>Not Used</h4>
<hr>
-Last changed: $Id: unittype.html,v 1.20 2003/07/03 17:40:05 ingo Exp $<br>
+Last changed: $Id: unittype.html,v 1.21 2003/08/31 10:47:01 mr-russ 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/unit/ccl_unittype.c
diff -u stratagus/src/unit/ccl_unittype.c:1.77
stratagus/src/unit/ccl_unittype.c:1.78
--- stratagus/src/unit/ccl_unittype.c:1.77 Thu Aug 28 18:51:42 2003
+++ stratagus/src/unit/ccl_unittype.c Sun Aug 31 06:47:01 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: ccl_unittype.c,v 1.77 2003/08/28 22:51:42 n0body Exp $
+// $Id: ccl_unittype.c,v 1.78 2003/08/31 10:47:01 mr-russ Exp $
//@{
@@ -221,6 +221,16 @@
value=gh_car(sublist);
sublist=gh_cdr(sublist);
type->_Costs[CclGetResourceByName(value)]=gh_scm2int(gh_car(sublist));
+ sublist=gh_cdr(sublist);
+ }
+ } else if( gh_eq_p(value,gh_symbol2scm("improve-production")) ) {
+ sublist=gh_car(list);
+ list=gh_cdr(list);
+ while( !gh_null_p(sublist) ) {
+ value=gh_car(sublist);
+ sublist=gh_cdr(sublist);
+ type->ImproveIncomes[CclGetResourceByName(value)]=
+
DefaultIncomes[CclGetResourceByName(value)]+gh_scm2int(gh_car(sublist));
sublist=gh_cdr(sublist);
}
} else if( gh_eq_p(value,gh_symbol2scm("construction")) ) {
Index: stratagus/src/unit/unittype.c
diff -u stratagus/src/unit/unittype.c:1.89 stratagus/src/unit/unittype.c:1.90
--- stratagus/src/unit/unittype.c:1.89 Thu Aug 28 18:51:42 2003
+++ stratagus/src/unit/unittype.c Sun Aug 31 06:47:01 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: unittype.c,v 1.89 2003/08/28 22:51:42 n0body Exp $
+// $Id: unittype.c,v 1.90 2003/08/31 10:47:01 mr-russ Exp $
//@{
@@ -1040,7 +1040,7 @@
char **sp;
CLprintf(file,"\n;;; -----------------------------------------\n");
- CLprintf(file,";;; MODULE: unittypes $Id: unittype.c,v 1.89 2003/08/28
22:51:42 n0body Exp $\n\n");
+ CLprintf(file,";;; MODULE: unittypes $Id: unittype.c,v 1.90 2003/08/31
10:47:01 mr-russ Exp $\n\n");
// Original number to internal unit-type name.
@@ -1188,41 +1188,6 @@
//
*(UnitType**)hash_add(UnitTypeHash,UnitTypes[type]->Ident)
=UnitTypes[type];
- //
- // Hardcoded incomes, FIXME: should be moved to some configs.
- //
- if( !strcmp(UnitTypes[type]->Ident,"unit-elven-lumber-mill") ) {
- UnitTypes[type]->ImproveIncomes[WoodCost]=
- DefaultIncomes[WoodCost]+25;
- }
- if( !strcmp(UnitTypes[type]->Ident,"unit-troll-lumber-mill") ) {
- UnitTypes[type]->ImproveIncomes[WoodCost]=
- DefaultIncomes[WoodCost]+25;
- }
- if( !strcmp(UnitTypes[type]->Ident,"unit-human-refinery") ) {
- UnitTypes[type]->ImproveIncomes[OilCost]=
- DefaultIncomes[OilCost]+25;
- }
- if( !strcmp(UnitTypes[type]->Ident,"unit-orc-refinery") ) {
- UnitTypes[type]->ImproveIncomes[OilCost]=
- DefaultIncomes[OilCost]+25;
- }
- if( !strcmp(UnitTypes[type]->Ident,"unit-keep") ) {
- UnitTypes[type]->ImproveIncomes[GoldCost]=
- DefaultIncomes[GoldCost]+10;
- }
- if( !strcmp(UnitTypes[type]->Ident,"unit-stronghold") ) {
- UnitTypes[type]->ImproveIncomes[GoldCost]=
- DefaultIncomes[GoldCost]+10;
- }
- if( !strcmp(UnitTypes[type]->Ident,"unit-castle") ) {
- UnitTypes[type]->ImproveIncomes[GoldCost]=
- DefaultIncomes[GoldCost]+20;
- }
- if( !strcmp(UnitTypes[type]->Ident,"unit-fortress") ) {
- UnitTypes[type]->ImproveIncomes[GoldCost]=
- DefaultIncomes[GoldCost]+20;
- }
}
// LUDO : called after game is loaded -> don't reset stats !