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 item_t;
|
||||
typedef short resource_t;
|
||||
typedef short spellid_t;
|
||||
typedef unsigned int spellid_t;
|
||||
|
||||
struct plane;
|
||||
struct order;
|
||||
|
|
|
@ -355,7 +355,7 @@ already_seen(const faction * f, spellid_t id)
|
|||
attrib *a;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -2004,19 +2004,6 @@ creation_message(unit * mage, const item_type * itype)
|
|||
"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
|
||||
* Stufe: 9
|
||||
|
@ -3388,49 +3375,6 @@ patzer_deathcloud(castorder *co)
|
|||
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
|
||||
* Stufe: 7
|
||||
|
@ -4736,28 +4680,6 @@ sp_seduce(castorder *co)
|
|||
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
|
||||
* Stufe: 6
|
||||
|
@ -5525,18 +5447,6 @@ sp_sweetdreams(castorder *co)
|
|||
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
|
||||
sp_disturbingdreams(castorder *co)
|
||||
|
@ -7338,46 +7248,6 @@ patzer(castorder *co)
|
|||
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 */
|
||||
int
|
||||
|
@ -7625,6 +7495,9 @@ register_spell(spell * sp)
|
|||
spell_list * slist = malloc(sizeof(spell_list));
|
||||
slist->next = spells;
|
||||
slist->data = sp;
|
||||
if (sp->id==0) {
|
||||
sp->id = hashstring(sp->sname);
|
||||
}
|
||||
spells = slist;
|
||||
}
|
||||
|
||||
|
@ -7989,30 +7862,6 @@ static spell spelldaten[] =
|
|||
},
|
||||
(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,
|
||||
M_DRUIDE, (0), 5, 7,
|
||||
|
@ -8119,18 +7968,6 @@ static spell spelldaten[] =
|
|||
},
|
||||
(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,
|
||||
M_DRUIDE, (SPELLLEVEL), 5, 10,
|
||||
|
@ -8380,31 +8217,7 @@ static spell spelldaten[] =
|
|||
(spell_f)sp_combatrosthauch, patzer
|
||||
},
|
||||
{
|
||||
SPL_TRUESEEING_DRAIG, "trueseeingdraig", 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_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,
|
||||
SPL_TRANSFERAURA_CHAOS, "transferaurachaos", NULL,
|
||||
"ZAUBERE \'Machtübertragung\' <Einheit-Nr> <investierte Aura>",
|
||||
"ui",
|
||||
M_CHAOS, (UNITSPELL|ONSHIPCAST|ONETARGET), 1, 7,
|
||||
|
@ -8481,18 +8294,6 @@ static spell spelldaten[] =
|
|||
},
|
||||
(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,
|
||||
M_CHAOS, (REGIONSPELL | TESTRESISTANCE), 3, 9,
|
||||
|
@ -8597,18 +8398,6 @@ static spell spelldaten[] =
|
|||
},
|
||||
(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,
|
||||
M_CHAOS, (NOTFAMILIARCAST), 5, 13,
|
||||
|
@ -8803,30 +8592,6 @@ static spell spelldaten[] =
|
|||
},
|
||||
(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,
|
||||
M_TRAUM, (COMBATSPELL | SPELLLEVEL ), 5, 7,
|
||||
|
@ -8989,18 +8754,6 @@ static spell spelldaten[] =
|
|||
},
|
||||
(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",
|
||||
M_TRAUM,
|
||||
|
@ -9230,39 +8983,6 @@ static spell spelldaten[] =
|
|||
},
|
||||
(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",
|
||||
"Aufzeichung des Vortrags von Selen Ard'Ragorn in Bar'Glingal: "
|
||||
|
@ -9495,27 +9215,6 @@ static spell spelldaten[] =
|
|||
},
|
||||
(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",
|
||||
"Dieses Lied, das in die magische Essenz der Region gewoben wird, "
|
||||
|
@ -9811,23 +9510,6 @@ static spell spelldaten[] =
|
|||
},
|
||||
(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",
|
||||
"Dieser Zauber ermöglicht dem Magier, Verzauberungen einer Einheit, "
|
||||
|
@ -9924,22 +9606,6 @@ static spell spelldaten[] =
|
|||
},
|
||||
(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",
|
||||
"Mit Hilfe dieses Zauber entzieht der Magier einem Quarzkristall "
|
||||
|
|
|
@ -76,7 +76,7 @@ extern "C" {
|
|||
SPL_HOMESTONE,
|
||||
SPL_DROUGHT,
|
||||
SPL_FOREST_FIRE,
|
||||
SPL_STRENGTH,
|
||||
LUASPL_STRENGTH,
|
||||
SPL_SUMMONENT,
|
||||
SPL_DISTURBINGDREAMS,
|
||||
SPL_DENYATTACK,
|
||||
|
@ -91,7 +91,7 @@ extern "C" {
|
|||
SPL_RAISEPEASANTS,
|
||||
SPL_DEPRESSION,
|
||||
SPL_HEADACHE,
|
||||
SPL_ARTEFAKT_NIMBLEFINGERRING,
|
||||
LUASPL_ARTEFAKT_NIMBLEFINGERRING,
|
||||
SPL_ENTERASTRAL,
|
||||
SPL_LEAVEASTRAL,
|
||||
SPL_SHOWASTRAL,
|
||||
|
@ -152,16 +152,16 @@ extern "C" {
|
|||
SPL_CERDDOR_FAMILIAR,
|
||||
SPL_TYBIED_FAMILIAR,
|
||||
SPL_SONG_OF_ENSLAVE,
|
||||
SPL_TRUESEEING_GWYRRD,
|
||||
SPL_TRUESEEING_DRAIG,
|
||||
SPL_TRUESEEING_ILLAUN,
|
||||
SPL_TRUESEEING_CERDDOR,
|
||||
SPL_TRUESEEING_TYBIED,
|
||||
SPL_INVISIBILITY_GWYRRD,
|
||||
SPL_INVISIBILITY_DRAIG,
|
||||
SPL_INVISIBILITY_ILLAUN,
|
||||
SPL_INVISIBILITY_CERDDOR,
|
||||
SPL_INVISIBILITY_TYBIED,
|
||||
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,
|
||||
SPL_ARTEFAKT_CHASTITYBELT,
|
||||
SPL_ARTEFAKT_RUNESWORD,
|
||||
SPL_FUMBLECURSE,
|
||||
|
@ -176,7 +176,7 @@ extern "C" {
|
|||
SPL_CERRDOR_FUMBLESHIELD,
|
||||
SPL_TYBIED_FUMBLESHIELD,
|
||||
SPL_SHADOWKNIGHTS,
|
||||
SPL_FIRESWORD,
|
||||
LUASPL_FIRESWORD,
|
||||
SPL_CREATE_TACTICCRYSTAL,
|
||||
SPL_ITEMCLOAK,
|
||||
SPL_FIREWALL,
|
||||
|
@ -193,7 +193,7 @@ extern "C" {
|
|||
SPL_CERDDOR_EARN_SILVER,
|
||||
SPL_SHOCKWAVE,
|
||||
SPL_UNDEADHERO,
|
||||
SPL_ARTEFAKT_SACK_OF_CONSERVATION,
|
||||
LUASPL_ARTEFAKT_SACK_OF_CONSERVATION,
|
||||
SPL_BECOMEWYRM,
|
||||
SPL_ETERNIZEWALL,
|
||||
SPL_PUTTOREST,
|
||||
|
|
|
@ -199,6 +199,23 @@ xml_readconstruction(xmlXPathContextPtr xpath, xmlNodePtr * nodeTab, int nodeNr,
|
|||
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
|
||||
parse_buildings(xmlDocPtr doc)
|
||||
{
|
||||
|
@ -250,26 +267,22 @@ parse_buildings(xmlDocPtr doc)
|
|||
for (k=0;k!=result->nodesetval->nodeNr;++k) {
|
||||
xmlNodePtr node = result->nodesetval->nodeTab[k];
|
||||
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) {
|
||||
log_error(("unknown function name '%s' for building %s\n",
|
||||
(const char*)property, bt->_name));
|
||||
xmlFree(property);
|
||||
continue;
|
||||
}
|
||||
xmlFree(property);
|
||||
|
||||
property = xmlGetProp(node, BAD_CAST "name");
|
||||
assert(property!=NULL);
|
||||
if (strcmp((const char*)property, "name")==0) {
|
||||
bt->name = (const char * (*)(int size))fun;
|
||||
} else if (strcmp((const char*)property, "init")==0) {
|
||||
bt->init = (void (*)(struct building_type*))fun;
|
||||
} 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);
|
||||
}
|
||||
|
@ -706,18 +719,13 @@ xml_readitem(xmlXPathContextPtr xpath, resource_type * rtype)
|
|||
xmlChar * property;
|
||||
pf_generic fun;
|
||||
|
||||
property = xmlGetProp(node, BAD_CAST "value");
|
||||
assert(property!=NULL);
|
||||
fun = get_function((const char*)property);
|
||||
parse_function(node, &fun, &property);
|
||||
if (fun==NULL) {
|
||||
log_error(("unknown function name '%s' for item '%s'\n",
|
||||
(const char*)property, rtype->_name[0]));
|
||||
xmlFree(property);
|
||||
continue;
|
||||
}
|
||||
xmlFree(property);
|
||||
|
||||
property = xmlGetProp(node, BAD_CAST "name");
|
||||
assert(property!=NULL);
|
||||
if (strcmp((const char*)property, "give")==0) {
|
||||
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];
|
||||
pf_generic fun;
|
||||
|
||||
property = xmlGetProp(node, BAD_CAST "value");
|
||||
assert(property!=NULL);
|
||||
fun = get_function((const char*)property);
|
||||
parse_function(node, &fun, &property);
|
||||
if (fun==NULL) {
|
||||
log_error(("unknown function name '%s' for resource %s\n",
|
||||
(const char*)property, rtype->_name[0]));
|
||||
xmlFree(property);
|
||||
continue;
|
||||
}
|
||||
xmlFree(property);
|
||||
|
||||
property = xmlGetProp(node, BAD_CAST "name");
|
||||
assert(property!=NULL);
|
||||
if (strcmp((const char*)property, "change")==0) {
|
||||
rtype->uchange = (rtype_uchange)fun;
|
||||
|
@ -1026,6 +1030,113 @@ parse_equipment(xmlDocPtr doc)
|
|||
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
|
||||
parse_races(xmlDocPtr doc)
|
||||
{
|
||||
|
@ -1153,18 +1264,13 @@ parse_races(xmlDocPtr doc)
|
|||
xmlNodePtr node = result->nodesetval->nodeTab[k];
|
||||
pf_generic fun;
|
||||
|
||||
property = xmlGetProp(node, BAD_CAST "value");
|
||||
assert(property!=NULL);
|
||||
fun = get_function((const char*)property);
|
||||
parse_function(node, &fun, &property);
|
||||
if (fun==NULL) {
|
||||
log_error(("unknown function name '%s' for race %s\n",
|
||||
(const char*)property, rc->_name[0]));
|
||||
xmlFree(property);
|
||||
continue;
|
||||
}
|
||||
xmlFree(property);
|
||||
|
||||
property = xmlGetProp(node, BAD_CAST "name");
|
||||
assert(property!=NULL);
|
||||
if (strcmp((const char*)property, "name")==0) {
|
||||
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_equipment);
|
||||
xml_register_callback(parse_calendar);
|
||||
xml_register_callback(parse_spells);
|
||||
}
|
||||
|
|
|
@ -284,6 +284,9 @@
|
|||
<File
|
||||
RelativePath=".\lua\list.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\lua\message.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\lua\region.cpp">
|
||||
<FileConfiguration
|
||||
|
|
|
@ -298,11 +298,11 @@ show_newspells(void)
|
|||
|
||||
if (m->magietyp == sp->magietyp || has_spell(u, sp)) {
|
||||
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) {
|
||||
/* spell is not being shown yet. if seen before, remove to show again */
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
#ifndef LUA_BINDINGS_H
|
||||
#define LUA_BINDINGS_H
|
||||
|
||||
struct lua_State;
|
||||
|
||||
extern void bind_region(struct lua_State * L);
|
||||
extern void bind_unit(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_alliance(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_event(lua_State * L);
|
||||
extern void bind_event(struct lua_State * L);
|
||||
extern void bind_message(struct lua_State * L);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -67,7 +67,7 @@ setscript(struct attrib ** ap, void * fptr)
|
|||
if (a == NULL) {
|
||||
a = a_add(ap, a_new(&at_script));
|
||||
} 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;
|
||||
}
|
||||
a->data.v = fptr;
|
||||
|
|
|
@ -2,11 +2,12 @@
|
|||
#include <eressea.h>
|
||||
#include "list.h"
|
||||
|
||||
// Atributes includes
|
||||
#include <attributes/racename.h>
|
||||
|
||||
// kernel includes
|
||||
#include <kernel/magic.h>
|
||||
#include <kernel/spell.h>
|
||||
|
||||
// util includes
|
||||
#include <util/functions.h>
|
||||
|
||||
// lua includes
|
||||
#include <lua.hpp>
|
||||
|
@ -21,13 +22,31 @@ spell_getschool(const spell& sp)
|
|||
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
|
||||
bind_spell(lua_State * L)
|
||||
{
|
||||
luaState = L;
|
||||
module(L)[
|
||||
class_<struct spell>("spell")
|
||||
.def_readonly("name", &spell::sname)
|
||||
.def_readonly("level", &spell::level)
|
||||
.property("school", &spell_getschool)
|
||||
];
|
||||
register_function((pf_generic)&call_spell, "luaspell");
|
||||
}
|
||||
|
|
|
@ -310,6 +310,7 @@ lua_init(void)
|
|||
bind_ship(luaState);
|
||||
bind_building(luaState);
|
||||
bind_event(luaState);
|
||||
bind_message(luaState);
|
||||
return luaState;
|
||||
}
|
||||
|
||||
|
@ -640,7 +641,7 @@ my_lua_error(lua_State * L)
|
|||
{
|
||||
const char* error = lua_tostring(L, -1);
|
||||
|
||||
log_error((error));
|
||||
log_error(("A LUA error occured: %s\n", error));
|
||||
lua_pop(L, 1);
|
||||
std::terminate();
|
||||
}
|
||||
|
|
|
@ -3957,16 +3957,20 @@
|
|||
<text locale="de">Beschwöre einen Sturmelementar</text>
|
||||
<text locale="en">Summon Storm Elemental</text>
|
||||
</string>
|
||||
<string name="trueseeinggwyrrd">
|
||||
<string name="create_aots">
|
||||
<text locale="de">Erschaffe ein Amulett des wahren
|
||||
Sehens</text>
|
||||
<text locale="en">Create An Amulet Of True Sight</text>
|
||||
</string>
|
||||
<string name="invisibilitygwyrrd">
|
||||
<string name="create_roi">
|
||||
<text locale="de">Erschaffe einen Ring der
|
||||
Unsichtbarkeit</text>
|
||||
<text locale="en">Create A Ring Of Invisibility</text>
|
||||
</string>
|
||||
<string name="create_roqf">
|
||||
<text locale="de">Miriams flinke Finger</text>
|
||||
<text locale="en">Quick Fingers</text>
|
||||
</string>
|
||||
<string name="homestone">
|
||||
<text locale="de">Heimstein</text>
|
||||
<text locale="en">Homestone</text>
|
||||
|
@ -3999,7 +4003,7 @@
|
|||
<text locale="de">Heiliger Boden</text>
|
||||
<text locale="en">Sacred Ground</text>
|
||||
</string>
|
||||
<string name="artefaktsackofconservation">
|
||||
<string name="create_magicherbbag">
|
||||
<text locale="de">Erschaffe einen magischen
|
||||
Kräuterbeutel</text>
|
||||
<text locale="en">Create A Magical Herb Pouch</text>
|
||||
|
@ -4056,17 +4060,7 @@
|
|||
<text locale="de">Rosthauch</text>
|
||||
<text locale="en">Winds Of Rust</text>
|
||||
</string>
|
||||
<string name="trueseeingdraig">
|
||||
<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">
|
||||
<string name="transferaurachaos">
|
||||
<text locale="de">Machtübertragung</text>
|
||||
<text locale="en">Transfer Power</text>
|
||||
</string>
|
||||
|
@ -4098,7 +4092,7 @@
|
|||
<text locale="de">Untote Helden</text>
|
||||
<text locale="en">Undead Heroes</text>
|
||||
</string>
|
||||
<string name="strength">
|
||||
<string name="create_trollbelt">
|
||||
<text locale="de">Erschaffe einen Gürtel der
|
||||
Trollstärke</text>
|
||||
<text locale="en">Create A Girdle Of Troll
|
||||
|
@ -4136,7 +4130,7 @@
|
|||
<text locale="de">Beschwöre Schattenmeister</text>
|
||||
<text locale="en">Summon Shadowmasters</text>
|
||||
</string>
|
||||
<string name="firesword">
|
||||
<string name="create_firesword">
|
||||
<text locale="de">Erschaffe ein Flammenschwert</text>
|
||||
<text locale="en">Create A Flamesword</text>
|
||||
</string>
|
||||
|
@ -4200,16 +4194,6 @@
|
|||
<text locale="de">Schlechter Schlaf</text>
|
||||
<text locale="en">Insomnia</text>
|
||||
</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">
|
||||
<text locale="de">Schlaf</text>
|
||||
<text locale="en">Sleep</text>
|
||||
|
@ -4226,7 +4210,7 @@
|
|||
<text locale="de">Alp</text>
|
||||
<text locale="en">Nightmare</text>
|
||||
</string>
|
||||
<string name="create_tacticcrystal">
|
||||
<string name="create_dreameye">
|
||||
<text locale="de">Erschaffe ein Traumauge</text>
|
||||
<text locale="en">Create a Visioneye</text>
|
||||
</string>
|
||||
|
@ -4797,7 +4781,7 @@
|
|||
ship needs an own spirit.
|
||||
</text>
|
||||
</string>
|
||||
<string name="trueseeinggwyrrd">
|
||||
<string name="create_aots">
|
||||
<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,
|
||||
|
@ -4814,7 +4798,23 @@
|
|||
undiscovered.
|
||||
</text>
|
||||
</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
|
||||
einen Ring der Unsichtbarkeit erschaffen. Der
|
||||
Träger des Ringes wird für alle Einheiten
|
||||
|
@ -4960,7 +4960,7 @@
|
|||
possible.
|
||||
</text>
|
||||
</string>
|
||||
<string name="artefaktsackofconservation">
|
||||
<string name="create_magicherbbag">
|
||||
<text locale="de">Der Druide nehme etwas präpariertes
|
||||
Leder, welches er in einem großen Ritual der
|
||||
Reinigung von allen unreinen Geistern befreie,
|
||||
|
@ -5179,40 +5179,7 @@
|
|||
destroy many weapons of the enemy.
|
||||
</text>
|
||||
</string>
|
||||
<string name="trueseeingdraig">
|
||||
<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">
|
||||
<string name="transferaurachaos">
|
||||
<text locale="de">Mit Hilfe dieses Zaubers kann der
|
||||
Magier eigene Aura im Verhältnis 2:1 auf einen
|
||||
anderen Magier des gleichen Magiegebietes
|
||||
|
@ -5324,7 +5291,7 @@
|
|||
before their death.
|
||||
</text>
|
||||
</string>
|
||||
<string name="strength">
|
||||
<string name="create_trollbelt">
|
||||
<text locale="de">Dieses magische Artefakt verleiht dem
|
||||
Träger die Stärke eines ausgewachsenen
|
||||
Höhlentrolls. Seine Tragkraft erhöht sich auf
|
||||
|
@ -5475,7 +5442,7 @@
|
|||
force from their victims.
|
||||
</text>
|
||||
</string>
|
||||
<string name="firesword">
|
||||
<string name="create_firesword">
|
||||
<text locale="de">'Und so reibe das Blut eines wilden
|
||||
Kämpfers in den Stahl der Klinge und beginne die
|
||||
Anrufung der Sphären des Chaos. Und hast du
|
||||
|
@ -5717,37 +5684,6 @@
|
|||
slower than normal.
|
||||
</text>
|
||||
</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">
|
||||
<text locale="de">Dieser Zauber läßt einige feindliche
|
||||
Kämpfer einschlafen. Schlafende Kämpfer greifen
|
||||
|
@ -5810,7 +5746,7 @@
|
|||
his aura forever.
|
||||
</text>
|
||||
</string>
|
||||
<string name="create_tacticcrystal">
|
||||
<string name="create_dreameye">
|
||||
<text locale="de">
|
||||
Ein mit diesem Zauber belegtes Drachenauge, welches zum Abendmahle
|
||||
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="eressea/calendar.xml"/>
|
||||
<xi:include href="equipment.xml"/>
|
||||
<xi:include href="spells.xml"/>
|
||||
|
||||
<game name="Eressea" welcome="eressea">
|
||||
<comment>Game specific</comment>
|
||||
|
|
|
@ -13,10 +13,14 @@
|
|||
<xi:include href="ships.xml"/>
|
||||
<xi:include href="buildings.xml"/>
|
||||
<xi:include href="calendar.xml"/>
|
||||
<xi:include href="equipment.xml"/>
|
||||
<xi:include href="spells.xml"/>
|
||||
|
||||
<equipment>
|
||||
<item name="wood" amount="5"/>
|
||||
<item name="stone" amount="10"/>
|
||||
<set name="new_faction">
|
||||
<item name="wood" amount="5"/>
|
||||
<item name="stone" amount="10"/>
|
||||
</set>
|
||||
</equipment>
|
||||
|
||||
<game name="HSE4" welcome="eressea">
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
<xi:include href="buildings.xml"/>
|
||||
<xi:include href="calendar.xml"/>
|
||||
<xi:include href="equipment.xml"/>
|
||||
<xi:include href="spells.xml"/>
|
||||
|
||||
<game name="Tutorial" welcome="tutorial">
|
||||
<comment>Game specific</comment>
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
<xi:include href="buildings.xml"/>
|
||||
<xi:include href="calendar.xml"/>
|
||||
<xi:include href="equipment.xml"/>
|
||||
<xi:include href="spells.xml"/>
|
||||
|
||||
<game name="Wettstreit der Weisen" unitsperalliance="yes" units="1000" welcome="vinyambar">
|
||||
<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