bis wir autodrop haben, geben spielermonster gegenstände her

mehr curse umstellung
This commit is contained in:
Katja Zedel 2002-04-28 07:53:18 +00:00
parent aa619ea977
commit c220337647
5 changed files with 30 additions and 89 deletions

View File

@ -224,17 +224,6 @@ is_curseskill(curse_t id)
return false;
}
boolean
is_cursesecondid(curse_t id)
{
const curse_type *ct = find_cursetype(id);
if (ct->typ == CURSETYP_SECONDID)
return true;
return false;
}
/* ------------------------------------------------------------- */
/* get_curse identifiziert eine Verzauberung über die ID und gibt
* einen pointer auf die struct zurück.
@ -266,16 +255,17 @@ cmp_oldcurse(const attrib * a, const void * data)
if (ct->cspellid != ti->id) return false;
/* TODO: prüfen auf namen */
if (is_curseskill(ti->id)){
curse_skill * cc = (curse_skill*)c->data;
if (cc->skill == (skill_t) ti->id2) return true;
} else if (is_cursesecondid(ti->id)) {
curse_secondid * cc = (curse_secondid*)c->data;
if (cc->secondid == ti->id2) return true;
} else {
if (cc->skill == (skill_t) ti->id2){
return true;
}
} else {
return false;
}
}
return true;
}
twoids *
@ -547,13 +537,6 @@ set_curse(unit *mage, attrib **ap, curse_t id, int id2, int vigour,
c->data = cc;
break;
}
case CURSETYP_SECONDID:
{
curse_secondid *cc = calloc(1, sizeof(curse_secondid));
cc->secondid = id2;
c->data = cc;
break;
}
}
return c;
@ -1527,7 +1510,7 @@ curse_type cursedaten[MAXCURSE] =
(cdesc_fun)cinfo_magicstreet
},
{ C_RESIST_MAGIC,
"ct_magicresistance",
"ct_magicrunes",
CURSETYP_NORM, 0, M_SUMEFFECT,
"Dieses Zauber verstärkt die natürliche Widerstandskraft gegen eine "
"Verzauberung.",
@ -1658,58 +1641,58 @@ curse_type cursedaten[MAXCURSE] =
/* struct's vom typ curse_unit: */
{ C_SPEED,
"Beschleunigen II",
"ct_speed",
CURSETYP_UNIT, CURSE_SPREADNEVER, M_MEN,
"Diese Einheit bewegt sich doppelt so schnell.",
(cdesc_fun)cinfo_speed
},
{ C_ORC,
"Orkfieber",
"ct_orcish",
CURSETYP_UNIT, CURSE_SPREADMODULO, M_MEN,
"Dieser Zauber scheint die Einheit zu 'orkisieren'. Wie bei Orks "
"ist eine deutliche Neigung zur Fortpflanzung zu beobachten.",
(cdesc_fun)cinfo_orc
},
{ C_MBOOST,
"",
"ct_magicboost",
CURSETYP_UNIT, CURSE_SPREADMODULO, M_MEN,
"",
NULL
},
{ C_KAELTESCHUTZ,
"Winterfell",
"ct_insectfur",
CURSETYP_UNIT, CURSE_SPREADMODULO, ( M_MEN | M_DURATION ),
"Dieser Zauber schützt vor den Auswirkungen der Kälte.",
(cdesc_fun)cinfo_kaelteschutz
},
{ C_STRENGTH, /* */
"Trollstärke",
"ct_strength",
CURSETYP_UNIT, CURSE_SPREADMODULO, M_MEN,
"Dieser Zauber vermehrt die Stärke der verzauberten Personen um ein "
"vielfaches.",
(cdesc_fun)cinfo_strength
},
{ C_ALLSKILLS, /* Alp */
"",
"ct_worse",
CURSETYP_UNIT, CURSE_SPREADMODULO, M_MEN,
"",
(cdesc_fun)cinfo_allskills
},
{ C_MAGICRESISTANCE, /* */
"Magieschutz",
"ct_magicresistance",
CURSETYP_UNIT, CURSE_SPREADMODULO, M_MEN,
"Dieser Zauber verstärkt die natürliche Widerstandskraft gegen eine "
"Verzauberung.",
NULL
},
{ C_ITEMCLOAK, /* */
"Schleieraura",
"ct_itemcloak",
CURSETYP_UNIT, CURSE_SPREADNEVER, M_DURATION,
"Dieser Zauber macht die Ausrüstung unsichtbar.",
(cdesc_fun)cinfo_itemcloak
},
{ C_SPARKLE, /* */
"Leichte Verzauberung",
"ct_sparkle",
CURSETYP_UNIT, CURSE_SPREADMODULO, ( M_MEN | M_DURATION ),
"Dieser Zauber ist einer der ersten, den junge Magier in der Schule lernen.",
(cdesc_fun)cinfo_sparkle
@ -1735,30 +1718,11 @@ curse_type cursedaten[MAXCURSE] =
/* struct's vom typ curse_skill: */
{ C_SKILL, /* */
"",
"ct_skillmod",
CURSETYP_SKILL, CURSE_SPREADMODULO, M_MEN,
"",
(cdesc_fun)cinfo_skill
},
{ C_FREE_30, /* */
"",
CURSETYP_UNIT, 0, (NO_MERGE),
"",
NULL
},
{ C_FREE_31, /* */
"",
CURSETYP_UNIT, 0, (NO_MERGE),
"",
NULL
},
{ C_FREE_32, /* */
"",
CURSETYP_UNIT, 0, (NO_MERGE),
"",
NULL
},
/* struct's vom typ curse_secondid: */
};
void *

View File

@ -140,10 +140,7 @@ enum {
C_FREE_24,
/* struct's vom untertyp curse_skill: */
C_SKILL,
C_FREE_30,
C_FREE_31,
C_FREE_32,
/* struct's vom untertyp curse_secondid: */
C_DUMMY,
MAXCURSE
};
@ -169,7 +166,6 @@ enum {
CURSETYP_NORM,
CURSETYP_UNIT,
CURSETYP_SKILL,
CURSETYP_SECONDID,
MAXCURSETYP
};
@ -224,12 +220,6 @@ typedef struct curse_skill {
skill_t skill; /* Talent auf das der Spruch wirkt (id2) */
} curse_skill;
/* für alle fälle, wo man unterscheidbare Curses gleichen Typs braucht */
typedef struct curse_secondid {
int secondid;
int i;
}curse_secondid;
typedef int (*cdesc_fun)(const void*, int, curse*, int);
/* Parameter: Objekt, auf dem curse liegt, Typ des Objekts, curse,
* Besitzerpartei?1:0 */

View File

@ -1382,12 +1382,6 @@ curse_write(const attrib * a,FILE * f) {
fprintf(f, "%d %d ", (int)cc->skill, cc->cursedmen);
break;
}
case CURSETYP_SECONDID:
{
curse_secondid * cc = (curse_secondid*)c->data;
fprintf(f, "%d %d ", (int)cc->secondid, cc->i);
break;
}
case CURSETYP_NORM:
default:
break;
@ -1439,13 +1433,6 @@ curse_read(attrib * a, FILE * f) {
cc->skill = (skill_t)skill;
break;
}
case CURSETYP_SECONDID:
{
curse_secondid * cc = calloc(1, sizeof(curse_secondid));
fscanf(f, "%d %d ", &cc->secondid, &cc->i);
break;
}
case CURSETYP_NORM:
default:
break;

View File

@ -2862,8 +2862,8 @@ wall_vigour(curse* c, int delta)
}
const curse_type ct_firewall = {
C_DUMMY, "Feuerwand",
CURSETYP_NORM, 0, (M_DURATION | M_VIGOUR | NO_MERGE),
"Feuerwand",
"Eine Feuerwand blockiert die Ein- und Ausreise",
NULL, /* curseinfo */
wall_vigour /* change_vigour */

View File

@ -58,7 +58,7 @@
<attack type="2" damage="5d600"></attack>
<attack type="1" damage="1d4"></attack>
</race>
<race name="ghast" magres="0.600000" maxaura="1.000000" regaura="1.000000" recruitcost="5" maintenance="0" weight="1000" capacity="540" speed="1.000000" hp="60" ac="2" damage="1d7" unarmedattack="6" unarmeddefense="6" attackmodifier="6" defensemodifier="6" scarepeasants walk nolearn noteach absorbpeasants noheal undead canguard equipment>
<race name="ghast" magres="0.600000" maxaura="1.000000" regaura="1.000000" recruitcost="5" maintenance="0" weight="1000" capacity="540" speed="1.000000" hp="60" ac="2" damage="1d7" unarmedattack="6" unarmeddefense="6" attackmodifier="6" defensemodifier="6" scarepeasants walk nolearn noteach absorbpeasants noheal undead canguard equipment giveitem>
<ai splitsize="10000" attackrandom moverandom></ai>
<function name="name" value="nameghoul"></function>
<skill name="sk_crossbow" modifier="1"></skill>
@ -76,7 +76,7 @@
<attack type="2" damage="1d30"></attack>
<attack type="2" damage="1d30"></attack>
</race>
<race name="ghoul" magres="0.300000" maxaura="1.000000" regaura="1.000000" recruitcost="5" maintenance="0" weight="1000" capacity="540" speed="1.000000" hp="30" ac="1" damage="1d7" unarmedattack="3" unarmeddefense="3" attackmodifier="3" defensemodifier="3" scarepeasants walk nolearn noteach absorbpeasants noheal undead canguard equipment>
<race name="ghoul" magres="0.300000" maxaura="1.000000" regaura="1.000000" recruitcost="5" maintenance="0" weight="1000" capacity="540" speed="1.000000" hp="30" ac="1" damage="1d7" unarmedattack="3" unarmeddefense="3" attackmodifier="3" defensemodifier="3" scarepeasants walk nolearn noteach absorbpeasants noheal undead canguard equipment giveitem>
<ai splitsize="10000" attackrandom moverandom></ai>
<function name="name" value="nameghoul"></function>
<function name="age" value="ageghoul"></function>
@ -94,7 +94,7 @@
<attack type="3" damage="1d2"></attack>
<attack type="2" damage="1d30"></attack>
</race>
<race name="juju-zombie" magres="0.500000" maxaura="1.000000" regaura="1.000000" recruitcost="8" maintenance="0" weight="1000" capacity="540" speed="1.000000" hp="80" ac="2" damage="1d7" unarmedattack="6" unarmeddefense="6" attackmodifier="8" defensemodifier="8" scarepeasants walk nolearn noteach absorbpeasants noheal undead canguard equipment resistbash resistcut resistpierce>
<race name="juju-zombie" magres="0.500000" maxaura="1.000000" regaura="1.000000" recruitcost="8" maintenance="0" weight="1000" capacity="540" speed="1.000000" hp="80" ac="2" damage="1d7" unarmedattack="6" unarmeddefense="6" attackmodifier="8" defensemodifier="8" scarepeasants walk nolearn noteach absorbpeasants noheal undead canguard equipment resistbash resistcut resistpierce giveitem>
<ai splitsize="10000" attackrandom moverandom></ai>
<function name="name" value="namezombie"></function>
<skill name="sk_crossbow" modifier="1"></skill>
@ -110,7 +110,7 @@
<attack type="3" damage="1d1"></attack>
<attack type="3" damage="1d1"></attack>
</race>
<race name="zombie" magres="0.200000" maxaura="1.000000" regaura="1.000000" recruitcost="4" maintenance="0" weight="1000" capacity="540" speed="1.000000" hp="40" ac="1" damage="1d7" unarmedattack="2" unarmeddefense="2" attackmodifier="5" defensemodifier="5" scarepeasants walk nolearn noteach noheal undead canguard equipment resistcut resistpierce>
<race name="zombie" magres="0.200000" maxaura="1.000000" regaura="1.000000" recruitcost="4" maintenance="0" weight="1000" capacity="540" speed="1.000000" hp="40" ac="1" damage="1d7" unarmedattack="2" unarmeddefense="2" attackmodifier="5" defensemodifier="5" scarepeasants walk nolearn noteach noheal undead canguard equipment resistcut resistpierce giveitem>
<ai splitsize="10000" killpeasants attackrandom moverandom></ai>
<function name="name" value="namezombie"></function>
<function name="age" value="agezombie"></function>
@ -125,7 +125,7 @@
<skill name="sk_unarmed" modifier="1"></skill>
<attack type="1" damage="1d7"></attack>
</race>
<race name="skeleton lord" magres="0.300000" maxaura="1.000000" regaura="1.000000" recruitcost="2" maintenance="0" weight="1000" capacity="540" speed="1.000000" hp="60" ac="4" damage="1d7" unarmedattack="6" unarmeddefense="6" attackmodifier="8" defensemodifier="8" scarepeasants walk nolearn noteach absorbpeasants noheal undead canguard equipment resistcut resistpierce>
<race name="skeleton lord" magres="0.300000" maxaura="1.000000" regaura="1.000000" recruitcost="2" maintenance="0" weight="1000" capacity="540" speed="1.000000" hp="60" ac="4" damage="1d7" unarmedattack="6" unarmeddefense="6" attackmodifier="8" defensemodifier="8" scarepeasants walk nolearn noteach absorbpeasants noheal undead canguard equipment resistcut resistpierce giveitem>
<ai splitsize="10000" attackrandom moverandom></ai>
<function name="name" value="nameskeleton"></function>
<skill name="sk_crossbow" modifier="1"></skill>
@ -140,7 +140,7 @@
<attack type="1" damage="1d7"></attack>
<attack type="1" damage="1d7"></attack>
</race>
<race name="skeleton" magres="0.100000" maxaura="1.000000" regaura="1.000000" recruitcost="0" maintenance="0" weight="500" capacity="540" speed="1.000000" hp="20" ac="1" damage="1d7" unarmedattack="1" unarmeddefense="1" attackmodifier="6" defensemodifier="6" scarepeasants walk nolearn noteach noheal undead canguard equipment resistcut resistpierce>
<race name="skeleton" magres="0.100000" maxaura="1.000000" regaura="1.000000" recruitcost="0" maintenance="0" weight="500" capacity="540" speed="1.000000" hp="20" ac="1" damage="1d7" unarmedattack="1" unarmeddefense="1" attackmodifier="6" defensemodifier="6" scarepeasants walk nolearn noteach noheal undead canguard equipment resistcut resistpierce giveitem>
<ai splitsize="10000" killpeasants attackrandom moverandom></ai>
<function name="name" value="nameskeleton"></function>
<function name="age" value="ageskeleton"></function>
@ -809,11 +809,11 @@
<ai splitsize="1"></ai>
<attack type="1" damage="1d4"></attack>
</race>
<race name="mountainguard" magres="0.500000" maxaura="1.000000" regaura="0.500000" recruitcost="50000" maintenance="0" weight="10000" capacity="2000" speed="0.000000" hp="1000" ac="12" damage="2d40" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="8" cannotmove nolearn noteach noweapons canguard>
<race name="mountainguard" magres="0.500000" maxaura="1.000000" regaura="0.500000" recruitcost="50000" maintenance="0" weight="10000" capacity="2000" speed="0.000000" hp="1000" ac="12" damage="2d40" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="8" cannotmove nolearn noteach noweapons canguard giveitem>
<ai splitsize="1"></ai>
<attack type="4" damage="2d40"></attack>
</race>
<race name="shadowmaster" magres="0.750000" maxaura="1.000000" regaura="2.000000" recruitcost="50000" maintenance="0" weight="500" capacity="200" speed="1.000000" hp="150" ac="4" damage="2d5" unarmedattack="0" unarmeddefense="0" attackmodifier="11" defensemodifier="13" scarepeasants walk noteach desert>
<race name="shadowmaster" magres="0.750000" maxaura="1.000000" regaura="2.000000" recruitcost="50000" maintenance="0" weight="500" capacity="200" speed="1.000000" hp="150" ac="4" damage="2d5" unarmedattack="0" unarmeddefense="0" attackmodifier="11" defensemodifier="13" scarepeasants walk noteach desert giveitem>
<ai splitsize="50" killpeasants attackrandom moverandom learn></ai>
<function name="name" value="nameshadow"></function>
<attack type="4" damage="2d4"></attack>
@ -821,7 +821,7 @@
<attack type="3" damage="1d2"></attack>
</race>
<race name="shadowdemon" magres="0.750000" maxaura="1.000000" regaura="1.000000" recruitcost="5000" maintenance="0" weight="500" capacity="200" speed="1.000000" hp="50" ac="3" damage="2d4" unarmedattack="0" unarmeddefense="0" attackmodifier="8" defensemodifier="11" scarepeasants walk noteach desert recruitethereal>
<ai splitsize="1000" killpeasants attackrandom moverandom learn></ai>
<ai splitsize="1000" killpeasants attackrandom moverandom learn giveitem></ai>
<function name="name" value="nameshadow"></function>
<attack type="4" damage="2d3"></attack>
<attack type="3" damage="1d1"></attack>