LUASPL_* ids entfernt, weil jetzt ein System existiert, die spell-id in XML zu setzen um zu alten Daten kompatibel zu bleiben.

This commit is contained in:
Enno Rehling 2006-01-01 19:03:35 +00:00
parent dfebbe3bc0
commit e9a7108423
5 changed files with 34 additions and 90 deletions

View File

@ -167,33 +167,6 @@ get_spellfromtoken(unit *u, const char *name, const struct locale * lang)
spell * spell *
find_spellbyid(spellid_t id) find_spellbyid(spellid_t id)
{ {
struct {
spellid_t id;
const char * name;
magic_t mtype;
} * oldspell, oldspells[] = {
{ LUASPL_CREATE_TACTICCRYSTAL, "create_dreameye", M_TRAUM },
{ LUASPL_CREATE_ANTIMAGICCRYSTAL, "create_antimagic", M_ASTRAL },
{ LUASPL_ARTEFAKT_NIMBLEFINGERRING, "create_roqf", M_BARDE },
{ LUASPL_ARTEFAKT_SACK_OF_CONSERVATION, "create_magicherbbag", M_DRUIDE },
{ LUASPL_FIRESWORD, "create_firesword", M_CHAOS },
{ LUASPL_INVISIBILITY_CERDDOR, "create_roi", M_BARDE },
{ LUASPL_INVISIBILITY_DRAIG, "create_roi", M_CHAOS },
{ LUASPL_INVISIBILITY_GWYRRD, "create_roi", M_DRUIDE },
{ LUASPL_INVISIBILITY_ILLAUN, "create_roi", M_TRAUM },
{ LUASPL_INVISIBILITY_TYBIED, "create_roi", M_ASTRAL },
{ LUASPL_STRENGTH, "create_trollbelt", M_CHAOS },
{ LUASPL_TRUESEEING_CERDDOR, "create_aots", M_BARDE },
{ LUASPL_TRUESEEING_DRAIG, "create_aots", M_CHAOS },
{ LUASPL_TRUESEEING_GWYRRD, "create_aots", M_DRUIDE },
{ LUASPL_TRUESEEING_ILLAUN, "create_aots", M_TRAUM },
{ LUASPL_TRUESEEING_TYBIED, "create_aots", M_ASTRAL },
{ LUASPL_ARTEFAKT_OF_POWER, "create_rop", M_ASTRAL },
{ LUASPL_BAG_OF_HOLDING, "create_bagofholding", M_ASTRAL },
{ LUASPL_INVISIBILITY2_ILLAUN, "create_invisibility_sphere", M_TRAUM },
{ LUASPL_ARTEFAKT_CHASTITYBELT, "create_chastitybelt", M_GRAU },
{ 0, NULL, 0 }
};
spell_list * slist; spell_list * slist;
assert(id>=0); assert(id>=0);
@ -207,9 +180,6 @@ find_spellbyid(spellid_t id)
if (sp->id == id) return sp; if (sp->id == id) return sp;
} }
for (oldspell=oldspells;oldspell->name;++oldspell) {
if (oldspell->id==id) return find_spell(oldspell->mtype, oldspell->name);
}
log_warning(("cannot find spell by id: %u\n", id)); log_warning(("cannot find spell by id: %u\n", id));
return NULL; return NULL;
} }

View File

@ -38,9 +38,7 @@ extern "C" {
/* ------------------------------------------------------------- */ /* ------------------------------------------------------------- */
extern struct attrib_type at_unitdissolve; extern struct attrib_type at_unitdissolve;
#ifdef WDW_PYRAMIDSPELL
extern struct attrib_type at_wdwpyramid; extern struct attrib_type at_wdwpyramid;
#endif
extern struct spell_list * spells; extern struct spell_list * spells;
extern void init_spells(void); extern void init_spells(void);

View File

@ -14,9 +14,6 @@
/* Sprüche. Neue NUR hinten anfügen, oder das Datenfile geht kaputt */ /* Sprüche. Neue NUR hinten anfügen, oder das Datenfile geht kaputt */
enum { enum {
SPL_NOSPELL = 0, SPL_NOSPELL = 0,
LUASPL_ARTEFAKT_OF_POWER,
LUASPL_ARTEFAKT_OF_AURAPOWER,
LUASPL_ARTEFAKT_OF_REGENERATION,
SPL_FIREBALL = 4, SPL_FIREBALL = 4,
SPL_HAGEL, SPL_HAGEL,
SPL_RUSTWEAPON, SPL_RUSTWEAPON,
@ -50,8 +47,7 @@ enum {
SPL_SUMMONSHADOW, SPL_SUMMONSHADOW,
SPL_SUMMONSHADOWLORDS, SPL_SUMMONSHADOWLORDS,
SPL_REELING_ARROWS, SPL_REELING_ARROWS,
SPL_ANTIMAGICZONE, SPL_ANTIMAGICZONE = 37,
LUASPL_CREATE_ANTIMAGICCRYSTAL,
SPL_KAELTESCHUTZ = 39, SPL_KAELTESCHUTZ = 39,
SPL_STEALAURA, SPL_STEALAURA,
SPL_SUMMONUNDEAD, SPL_SUMMONUNDEAD,
@ -60,8 +56,7 @@ enum {
SPL_STRONG_WALL, SPL_STRONG_WALL,
SPL_HOMESTONE, SPL_HOMESTONE,
SPL_DROUGHT, SPL_DROUGHT,
SPL_FOREST_FIRE, SPL_FOREST_FIRE = 47,
LUASPL_STRENGTH,
SPL_SUMMONENT = 49, SPL_SUMMONENT = 49,
SPL_DISTURBINGDREAMS, SPL_DISTURBINGDREAMS,
SPL_DENYATTACK, SPL_DENYATTACK,
@ -75,8 +70,7 @@ enum {
SPL_WINDSHIELD, SPL_WINDSHIELD,
SPL_RAISEPEASANTS, SPL_RAISEPEASANTS,
SPL_DEPRESSION, SPL_DEPRESSION,
SPL_HEADACHE, SPL_HEADACHE = 62,
LUASPL_ARTEFAKT_NIMBLEFINGERRING,
SPL_ENTERASTRAL = 64, SPL_ENTERASTRAL = 64,
SPL_LEAVEASTRAL, SPL_LEAVEASTRAL,
SPL_SHOWASTRAL, SPL_SHOWASTRAL,
@ -136,19 +130,7 @@ enum {
SPL_DRAIG_FAMILIAR, SPL_DRAIG_FAMILIAR,
SPL_CERDDOR_FAMILIAR, SPL_CERDDOR_FAMILIAR,
SPL_TYBIED_FAMILIAR, SPL_TYBIED_FAMILIAR,
SPL_SONG_OF_ENSLAVE, SPL_SONG_OF_ENSLAVE = 123,
LUASPL_TRUESEEING_GWYRRD,
LUASPL_TRUESEEING_DRAIG,
LUASPL_TRUESEEING_ILLAUN,
LUASPL_TRUESEEING_CERDDOR,
LUASPL_TRUESEEING_TYBIED,
LUASPL_INVISIBILITY_GWYRRD,
LUASPL_INVISIBILITY_DRAIG,
LUASPL_INVISIBILITY_ILLAUN,
LUASPL_INVISIBILITY_CERDDOR,
LUASPL_INVISIBILITY_TYBIED,
LUASPL_ARTEFAKT_CHASTITYBELT,
LUASPL_ARTEFAKT_RUNESWORD,
SPL_FUMBLECURSE = 136, SPL_FUMBLECURSE = 136,
SPL_ICASTLE, SPL_ICASTLE,
SPL_GWYRRD_DESTROY_MAGIC, SPL_GWYRRD_DESTROY_MAGIC,
@ -160,15 +142,12 @@ enum {
SPL_GWYRRD_FUMBLESHIELD, SPL_GWYRRD_FUMBLESHIELD,
SPL_CERRDOR_FUMBLESHIELD, SPL_CERRDOR_FUMBLESHIELD,
SPL_TYBIED_FUMBLESHIELD, SPL_TYBIED_FUMBLESHIELD,
SPL_SHADOWKNIGHTS, SPL_SHADOWKNIGHTS = 147,
LUASPL_FIRESWORD,
LUASPL_CREATE_TACTICCRYSTAL,
SPL_ITEMCLOAK = 150, SPL_ITEMCLOAK = 150,
SPL_FIREWALL, SPL_FIREWALL,
SPL_WISPS, SPL_WISPS,
SPL_SPARKLE_CHAOS, SPL_SPARKLE_CHAOS,
SPL_SPARKLE_DREAM, SPL_SPARKLE_DREAM = 154,
LUASPL_BAG_OF_HOLDING,
SPL_PULLASTRAL = 156, SPL_PULLASTRAL = 156,
SPL_FETCHASTRAL, SPL_FETCHASTRAL,
SPL_ILLAUN_EARN_SILVER, SPL_ILLAUN_EARN_SILVER,
@ -177,8 +156,7 @@ enum {
SPL_TYBIED_EARN_SILVER, SPL_TYBIED_EARN_SILVER,
SPL_CERDDOR_EARN_SILVER, SPL_CERDDOR_EARN_SILVER,
SPL_SHOCKWAVE, SPL_SHOCKWAVE,
SPL_UNDEADHERO, SPL_UNDEADHERO = 164,
LUASPL_ARTEFAKT_SACK_OF_CONSERVATION,
SPL_BECOMEWYRM = 166, SPL_BECOMEWYRM = 166,
SPL_ETERNIZEWALL, SPL_ETERNIZEWALL,
SPL_PUTTOREST, SPL_PUTTOREST,
@ -187,11 +165,10 @@ enum {
SPL_BLOODSACRIFICE, SPL_BLOODSACRIFICE,
SPL_MALLORN, SPL_MALLORN,
SPL_CLONECOPY, SPL_CLONECOPY,
SPL_DRAINODEM, /* 174? */ SPL_DRAINODEM,
SPL_AURA_OF_FEAR, /* 175? */ SPL_AURA_OF_FEAR,
SPL_SHADOWCALL, /* 176? */ SPL_SHADOWCALL,
SPL_MALLORNTREEGROW, SPL_MALLORNTREEGROW = 177,
LUASPL_INVISIBILITY2_ILLAUN,
SPL_BIGRECRUIT = 179, SPL_BIGRECRUIT = 179,
SPL_IMMOLATION, SPL_IMMOLATION,
SPL_FIREODEM, /* 181 */ SPL_FIREODEM, /* 181 */

View File

@ -54,5 +54,4 @@
#undef ARENA_MODULE #undef ARENA_MODULE
#undef WORMHOLE_MODULE #undef WORMHOLE_MODULE
#undef XECMD_MODULE #undef XECMD_MODULE
#define WDW_PYRAMIDSPELL
#define WDW_PYRAMID #define WDW_PYRAMID

View File

@ -1,21 +1,21 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<spells> <spells>
<!-- draig spells --> <!-- draig spells -->
<spell name="create_roi" type="draig" ship="true" rank="5" level="6"> <spell name="create_roi" type="draig" ship="true" rank="5" level="6" index="130">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="50" cost="fixed"/> <resource name="aura" amount="50" cost="fixed"/>
<resource name="money" amount="3000" cost="fixed"/> <resource name="money" amount="3000" cost="fixed"/>
<resource name="permaura" amount="1" cost="fixed"/> <resource name="permaura" amount="1" cost="fixed"/>
</spell> </spell>
<spell name="create_aots" type="draig" ship="true" rank="5" level="6"> <spell name="create_aots" type="draig" ship="true" rank="5" level="6" index="125">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="50" cost="fixed"/> <resource name="aura" amount="50" cost="fixed"/>
<resource name="money" amount="3000" cost="fixed"/> <resource name="money" amount="3000" cost="fixed"/>
<resource name="permaura" amount="1" cost="fixed"/> <resource name="permaura" amount="1" cost="fixed"/>
</spell> </spell>
<spell name="create_firesword" type="draig" ship="true" rank="5" level="12"> <spell name="create_firesword" type="draig" ship="true" rank="5" level="12" index="148">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="100" cost="fixed"/> <resource name="aura" amount="100" cost="fixed"/>
<resource name="p10" amount="1" cost="fixed"/> <resource name="p10" amount="1" cost="fixed"/>
@ -23,28 +23,28 @@
<resource name="permaura" amount="1" cost="fixed"/> <resource name="permaura" amount="1" cost="fixed"/>
</spell> </spell>
<spell name="create_trollbelt" type="draig" ship="true" rank="5" level="9"> <spell name="create_trollbelt" type="draig" ship="true" rank="5" level="9" index="48">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="20" cost="fixed"/> <resource name="aura" amount="20" cost="fixed"/>
<resource name="permaura" amount="1" cost="fixed"/> <resource name="permaura" amount="1" cost="fixed"/>
</spell> </spell>
<!-- gwyrrd spells --> <!-- gwyrrd spells -->
<spell name="create_roi" type="gwyrrd" ship="true" rank="5" level="6"> <spell name="create_roi" type="gwyrrd" ship="true" rank="5" level="6" index="129">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="50" cost="fixed"/> <resource name="aura" amount="50" cost="fixed"/>
<resource name="money" amount="3000" cost="fixed"/> <resource name="money" amount="3000" cost="fixed"/>
<resource name="permaura" amount="1" cost="fixed"/> <resource name="permaura" amount="1" cost="fixed"/>
</spell> </spell>
<spell name="create_aots" type="gwyrrd" ship="true" rank="5" level="6"> <spell name="create_aots" type="gwyrrd" ship="true" rank="5" level="6" index="124">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="50" cost="fixed"/> <resource name="aura" amount="50" cost="fixed"/>
<resource name="money" amount="3000" cost="fixed"/> <resource name="money" amount="3000" cost="fixed"/>
<resource name="permaura" amount="1" cost="fixed"/> <resource name="permaura" amount="1" cost="fixed"/>
</spell> </spell>
<spell name="create_magicherbbag" type="gwyrrd" ship="true" rank="5" level="5"> <spell name="create_magicherbbag" type="gwyrrd" ship="true" rank="5" level="5" index="165">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="30" cost="fixed"/> <resource name="aura" amount="30" cost="fixed"/>
<resource name="permaura" amount="1" cost="fixed"/> <resource name="permaura" amount="1" cost="fixed"/>
@ -52,27 +52,27 @@
</spell> </spell>
<!-- illaun spells --> <!-- illaun spells -->
<spell name="create_roi" type="illaun" ship="true" rank="5" level="6"> <spell name="create_roi" type="illaun" ship="true" rank="5" level="6" index="131">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="50" cost="fixed"/> <resource name="aura" amount="50" cost="fixed"/>
<resource name="money" amount="3000" cost="fixed"/> <resource name="money" amount="3000" cost="fixed"/>
<resource name="permaura" amount="1" cost="fixed"/> <resource name="permaura" amount="1" cost="fixed"/>
</spell> </spell>
<spell name="create_aots" type="illaun" ship="true" rank="5" level="6"> <spell name="create_aots" type="illaun" ship="true" rank="5" level="6" index="126">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="50" cost="fixed"/> <resource name="aura" amount="50" cost="fixed"/>
<resource name="money" amount="3000" cost="fixed"/> <resource name="money" amount="3000" cost="fixed"/>
<resource name="permaura" amount="1" cost="fixed"/> <resource name="permaura" amount="1" cost="fixed"/>
</spell> </spell>
<spell name="create_dreameye" type="illaun" ship="true" rank="5" level="14"> <spell name="create_dreameye" type="illaun" ship="true" rank="5" level="14" index="149">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="dragonhead" amount="1" cost="fixed"/> <resource name="dragonhead" amount="1" cost="fixed"/>
<resource name="permaura" amount="5" cost="fixed"/> <resource name="permaura" amount="5" cost="fixed"/>
</spell> </spell>
<spell name="create_invisibility_sphere" type="illaun" ship="true" rank="5" level="13"> <spell name="create_invisibility_sphere" type="illaun" ship="true" rank="5" level="13" index="178">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="150" cost="fixed"/> <resource name="aura" amount="150" cost="fixed"/>
<resource name="money" amount="30000" cost="fixed"/> <resource name="money" amount="30000" cost="fixed"/>
@ -80,21 +80,21 @@
</spell> </spell>
<!-- cerddor spells --> <!-- cerddor spells -->
<spell name="create_roi" type="cerddor" ship="true" rank="5" level="6"> <spell name="create_roi" type="cerddor" ship="true" rank="5" level="6" index="132">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="50" cost="fixed"/> <resource name="aura" amount="50" cost="fixed"/>
<resource name="money" amount="3000" cost="fixed"/> <resource name="money" amount="3000" cost="fixed"/>
<resource name="permaura" amount="1" cost="fixed"/> <resource name="permaura" amount="1" cost="fixed"/>
</spell> </spell>
<spell name="create_aots" type="cerddor" ship="true" rank="5" level="6"> <spell name="create_aots" type="cerddor" ship="true" rank="5" level="6" index="127">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="50" cost="fixed"/> <resource name="aura" amount="50" cost="fixed"/>
<resource name="money" amount="3000" cost="fixed"/> <resource name="money" amount="3000" cost="fixed"/>
<resource name="permaura" amount="1" cost="fixed"/> <resource name="permaura" amount="1" cost="fixed"/>
</spell> </spell>
<spell name="create_roqf" type="cerddor" ship="true" rank="5" level="11"> <spell name="create_roqf" type="cerddor" ship="true" rank="5" level="11" index="63">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="20" cost="fixed"/> <resource name="aura" amount="20" cost="fixed"/>
<resource name="money" amount="1000" cost="fixed"/> <resource name="money" amount="1000" cost="fixed"/>
@ -102,34 +102,34 @@
</spell> </spell>
<!-- tybied spells --> <!-- tybied spells -->
<spell name="create_roi" type="tybied" ship="true" rank="5" level="6"> <spell name="create_roi" type="tybied" ship="true" rank="5" level="6" index="133">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="50" cost="fixed"/> <resource name="aura" amount="50" cost="fixed"/>
<resource name="money" amount="3000" cost="fixed"/> <resource name="money" amount="3000" cost="fixed"/>
<resource name="permaura" amount="1" cost="fixed"/> <resource name="permaura" amount="1" cost="fixed"/>
</spell> </spell>
<spell name="create_aots" type="tybied" ship="true" rank="5" level="6"> <spell name="create_aots" type="tybied" ship="true" rank="5" level="6" index="128">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="50" cost="fixed"/> <resource name="aura" amount="50" cost="fixed"/>
<resource name="money" amount="3000" cost="fixed"/> <resource name="money" amount="3000" cost="fixed"/>
<resource name="permaura" amount="1" cost="fixed"/> <resource name="permaura" amount="1" cost="fixed"/>
</spell> </spell>
<spell name="create_antimagic" type="tybied" ship="true" rank="5" level="7"> <spell name="create_antimagic" type="tybied" ship="true" rank="5" level="7" index="38">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="50" cost="fixed"/> <resource name="aura" amount="50" cost="fixed"/>
<resource name="money" amount="3000" cost="fixed"/> <resource name="money" amount="3000" cost="fixed"/>
</spell> </spell>
<spell name="create_rop" type="tybied" ship="true" rank="5" level="9"> <spell name="create_rop" type="tybied" ship="true" rank="5" level="9" index="1">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="100" cost="fixed"/> <resource name="aura" amount="100" cost="fixed"/>
<resource name="permaura" amount="1" cost="fixed"/> <resource name="permaura" amount="1" cost="fixed"/>
<resource name="money" amount="4000" cost="fixed"/> <resource name="money" amount="4000" cost="fixed"/>
</spell> </spell>
<spell name="create_bagofholding" type="tybied" ship="true" rank="5" level="10"> <spell name="create_bagofholding" type="tybied" ship="true" rank="5" level="10" index="155">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="30" cost="fixed"/> <resource name="aura" amount="30" cost="fixed"/>
<resource name="permaura" amount="1" cost="fixed"/> <resource name="permaura" amount="1" cost="fixed"/>
@ -137,7 +137,7 @@
</spell> </spell>
<!-- gray magic --> <!-- gray magic -->
<spell name="create_runesword" type="gray" ship="true" rank="5" level="6"> <spell name="create_runesword" type="gray" ship="true" rank="5" level="6" index="135">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="100" cost="fixed"/> <resource name="aura" amount="100" cost="fixed"/>
<resource name="permaura" amount="1" cost="fixed"/> <resource name="permaura" amount="1" cost="fixed"/>
@ -145,20 +145,20 @@
<resource name="laensword" amount="1" cost="fixed"/> <resource name="laensword" amount="1" cost="fixed"/>
</spell> </spell>
<spell name="create_chastitybelt" type="gray" ship="true" rank="5" level="7"> <spell name="create_chastitybelt" type="gray" ship="true" rank="5" level="7" index="134">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="50" cost="fixed"/> <resource name="aura" amount="50" cost="fixed"/>
<resource name="permaura" amount="1" cost="fixed"/> <resource name="permaura" amount="1" cost="fixed"/>
<resource name="money" amount="3000" cost="fixed"/> <resource name="money" amount="3000" cost="fixed"/>
</spell> </spell>
<spell name="create_focus" type="gray" ship="true" rank="5" level="9"> <spell name="create_focus" type="gray" ship="true" rank="5" level="9" index="2">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="100" cost="fixed"/> <resource name="aura" amount="100" cost="fixed"/>
<resource name="permaura" amount="1" cost="fixed"/> <resource name="permaura" amount="1" cost="fixed"/>
</spell> </spell>
<spell name="create_ror" type="gray" ship="true" rank="5" level="9"> <spell name="create_ror" type="gray" ship="true" rank="5" level="9" index="3">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="100" cost="fixed"/> <resource name="aura" amount="100" cost="fixed"/>
<resource name="permaura" amount="1" cost="fixed"/> <resource name="permaura" amount="1" cost="fixed"/>