forked from github/server
Neu: Zaubersprüche können in LUA programmiert werden, und per XML-Datei (siehe spells.xml) in ein Spiel integriert werden.
Ich habe angefangen, die Item-erzeugenden Zauber aus dem Code in Skripte zu verlagern.
This commit is contained in:
parent
fd364ba0f9
commit
6426004640
|
@ -51,7 +51,7 @@ typedef short luxury_t;
|
||||||
typedef short weapon_t;
|
typedef short weapon_t;
|
||||||
typedef short item_t;
|
typedef short item_t;
|
||||||
typedef short resource_t;
|
typedef short resource_t;
|
||||||
typedef short spellid_t;
|
typedef unsigned int spellid_t;
|
||||||
|
|
||||||
struct plane;
|
struct plane;
|
||||||
struct order;
|
struct order;
|
||||||
|
|
|
@ -355,7 +355,7 @@ already_seen(const faction * f, spellid_t id)
|
||||||
attrib *a;
|
attrib *a;
|
||||||
|
|
||||||
for (a = a_find(f->attribs, &at_seenspell); a; a=a->nexttype)
|
for (a = a_find(f->attribs, &at_seenspell); a; a=a->nexttype)
|
||||||
if (a->data.i==id) return true;
|
if (a->data.i==(int)id) return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2004,19 +2004,6 @@ creation_message(unit * mage, const item_type * itype)
|
||||||
"mage number item", mage, 1, itype->rtype));
|
"mage number item", mage, 1, itype->rtype));
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
|
||||||
sp_create_sack_of_conservation(castorder *co)
|
|
||||||
{
|
|
||||||
unit *mage = (unit *)co->magician;
|
|
||||||
int cast_level = co->level;
|
|
||||||
|
|
||||||
change_item(mage,I_SACK_OF_CONSERVATION,1);
|
|
||||||
|
|
||||||
creation_message(mage, olditemtype[I_SACK_OF_CONSERVATION]);
|
|
||||||
|
|
||||||
return cast_level;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ------------------------------------------------------------- */
|
/* ------------------------------------------------------------- */
|
||||||
/* Name: Heiliger Boden
|
/* Name: Heiliger Boden
|
||||||
* Stufe: 9
|
* Stufe: 9
|
||||||
|
@ -3388,49 +3375,6 @@ patzer_deathcloud(castorder *co)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ------------------------------------------------------------- */
|
|
||||||
/* Name: Trollgürtel
|
|
||||||
* Stufe: 9
|
|
||||||
* Gebiet: Draig
|
|
||||||
* Kategorie: Artefakt
|
|
||||||
* Wirkung:
|
|
||||||
* Artefakt. *50 GE, +2 Schaden, +1 Rüstung
|
|
||||||
*/
|
|
||||||
|
|
||||||
static int
|
|
||||||
sp_create_trollbelt(castorder *co)
|
|
||||||
{
|
|
||||||
const item_type * itype = it_find("trollbelt");
|
|
||||||
unit *mage = (unit *)co->magician;
|
|
||||||
int cast_level = co->level;
|
|
||||||
|
|
||||||
i_change(&mage->items, itype, 1);
|
|
||||||
|
|
||||||
creation_message(mage, itype);
|
|
||||||
return cast_level;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ------------------------------------------------------------- */
|
|
||||||
/* Name: Erschaffe ein Flammenschwert
|
|
||||||
* Stufe: 12
|
|
||||||
* Gebiet: Draig
|
|
||||||
* Kategorie: Artefakt
|
|
||||||
* Wirkung:
|
|
||||||
* Artefakt.
|
|
||||||
* 3d6+10 Schaden, +1 auf AT, +1 auf DF, schleudert Feuerball
|
|
||||||
*/
|
|
||||||
|
|
||||||
static int
|
|
||||||
sp_create_firesword(castorder *co)
|
|
||||||
{
|
|
||||||
unit *mage = (unit *)co->magician;
|
|
||||||
int cast_level = co->level;
|
|
||||||
|
|
||||||
change_item(mage,I_FIRESWORD,1);
|
|
||||||
creation_message(mage, olditemtype[I_FIRESWORD]);
|
|
||||||
return cast_level;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ------------------------------------------------------------- */
|
/* ------------------------------------------------------------- */
|
||||||
/* Name: Pest
|
/* Name: Pest
|
||||||
* Stufe: 7
|
* Stufe: 7
|
||||||
|
@ -4736,28 +4680,6 @@ sp_seduce(castorder *co)
|
||||||
return cast_level;
|
return cast_level;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ------------------------------------------------------------- */
|
|
||||||
/* Name: Miriams flinke Finger
|
|
||||||
* Stufe: 11
|
|
||||||
* Gebiet: Cerddor
|
|
||||||
* Wirkung:
|
|
||||||
* Erschafft Artefakt I_RING_OF_NIMBLEFINGER, Ring der flinken Finger. Der
|
|
||||||
* Ring verzehnfacht die Produktion seines Trägers (wirkt nur auf
|
|
||||||
* 'Handwerker') und erhöht Menge des geklauten Geldes auf 500 Silber
|
|
||||||
* pro Talentpunkt Unterschied
|
|
||||||
*/
|
|
||||||
|
|
||||||
static int
|
|
||||||
sp_create_nimblefingerring(castorder *co)
|
|
||||||
{
|
|
||||||
unit *mage = (unit *)co->magician;
|
|
||||||
int cast_level = co->level;
|
|
||||||
|
|
||||||
change_item(mage,I_RING_OF_NIMBLEFINGER,1);
|
|
||||||
creation_message(mage, olditemtype[I_RING_OF_NIMBLEFINGER]);
|
|
||||||
return cast_level;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ------------------------------------------------------------- */
|
/* ------------------------------------------------------------- */
|
||||||
/* Name: Monster friedlich stimmen
|
/* Name: Monster friedlich stimmen
|
||||||
* Stufe: 6
|
* Stufe: 6
|
||||||
|
@ -5525,18 +5447,6 @@ sp_sweetdreams(castorder *co)
|
||||||
return cast_level;
|
return cast_level;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ------------------------------------------------------------- */
|
|
||||||
int
|
|
||||||
sp_create_tacticcrystal(castorder *co)
|
|
||||||
{
|
|
||||||
unit *mage = (unit *)co->magician;
|
|
||||||
int cast_level = co->level;
|
|
||||||
|
|
||||||
change_item(mage,I_TACTICCRYSTAL,1);
|
|
||||||
creation_message(mage, olditemtype[I_TACTICCRYSTAL]);
|
|
||||||
return cast_level;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ------------------------------------------------------------- */
|
/* ------------------------------------------------------------- */
|
||||||
int
|
int
|
||||||
sp_disturbingdreams(castorder *co)
|
sp_disturbingdreams(castorder *co)
|
||||||
|
@ -7338,46 +7248,6 @@ patzer(castorder *co)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ------------------------------------------------------------- */
|
|
||||||
/* allgemeine Artefakterschaffungszauber (Gebietsunspezifisch) */
|
|
||||||
/* ------------------------------------------------------------- */
|
|
||||||
/* Amulett des wahren Sehens */
|
|
||||||
int
|
|
||||||
sp_createitem_trueseeing(castorder *co)
|
|
||||||
{
|
|
||||||
unit *mage = (unit *)co->magician;
|
|
||||||
int cast_level = co->level;
|
|
||||||
unit *familiar = (unit *)co->familiar;
|
|
||||||
|
|
||||||
if (familiar){
|
|
||||||
mage = familiar;
|
|
||||||
}
|
|
||||||
|
|
||||||
change_item(mage,I_AMULET_OF_TRUE_SEEING,1);
|
|
||||||
creation_message(mage, olditemtype[I_AMULET_OF_TRUE_SEEING]);
|
|
||||||
|
|
||||||
return cast_level;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ------------------------------------------------------------- */
|
|
||||||
/* Ring der Unsichtbarkeit */
|
|
||||||
int
|
|
||||||
sp_createitem_invisibility(castorder *co)
|
|
||||||
{
|
|
||||||
unit *mage = (unit *)co->magician;
|
|
||||||
int cast_level = co->level;
|
|
||||||
unit *familiar = (unit *)co->familiar;
|
|
||||||
|
|
||||||
if (familiar){
|
|
||||||
mage = familiar;
|
|
||||||
}
|
|
||||||
|
|
||||||
change_item(mage,I_RING_OF_INVISIBILITY,1);
|
|
||||||
creation_message(mage, olditemtype[I_RING_OF_INVISIBILITY]);
|
|
||||||
|
|
||||||
return cast_level;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ------------------------------------------------------------- */
|
/* ------------------------------------------------------------- */
|
||||||
/* Sphäre der Unsichtbarkeit */
|
/* Sphäre der Unsichtbarkeit */
|
||||||
int
|
int
|
||||||
|
@ -7625,6 +7495,9 @@ register_spell(spell * sp)
|
||||||
spell_list * slist = malloc(sizeof(spell_list));
|
spell_list * slist = malloc(sizeof(spell_list));
|
||||||
slist->next = spells;
|
slist->next = spells;
|
||||||
slist->data = sp;
|
slist->data = sp;
|
||||||
|
if (sp->id==0) {
|
||||||
|
sp->id = hashstring(sp->sname);
|
||||||
|
}
|
||||||
spells = slist;
|
spells = slist;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7989,30 +7862,6 @@ static spell spelldaten[] =
|
||||||
},
|
},
|
||||||
(spell_f)sp_stormwinds, patzer
|
(spell_f)sp_stormwinds, patzer
|
||||||
},
|
},
|
||||||
{
|
|
||||||
SPL_TRUESEEING_GWYRRD, "trueseeinggwyrrd", NULL, NULL, NULL,
|
|
||||||
M_DRUIDE, (ONSHIPCAST), 5, 6,
|
|
||||||
{
|
|
||||||
{ R_AURA, 50, SPC_FIX },
|
|
||||||
{ R_SILVER, 3000, SPC_FIX },
|
|
||||||
{ R_PERMAURA, 1, SPC_FIX },
|
|
||||||
{ 0, 0, 0 },
|
|
||||||
{ 0, 0, 0 }
|
|
||||||
},
|
|
||||||
(spell_f)sp_createitem_trueseeing, patzer_createitem
|
|
||||||
},
|
|
||||||
{
|
|
||||||
SPL_INVISIBILITY_GWYRRD, "invisibilitygwyrrd", NULL, NULL, NULL,
|
|
||||||
M_DRUIDE, (ONSHIPCAST), 5, 6,
|
|
||||||
{
|
|
||||||
{ R_AURA, 50, SPC_FIX },
|
|
||||||
{ R_SILVER, 3000, SPC_FIX },
|
|
||||||
{ R_PERMAURA, 1, SPC_FIX },
|
|
||||||
{ 0, 0, 0 },
|
|
||||||
{ 0, 0, 0 }
|
|
||||||
},
|
|
||||||
(spell_f)sp_createitem_invisibility, patzer_createitem
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
SPL_HOMESTONE, "homestone", NULL, NULL, NULL,
|
SPL_HOMESTONE, "homestone", NULL, NULL, NULL,
|
||||||
M_DRUIDE, (0), 5, 7,
|
M_DRUIDE, (0), 5, 7,
|
||||||
|
@ -8119,18 +7968,6 @@ static spell spelldaten[] =
|
||||||
},
|
},
|
||||||
(spell_f)sp_holyground, patzer
|
(spell_f)sp_holyground, patzer
|
||||||
},
|
},
|
||||||
{
|
|
||||||
SPL_ARTEFAKT_SACK_OF_CONSERVATION, "artefaktsackofconservation", NULL, NULL, NULL,
|
|
||||||
M_DRUIDE, (ONSHIPCAST), 5, 5,
|
|
||||||
{
|
|
||||||
{ R_AURA, 30, SPC_FIX },
|
|
||||||
{ R_PERMAURA, 1, SPC_FIX },
|
|
||||||
{ R_TREES, 1, SPC_FIX },
|
|
||||||
{ 0, 0, 0 },
|
|
||||||
{ 0, 0, 0 }
|
|
||||||
},
|
|
||||||
(spell_f)sp_create_sack_of_conservation, patzer
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
SPL_SUMMONENT, "summonent", NULL, NULL, NULL,
|
SPL_SUMMONENT, "summonent", NULL, NULL, NULL,
|
||||||
M_DRUIDE, (SPELLLEVEL), 5, 10,
|
M_DRUIDE, (SPELLLEVEL), 5, 10,
|
||||||
|
@ -8380,31 +8217,7 @@ static spell spelldaten[] =
|
||||||
(spell_f)sp_combatrosthauch, patzer
|
(spell_f)sp_combatrosthauch, patzer
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
SPL_TRUESEEING_DRAIG, "trueseeingdraig", NULL, NULL, NULL,
|
SPL_TRANSFERAURA_CHAOS, "transferaurachaos", NULL,
|
||||||
M_CHAOS, (ONSHIPCAST), 5, 6,
|
|
||||||
{
|
|
||||||
{ R_AURA, 50, SPC_FIX },
|
|
||||||
{ R_SILVER, 3000, SPC_FIX },
|
|
||||||
{ R_PERMAURA, 1, SPC_FIX },
|
|
||||||
{ 0, 0, 0 },
|
|
||||||
{ 0, 0, 0 }
|
|
||||||
},
|
|
||||||
(spell_f)sp_createitem_trueseeing, patzer_createitem
|
|
||||||
},
|
|
||||||
{
|
|
||||||
SPL_INVISIBILITY_DRAIG, "invisibilitydraig", NULL, NULL, NULL,
|
|
||||||
M_CHAOS, (ONSHIPCAST), 5, 6,
|
|
||||||
{
|
|
||||||
{ R_AURA, 50, SPC_FIX },
|
|
||||||
{ R_SILVER, 3000, SPC_FIX },
|
|
||||||
{ R_PERMAURA, 1, SPC_FIX },
|
|
||||||
{ 0, 0, 0 },
|
|
||||||
{ 0, 0, 0 }
|
|
||||||
},
|
|
||||||
(spell_f)sp_createitem_invisibility, patzer_createitem
|
|
||||||
},
|
|
||||||
{
|
|
||||||
SPL_TRANSFERAURA_CHAOS, "tranferaurachaos", NULL,
|
|
||||||
"ZAUBERE \'Machtübertragung\' <Einheit-Nr> <investierte Aura>",
|
"ZAUBERE \'Machtübertragung\' <Einheit-Nr> <investierte Aura>",
|
||||||
"ui",
|
"ui",
|
||||||
M_CHAOS, (UNITSPELL|ONSHIPCAST|ONETARGET), 1, 7,
|
M_CHAOS, (UNITSPELL|ONSHIPCAST|ONETARGET), 1, 7,
|
||||||
|
@ -8481,18 +8294,6 @@ static spell spelldaten[] =
|
||||||
},
|
},
|
||||||
(spell_f)sp_undeadhero, patzer
|
(spell_f)sp_undeadhero, patzer
|
||||||
},
|
},
|
||||||
{
|
|
||||||
SPL_STRENGTH, "strength", NULL, NULL, NULL,
|
|
||||||
M_CHAOS, (ONSHIPCAST), 5, 9,
|
|
||||||
{
|
|
||||||
{ R_AURA, 20, SPC_FIX },
|
|
||||||
{ R_PERMAURA, 1, SPC_FIX },
|
|
||||||
{ 0, 0, 0 },
|
|
||||||
{ 0, 0, 0 },
|
|
||||||
{ 0, 0, 0 }
|
|
||||||
},
|
|
||||||
(spell_f)sp_create_trollbelt, patzer
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
SPL_AURALEAK, "auraleak", NULL, NULL, NULL,
|
SPL_AURALEAK, "auraleak", NULL, NULL, NULL,
|
||||||
M_CHAOS, (REGIONSPELL | TESTRESISTANCE), 3, 9,
|
M_CHAOS, (REGIONSPELL | TESTRESISTANCE), 3, 9,
|
||||||
|
@ -8597,18 +8398,6 @@ static spell spelldaten[] =
|
||||||
},
|
},
|
||||||
(spell_f)sp_summonshadowlords, patzer_peasantmob
|
(spell_f)sp_summonshadowlords, patzer_peasantmob
|
||||||
},
|
},
|
||||||
{
|
|
||||||
SPL_FIRESWORD, "firesword", NULL, NULL, NULL,
|
|
||||||
M_CHAOS, (ONSHIPCAST), 5, 12,
|
|
||||||
{
|
|
||||||
{ R_AURA, 100, SPC_FIX },
|
|
||||||
{ R_BERSERK, 1, SPC_FIX },
|
|
||||||
{ R_SWORD, 1, SPC_FIX },
|
|
||||||
{ R_PERMAURA, 1, SPC_FIX },
|
|
||||||
{ 0, 0, 0 }
|
|
||||||
},
|
|
||||||
(spell_f)sp_create_firesword, patzer
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
SPL_DRAIG_FAMILIAR, "draigfamiliar", NULL, NULL, NULL,
|
SPL_DRAIG_FAMILIAR, "draigfamiliar", NULL, NULL, NULL,
|
||||||
M_CHAOS, (NOTFAMILIARCAST), 5, 13,
|
M_CHAOS, (NOTFAMILIARCAST), 5, 13,
|
||||||
|
@ -8803,30 +8592,6 @@ static spell spelldaten[] =
|
||||||
},
|
},
|
||||||
(spell_f)sp_disturbingdreams, patzer
|
(spell_f)sp_disturbingdreams, patzer
|
||||||
},
|
},
|
||||||
{
|
|
||||||
SPL_TRUESEEING_ILLAUN, "trueseeingillaun", NULL, NULL, NULL,
|
|
||||||
M_TRAUM, (ONSHIPCAST), 5, 6,
|
|
||||||
{
|
|
||||||
{ R_AURA, 50, SPC_FIX },
|
|
||||||
{ R_SILVER, 3000, SPC_FIX },
|
|
||||||
{ R_PERMAURA, 1, SPC_FIX },
|
|
||||||
{ 0, 0, 0 },
|
|
||||||
{ 0, 0, 0 }
|
|
||||||
},
|
|
||||||
(spell_f)sp_createitem_trueseeing, patzer_createitem
|
|
||||||
},
|
|
||||||
{
|
|
||||||
SPL_INVISIBILITY_ILLAUN, "invisibilityillaun", NULL, NULL, NULL,
|
|
||||||
M_TRAUM, (ONSHIPCAST), 5, 6,
|
|
||||||
{
|
|
||||||
{ R_AURA, 50, SPC_FIX },
|
|
||||||
{ R_SILVER, 3000, SPC_FIX },
|
|
||||||
{ R_PERMAURA, 1, SPC_FIX },
|
|
||||||
{ 0, 0, 0 },
|
|
||||||
{ 0, 0, 0 }
|
|
||||||
},
|
|
||||||
(spell_f)sp_createitem_invisibility, patzer_createitem
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
SPL_SLEEP, "sleep", NULL, NULL, NULL,
|
SPL_SLEEP, "sleep", NULL, NULL, NULL,
|
||||||
M_TRAUM, (COMBATSPELL | SPELLLEVEL ), 5, 7,
|
M_TRAUM, (COMBATSPELL | SPELLLEVEL ), 5, 7,
|
||||||
|
@ -8989,18 +8754,6 @@ static spell spelldaten[] =
|
||||||
},
|
},
|
||||||
(spell_f)sp_createitem_invisibility2, patzer_createitem
|
(spell_f)sp_createitem_invisibility2, patzer_createitem
|
||||||
},
|
},
|
||||||
{
|
|
||||||
SPL_CREATE_TACTICCRYSTAL, "create_tacticcrystal", NULL, NULL, NULL,
|
|
||||||
M_TRAUM, (ONSHIPCAST), 5, 14,
|
|
||||||
{
|
|
||||||
{ R_PERMAURA, 5, SPC_FIX },
|
|
||||||
{ R_DRAGONHEAD, 1, SPC_FIX },
|
|
||||||
{ 0, 0, 0 },
|
|
||||||
{ 0, 0, 0 },
|
|
||||||
{ 0, 0, 0 }
|
|
||||||
},
|
|
||||||
(spell_f)sp_create_tacticcrystal, patzer_createitem
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
SPL_SUMMON_ALP, "summon_alp", NULL, NULL, "u",
|
SPL_SUMMON_ALP, "summon_alp", NULL, NULL, "u",
|
||||||
M_TRAUM,
|
M_TRAUM,
|
||||||
|
@ -9230,39 +8983,6 @@ static spell spelldaten[] =
|
||||||
},
|
},
|
||||||
(spell_f)sp_seduce, patzer
|
(spell_f)sp_seduce, patzer
|
||||||
},
|
},
|
||||||
{
|
|
||||||
SPL_TRUESEEING_CERDDOR, "Erschaffe ein Amulett des wahren Sehens",
|
|
||||||
"Der Spruch ermöglicht es einem Magier, ein Amulett des Wahren Sehens "
|
|
||||||
"zu erschaffen. Das Amulett erlaubt es dem Träger, alle Einheiten, die "
|
|
||||||
"durch einen Ring der Unsichtbarkeit geschützt sind, zu sehen. Einheiten "
|
|
||||||
"allerdings, die sich mit ihrem Tarnungs-Talent verstecken, bleiben "
|
|
||||||
"weiterhin unentdeckt.", NULL, NULL,
|
|
||||||
M_BARDE, (ONSHIPCAST), 5, 6,
|
|
||||||
{
|
|
||||||
{ R_AURA, 50, SPC_FIX },
|
|
||||||
{ R_SILVER, 3000, SPC_FIX },
|
|
||||||
{ R_PERMAURA, 1, SPC_FIX },
|
|
||||||
{ 0, 0, 0 },
|
|
||||||
{ 0, 0, 0 }
|
|
||||||
},
|
|
||||||
(spell_f)sp_createitem_trueseeing, patzer_createitem
|
|
||||||
},
|
|
||||||
{
|
|
||||||
SPL_INVISIBILITY_CERDDOR, "Erschaffe einen Ring der Unsichtbarkeit",
|
|
||||||
"Mit diesem Spruch kann der Zauberer einen Ring der Unsichtbarkeit "
|
|
||||||
"erschaffen. Der Träger des Ringes wird für alle Einheiten anderer "
|
|
||||||
"Parteien unsichtbar, egal wie gut ihre Wahrnehmung auch sein mag. In "
|
|
||||||
"einer unsichtbaren Einheit muss jede Person einen Ring tragen.", NULL, NULL,
|
|
||||||
M_BARDE, (ONSHIPCAST), 5, 6,
|
|
||||||
{
|
|
||||||
{ R_AURA, 50, SPC_FIX },
|
|
||||||
{ R_SILVER, 3000, SPC_FIX },
|
|
||||||
{ R_PERMAURA, 1, SPC_FIX },
|
|
||||||
{ 0, 0, 0 },
|
|
||||||
{ 0, 0, 0 }
|
|
||||||
},
|
|
||||||
(spell_f)sp_createitem_invisibility, patzer_createitem
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
SPL_HEADACHE, "Schaler Wein",
|
SPL_HEADACHE, "Schaler Wein",
|
||||||
"Aufzeichung des Vortrags von Selen Ard'Ragorn in Bar'Glingal: "
|
"Aufzeichung des Vortrags von Selen Ard'Ragorn in Bar'Glingal: "
|
||||||
|
@ -9495,27 +9215,6 @@ static spell spelldaten[] =
|
||||||
},
|
},
|
||||||
(spell_f)sp_depression, patzer
|
(spell_f)sp_depression, patzer
|
||||||
},
|
},
|
||||||
{
|
|
||||||
SPL_ARTEFAKT_NIMBLEFINGERRING, "Miriams flinke Finger",
|
|
||||||
"Die berühmte Bardin Miriam bhean'Meddaf war bekannt für ihr "
|
|
||||||
"außergewöhnliches Geschick mit der Harfe. Ihre Finger sollen sich "
|
|
||||||
"so schnell über die Saiten bewegt haben, das sie nicht mehr erkennbar "
|
|
||||||
"waren. Dieser Zauber, der recht einfach in einen Silberring zu bannen "
|
|
||||||
"ist, bewirkt eine um das zehnfache verbesserte Geschicklichkeit und "
|
|
||||||
"Gewandheit der Finger. (Das soll sie auch an anderer Stelle ausgenutzt "
|
|
||||||
"haben, ihr Ruf als Falschspielerin war berüchtigt.) Handwerker können "
|
|
||||||
"somit das zehnfache produzieren, und bei einigen anderen Tätigkeiten "
|
|
||||||
"könnte dies ebenfalls von Nutzen sein.", NULL, NULL,
|
|
||||||
M_BARDE, (ONSHIPCAST), 5, 11,
|
|
||||||
{
|
|
||||||
{ R_AURA, 20, SPC_FIX },
|
|
||||||
{ R_PERMAURA, 1, SPC_FIX },
|
|
||||||
{ R_SILVER, 1000, SPC_FIX },
|
|
||||||
{ 0, 0, 0 },
|
|
||||||
{ 0, 0, 0 }
|
|
||||||
},
|
|
||||||
(spell_f)sp_create_nimblefingerring, patzer
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
SPL_SONG_SUSCEPTMAGIC, "Gesang des schwachen Geistes",
|
SPL_SONG_SUSCEPTMAGIC, "Gesang des schwachen Geistes",
|
||||||
"Dieses Lied, das in die magische Essenz der Region gewoben wird, "
|
"Dieses Lied, das in die magische Essenz der Region gewoben wird, "
|
||||||
|
@ -9811,23 +9510,6 @@ static spell spelldaten[] =
|
||||||
},
|
},
|
||||||
(spell_f)sp_antimagiczone, patzer
|
(spell_f)sp_antimagiczone, patzer
|
||||||
},
|
},
|
||||||
{
|
|
||||||
SPL_TRUESEEING_TYBIED, "Erschaffe ein Amulett des wahren Sehens",
|
|
||||||
"Der Spruch ermöglicht es einem Magier, ein Amulett des Wahren Sehens "
|
|
||||||
"zu erschaffen. Das Amulett erlaubt es dem Träger, alle Einheiten, die "
|
|
||||||
"durch einen Ring der Unsichtbarkeit geschützt sind, zu sehen. Einheiten "
|
|
||||||
"allerdings, die sich mit ihrem Tarnungs-Talent verstecken, bleiben "
|
|
||||||
"weiterhin unentdeckt.", NULL, NULL,
|
|
||||||
M_ASTRAL, (ONSHIPCAST), 5, 5,
|
|
||||||
{
|
|
||||||
{ R_AURA, 50, SPC_FIX },
|
|
||||||
{ R_SILVER, 3000, SPC_FIX },
|
|
||||||
{ R_PERMAURA, 1, SPC_FIX },
|
|
||||||
{ 0, 0, 0 },
|
|
||||||
{ 0, 0, 0 }
|
|
||||||
},
|
|
||||||
(spell_f)sp_createitem_trueseeing, patzer_createitem
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
SPL_TYBIED_DESTROY_MAGIC, "Magiefresser",
|
SPL_TYBIED_DESTROY_MAGIC, "Magiefresser",
|
||||||
"Dieser Zauber ermöglicht dem Magier, Verzauberungen einer Einheit, "
|
"Dieser Zauber ermöglicht dem Magier, Verzauberungen einer Einheit, "
|
||||||
|
@ -9924,22 +9606,6 @@ static spell spelldaten[] =
|
||||||
},
|
},
|
||||||
(spell_f)sp_flying_ship, patzer
|
(spell_f)sp_flying_ship, patzer
|
||||||
},
|
},
|
||||||
{
|
|
||||||
SPL_INVISIBILITY_TYBIED, "Erschaffe einen Ring der Unsichtbarkeit",
|
|
||||||
"Mit diesem Spruch kann der Zauberer einen Ring der Unsichtbarkeit "
|
|
||||||
"erschaffen. Der Träger des Ringes wird für alle Einheiten anderer "
|
|
||||||
"Parteien unsichtbar, egal wie gut ihre Wahrnehmung auch sein mag. In "
|
|
||||||
"einer unsichtbaren Einheit muss jede Person einen Ring tragen.", NULL, NULL,
|
|
||||||
M_ASTRAL, (ONSHIPCAST), 5, 6,
|
|
||||||
{
|
|
||||||
{ R_AURA, 50, SPC_FIX },
|
|
||||||
{ R_SILVER, 3000, SPC_FIX },
|
|
||||||
{ R_PERMAURA, 1, SPC_FIX },
|
|
||||||
{ 0, 0, 0 },
|
|
||||||
{ 0, 0, 0 }
|
|
||||||
},
|
|
||||||
(spell_f)sp_createitem_invisibility, patzer_createitem
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
SPL_CREATE_ANTIMAGICCRYSTAL, "Erschaffe Antimagiekristall",
|
SPL_CREATE_ANTIMAGICCRYSTAL, "Erschaffe Antimagiekristall",
|
||||||
"Mit Hilfe dieses Zauber entzieht der Magier einem Quarzkristall "
|
"Mit Hilfe dieses Zauber entzieht der Magier einem Quarzkristall "
|
||||||
|
|
|
@ -76,7 +76,7 @@ extern "C" {
|
||||||
SPL_HOMESTONE,
|
SPL_HOMESTONE,
|
||||||
SPL_DROUGHT,
|
SPL_DROUGHT,
|
||||||
SPL_FOREST_FIRE,
|
SPL_FOREST_FIRE,
|
||||||
SPL_STRENGTH,
|
LUASPL_STRENGTH,
|
||||||
SPL_SUMMONENT,
|
SPL_SUMMONENT,
|
||||||
SPL_DISTURBINGDREAMS,
|
SPL_DISTURBINGDREAMS,
|
||||||
SPL_DENYATTACK,
|
SPL_DENYATTACK,
|
||||||
|
@ -91,7 +91,7 @@ extern "C" {
|
||||||
SPL_RAISEPEASANTS,
|
SPL_RAISEPEASANTS,
|
||||||
SPL_DEPRESSION,
|
SPL_DEPRESSION,
|
||||||
SPL_HEADACHE,
|
SPL_HEADACHE,
|
||||||
SPL_ARTEFAKT_NIMBLEFINGERRING,
|
LUASPL_ARTEFAKT_NIMBLEFINGERRING,
|
||||||
SPL_ENTERASTRAL,
|
SPL_ENTERASTRAL,
|
||||||
SPL_LEAVEASTRAL,
|
SPL_LEAVEASTRAL,
|
||||||
SPL_SHOWASTRAL,
|
SPL_SHOWASTRAL,
|
||||||
|
@ -152,16 +152,16 @@ extern "C" {
|
||||||
SPL_CERDDOR_FAMILIAR,
|
SPL_CERDDOR_FAMILIAR,
|
||||||
SPL_TYBIED_FAMILIAR,
|
SPL_TYBIED_FAMILIAR,
|
||||||
SPL_SONG_OF_ENSLAVE,
|
SPL_SONG_OF_ENSLAVE,
|
||||||
SPL_TRUESEEING_GWYRRD,
|
LUASPL_TRUESEEING_GWYRRD,
|
||||||
SPL_TRUESEEING_DRAIG,
|
LUASPL_TRUESEEING_DRAIG,
|
||||||
SPL_TRUESEEING_ILLAUN,
|
LUASPL_TRUESEEING_ILLAUN,
|
||||||
SPL_TRUESEEING_CERDDOR,
|
LUASPL_TRUESEEING_CERDDOR,
|
||||||
SPL_TRUESEEING_TYBIED,
|
LUASPL_TRUESEEING_TYBIED,
|
||||||
SPL_INVISIBILITY_GWYRRD,
|
LUASPL_INVISIBILITY_GWYRRD,
|
||||||
SPL_INVISIBILITY_DRAIG,
|
LUASPL_INVISIBILITY_DRAIG,
|
||||||
SPL_INVISIBILITY_ILLAUN,
|
LUASPL_INVISIBILITY_ILLAUN,
|
||||||
SPL_INVISIBILITY_CERDDOR,
|
LUASPL_INVISIBILITY_CERDDOR,
|
||||||
SPL_INVISIBILITY_TYBIED,
|
LUASPL_INVISIBILITY_TYBIED,
|
||||||
SPL_ARTEFAKT_CHASTITYBELT,
|
SPL_ARTEFAKT_CHASTITYBELT,
|
||||||
SPL_ARTEFAKT_RUNESWORD,
|
SPL_ARTEFAKT_RUNESWORD,
|
||||||
SPL_FUMBLECURSE,
|
SPL_FUMBLECURSE,
|
||||||
|
@ -176,7 +176,7 @@ extern "C" {
|
||||||
SPL_CERRDOR_FUMBLESHIELD,
|
SPL_CERRDOR_FUMBLESHIELD,
|
||||||
SPL_TYBIED_FUMBLESHIELD,
|
SPL_TYBIED_FUMBLESHIELD,
|
||||||
SPL_SHADOWKNIGHTS,
|
SPL_SHADOWKNIGHTS,
|
||||||
SPL_FIRESWORD,
|
LUASPL_FIRESWORD,
|
||||||
SPL_CREATE_TACTICCRYSTAL,
|
SPL_CREATE_TACTICCRYSTAL,
|
||||||
SPL_ITEMCLOAK,
|
SPL_ITEMCLOAK,
|
||||||
SPL_FIREWALL,
|
SPL_FIREWALL,
|
||||||
|
@ -193,7 +193,7 @@ extern "C" {
|
||||||
SPL_CERDDOR_EARN_SILVER,
|
SPL_CERDDOR_EARN_SILVER,
|
||||||
SPL_SHOCKWAVE,
|
SPL_SHOCKWAVE,
|
||||||
SPL_UNDEADHERO,
|
SPL_UNDEADHERO,
|
||||||
SPL_ARTEFAKT_SACK_OF_CONSERVATION,
|
LUASPL_ARTEFAKT_SACK_OF_CONSERVATION,
|
||||||
SPL_BECOMEWYRM,
|
SPL_BECOMEWYRM,
|
||||||
SPL_ETERNIZEWALL,
|
SPL_ETERNIZEWALL,
|
||||||
SPL_PUTTOREST,
|
SPL_PUTTOREST,
|
||||||
|
|
|
@ -199,6 +199,23 @@ xml_readconstruction(xmlXPathContextPtr xpath, xmlNodePtr * nodeTab, int nodeNr,
|
||||||
xpath->node = pushNode;
|
xpath->node = pushNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
parse_function(xmlNodePtr node, pf_generic * funPtr, xmlChar ** namePtr)
|
||||||
|
{
|
||||||
|
pf_generic fun;
|
||||||
|
xmlChar * property = xmlGetProp(node, BAD_CAST "value");
|
||||||
|
assert(property!=NULL);
|
||||||
|
fun = get_function((const char*)property);
|
||||||
|
if (fun!=NULL) {
|
||||||
|
xmlFree(property);
|
||||||
|
|
||||||
|
property = xmlGetProp(node, BAD_CAST "name");
|
||||||
|
}
|
||||||
|
*namePtr = property;
|
||||||
|
*funPtr = fun;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
parse_buildings(xmlDocPtr doc)
|
parse_buildings(xmlDocPtr doc)
|
||||||
{
|
{
|
||||||
|
@ -250,26 +267,22 @@ parse_buildings(xmlDocPtr doc)
|
||||||
for (k=0;k!=result->nodesetval->nodeNr;++k) {
|
for (k=0;k!=result->nodesetval->nodeNr;++k) {
|
||||||
xmlNodePtr node = result->nodesetval->nodeTab[k];
|
xmlNodePtr node = result->nodesetval->nodeTab[k];
|
||||||
pf_generic fun;
|
pf_generic fun;
|
||||||
|
parse_function(node, &fun, &property);
|
||||||
|
|
||||||
property = xmlGetProp(node, BAD_CAST "value");
|
|
||||||
assert(property!=NULL);
|
|
||||||
fun = get_function((const char*)property);
|
|
||||||
if (fun==NULL) {
|
if (fun==NULL) {
|
||||||
log_error(("unknown function name '%s' for building %s\n",
|
log_error(("unknown function name '%s' for building %s\n",
|
||||||
(const char*)property, bt->_name));
|
(const char*)property, bt->_name));
|
||||||
xmlFree(property);
|
xmlFree(property);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
xmlFree(property);
|
|
||||||
|
|
||||||
property = xmlGetProp(node, BAD_CAST "name");
|
|
||||||
assert(property!=NULL);
|
assert(property!=NULL);
|
||||||
if (strcmp((const char*)property, "name")==0) {
|
if (strcmp((const char*)property, "name")==0) {
|
||||||
bt->name = (const char * (*)(int size))fun;
|
bt->name = (const char * (*)(int size))fun;
|
||||||
} else if (strcmp((const char*)property, "init")==0) {
|
} else if (strcmp((const char*)property, "init")==0) {
|
||||||
bt->init = (void (*)(struct building_type*))fun;
|
bt->init = (void (*)(struct building_type*))fun;
|
||||||
} else {
|
} else {
|
||||||
log_error(("unknown function type '%s' for building %s\n", (const char*)property, bt->_name));
|
log_error(("unknown function type '%s' for building %s\n",
|
||||||
|
(const char*)property, bt->_name));
|
||||||
}
|
}
|
||||||
xmlFree(property);
|
xmlFree(property);
|
||||||
}
|
}
|
||||||
|
@ -706,18 +719,13 @@ xml_readitem(xmlXPathContextPtr xpath, resource_type * rtype)
|
||||||
xmlChar * property;
|
xmlChar * property;
|
||||||
pf_generic fun;
|
pf_generic fun;
|
||||||
|
|
||||||
property = xmlGetProp(node, BAD_CAST "value");
|
parse_function(node, &fun, &property);
|
||||||
assert(property!=NULL);
|
|
||||||
fun = get_function((const char*)property);
|
|
||||||
if (fun==NULL) {
|
if (fun==NULL) {
|
||||||
log_error(("unknown function name '%s' for item '%s'\n",
|
log_error(("unknown function name '%s' for item '%s'\n",
|
||||||
(const char*)property, rtype->_name[0]));
|
(const char*)property, rtype->_name[0]));
|
||||||
xmlFree(property);
|
xmlFree(property);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
xmlFree(property);
|
|
||||||
|
|
||||||
property = xmlGetProp(node, BAD_CAST "name");
|
|
||||||
assert(property!=NULL);
|
assert(property!=NULL);
|
||||||
if (strcmp((const char*)property, "give")==0) {
|
if (strcmp((const char*)property, "give")==0) {
|
||||||
itype->give = (boolean (*)(const struct unit*, const struct unit*, const struct item_type *, int, struct order *))fun;
|
itype->give = (boolean (*)(const struct unit*, const struct unit*, const struct item_type *, int, struct order *))fun;
|
||||||
|
@ -789,18 +797,14 @@ parse_resources(xmlDocPtr doc)
|
||||||
xmlNodePtr node = result->nodesetval->nodeTab[k];
|
xmlNodePtr node = result->nodesetval->nodeTab[k];
|
||||||
pf_generic fun;
|
pf_generic fun;
|
||||||
|
|
||||||
property = xmlGetProp(node, BAD_CAST "value");
|
parse_function(node, &fun, &property);
|
||||||
assert(property!=NULL);
|
|
||||||
fun = get_function((const char*)property);
|
|
||||||
if (fun==NULL) {
|
if (fun==NULL) {
|
||||||
log_error(("unknown function name '%s' for resource %s\n",
|
log_error(("unknown function name '%s' for resource %s\n",
|
||||||
(const char*)property, rtype->_name[0]));
|
(const char*)property, rtype->_name[0]));
|
||||||
xmlFree(property);
|
xmlFree(property);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
xmlFree(property);
|
|
||||||
|
|
||||||
property = xmlGetProp(node, BAD_CAST "name");
|
|
||||||
assert(property!=NULL);
|
assert(property!=NULL);
|
||||||
if (strcmp((const char*)property, "change")==0) {
|
if (strcmp((const char*)property, "change")==0) {
|
||||||
rtype->uchange = (rtype_uchange)fun;
|
rtype->uchange = (rtype_uchange)fun;
|
||||||
|
@ -1026,6 +1030,113 @@ parse_equipment(xmlDocPtr doc)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
parse_spells(xmlDocPtr doc)
|
||||||
|
{
|
||||||
|
xmlXPathContextPtr xpath = xmlXPathNewContext(doc);
|
||||||
|
xmlXPathObjectPtr spells;
|
||||||
|
xmlNodeSetPtr nodes;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
/* reading eressea/spells/spell */
|
||||||
|
spells = xmlXPathEvalExpression(BAD_CAST "/eressea/spells/spell", xpath);
|
||||||
|
nodes = spells->nodesetval;
|
||||||
|
for (i=0;i!=nodes->nodeNr;++i) {
|
||||||
|
xmlXPathObjectPtr result;
|
||||||
|
xmlNodePtr node = nodes->nodeTab[i];
|
||||||
|
xmlChar * property;
|
||||||
|
int k;
|
||||||
|
spell * sp = calloc(1, sizeof(spell));
|
||||||
|
|
||||||
|
/* spellname */
|
||||||
|
property = xmlGetProp(node, BAD_CAST "name");
|
||||||
|
assert(property!=NULL);
|
||||||
|
sp->sname = strdup((const char*)property);
|
||||||
|
xmlFree(property);
|
||||||
|
|
||||||
|
/* magic type */
|
||||||
|
property = xmlGetProp(node, BAD_CAST "type");
|
||||||
|
assert(property!=NULL);
|
||||||
|
for (sp->magietyp=0;sp->magietyp!=MAXMAGIETYP;++sp->magietyp) {
|
||||||
|
if (strcmp(magietypen[sp->magietyp], (const char *)property)==0) break;
|
||||||
|
}
|
||||||
|
assert(sp->magietyp!=MAXMAGIETYP);
|
||||||
|
xmlFree(property);
|
||||||
|
|
||||||
|
/* level, rank and flags */
|
||||||
|
sp->level = xml_ivalue(node, "level", -1);
|
||||||
|
sp->rank = (char)xml_ivalue(node, "rank", -1);
|
||||||
|
if (xml_bvalue(node, "ship", false)) sp->sptyp |= ONSHIPCAST;
|
||||||
|
if (xml_bvalue(node, "ocean", false)) sp->sptyp |= OCEANCASTABLE;
|
||||||
|
if (xml_bvalue(node, "far", false)) sp->sptyp |= FARCASTING;
|
||||||
|
|
||||||
|
/* reading eressea/spells/spell/function */
|
||||||
|
xpath->node = node;
|
||||||
|
result = xmlXPathEvalExpression(BAD_CAST "function", xpath);
|
||||||
|
for (k=0;k!=result->nodesetval->nodeNr;++k) {
|
||||||
|
xmlNodePtr node = result->nodesetval->nodeTab[k];
|
||||||
|
pf_generic fun;
|
||||||
|
|
||||||
|
parse_function(node, &fun, &property);
|
||||||
|
if (fun==NULL) {
|
||||||
|
log_error(("unknown function name '%s' for spell '%s'\n",
|
||||||
|
(const char*)property, sp->sname));
|
||||||
|
xmlFree(property);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
assert(property!=NULL);
|
||||||
|
if (strcmp((const char*)property, "cast")==0) {
|
||||||
|
sp->sp_function = (spell_f)fun;
|
||||||
|
} else if (strcmp((const char*)property, "fumble")==0) {
|
||||||
|
sp->patzer = (pspell_f)fun;
|
||||||
|
} else {
|
||||||
|
log_error(("unknown function type '%s' for spell %s\n",
|
||||||
|
(const char*)property, sp->sname));
|
||||||
|
}
|
||||||
|
xmlFree(property);
|
||||||
|
}
|
||||||
|
xmlXPathFreeObject(result);
|
||||||
|
|
||||||
|
/* reading eressea/spells/spell/resource */
|
||||||
|
xpath->node = node;
|
||||||
|
result = xmlXPathEvalExpression(BAD_CAST "resource", xpath);
|
||||||
|
for (k=0;k!=result->nodesetval->nodeNr && k!=MAXINGREDIENT;++k) {
|
||||||
|
xmlNodePtr node = result->nodesetval->nodeTab[k];
|
||||||
|
resource_t res;
|
||||||
|
sp->komponenten[k][0] = 0;
|
||||||
|
property = xmlGetProp(node, BAD_CAST "name");
|
||||||
|
assert(property);
|
||||||
|
for (res=0;res!=MAX_RESOURCES;++res) {
|
||||||
|
if (strcmp(oldresourcetype[res]->_name[0], (const char *)property)==0) {
|
||||||
|
sp->komponenten[k][0] = res;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
xmlFree(property);
|
||||||
|
sp->komponenten[k][1] = (resource_t)xml_ivalue(node, "amount", 1);
|
||||||
|
sp->komponenten[k][2] = SPC_FIX;
|
||||||
|
property = xmlGetProp(node, BAD_CAST "cost");
|
||||||
|
if (property!=NULL) {
|
||||||
|
if (strcmp((const char *)property, "linear")==0) {
|
||||||
|
sp->komponenten[k][2] = SPC_LINEAR;
|
||||||
|
} else if (strcmp((const char *)property, "level")==0) {
|
||||||
|
sp->komponenten[k][2] = SPC_LEVEL;
|
||||||
|
}
|
||||||
|
xmlFree(property);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (k<MAXINGREDIENT) sp->komponenten[k][0] = 0;
|
||||||
|
xmlXPathFreeObject(result);
|
||||||
|
sp->id = 0;
|
||||||
|
register_spell(sp);
|
||||||
|
}
|
||||||
|
|
||||||
|
xmlXPathFreeObject(spells);
|
||||||
|
|
||||||
|
xmlXPathFreeContext(xpath);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
parse_races(xmlDocPtr doc)
|
parse_races(xmlDocPtr doc)
|
||||||
{
|
{
|
||||||
|
@ -1153,18 +1264,13 @@ parse_races(xmlDocPtr doc)
|
||||||
xmlNodePtr node = result->nodesetval->nodeTab[k];
|
xmlNodePtr node = result->nodesetval->nodeTab[k];
|
||||||
pf_generic fun;
|
pf_generic fun;
|
||||||
|
|
||||||
property = xmlGetProp(node, BAD_CAST "value");
|
parse_function(node, &fun, &property);
|
||||||
assert(property!=NULL);
|
|
||||||
fun = get_function((const char*)property);
|
|
||||||
if (fun==NULL) {
|
if (fun==NULL) {
|
||||||
log_error(("unknown function name '%s' for race %s\n",
|
log_error(("unknown function name '%s' for race %s\n",
|
||||||
(const char*)property, rc->_name[0]));
|
(const char*)property, rc->_name[0]));
|
||||||
xmlFree(property);
|
xmlFree(property);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
xmlFree(property);
|
|
||||||
|
|
||||||
property = xmlGetProp(node, BAD_CAST "name");
|
|
||||||
assert(property!=NULL);
|
assert(property!=NULL);
|
||||||
if (strcmp((const char*)property, "name")==0) {
|
if (strcmp((const char*)property, "name")==0) {
|
||||||
rc->generate_name = (const char* (*)(const struct unit*))fun;
|
rc->generate_name = (const char* (*)(const struct unit*))fun;
|
||||||
|
@ -1520,4 +1626,5 @@ register_xmlreader(void)
|
||||||
xml_register_callback(parse_ships);
|
xml_register_callback(parse_ships);
|
||||||
xml_register_callback(parse_equipment);
|
xml_register_callback(parse_equipment);
|
||||||
xml_register_callback(parse_calendar);
|
xml_register_callback(parse_calendar);
|
||||||
|
xml_register_callback(parse_spells);
|
||||||
}
|
}
|
||||||
|
|
|
@ -284,6 +284,9 @@
|
||||||
<File
|
<File
|
||||||
RelativePath=".\lua\list.h">
|
RelativePath=".\lua\list.h">
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\lua\message.cpp">
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\lua\region.cpp">
|
RelativePath=".\lua\region.cpp">
|
||||||
<FileConfiguration
|
<FileConfiguration
|
||||||
|
|
|
@ -298,11 +298,11 @@ show_newspells(void)
|
||||||
|
|
||||||
if (m->magietyp == sp->magietyp || has_spell(u, sp)) {
|
if (m->magietyp == sp->magietyp || has_spell(u, sp)) {
|
||||||
attrib * a = a_find(u->faction->attribs, &at_reportspell);
|
attrib * a = a_find(u->faction->attribs, &at_reportspell);
|
||||||
while (a && a->data.i != sp->id) a = a->nexttype;
|
while (a && a->data.i != (int)sp->id) a = a->nexttype;
|
||||||
if (!a) {
|
if (!a) {
|
||||||
/* spell is not being shown yet. if seen before, remove to show again */
|
/* spell is not being shown yet. if seen before, remove to show again */
|
||||||
a = a_find(u->faction->attribs, &at_seenspell);
|
a = a_find(u->faction->attribs, &at_seenspell);
|
||||||
while (a && a->data.i != sp->id) a = a->nexttype;
|
while (a && a->data.i != (int)sp->id) a = a->nexttype;
|
||||||
if (a) a_remove(&u->faction->attribs, a);
|
if (a) a_remove(&u->faction->attribs, a);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
#ifndef LUA_BINDINGS_H
|
#ifndef LUA_BINDINGS_H
|
||||||
#define LUA_BINDINGS_H
|
#define LUA_BINDINGS_H
|
||||||
|
|
||||||
struct lua_State;
|
|
||||||
|
|
||||||
extern void bind_region(struct lua_State * L);
|
extern void bind_region(struct lua_State * L);
|
||||||
extern void bind_unit(struct lua_State * L);
|
extern void bind_unit(struct lua_State * L);
|
||||||
extern void bind_ship(struct lua_State * L);
|
extern void bind_ship(struct lua_State * L);
|
||||||
|
@ -10,7 +8,9 @@ extern void bind_building(struct lua_State * L);
|
||||||
extern void bind_faction(struct lua_State * L);
|
extern void bind_faction(struct lua_State * L);
|
||||||
extern void bind_alliance(struct lua_State * L);
|
extern void bind_alliance(struct lua_State * L);
|
||||||
extern void bind_eressea(struct lua_State * L);
|
extern void bind_eressea(struct lua_State * L);
|
||||||
extern void bind_spell(lua_State * L) ;
|
extern void bind_spell(struct lua_State * L) ;
|
||||||
extern void bind_item(struct lua_State * L);
|
extern void bind_item(struct lua_State * L);
|
||||||
extern void bind_event(lua_State * L);
|
extern void bind_event(struct lua_State * L);
|
||||||
|
extern void bind_message(struct lua_State * L);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -67,7 +67,7 @@ setscript(struct attrib ** ap, void * fptr)
|
||||||
if (a == NULL) {
|
if (a == NULL) {
|
||||||
a = a_add(ap, a_new(&at_script));
|
a = a_add(ap, a_new(&at_script));
|
||||||
} else if (a->data.v!=NULL) {
|
} else if (a->data.v!=NULL) {
|
||||||
luabind::functor<void> * f = (luabind::functor<void> *)a->data.v;
|
luabind::functor<void> * f = (luabind::functor<void> *)a->data.v;
|
||||||
delete f;
|
delete f;
|
||||||
}
|
}
|
||||||
a->data.v = fptr;
|
a->data.v = fptr;
|
||||||
|
|
|
@ -2,11 +2,12 @@
|
||||||
#include <eressea.h>
|
#include <eressea.h>
|
||||||
#include "list.h"
|
#include "list.h"
|
||||||
|
|
||||||
// Atributes includes
|
|
||||||
#include <attributes/racename.h>
|
|
||||||
|
|
||||||
// kernel includes
|
// kernel includes
|
||||||
#include <kernel/magic.h>
|
#include <kernel/magic.h>
|
||||||
|
#include <kernel/spell.h>
|
||||||
|
|
||||||
|
// util includes
|
||||||
|
#include <util/functions.h>
|
||||||
|
|
||||||
// lua includes
|
// lua includes
|
||||||
#include <lua.hpp>
|
#include <lua.hpp>
|
||||||
|
@ -21,13 +22,31 @@ spell_getschool(const spell& sp)
|
||||||
return magietypen[sp.magietyp];
|
return magietypen[sp.magietyp];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static lua_State * luaState;
|
||||||
|
|
||||||
|
int
|
||||||
|
call_spell(castorder *co)
|
||||||
|
{
|
||||||
|
const char * fname = co->sp->sname;
|
||||||
|
unit * mage = (unit*)co->magician;
|
||||||
|
|
||||||
|
if (co->familiar) {
|
||||||
|
mage = co->familiar;
|
||||||
|
}
|
||||||
|
|
||||||
|
return luabind::call_function<int>(luaState, fname, co->rt, mage, co->level, co->force);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
bind_spell(lua_State * L)
|
bind_spell(lua_State * L)
|
||||||
{
|
{
|
||||||
|
luaState = L;
|
||||||
module(L)[
|
module(L)[
|
||||||
class_<struct spell>("spell")
|
class_<struct spell>("spell")
|
||||||
.def_readonly("name", &spell::sname)
|
.def_readonly("name", &spell::sname)
|
||||||
.def_readonly("level", &spell::level)
|
.def_readonly("level", &spell::level)
|
||||||
.property("school", &spell_getschool)
|
.property("school", &spell_getschool)
|
||||||
];
|
];
|
||||||
|
register_function((pf_generic)&call_spell, "luaspell");
|
||||||
}
|
}
|
||||||
|
|
|
@ -310,6 +310,7 @@ lua_init(void)
|
||||||
bind_ship(luaState);
|
bind_ship(luaState);
|
||||||
bind_building(luaState);
|
bind_building(luaState);
|
||||||
bind_event(luaState);
|
bind_event(luaState);
|
||||||
|
bind_message(luaState);
|
||||||
return luaState;
|
return luaState;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -640,7 +641,7 @@ my_lua_error(lua_State * L)
|
||||||
{
|
{
|
||||||
const char* error = lua_tostring(L, -1);
|
const char* error = lua_tostring(L, -1);
|
||||||
|
|
||||||
log_error((error));
|
log_error(("A LUA error occured: %s\n", error));
|
||||||
lua_pop(L, 1);
|
lua_pop(L, 1);
|
||||||
std::terminate();
|
std::terminate();
|
||||||
}
|
}
|
||||||
|
|
|
@ -3957,16 +3957,20 @@
|
||||||
<text locale="de">Beschwöre einen Sturmelementar</text>
|
<text locale="de">Beschwöre einen Sturmelementar</text>
|
||||||
<text locale="en">Summon Storm Elemental</text>
|
<text locale="en">Summon Storm Elemental</text>
|
||||||
</string>
|
</string>
|
||||||
<string name="trueseeinggwyrrd">
|
<string name="create_aots">
|
||||||
<text locale="de">Erschaffe ein Amulett des wahren
|
<text locale="de">Erschaffe ein Amulett des wahren
|
||||||
Sehens</text>
|
Sehens</text>
|
||||||
<text locale="en">Create An Amulet Of True Sight</text>
|
<text locale="en">Create An Amulet Of True Sight</text>
|
||||||
</string>
|
</string>
|
||||||
<string name="invisibilitygwyrrd">
|
<string name="create_roi">
|
||||||
<text locale="de">Erschaffe einen Ring der
|
<text locale="de">Erschaffe einen Ring der
|
||||||
Unsichtbarkeit</text>
|
Unsichtbarkeit</text>
|
||||||
<text locale="en">Create A Ring Of Invisibility</text>
|
<text locale="en">Create A Ring Of Invisibility</text>
|
||||||
</string>
|
</string>
|
||||||
|
<string name="create_roqf">
|
||||||
|
<text locale="de">Miriams flinke Finger</text>
|
||||||
|
<text locale="en">Quick Fingers</text>
|
||||||
|
</string>
|
||||||
<string name="homestone">
|
<string name="homestone">
|
||||||
<text locale="de">Heimstein</text>
|
<text locale="de">Heimstein</text>
|
||||||
<text locale="en">Homestone</text>
|
<text locale="en">Homestone</text>
|
||||||
|
@ -3999,7 +4003,7 @@
|
||||||
<text locale="de">Heiliger Boden</text>
|
<text locale="de">Heiliger Boden</text>
|
||||||
<text locale="en">Sacred Ground</text>
|
<text locale="en">Sacred Ground</text>
|
||||||
</string>
|
</string>
|
||||||
<string name="artefaktsackofconservation">
|
<string name="create_magicherbbag">
|
||||||
<text locale="de">Erschaffe einen magischen
|
<text locale="de">Erschaffe einen magischen
|
||||||
Kräuterbeutel</text>
|
Kräuterbeutel</text>
|
||||||
<text locale="en">Create A Magical Herb Pouch</text>
|
<text locale="en">Create A Magical Herb Pouch</text>
|
||||||
|
@ -4056,17 +4060,7 @@
|
||||||
<text locale="de">Rosthauch</text>
|
<text locale="de">Rosthauch</text>
|
||||||
<text locale="en">Winds Of Rust</text>
|
<text locale="en">Winds Of Rust</text>
|
||||||
</string>
|
</string>
|
||||||
<string name="trueseeingdraig">
|
<string name="transferaurachaos">
|
||||||
<text locale="de">Erschaffe ein Amulett des wahren
|
|
||||||
Sehens</text>
|
|
||||||
<text locale="en">Create An Amulet Of True Sight</text>
|
|
||||||
</string>
|
|
||||||
<string name="invisibilitydraig">
|
|
||||||
<text locale="de">Erschaffe einen Ring der
|
|
||||||
Unsichtbarkeit</text>
|
|
||||||
<text locale="en">Create A Ring Of Invisibility</text>
|
|
||||||
</string>
|
|
||||||
<string name="tranferaurachaos">
|
|
||||||
<text locale="de">Machtübertragung</text>
|
<text locale="de">Machtübertragung</text>
|
||||||
<text locale="en">Transfer Power</text>
|
<text locale="en">Transfer Power</text>
|
||||||
</string>
|
</string>
|
||||||
|
@ -4098,7 +4092,7 @@
|
||||||
<text locale="de">Untote Helden</text>
|
<text locale="de">Untote Helden</text>
|
||||||
<text locale="en">Undead Heroes</text>
|
<text locale="en">Undead Heroes</text>
|
||||||
</string>
|
</string>
|
||||||
<string name="strength">
|
<string name="create_trollbelt">
|
||||||
<text locale="de">Erschaffe einen Gürtel der
|
<text locale="de">Erschaffe einen Gürtel der
|
||||||
Trollstärke</text>
|
Trollstärke</text>
|
||||||
<text locale="en">Create A Girdle Of Troll
|
<text locale="en">Create A Girdle Of Troll
|
||||||
|
@ -4136,7 +4130,7 @@
|
||||||
<text locale="de">Beschwöre Schattenmeister</text>
|
<text locale="de">Beschwöre Schattenmeister</text>
|
||||||
<text locale="en">Summon Shadowmasters</text>
|
<text locale="en">Summon Shadowmasters</text>
|
||||||
</string>
|
</string>
|
||||||
<string name="firesword">
|
<string name="create_firesword">
|
||||||
<text locale="de">Erschaffe ein Flammenschwert</text>
|
<text locale="de">Erschaffe ein Flammenschwert</text>
|
||||||
<text locale="en">Create A Flamesword</text>
|
<text locale="en">Create A Flamesword</text>
|
||||||
</string>
|
</string>
|
||||||
|
@ -4200,16 +4194,6 @@
|
||||||
<text locale="de">Schlechter Schlaf</text>
|
<text locale="de">Schlechter Schlaf</text>
|
||||||
<text locale="en">Insomnia</text>
|
<text locale="en">Insomnia</text>
|
||||||
</string>
|
</string>
|
||||||
<string name="trueseeingillaun">
|
|
||||||
<text locale="de">Erschaffe ein Amulett des wahren
|
|
||||||
Sehens</text>
|
|
||||||
<text locale="en">Create An Amulet Of True Sight</text>
|
|
||||||
</string>
|
|
||||||
<string name="invisibilityillaun">
|
|
||||||
<text locale="de">Erschaffe einen Ring der
|
|
||||||
Unsichtbarkeit</text>
|
|
||||||
<text locale="en">Create A Ring Of Invisibility</text>
|
|
||||||
</string>
|
|
||||||
<string name="sleep">
|
<string name="sleep">
|
||||||
<text locale="de">Schlaf</text>
|
<text locale="de">Schlaf</text>
|
||||||
<text locale="en">Sleep</text>
|
<text locale="en">Sleep</text>
|
||||||
|
@ -4226,7 +4210,7 @@
|
||||||
<text locale="de">Alp</text>
|
<text locale="de">Alp</text>
|
||||||
<text locale="en">Nightmare</text>
|
<text locale="en">Nightmare</text>
|
||||||
</string>
|
</string>
|
||||||
<string name="create_tacticcrystal">
|
<string name="create_dreameye">
|
||||||
<text locale="de">Erschaffe ein Traumauge</text>
|
<text locale="de">Erschaffe ein Traumauge</text>
|
||||||
<text locale="en">Create a Visioneye</text>
|
<text locale="en">Create a Visioneye</text>
|
||||||
</string>
|
</string>
|
||||||
|
@ -4797,7 +4781,7 @@
|
||||||
ship needs an own spirit.
|
ship needs an own spirit.
|
||||||
</text>
|
</text>
|
||||||
</string>
|
</string>
|
||||||
<string name="trueseeinggwyrrd">
|
<string name="create_aots">
|
||||||
<text locale="de">Der Spruch ermöglicht es einem Magier,
|
<text locale="de">Der Spruch ermöglicht es einem Magier,
|
||||||
ein Amulett des Wahren Sehens zu erschaffen. Das
|
ein Amulett des Wahren Sehens zu erschaffen. Das
|
||||||
Amulett erlaubt es dem Träger, alle Einheiten,
|
Amulett erlaubt es dem Träger, alle Einheiten,
|
||||||
|
@ -4814,7 +4798,23 @@
|
||||||
undiscovered.
|
undiscovered.
|
||||||
</text>
|
</text>
|
||||||
</string>
|
</string>
|
||||||
<string name="invisibilitygwyrrd">
|
<string name="create_roqf">
|
||||||
|
<text locale="de">Die berühmte Bardin Miriam bhean'Meddaf war bekannt
|
||||||
|
für ihr außergewöhnliches Geschick mit der Harfe. Ihre Finger sollen
|
||||||
|
sich so schnell über die Saiten bewegt haben, das sie nicht mehr
|
||||||
|
erkennbar waren. Dieser Zauber, der recht einfach in einen Silberring
|
||||||
|
zu bannen ist, bewirkt eine um das zehnfache verbesserte
|
||||||
|
Geschicklichkeit und Gewandheit der Finger. (Das soll sie auch an
|
||||||
|
anderer Stelle ausgenutzt haben, ihr Ruf als Falschspielerin war
|
||||||
|
berüchtigt). Handwerker können somit das zehnfache produzieren,
|
||||||
|
und bei einigen anderen Tätigkeiten könnte dies ebenfalls von Nutzen
|
||||||
|
sein.</text>
|
||||||
|
<text locale="en">The famous bard Mirim was known for exceptionally limber
|
||||||
|
play of the harp. Her spell, which is easy to ban into a little silver
|
||||||
|
ring, increases the wearer's dexterity by a factor of ten, which is siad
|
||||||
|
to be useful to both craftsmen and shady natures.</text>
|
||||||
|
</string>
|
||||||
|
<string name="create_roi">
|
||||||
<text locale="de">Mit diesem Spruch kann der Zauberer
|
<text locale="de">Mit diesem Spruch kann der Zauberer
|
||||||
einen Ring der Unsichtbarkeit erschaffen. Der
|
einen Ring der Unsichtbarkeit erschaffen. Der
|
||||||
Träger des Ringes wird für alle Einheiten
|
Träger des Ringes wird für alle Einheiten
|
||||||
|
@ -4960,7 +4960,7 @@
|
||||||
possible.
|
possible.
|
||||||
</text>
|
</text>
|
||||||
</string>
|
</string>
|
||||||
<string name="artefaktsackofconservation">
|
<string name="create_magicherbbag">
|
||||||
<text locale="de">Der Druide nehme etwas präpariertes
|
<text locale="de">Der Druide nehme etwas präpariertes
|
||||||
Leder, welches er in einem großen Ritual der
|
Leder, welches er in einem großen Ritual der
|
||||||
Reinigung von allen unreinen Geistern befreie,
|
Reinigung von allen unreinen Geistern befreie,
|
||||||
|
@ -5179,40 +5179,7 @@
|
||||||
destroy many weapons of the enemy.
|
destroy many weapons of the enemy.
|
||||||
</text>
|
</text>
|
||||||
</string>
|
</string>
|
||||||
<string name="trueseeingdraig">
|
<string name="transferaurachaos">
|
||||||
<text locale="de">Der Spruch ermöglicht es einem Magier,
|
|
||||||
ein Amulett des Wahren Sehens zu erschaffen. Das
|
|
||||||
Amulett erlaubt es dem Träger, alle Einheiten,
|
|
||||||
die durch einen Ring der Unsichtbarkeit
|
|
||||||
geschützt sind, zu sehen. Einheiten allerdings,
|
|
||||||
die sich mit ihrem Tarnungs-Talent verstecken,
|
|
||||||
bleiben weiterhin unentdeckt.
|
|
||||||
</text>
|
|
||||||
<text locale="en">This spell enables the caster to
|
|
||||||
create an Amulet Of True Sight. Wearing such an
|
|
||||||
amulet, a person can discover anyone wearing a
|
|
||||||
Ring of Invisibility. Anyway, units concealed by
|
|
||||||
the use of their stealth skill will remain
|
|
||||||
undiscovered.
|
|
||||||
</text>
|
|
||||||
</string>
|
|
||||||
<string name="invisibilitydraig">
|
|
||||||
<text locale="de">Mit diesem Spruch kann der Zauberer
|
|
||||||
einen Ring der Unsichtbarkeit erschaffen. Der
|
|
||||||
Träger des Ringes wird für alle Einheiten
|
|
||||||
anderer Parteien unsichtbar, egal wie gut ihre
|
|
||||||
Wahrnehmung auch sein mag. In einer unsichtbaren
|
|
||||||
Einheit muss jede Person einen Ring tragen.
|
|
||||||
</text>
|
|
||||||
<text locale="en">With this spell, the caster can create
|
|
||||||
a Ring Of Invisibility. The wearer of this ring
|
|
||||||
will be invisible to all units of other
|
|
||||||
factions, no matter how good their perception
|
|
||||||
skill may be. In an invisible unit, each person
|
|
||||||
must wear a Ring Of Invisibility.
|
|
||||||
</text>
|
|
||||||
</string>
|
|
||||||
<string name="tranferaurachaos">
|
|
||||||
<text locale="de">Mit Hilfe dieses Zaubers kann der
|
<text locale="de">Mit Hilfe dieses Zaubers kann der
|
||||||
Magier eigene Aura im Verhältnis 2:1 auf einen
|
Magier eigene Aura im Verhältnis 2:1 auf einen
|
||||||
anderen Magier des gleichen Magiegebietes
|
anderen Magier des gleichen Magiegebietes
|
||||||
|
@ -5324,7 +5291,7 @@
|
||||||
before their death.
|
before their death.
|
||||||
</text>
|
</text>
|
||||||
</string>
|
</string>
|
||||||
<string name="strength">
|
<string name="create_trollbelt">
|
||||||
<text locale="de">Dieses magische Artefakt verleiht dem
|
<text locale="de">Dieses magische Artefakt verleiht dem
|
||||||
Träger die Stärke eines ausgewachsenen
|
Träger die Stärke eines ausgewachsenen
|
||||||
Höhlentrolls. Seine Tragkraft erhöht sich auf
|
Höhlentrolls. Seine Tragkraft erhöht sich auf
|
||||||
|
@ -5475,7 +5442,7 @@
|
||||||
force from their victims.
|
force from their victims.
|
||||||
</text>
|
</text>
|
||||||
</string>
|
</string>
|
||||||
<string name="firesword">
|
<string name="create_firesword">
|
||||||
<text locale="de">'Und so reibe das Blut eines wilden
|
<text locale="de">'Und so reibe das Blut eines wilden
|
||||||
Kämpfers in den Stahl der Klinge und beginne die
|
Kämpfers in den Stahl der Klinge und beginne die
|
||||||
Anrufung der Sphären des Chaos. Und hast du
|
Anrufung der Sphären des Chaos. Und hast du
|
||||||
|
@ -5717,37 +5684,6 @@
|
||||||
slower than normal.
|
slower than normal.
|
||||||
</text>
|
</text>
|
||||||
</string>
|
</string>
|
||||||
<string name="trueseeingillaun">
|
|
||||||
<text locale="de">Der Spruch ermöglicht es einem Magier,
|
|
||||||
ein Amulett des Wahren Sehens zu erschaffen. Das
|
|
||||||
Amulett erlaubt es dem Träger, alle Einheiten,
|
|
||||||
die durch einen Ring der Unsichtbarkeit
|
|
||||||
geschützt sind, zu sehen. Einheiten allerdings,
|
|
||||||
die sich mit ihrem Tarnungs-Talent verstecken,
|
|
||||||
bleiben weiterhin unentdeckt.
|
|
||||||
</text>
|
|
||||||
<text locale="en">This spell enables the caster to
|
|
||||||
create an Amulet Of True Sight. Wearing such an
|
|
||||||
amulet, a person can discover anyone wearing a
|
|
||||||
Ring of Invisibility. Anyway, units concealed by
|
|
||||||
the use of their stealth skill will remain
|
|
||||||
undiscovered.
|
|
||||||
</text>
|
|
||||||
</string>
|
|
||||||
<string name="invisibilityillaun">
|
|
||||||
<text locale="de">Mit diesem Spruch kann der Zauberer
|
|
||||||
einen Ring der Unsichtbarkeit erschaffen. Der Träger des
|
|
||||||
Ringes wird für alle Einheiten anderer Parteien
|
|
||||||
unsichtbar, egal wie gut ihre Wahrnehmung auch sein mag.
|
|
||||||
In einer unsichtbaren Einheit muss jede Person einen
|
|
||||||
Ring tragen. </text>
|
|
||||||
<text locale="en">With this spell the caster can create
|
|
||||||
a Ring Of Invisibility. The wearer of this ring will be
|
|
||||||
invisible to all units of other factions, no matter how
|
|
||||||
good their perception skill may be. In an invisible
|
|
||||||
unit, each person must wear a Ring Of Invisibility.
|
|
||||||
</text>
|
|
||||||
</string>
|
|
||||||
<string name="sleep">
|
<string name="sleep">
|
||||||
<text locale="de">Dieser Zauber läßt einige feindliche
|
<text locale="de">Dieser Zauber läßt einige feindliche
|
||||||
Kämpfer einschlafen. Schlafende Kämpfer greifen
|
Kämpfer einschlafen. Schlafende Kämpfer greifen
|
||||||
|
@ -5810,7 +5746,7 @@
|
||||||
his aura forever.
|
his aura forever.
|
||||||
</text>
|
</text>
|
||||||
</string>
|
</string>
|
||||||
<string name="create_tacticcrystal">
|
<string name="create_dreameye">
|
||||||
<text locale="de">
|
<text locale="de">
|
||||||
Ein mit diesem Zauber belegtes Drachenauge, welches zum Abendmahle
|
Ein mit diesem Zauber belegtes Drachenauge, welches zum Abendmahle
|
||||||
verzehrt wird, erlaubt es dem Benutzer, in die Träume einer anderen
|
verzehrt wird, erlaubt es dem Benutzer, in die Träume einer anderen
|
||||||
|
@ -6497,3 +6433,5 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
<xi:include href="buildings.xml"/>
|
<xi:include href="buildings.xml"/>
|
||||||
<xi:include href="eressea/calendar.xml"/>
|
<xi:include href="eressea/calendar.xml"/>
|
||||||
<xi:include href="equipment.xml"/>
|
<xi:include href="equipment.xml"/>
|
||||||
|
<xi:include href="spells.xml"/>
|
||||||
|
|
||||||
<game name="Eressea" welcome="eressea">
|
<game name="Eressea" welcome="eressea">
|
||||||
<comment>Game specific</comment>
|
<comment>Game specific</comment>
|
||||||
|
|
|
@ -13,10 +13,14 @@
|
||||||
<xi:include href="ships.xml"/>
|
<xi:include href="ships.xml"/>
|
||||||
<xi:include href="buildings.xml"/>
|
<xi:include href="buildings.xml"/>
|
||||||
<xi:include href="calendar.xml"/>
|
<xi:include href="calendar.xml"/>
|
||||||
|
<xi:include href="equipment.xml"/>
|
||||||
|
<xi:include href="spells.xml"/>
|
||||||
|
|
||||||
<equipment>
|
<equipment>
|
||||||
<item name="wood" amount="5"/>
|
<set name="new_faction">
|
||||||
<item name="stone" amount="10"/>
|
<item name="wood" amount="5"/>
|
||||||
|
<item name="stone" amount="10"/>
|
||||||
|
</set>
|
||||||
</equipment>
|
</equipment>
|
||||||
|
|
||||||
<game name="HSE4" welcome="eressea">
|
<game name="HSE4" welcome="eressea">
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
<xi:include href="buildings.xml"/>
|
<xi:include href="buildings.xml"/>
|
||||||
<xi:include href="calendar.xml"/>
|
<xi:include href="calendar.xml"/>
|
||||||
<xi:include href="equipment.xml"/>
|
<xi:include href="equipment.xml"/>
|
||||||
|
<xi:include href="spells.xml"/>
|
||||||
|
|
||||||
<game name="Tutorial" welcome="tutorial">
|
<game name="Tutorial" welcome="tutorial">
|
||||||
<comment>Game specific</comment>
|
<comment>Game specific</comment>
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
<xi:include href="buildings.xml"/>
|
<xi:include href="buildings.xml"/>
|
||||||
<xi:include href="calendar.xml"/>
|
<xi:include href="calendar.xml"/>
|
||||||
<xi:include href="equipment.xml"/>
|
<xi:include href="equipment.xml"/>
|
||||||
|
<xi:include href="spells.xml"/>
|
||||||
|
|
||||||
<game name="Wettstreit der Weisen" unitsperalliance="yes" units="1000" welcome="vinyambar">
|
<game name="Wettstreit der Weisen" unitsperalliance="yes" units="1000" welcome="vinyambar">
|
||||||
<comment>Game specific</comment>
|
<comment>Game specific</comment>
|
||||||
|
|
|
@ -0,0 +1,71 @@
|
||||||
|
function creation_message(mage, type)
|
||||||
|
msg = message("item_create_spell")
|
||||||
|
msg:set_unit("mage", mage)
|
||||||
|
msg:set_int("number", 1)
|
||||||
|
msg:set_resource("item", type)
|
||||||
|
return msg
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Erschaffe ein Flammenschwert
|
||||||
|
function create_firesword(r, mage, level, force)
|
||||||
|
mage:add_item("firesword", 1);
|
||||||
|
|
||||||
|
local msg = creation_message(mage, "firesword")
|
||||||
|
msg:send_faction(mage.faction)
|
||||||
|
return level
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Erschaffe einen Gürtel der Trollstärke
|
||||||
|
function create_trollbelt(r, mage, level, force)
|
||||||
|
mage:add_item("trollbelt", 1);
|
||||||
|
|
||||||
|
local msg = creation_message(mage, "trollbelt")
|
||||||
|
msg:send_faction(mage.faction)
|
||||||
|
return level
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Erschaffe einen Ring der Unsichtbarkeit
|
||||||
|
function create_roi(r, mage, level, force)
|
||||||
|
mage:add_item("roi", 1);
|
||||||
|
|
||||||
|
local msg = creation_message(mage, "roi")
|
||||||
|
msg:send_faction(mage.faction)
|
||||||
|
return level
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Erschaffe einen Ring der flinken Finger
|
||||||
|
function create_roqf(r, mage, level, force)
|
||||||
|
mage:add_item("roqf", 1);
|
||||||
|
|
||||||
|
local msg = creation_message(mage, "roqf")
|
||||||
|
msg:send_faction(mage.faction)
|
||||||
|
return level
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Erschaffe ein Amulett des wahren Sehens
|
||||||
|
function create_roi(r, mage, level, force)
|
||||||
|
mage:add_item("aots", 1);
|
||||||
|
|
||||||
|
local msg = creation_message(mage, "aots")
|
||||||
|
msg:send_faction(mage.faction)
|
||||||
|
return level
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Erschaffe einen magischen Kräuterbeutel
|
||||||
|
function create_magicherbbag(r, mage, level, force)
|
||||||
|
mage:add_item("aots", 1);
|
||||||
|
|
||||||
|
local msg = creation_message(mage, "magicherbbag")
|
||||||
|
msg:send_faction(mage.faction)
|
||||||
|
return level
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Erschaffe einen Taktikkristal
|
||||||
|
function create_dreameye(r, mage, level, force)
|
||||||
|
mage:add_item("", 1);
|
||||||
|
|
||||||
|
local msg = creation_message(mage, "dreameye")
|
||||||
|
msg:send_faction(mage.faction)
|
||||||
|
return level
|
||||||
|
end
|
||||||
|
|
Loading…
Reference in New Issue