luxusgueter raus aus dem code, rein in die CML files

This commit is contained in:
Enno Rehling 2005-10-30 18:22:28 +00:00
parent eba19999f4
commit db9589bed1
5 changed files with 60 additions and 99 deletions

View File

@ -655,7 +655,6 @@ void use_birthdayamulet(region * r, unit * magician, int amount, struct order *
enum { enum {
IS_RESOURCE, IS_RESOURCE,
IS_PRODUCT, IS_PRODUCT,
IS_LUXURY,
IS_MAGIC, IS_MAGIC,
/* wird für ZEIGE gebraucht */ /* wird für ZEIGE gebraucht */
IS_ITEM, IS_ITEM,
@ -727,34 +726,6 @@ static t_item itemdata[MAXITEMS] = {
{"Speer", "Speere", "Speer", "Speere"}, {"Speer", "Speere", "Speer", "Speere"},
IS_PRODUCT, SK_WEAPONSMITH, 2, {0, 1, 0, 0, 0, 0}, 100, 0, 0, NULL IS_PRODUCT, SK_WEAPONSMITH, 2, {0, 1, 0, 0, 0, 0}, 100, 0, 0, NULL
}, },
{ /* I_BALM */
{"Balsam", "Balsam", "Balsam", "Balsam"},
IS_LUXURY, 0, 0, {0, 0, 0, 0, 0, 0}, 200, 4, 0, NULL
},
{ /* I_SPICES */
{"Gewürz", "Gewürz", "Gewürz", "Gewürz"},
IS_LUXURY, 0, 0, {0, 0, 0, 0, 0, 0}, 200, 5, 0, NULL
},
{ /* I_JEWELERY */
{"Juwel", "Juwelen", "Juwel", "Juwelen"},
IS_LUXURY, 0, 0, {0, 0, 0, 0, 0, 0}, 100, 7, 0, NULL
},
{ /* I_MYRRH */
{"Myrrhe", "Myrrhe", "Myrrhe", "Myrrhe"},
IS_LUXURY, 0, 0, {0, 0, 0, 0, 0, 0}, 200, 5, 0, NULL
},
{ /* I_OIL */
{"Öl", "Öl", "Öl", "Öl"},
IS_LUXURY, 0, 0, {0, 0, 0, 0, 0, 0}, 300, 3, 0, NULL
},
{ /* I_SILK */
{"Seide", "Seide", "Seide", "Seide"},
IS_LUXURY, 0, 0, {0, 0, 0, 0, 0, 0}, 300, 6, 0, NULL
},
{ /* I_INCENSE */
{"Weihrauch", "Weihrauch", "Weihrauch", "Weihrauch"},
IS_LUXURY, 0, 0, {0, 0, 0, 0, 0, 0}, 200, 4, 0, NULL
},
{ /* I_AMULET_OF_HEALING */ { /* I_AMULET_OF_HEALING */
{"Amulett der Heilung", "Amulette der Heilung", "Amulett", "Amulette"}, {"Amulett der Heilung", "Amulette der Heilung", "Amulett", "Amulette"},
IS_MAGIC, 0, 0, {0, 0, 0, 0, 0, 0}, 0, 0, 0, NULL IS_MAGIC, 0, 0, {0, 0, 0, 0, 0, 0}, 0, 0, 0, NULL
@ -1017,14 +988,12 @@ init_olditems(void)
const char * appearance[2]; const char * appearance[2];
int weight = itemdata[i].gewicht; int weight = itemdata[i].gewicht;
int capacity = 0; int capacity = 0;
int price;
attrib * a; attrib * a;
item_type * itype; item_type * itype;
if (itemdata[i].flags & FL_ITEM_CURSED) iflags |= ITF_CURSED; if (itemdata[i].flags & FL_ITEM_CURSED) iflags |= ITF_CURSED;
if (itemdata[i].flags & FL_ITEM_NOTLOST) iflags |= ITF_NOTLOST; if (itemdata[i].flags & FL_ITEM_NOTLOST) iflags |= ITF_NOTLOST;
if (itemdata[i].flags & FL_ITEM_NOTINBAG) iflags |= ITF_BIG; if (itemdata[i].flags & FL_ITEM_NOTINBAG) iflags |= ITF_BIG;
if (itemdata[i].typ == IS_LUXURY) iflags |= ITF_LUXURY;
if (itemdata[i].flags & FL_ITEM_ANIMAL) iflags |= ITF_ANIMAL; if (itemdata[i].flags & FL_ITEM_ANIMAL) iflags |= ITF_ANIMAL;
name[0]=NULL; name[0]=NULL;
@ -1073,10 +1042,6 @@ init_olditems(void)
/* itemdata::typ Analyse. IS_PRODUCT und IS_MAGIC sind so gut wie egal. */ /* itemdata::typ Analyse. IS_PRODUCT und IS_MAGIC sind so gut wie egal. */
switch (itemdata[i].typ) { switch (itemdata[i].typ) {
case IS_LUXURY:
price = itemdata[i].preis;
rtype->ltype = new_luxurytype(itype, price);
break;
case IS_RESOURCE: case IS_RESOURCE:
rtype->flags |= RTF_LIMITED; rtype->flags |= RTF_LIMITED;
itype->flags |= ITF_NOBUILDBESIEGED; itype->flags |= ITF_NOBUILDBESIEGED;
@ -1422,8 +1387,6 @@ static const char * names[] = {
static int static int
item_score(item_t i) item_score(item_t i)
{ {
const luxury_type * ltype;
switch (i) { switch (i) {
case I_IRON: case I_IRON:
case I_WOOD: case I_WOOD:
@ -1438,16 +1401,6 @@ item_score(item_t i)
return 60; return 60;
case I_LAENSWORD: case I_LAENSWORD:
return 400; return 400;
case I_BALM:
case I_SPICES:
case I_JEWELERY:
case I_MYRRH:
case I_OIL:
case I_SILK:
case I_INCENSE:
ltype = resource2luxury(olditemtype[i]->rtype);
if (ltype) return ltype->price / 5;
return 0;
case I_AMULET_OF_HEALING: case I_AMULET_OF_HEALING:
case I_AMULET_OF_TRUE_SEEING: case I_AMULET_OF_TRUE_SEEING:
case I_RING_OF_INVISIBILITY: case I_RING_OF_INVISIBILITY:

View File

@ -264,13 +264,6 @@ enum {
I_WAGON, I_WAGON,
I_CATAPULT, I_CATAPULT,
I_SPEAR, I_SPEAR,
I_BALM,
I_SPICES,
I_JEWELERY,
I_MYRRH,
I_OIL,
I_SILK,
I_INCENSE,
/* alte Artefakte */ /* alte Artefakte */
I_AMULET_OF_HEALING, I_AMULET_OF_HEALING,
I_AMULET_OF_TRUE_SEEING, I_AMULET_OF_TRUE_SEEING,
@ -310,14 +303,6 @@ enum {
R_WAGON, R_WAGON,
R_CATAPULT, R_CATAPULT,
R_SPEAR, R_SPEAR,
/* luxury */
R_BALM,
R_SPICES,
R_JEWELERY,
R_MYRRH,
R_OIL,
R_SILK,
R_INCENSE,
/**/ /**/
R_AMULET_OF_HEALING, R_AMULET_OF_HEALING,
R_AMULET_OF_TRUE_SEEING, R_AMULET_OF_TRUE_SEEING,

View File

@ -706,7 +706,7 @@ gm_addquest(const char * email, const char * name, short radius, unsigned int fl
a_add((attrib**)&a->data.v, make_atgmcreate(resource2item(r_silver))); a_add((attrib**)&a->data.v, make_atgmcreate(resource2item(r_silver)));
for (i=0;i<=I_INCENSE;++i) { for (i=0;i<=I_SPEAR;++i) {
a_add((attrib**)&a->data.v, make_atgmcreate(olditemtype[i])); a_add((attrib**)&a->data.v, make_atgmcreate(olditemtype[i]));
} }
for (i=I_LAENSWORD;i!=I_DRACHENBLUT;++i) { for (i=I_LAENSWORD;i!=I_DRACHENBLUT;++i) {
@ -771,7 +771,7 @@ gm_addfaction(const char * email, plane * p, region * r)
a_add((attrib**)&a->data.v, make_atgmcreate(resource2item(r_silver))); a_add((attrib**)&a->data.v, make_atgmcreate(resource2item(r_silver)));
for (i=0;i<=I_INCENSE;++i) { for (i=0;i<=I_SPEAR;++i) {
a_add((attrib**)&a->data.v, make_atgmcreate(olditemtype[i])); a_add((attrib**)&a->data.v, make_atgmcreate(olditemtype[i]));
} }
for (i=I_LAENSWORD;i!=I_DRACHENBLUT;++i) { for (i=I_LAENSWORD;i!=I_DRACHENBLUT;++i) {

View File

@ -1,6 +1,29 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resources> <resources>
<!-- luxury items -->
<resource name="balm">
<item weight="200"><luxury price="4"/></item>
</resource>
<resource name="spice">
<item weight="200"><luxury price="5"/></item>
</resource>
<resource name="jewel">
<item weight="100"><luxury price="7"/></item>
</resource>
<resource name="myrrh">
<item weight="200"><luxury price="5"/></item>
</resource>
<resource name="oil">
<item weight="300"><luxury price="3"/></item>
</resource>
<resource name="silk">
<item weight="300"><luxury price="6"/></item>
</resource>
<resource name="incense">
<item weight="200"><luxury price="4"/></item>
</resource>
<!-- XE items --> <!-- XE items -->
<resource name="skillpotion"> <resource name="skillpotion">
<!-- gives user one free learning attempt --> <!-- gives user one free learning attempt -->