forked from github/server
- bugfix capacities
- a little cleanup
This commit is contained in:
parent
e936284347
commit
9475e47606
6 changed files with 19 additions and 49 deletions
|
@ -30,17 +30,6 @@
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
static weapon_mod wm_spear[] = {
|
|
||||||
{ 1, WMF_SKILL|WMF_RIDING|WMF_AGAINST_ANYONE|WMF_OFFENSIVE },
|
|
||||||
{ 1, WMF_SKILL|WMF_WALKING|WMF_AGAINST_RIDING|WMF_DEFENSIVE },
|
|
||||||
{ 0, 0 }
|
|
||||||
};
|
|
||||||
|
|
||||||
static weapon_mod wm_lance[] = {
|
|
||||||
{ 1, WMF_SKILL|WMF_RIDING|WMF_AGAINST_ANYONE|WMF_OFFENSIVE },
|
|
||||||
{ 0, 0 }
|
|
||||||
};
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
WP_NONE,
|
WP_NONE,
|
||||||
WP_MAX
|
WP_MAX
|
||||||
|
|
|
@ -3107,6 +3107,7 @@ attrib_init(void)
|
||||||
at_register(&at_moveblock);
|
at_register(&at_moveblock);
|
||||||
at_register(&at_deathcount);
|
at_register(&at_deathcount);
|
||||||
at_register(&at_chaoscount);
|
at_register(&at_chaoscount);
|
||||||
|
at_register(&at_woodcount);
|
||||||
|
|
||||||
/* neue UNIT-Attribute */
|
/* neue UNIT-Attribute */
|
||||||
at_register(&at_siege);
|
at_register(&at_siege);
|
||||||
|
|
|
@ -236,12 +236,12 @@ get_transporters(const item * itm, int * p_animals, int *p_acap, int * p_vehicle
|
||||||
const item_type * itype = itm->type;
|
const item_type * itype = itm->type;
|
||||||
if (itype->capacity>0) {
|
if (itype->capacity>0) {
|
||||||
if (itype->flags & ITF_ANIMAL) {
|
if (itype->flags & ITF_ANIMAL) {
|
||||||
++animals;
|
animals += itm->number;
|
||||||
if (acap==0) acap = itype->capacity;
|
if (acap==0) acap = itype->capacity;
|
||||||
assert(acap==itype->capacity || !"animals with different capacity not supported");
|
assert(acap==itype->capacity || !"animals with different capacity not supported");
|
||||||
}
|
}
|
||||||
if (itype->flags & ITF_VEHICLE) {
|
if (itype->flags & ITF_VEHICLE) {
|
||||||
++vehicles;
|
vehicles += itm->number;
|
||||||
if (vcap==0) vcap = itype->capacity;
|
if (vcap==0) vcap = itype->capacity;
|
||||||
assert(vcap==itype->capacity || !"vehicles with different capacity not supported");
|
assert(vcap==itype->capacity || !"vehicles with different capacity not supported");
|
||||||
}
|
}
|
||||||
|
|
|
@ -1396,9 +1396,7 @@ parse_races(xmlDocPtr doc)
|
||||||
rc->recruitcost = xml_ivalue(node, "recruitcost", 0);
|
rc->recruitcost = xml_ivalue(node, "recruitcost", 0);
|
||||||
rc->maintenance = xml_ivalue(node, "maintenance", 0);
|
rc->maintenance = xml_ivalue(node, "maintenance", 0);
|
||||||
rc->weight = xml_ivalue(node, "weight", 0);
|
rc->weight = xml_ivalue(node, "weight", 0);
|
||||||
#ifdef RACE_CAPACITY
|
|
||||||
rc->capacity = xml_ivalue(node, "capacity", 540);
|
rc->capacity = xml_ivalue(node, "capacity", 540);
|
||||||
#endif
|
|
||||||
rc->speed = (float)xml_fvalue(node, "speed", 1.0F);
|
rc->speed = (float)xml_fvalue(node, "speed", 1.0F);
|
||||||
rc->hitpoints = xml_ivalue(node, "hp", 0);
|
rc->hitpoints = xml_ivalue(node, "hp", 0);
|
||||||
rc->armor = (char)xml_ivalue(node, "ac", 0);
|
rc->armor = (char)xml_ivalue(node, "ac", 0);
|
||||||
|
|
|
@ -120,23 +120,6 @@ typedef struct island {
|
||||||
int age;
|
int age;
|
||||||
} island;
|
} island;
|
||||||
|
|
||||||
static int
|
|
||||||
days2level(int days)
|
|
||||||
{
|
|
||||||
int l = 0;
|
|
||||||
while (level_days(l)<=days) ++l;
|
|
||||||
return l-1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
change_level(unit * u, skill_t sk, int bylevel)
|
|
||||||
{
|
|
||||||
skill * sv = get_skill(u, sk);
|
|
||||||
assert(bylevel>0);
|
|
||||||
if (sv==0) sv = add_skill(u, sk);
|
|
||||||
sk_set(sv, sv->level+bylevel);
|
|
||||||
}
|
|
||||||
|
|
||||||
newfaction *
|
newfaction *
|
||||||
select_newfaction(const struct race * rc)
|
select_newfaction(const struct race * rc)
|
||||||
{
|
{
|
||||||
|
|
|
@ -10,7 +10,6 @@ function use_snowman(u, amount)
|
||||||
end
|
end
|
||||||
|
|
||||||
function xmas2004()
|
function xmas2004()
|
||||||
print(get_gamename())
|
|
||||||
if get_gamename() == "Eressea" then
|
if get_gamename() == "Eressea" then
|
||||||
if not get_flag("xm04") then
|
if not get_flag("xm04") then
|
||||||
print("Es weihnachtet sehr (2004)")
|
print("Es weihnachtet sehr (2004)")
|
||||||
|
|
Loading…
Reference in a new issue