[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stratagus-CVS] stratagus data/ccl/stratagus.ccl doc/ccl/config...
From: |
Crestez Leonard |
Subject: |
[Stratagus-CVS] stratagus data/ccl/stratagus.ccl doc/ccl/config... |
Date: |
Sun, 26 Oct 2003 14:46:05 -0500 |
CVSROOT: /cvsroot/stratagus
Module name: stratagus
Branch:
Changes by: Crestez Leonard <address@hidden> 03/10/26 14:46:05
Modified files:
data/ccl : stratagus.ccl
doc/ccl : config.html
src/action : actions.c
src/clone : spells.c
src/include : actions.h unittype.h
src/map : ccl_map.c
src/unit : ccl_unittype.c unittype.c
Log message:
Removed set-burn-buildings, we now have per-unit configs.
Cleaned up timings a bit, haste/slow/stuff should work better.
Patches:
Index: stratagus/data/ccl/stratagus.ccl
diff -u stratagus/data/ccl/stratagus.ccl:1.23
stratagus/data/ccl/stratagus.ccl:1.24
--- stratagus/data/ccl/stratagus.ccl:1.23 Sat Oct 25 19:10:43 2003
+++ stratagus/data/ccl/stratagus.ccl Sun Oct 26 14:46:04 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.23 2003/10/25 23:10:43 n0body Exp $
+;; $Id: stratagus.ccl,v 1.24 2003/10/26 19:46:04 n0body Exp $
;; For documentation see stratagus/doc/ccl/ccl.html
@@ -221,10 +221,6 @@
;; (Auf allgemeinen Wunsch eines einzelnen Herrn :)
(set-forest-regeneration! 0)
;(set-forest-regeneration! 5)
-
-;; Set burning building percent and rate. (n percent, h HP/second)
-;; Buildings with less than n% HP lose h HP every wait cycles.
-;(set-burn-buildings! 25 2 6)
;; Edit this to enable/disable the reveal of the attacker.
;(set-reveal-attacker! #t)
Index: stratagus/doc/ccl/config.html
diff -u stratagus/doc/ccl/config.html:1.31 stratagus/doc/ccl/config.html:1.32
--- stratagus/doc/ccl/config.html:1.31 Sat Oct 25 19:10:43 2003
+++ stratagus/doc/ccl/config.html Sun Oct 26 14:46:04 2003
@@ -61,7 +61,6 @@
<a
href="#set-all-players-total-unit-limit!">set-all-players-total-unit-limit!</a>
<a href="#set-brightness!">set-brightness!</a>
<a href="#set-building-capture!">set-building-capture!</a>
-<a href="#set-burn-buildings!">set-burn-buildings!</a>
<a href="#set-click-missile!">set-click-missile!</a>
<a href="#set-color-cycle-all!">set-color-cycle-all!</a>
<a href="#set-contrast!">set-contrast!</a>
@@ -75,7 +74,6 @@
<a href="#set-fog-of-war-contrast!">set-fog-of-war-contrast!</a>
<a href="#set-fog-of-war-saturation!">set-fog-of-war-saturation!</a>
<a href="#set-forest-regeneration!">set-forest-regeneration!</a>
-<a href="#set-goldmine-depleted!">set-goldmine-depleted!</a>
<a href="#set-grab-mouse!">set-grab-mouse!</a>
<a href="#set-hold-click-delay!">set-hold-click-delay!</a>
<a href="#set-key-scroll!">set-key-scroll!</a>
@@ -415,33 +413,6 @@
<a href="../../data/ccl/stratagus.ccl"> $LIBARYPATH/ccl/stratagus.ccl </a>
-<a name="set-burn-buildings!"></a>
-<h3>(set-burn-buildings! percent rate wait)</h3>
-
-.
-
-
-<dl>
-<dt>percent</dt>
-<dd>percentage to start burning at.
-<dt>rate</dt>
-<dd>HP per wait period to lose
-</dd>
-<dt>wait</dt>
-<dd>Number of cycles to wait before running each burn
-</dd>
-</dl>
-
-<h4>Example</h4>
-
-<pre>
- (set-burn-buildings! 25 2 6)
-</pre>
-
-<h4>Used</h4>
-
-<a href="../../data/ccl/stratagus.ccl"> $LIBRARYPATH/ccl/stratagus.ccl </a>
-
<a name="set-click-missile!"></a>
<h3>(set-click-missile! missile)</h3>
@@ -723,30 +694,6 @@
<a href="../../data/ccl/stratagus.ccl"> $LIBARYPATH/ccl/stratagus.ccl </a>
-<a name="set-goldmine-depleted!"></a>
-<h3>(set-goldmine-depleted! percent)</h3>
-
-Set the option to use depleted goldmines.
-
-
-<dl>
-<dt>percent</dt>
-<dd>Players mining a depleted mine receive this percent of the default amount
-of gold. Use 0 to disable using depleted mines.
-</dd>
-</dl>
-
-<h4>Example</h4>
-
-<pre>
- ;; The first example disables using depleted mines. The second example
lets
- ;; players mine depleted mines and gives them 20% of the default amount of
gold.
- (set-goldmine-depleted! 0)
- (set-goldmine-depleted! 20)
-</pre>
-
-<h4>Not Used</h4>
-
<a name="set-grab-mouse!"></a>
<h3>(set-grab-mouse! grab)</h3>
@@ -1554,7 +1501,7 @@
<a href="../../data/ccl/stratagus.ccl"> $LIBARYPATH/ccl/stratagus.ccl </a>
<hr>
-Last changed: $Id: config.html,v 1.31 2003/10/25 23:10:43 n0body Exp $<br>
+Last changed: $Id: config.html,v 1.32 2003/10/26 19:46:04 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/action/actions.c
diff -u stratagus/src/action/actions.c:1.102
stratagus/src/action/actions.c:1.103
--- stratagus/src/action/actions.c:1.102 Sat Oct 25 19:10:44 2003
+++ stratagus/src/action/actions.c Sun Oct 26 14:46:04 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: actions.c,v 1.102 2003/10/25 23:10:44 n0body Exp $
+// $Id: actions.c,v 1.103 2003/10/26 19:46:04 n0body Exp $
//@{
@@ -53,9 +53,6 @@
----------------------------------------------------------------------------*/
global unsigned SyncHash; /// Hash calculated to find sync failures
-global int BurnBuildingPercent; /// Max percent to burn buildings
-global int BurnBuildingDamageRate; /// HP per second to damage buildings
-global int BurnBuildingWait; /// Cycles to Wait for each burn
/*----------------------------------------------------------------------------
-- Functions
@@ -265,54 +262,72 @@
** Increment a unit's health
**
** @param unit the unit to operate on
+** @param amount the amount of time to make up for.(in cycles)
*/
-local void IncrementUnitHealth(Unit* unit)
+local void HandleRegenerations(Unit* unit)
{
- // Unit may not have stats assigned to it
- if (unit->Stats) {
+ int f;
+ // Mana
+ if (unit->Type->CanCastSpell && unit->Mana!=unit->Type->_MaxMana) {
+ unit->Mana++;
+
+ if (unit->Mana > unit->Type->_MaxMana) {
+ unit->Mana = unit->Type->_MaxMana;
+ }
+ if (unit->Selected) {
+ MustRedraw |= RedrawInfoPanel;
+ }
+ }
+
+ f = 0;
+ // Burn
+ if (!unit->Removed && !unit->Destroyed && unit->Stats->HitPoints
+ && unit->Orders[0].Action!=UnitActionBuilded ) {
+ f = (100 * unit->HP) / unit->Stats->HitPoints;
+ if (f <= unit->Type->BurnPercent) {
+ HitUnit(NoUnitP, unit, unit->Type->BurnDamageRate);
+ f = 1;
+ } else {
+ f = 0;
+ }
+ }
+
+ // Health doesn't regenerate while burning.
+ if ((!f) && unit->Stats) {
+ // Unit may not have stats assigned to it
if (unit->Stats->RegenerationRate && unit->HP<unit->Stats->HitPoints) {
unit->HP += unit->Stats->RegenerationRate;
if (unit->HP > unit->Stats->HitPoints) {
unit->HP = unit->Stats->HitPoints;
}
-
if (unit->Selected) {
MustRedraw|=RedrawInfoPanel;
}
}
}
+
+ // Shields and stuff?
}
/**
** Handle things about the unit that decay over time
**
** @param unit the unit that the decay is handled for
+** @param amount the amount of time to make up for.(in cycles)
**
-** @return 1 for dead unit, 0 otherwise
*/
-local int HandleDecay(Unit* unit)
+local void HandleBuffs(Unit* unit, int amount)
{
int deadunit;
int flag;
- if (unit->Type->CanCastSpell && unit->Mana!=unit->Type->_MaxMana) {
- unit->Mana++;
-
- if (unit->Selected) {
- MustRedraw|=RedrawInfoPanel;
- }
- }
-
deadunit = 0;
//
// Look if the time to live is over.
//
if (unit->TTL && unit->TTL < (GameCycle - unit->HP)) {
DebugLevel0Fn("Unit must die %lu %lu!\n" _C_ unit->TTL _C_ GameCycle);
- if (--unit->HP < 0) {
- LetUnitDie(unit);
- deadunit |= 1;
- }
+ HitUnit(0, unit, amount); // * type->LossPerCycle or somthing?
if (unit->Selected) {
MustRedraw |= RedrawInfoPanel;
}
@@ -323,61 +338,55 @@
//
// decrease spells effects time, if end redraw unit.
//
+
+ // Bloodlust
if (unit->Bloodlust) {
- unit->Bloodlust--;
- if (!flag && !unit->Bloodlust) {
- flag = CheckUnitToBeDrawn(unit);
+ unit->Bloodlust -= amount;
+ if (unit->Bloodlust < 0) {
+ unit->Bloodlust = 0 ;
+ if (!flag) {
+ flag = CheckUnitToBeDrawn(unit);
+ }
}
}
+ // Haste
if (unit->Haste) {
- unit->Haste--;
- if (!flag && !unit->Haste) {
- flag = CheckUnitToBeDrawn(unit);
+ unit->Haste -= amount;
+ if (unit->Haste < 0) {
+ unit->Haste = 0;
+ if (!flag) {
+ flag = CheckUnitToBeDrawn(unit);
+ }
}
}
+ // Slow
if (unit->Slow) {
- unit->Slow--;
- if (!flag && !unit->Slow) {
- flag = CheckUnitToBeDrawn(unit);
+ unit->Slow -= amount;
+ if (unit->Slow < 0) {
+ unit->Slow = 0;
+ if (!flag) {
+ flag = CheckUnitToBeDrawn(unit);
+ }
}
}
+ // Invisible
if (unit->Invisible) {
- unit->Invisible--;
- if (!flag && !unit->Invisible) {
- flag = CheckUnitToBeDrawn(unit);
+ unit->Invisible -= amount;
+ if (unit->Invisible < 0) {
+ unit->Invisible = 0;
+ if (!flag) {
+ flag = CheckUnitToBeDrawn(unit);
+ }
}
}
+ // Unholy armor
if (unit->UnholyArmor) {
- unit->UnholyArmor--;
- if (!flag && !unit->UnholyArmor) {
- flag = CheckUnitToBeDrawn(unit);
- }
- }
- DebugLevel3Fn("%d:%d,%d,%d,%d,%d\n" _C_ UnitNumber(unit) _C_
- unit->Bloodlust _C_ unit->Haste _C_ unit->Slow _C_
- unit->Invisible _C_ unit->UnholyArmor);
-
- return deadunit;
-}
-
-/**
-** Handle burning buildings
-**
-** @param unit unit to burn
-*/
-local void BurnBuilding(Unit* unit)
-{
- int f;
-
- if (!unit->Type->Building || unit->Removed || unit->Destroyed) {
- return;
- }
-
- // don't burn buildings under construction
- if (unit->Stats->HitPoints && unit->Orders[0].Action!=UnitActionBuilded) {
- f = (100 * unit->HP) / unit->Stats->HitPoints;
- if (f <= BurnBuildingPercent) {
- HitUnit(NoUnitP, unit, BurnBuildingDamageRate);
+ unit->UnholyArmor -= amount;
+ if (unit->UnholyArmor < 0) {
+ unit->UnholyArmor = 0;
+ if (!flag) {
+ flag = CheckUnitToBeDrawn(unit);
+ }
}
}
}
@@ -457,8 +466,6 @@
}
}
- // FIXME: fire handling should be moved to here.
-
//
// Select action. FIXME: should us function pointers in unit structure.
//
@@ -476,19 +483,12 @@
Unit** tpos;
Unit** tend;
Unit* unit;
- int burnthiscycle;
- int healthiscycle;
- int manathiscycle;
int blinkthiscycle;
+ int buffsthiscycle;
+ int regenthiscycle;
- if (BurnBuildingPercent) {
- burnthiscycle = !(GameCycle % BurnBuildingWait);
- } else {
- burnthiscycle = 0;
- }
- // FIXME: Make configurable from CCL;
- healthiscycle = !(GameCycle % CYCLES_PER_SECOND);
- manathiscycle = !(GameCycle % CYCLES_PER_SECOND);
+ buffsthiscycle = !(GameCycle % CYCLES_PER_SECOND);
+ regenthiscycle = !(GameCycle % CYCLES_PER_SECOND);
blinkthiscycle = !(GameCycle % CYCLES_PER_SECOND);
//
@@ -498,10 +498,60 @@
memcpy(table, Units, sizeof(Unit*) * NumUnits);
//
+ // Check for dead/destroyed units in table...
+ //
+ for (tpos = table; tpos < tend; ++tpos) {
+ unit = *tpos;
+ if (unit->Destroyed) { // Ignore destroyed units
+ DebugLevel0Fn("Destroyed unit %d in table, should be ok\n" _C_
+ UnitNumber(unit));
+ unit = 0;
+ continue;
+ }
+ }
+
+ //
+ // Check for things that only happen every few cycles
+ // (faster in their own loops.)
+ //
+
+ // 1) Blink flag.
+ if (blinkthiscycle) {
+ for (tpos = table; tpos < tend; ++tpos) {
+ if ((unit = *tpos)) {
+ if (unit->Blink) {
+ --unit->Blink;
+ }
+ }
+ }
+ }
+
+ // 2) Buffs...
+ if (buffsthiscycle) {
+ for (tpos = table; tpos < tend; ++tpos) {
+ if ((unit = *tpos)) {
+ HandleBuffs(unit, CYCLES_PER_SECOND);
+ }
+ }
+ }
+
+ // 3) Increase health mana, burn and stuff
+ if (regenthiscycle) {
+ for (tpos = table; tpos < tend; ++tpos) {
+ if ((unit = *tpos)) {
+ HandleRegenerations(unit);
+ }
+ }
+ }
+
+ //
// Do all actions
//
for (tpos = table; tpos < tend; ++tpos) {
unit = *tpos;
+ if (!tpos) {
+ continue;
+ }
#if defined(UNIT_ON_MAP) && 0 // debug unit store
{ const Unit* list;
@@ -533,30 +583,7 @@
list = list->Next;
} }
#endif
- if (unit->Destroyed) { // Ignore destroyed units
- DebugLevel0Fn("Destroyed unit %d in table, should be ok\n" _C_
- UnitNumber(unit));
- continue;
- }
-
- if (blinkthiscycle && unit->Blink) { // clear blink flag
- --unit->Blink;
- }
-
- if (manathiscycle) {
- if (HandleDecay(unit)) {
- // Unit Died
- continue;
- }
- }
- if (healthiscycle) {
- IncrementUnitHealth(unit);
- }
- if (burnthiscycle) {
- BurnBuilding(unit);
- }
-
if (--unit->Wait) { // Wait until counter reached
continue;
}
Index: stratagus/src/clone/spells.c
diff -u stratagus/src/clone/spells.c:1.116 stratagus/src/clone/spells.c:1.117
--- stratagus/src/clone/spells.c:1.116 Sat Oct 25 14:58:42 2003
+++ stratagus/src/clone/spells.c Sun Oct 26 14:46:04 2003
@@ -27,7 +27,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: spells.c,v 1.116 2003/10/25 18:58:42 n0body Exp $
+// $Id: spells.c,v 1.117 2003/10/26 19:46:04 n0body Exp $
/*
** And when we cast our final spell
@@ -776,16 +776,6 @@
// Now check conditions regarding the target unit.
//
if (target) {
-// if (condition->Undead != CONDITION_TRUE) {
-// if ((condition->Undead == CONDITION_ONLY) ^
(target->Type->IsUndead)) {
-// return 0;
-// }
-// }
-// if (condition->Organic != CONDITION_TRUE) {
-// if ((condition->Organic == CONDITION_ONLY) ^
(target->Type->Organic)) {
-// return 0;
-// }
-// }
if (condition->Volatile != CONDITION_TRUE) {
if ((condition->Volatile == CONDITION_ONLY) ^
(target->Type->Volatile)) {
return 0;
@@ -796,11 +786,6 @@
return 0;
}
}
-// if (condition->Hero != CONDITION_TRUE) {
-// if ((condition->Hero == CONDITION_ONLY) ^ (target->Type->Hero)) {
-// return 0;
-// }
-// }
if (condition->Coward != CONDITION_TRUE) {
if ((condition->Coward == CONDITION_ONLY) ^ (target->Type->Coward))
{
return 0;
@@ -1221,7 +1206,8 @@
//
// Ugly hack, CastAdjustVitals makes it's own mana calculation.
//
- if (act->CastFunction!=CastAdjustVitals) {
+ if (act->CastFunction!=CastAdjustVitals &&
+ act->CastFunction!=CastSummon) {
caster->Mana -= spell->ManaCost;
}
PlayGameSound(spell->SoundWhenCast.Sound, MaxSampleVolume);
Index: stratagus/src/include/actions.h
diff -u stratagus/src/include/actions.h:1.56
stratagus/src/include/actions.h:1.57
--- stratagus/src/include/actions.h:1.56 Thu Oct 23 21:58:33 2003
+++ stratagus/src/include/actions.h Sun Oct 26 14:46:05 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: actions.h,v 1.56 2003/10/24 01:58:33 n0body Exp $
+// $Id: actions.h,v 1.57 2003/10/26 19:46:05 n0body Exp $
#ifndef __ACTIONS_H__
#define __ACTIONS_H__
@@ -58,9 +58,6 @@
----------------------------------------------------------------------------*/
extern unsigned SyncHash; /// Hash calculated to find sync
failures
-extern int BurnBuildingPercent; /// Max percent to burn buildings
-extern int BurnBuildingDamageRate; /// HP per second to damage buildings
-extern int BurnBuildingWait; /// Number of cycles to wait for burning
/*----------------------------------------------------------------------------
-- Functions
Index: stratagus/src/include/unittype.h
diff -u stratagus/src/include/unittype.h:1.122
stratagus/src/include/unittype.h:1.123
--- stratagus/src/include/unittype.h:1.122 Sat Oct 25 14:58:43 2003
+++ stratagus/src/include/unittype.h Sun Oct 26 14:46:05 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: unittype.h,v 1.122 2003/10/25 18:58:43 n0body Exp $
+// $Id: unittype.h,v 1.123 2003/10/26 19:46:05 n0body Exp $
#ifndef __UNITTYPE_H__
#define __UNITTYPE_H__
@@ -233,6 +233,15 @@
**
** Regeneration rate in HP per second
**
+** UnitType::BurnPercent
+**
+** The burning limit in percents. If the unit has lees than
+** this it will start to burn.
+**
+** UnitType::BurnDamageRate
+**
+** Burn rate in HP per second
+**
** UnitType::UnitType
**
** Land / fly / naval
@@ -681,7 +690,9 @@
int Priority; /// Priority value / AI
Treatment
int _BasicDamage; /// Basic damage dealt
int _PiercingDamage; /// Piercing damage dealt
- int _RegenerationRate; /// HP regeneration HP per sec
+ int _RegenerationRate; /// HP regeneration rate per sec
+ int BurnPercent; /// Burning percent.
+ int BurnDamageRate; /// HP burn rate per sec
int RepairRange; /// Units repair range.
char *CanCastSpell; /// Unit is able to use spells.
// FIXME: n0body: AutoBuildRate not implemented.
Index: stratagus/src/map/ccl_map.c
diff -u stratagus/src/map/ccl_map.c:1.41 stratagus/src/map/ccl_map.c:1.42
--- stratagus/src/map/ccl_map.c:1.41 Sun Sep 28 17:06:18 2003
+++ stratagus/src/map/ccl_map.c Sun Oct 26 14:46:05 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: ccl_map.c,v 1.41 2003/09/28 21:06:18 jsalmon3 Exp $
+// $Id: ccl_map.c,v 1.42 2003/10/26 19:46:05 n0body Exp $
//@{
@@ -478,44 +478,6 @@
}
/**
-** Set burning buildings percent and rate.
-**
-** @param percent Max percent needed to burn buildings
-** @param rate HP per cycle to damage buildings
-** @param wait Number of cycles to wait
-*/
-local SCM CclSetBurnBuildings(SCM percent, SCM rate, SCM wait)
-{
- int p;
- int r;
- int w;
-
- p = gh_scm2int(percent);
- r = gh_scm2int(rate);
- w = gh_scm2int(wait);
- if (p < 0 || p > 100) {
- PrintFunction();
- fprintf(stdout, "Burn percent should be 0-100\n");
- p = 0;
- }
- if (r <= 0) {
- PrintFunction();
- fprintf(stderr, "Burn rate should be greater than 0\n");
- p = 0;
- }
- if (w <= 0) {
- PrintFunction();
- fprintf(stderr, "Wait Cycles must be greater than 0\n");
- w = CYCLES_PER_SECOND;
- }
- BurnBuildingPercent = p;
- BurnBuildingDamageRate = r;
- BurnBuildingWait = w;
-
- return SCM_UNSPECIFIED;
-}
-
-/**
** Register CCL features for map.
*/
global void MapCclRegister(void)
@@ -537,8 +499,6 @@
gh_new_procedure1_0("set-fog-of-war-saturation!",
CclSetFogOfWarSaturation);
gh_new_procedure1_0("set-forest-regeneration!",CclSetForestRegeneration);
-
- gh_new_procedure3_0("set-burn-buildings!", CclSetBurnBuildings);
}
//@}
Index: stratagus/src/unit/ccl_unittype.c
diff -u stratagus/src/unit/ccl_unittype.c:1.101
stratagus/src/unit/ccl_unittype.c:1.102
--- stratagus/src/unit/ccl_unittype.c:1.101 Sat Oct 25 14:58:43 2003
+++ stratagus/src/unit/ccl_unittype.c Sun Oct 26 14:46:05 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: ccl_unittype.c,v 1.101 2003/10/25 18:58:43 n0body Exp $
+// $Id: ccl_unittype.c,v 1.102 2003/10/26 19:46:05 n0body Exp $
//@{
@@ -269,6 +269,12 @@
list = gh_cdr(list);
} else if (gh_eq_p(value, gh_symbol2scm("regeneration-rate"))) {
type->_RegenerationRate = gh_scm2int(gh_car(list));
+ list = gh_cdr(list);
+ } else if (gh_eq_p(value, gh_symbol2scm("burn-percent"))) {
+ type->BurnPercent = gh_scm2int(gh_car(list));
+ list = gh_cdr(list);
+ } else if (gh_eq_p(value, gh_symbol2scm("burn-damage-rate"))) {
+ type->BurnDamageRate = gh_scm2int(gh_car(list));
list = gh_cdr(list);
} else if (gh_eq_p(value, gh_symbol2scm("max-mana"))) {
type->_MaxMana = gh_scm2int(gh_car(list));
Index: stratagus/src/unit/unittype.c
diff -u stratagus/src/unit/unittype.c:1.118 stratagus/src/unit/unittype.c:1.119
--- stratagus/src/unit/unittype.c:1.118 Sat Oct 25 14:58:44 2003
+++ stratagus/src/unit/unittype.c Sun Oct 26 14:46:05 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: unittype.c,v 1.118 2003/10/25 18:58:44 n0body Exp $
+// $Id: unittype.c,v 1.119 2003/10/26 19:46:05 n0body Exp $
//@{
@@ -756,6 +756,10 @@
CLprintf(file, " 'speed %d\n", type->_Speed);
CLprintf(file, " 'hit-points %d\n", type->_HitPoints);
CLprintf(file, " 'regeneration-rate %d\n", type->_RegenerationRate);
+ if (type->BurnPercent) {
+ CLprintf(file, " 'burn-percent %d 'burn-damage-rate %d\n",
+ type->BurnPercent, type->BurnDamageRate);
+ }
if (all || type->_MaxMana) {
CLprintf(file, " 'max-mana %d\n", type->_MaxMana);
}
@@ -1167,7 +1171,7 @@
char** sp;
CLprintf(file, "\n;;; -----------------------------------------\n");
- CLprintf(file, ";;; MODULE: unittypes $Id: unittype.c,v 1.118 2003/10/25
18:58:44 n0body Exp $\n\n");
+ CLprintf(file, ";;; MODULE: unittypes $Id: unittype.c,v 1.119 2003/10/26
19:46:05 n0body Exp $\n\n");
// Original number to internal unit-type name.