forked from github/server
even more create_ spells are now scripted.
started on another spell (earn_silver), needs enabling and testing.
This commit is contained in:
parent
12906232f1
commit
a521385b13
|
@ -98,33 +98,11 @@ attrib_type at_wdwpyramid = {
|
|||
|
||||
/* ----------------------------------------------------------------------- */
|
||||
|
||||
#ifdef TODO
|
||||
static const char *
|
||||
spellcmd(const strarray * sa, const struct locale * lang) {
|
||||
int i;
|
||||
char * p = buf;
|
||||
strcpy(p, locale_string(lang, keywords[K_CAST]));
|
||||
p += strlen(p);
|
||||
for (i=0;i!=sa->length;++i) {
|
||||
*p++ = ' ';
|
||||
strcpy(p, sa->strings[i]);
|
||||
p += strlen(p);
|
||||
}
|
||||
return buf;
|
||||
}
|
||||
|
||||
static void
|
||||
report_failure(unit * mage, const strarray * sa) {
|
||||
/* Fehler: "Der Zauber schlägt fehl" */
|
||||
cmistake(mage, strdup(spellcmd(sa, mage->faction->locale)), 180, MSG_MAGIC);
|
||||
}
|
||||
#else
|
||||
static void
|
||||
report_failure(unit * mage, struct order * ord) {
|
||||
/* Fehler: "Der Zauber schlägt fehl" */
|
||||
cmistake(mage, ord, 180, MSG_MAGIC);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* ------------------------------------------------------------- */
|
||||
/* do_shock - Schockt die Einheit, z.B. bei Verlust eines */
|
||||
|
@ -6381,26 +6359,6 @@ sp_disruptastral(castorder *co)
|
|||
return cast_level;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------- */
|
||||
/* Name: Erschaffe einen Beutel des Negativen Gewichts
|
||||
* Stufe: 10
|
||||
* Gebiet: Tybied
|
||||
* Kategorie: Artefakt
|
||||
* Wirkung: Von transportierten Items werden bis zu 200 GE nicht auf
|
||||
* das Traggewicht angerechnet.
|
||||
*/
|
||||
int
|
||||
sp_create_bag_of_holding(castorder *co)
|
||||
{
|
||||
unit *mage = (unit *)co->magician;
|
||||
int cast_level = co->level;
|
||||
|
||||
change_item(mage,I_BAG_OF_HOLDING,1);
|
||||
|
||||
creation_message(mage, olditemtype[I_BAG_OF_HOLDING]);
|
||||
return cast_level;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------- */
|
||||
/* Name: Mauern der Ewigkeit
|
||||
* Stufe: 7
|
||||
|
@ -7230,123 +7188,6 @@ patzer(castorder *co)
|
|||
return;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------- */
|
||||
/* Sphäre der Unsichtbarkeit */
|
||||
int
|
||||
sp_createitem_invisibility2(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_SPHERE_OF_INVISIBILITY,1);
|
||||
creation_message(mage, olditemtype[I_SPHERE_OF_INVISIBILITY]);
|
||||
|
||||
return cast_level;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------- */
|
||||
/* Keuschheitsgürtel der Orks */
|
||||
int
|
||||
sp_createitem_chastitybelt(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_CHASTITY_BELT,1);
|
||||
creation_message(mage, olditemtype[I_CHASTITY_BELT]);
|
||||
|
||||
return cast_level;
|
||||
}
|
||||
/* ------------------------------------------------------------- */
|
||||
/* Ring der Macht
|
||||
* erhöht effektive Stufe +1 */
|
||||
int
|
||||
sp_createitem_power(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_POWER,1);
|
||||
creation_message(mage, olditemtype[I_RING_OF_POWER]);
|
||||
|
||||
return cast_level;
|
||||
}
|
||||
/* ------------------------------------------------------------- */
|
||||
/* Runenschwert */
|
||||
int
|
||||
sp_createitem_runesword(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_RUNESWORD,1);
|
||||
creation_message(mage, olditemtype[I_RUNESWORD]);
|
||||
|
||||
return cast_level;
|
||||
}
|
||||
/* ------------------------------------------------------------- */
|
||||
/* Artefakt der Stärke
|
||||
* Ermöglicht dem Magier mehr Magiepunkte zu 'speichern'
|
||||
*/
|
||||
int
|
||||
sp_createitem_aura(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_AURAKULUM,1);
|
||||
creation_message(mage, olditemtype[I_AURAKULUM]);
|
||||
|
||||
return cast_level;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------- */
|
||||
/* Artefakt der Regeneration
|
||||
* Heilt pro Runde HP
|
||||
* noch nicht implementiert
|
||||
*/
|
||||
int
|
||||
sp_createitem_regeneration(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_REGENERATION,1);
|
||||
creation_message(mage, olditemtype[I_RING_OF_REGENERATION]);
|
||||
|
||||
return cast_level;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------- */
|
||||
/* Erläuterungen zu den Spruchdefinitionen
|
||||
*
|
||||
|
@ -8767,17 +8608,6 @@ static spell spelldaten[] =
|
|||
},
|
||||
(spell_f)sp_sweetdreams, patzer
|
||||
},
|
||||
{ SPL_INVISIBILITY2_ILLAUN, "create_invisibility_sphere", NULL, NULL, NULL,
|
||||
M_TRAUM, (ONSHIPCAST), 5, 13,
|
||||
{
|
||||
{ R_AURA, 150, SPC_FIX },
|
||||
{ R_SILVER, 30000, SPC_FIX },
|
||||
{ R_PERMAURA, 3, SPC_FIX },
|
||||
{ 0, 0, 0 },
|
||||
{ 0, 0, 0 }
|
||||
},
|
||||
(spell_f)sp_createitem_invisibility2, patzer
|
||||
},
|
||||
{
|
||||
SPL_SUMMON_ALP, "summon_alp", NULL, NULL, "u",
|
||||
M_TRAUM,
|
||||
|
@ -9727,21 +9557,6 @@ static spell spelldaten[] =
|
|||
},
|
||||
(spell_f)sp_speed, patzer
|
||||
},
|
||||
{
|
||||
SPL_ARTEFAKT_OF_POWER, "create_rop",
|
||||
"Dieses mächtige Ritual erschafft einen Ring der Macht. Ein Ring "
|
||||
"der Macht erhöht die Stärke jedes Zaubers, den sein Träger zaubert, "
|
||||
"als wäre der Magier eine Stufe besser.", NULL, NULL,
|
||||
M_ASTRAL, (ONSHIPCAST), 5, 9,
|
||||
{
|
||||
{ R_AURA, 100, SPC_FIX },
|
||||
{ R_SILVER, 4000, SPC_FIX },
|
||||
{ R_PERMAURA, 1, SPC_FIX },
|
||||
{ 0, 0, 0 },
|
||||
{ 0, 0, 0 }
|
||||
},
|
||||
(spell_f)sp_createitem_power, patzer
|
||||
},
|
||||
{
|
||||
SPL_VIEWREALITY, "view_reality",
|
||||
"Der Magier kann mit Hilfe dieses Zaubers aus der Astral- in die "
|
||||
|
@ -9757,25 +9572,6 @@ static spell spelldaten[] =
|
|||
},
|
||||
(spell_f)sp_viewreality, patzer
|
||||
},
|
||||
{
|
||||
SPL_BAG_OF_HOLDING, "create_bagofholding",
|
||||
"Dieser Beutel umschließt eine kleine Dimensionsfalte, in der bis "
|
||||
"zu 200 Gewichtseinheiten transportiert werden können, ohne dass "
|
||||
"sie auf das Traggewicht angerechnet werden. Pferde und andere "
|
||||
"Lebewesen sowie besonders sperrige Dinge (Wagen und Katapulte) können "
|
||||
"nicht in dem Beutel transportiert werden. Auch ist es nicht möglich, "
|
||||
"einen Zauberbeutel in einem anderen zu transportieren. Der Beutel "
|
||||
"selber wiegt 1 GE.", NULL, NULL,
|
||||
M_ASTRAL, (ONSHIPCAST), 5, 10,
|
||||
{
|
||||
{ R_AURA, 30, SPC_FIX },
|
||||
{ R_PERMAURA, 1, SPC_FIX },
|
||||
{ R_SILVER, 5000, SPC_FIX },
|
||||
{ 0, 0, 0 },
|
||||
{ 0, 0, 0 }
|
||||
},
|
||||
(spell_f)sp_create_bag_of_holding, patzer
|
||||
},
|
||||
{
|
||||
SPL_SPEED2, "double_time",
|
||||
"Diese praktische Anwendung des theoretischen Wissens um Raum und Zeit "
|
||||
|
@ -9885,50 +9681,6 @@ static spell spelldaten[] =
|
|||
},
|
||||
/* M_GRAU */
|
||||
/* Definitionen von Create_Artefaktsprüchen */
|
||||
{
|
||||
SPL_ARTEFAKT_OF_AURAPOWER, "create_focus",
|
||||
"Der auf diesem Gegenstand liegende Zauber erleichtert es dem "
|
||||
"Zauberers enorm größere Mengen an Aura zu beherrschen.", NULL, NULL,
|
||||
M_GRAU, (ONSHIPCAST), 5, 9,
|
||||
{
|
||||
{ R_AURA, 100, SPC_FIX },
|
||||
{ R_PERMAURA, 1, SPC_FIX },
|
||||
{ 0, 0, 0 },
|
||||
{ 0, 0, 0 },
|
||||
{ 0, 0, 0 }
|
||||
},
|
||||
(spell_f)sp_createitem_aura, patzer
|
||||
},
|
||||
{
|
||||
SPL_ARTEFAKT_OF_REGENERATION, "regeneration",
|
||||
"Der auf diesem Gegenstand liegende Zauber saugt die diffusen "
|
||||
"magischen Energien des Lebens aus der Umgebung auf und läßt sie "
|
||||
"seinem Träger zukommen.", NULL, NULL,
|
||||
M_GRAU, (ONSHIPCAST), 5, 9,
|
||||
{
|
||||
{ R_AURA, 100, SPC_FIX },
|
||||
{ R_PERMAURA, 1, SPC_FIX },
|
||||
{ 0, 0, 0 },
|
||||
{ 0, 0, 0 },
|
||||
{ 0, 0, 0 }
|
||||
},
|
||||
(spell_f)sp_createitem_regeneration, patzer
|
||||
},
|
||||
{
|
||||
SPL_ARTEFAKT_CHASTITYBELT, "create_chastitybelt",
|
||||
"Dieses Amulett in Gestalt einer orkischen Matrone unterdrückt den "
|
||||
"Fortpflanzungstrieb eines einzelnen Orks sehr zuverlässig. Ein Ork "
|
||||
"mit Amulett der Keuschheit wird sich nicht mehr vermehren.", NULL, NULL,
|
||||
M_GRAU, (ONSHIPCAST), 5, 7,
|
||||
{
|
||||
{ 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_chastitybelt, patzer
|
||||
},
|
||||
{
|
||||
SPL_METEORRAIN, "meteor_rain",
|
||||
"Ein Schauer von Meteoren regnet über das Schlachtfeld.", NULL, NULL,
|
||||
|
@ -9942,25 +9694,6 @@ static spell spelldaten[] =
|
|||
},
|
||||
(spell_f)sp_kampfzauber, patzer
|
||||
},
|
||||
{
|
||||
SPL_ARTEFAKT_RUNESWORD, "create_runesword",
|
||||
"Mit diesem Spruch erzeugt man ein Runenschwert. Die Klinge des "
|
||||
"schwarzen "
|
||||
"Schwertes ist mit alten, magischen Runen verziert, und ein seltsames "
|
||||
"Eigenleben erfüllt die warme Klinge. Um es zu benutzen, muss man "
|
||||
"ein Schwertkämpfer von beachtlichem Talent (7) sein. "
|
||||
"Der Träger des Runenschwertes erhält einen Talentbonus von +4 im Kampf "
|
||||
"und wird so gut wie immun gegen alle Formen von Magie.", NULL, NULL,
|
||||
M_GRAU, (ONSHIPCAST), 5, 6,
|
||||
{
|
||||
{ R_AURA, 100, SPC_FIX },
|
||||
{ R_PERMAURA, 1, SPC_FIX },
|
||||
{ R_SILVER, 1000, SPC_FIX },
|
||||
{ R_EOGSWORD, 1, SPC_FIX },
|
||||
{ 0, 0, 0 }
|
||||
},
|
||||
(spell_f)sp_createitem_runesword, patzer
|
||||
},
|
||||
{
|
||||
SPL_BECOMEWYRM, "wyrm_transformation",
|
||||
"Mit Hilfe dieses Zaubers kann sich der Magier permanent in einen "
|
||||
|
|
|
@ -29,9 +29,9 @@ extern "C" {
|
|||
/* Sprüche. Neue NUR hinten anfügen, oder das Datenfile geht kaputt */
|
||||
enum {
|
||||
SPL_NOSPELL,
|
||||
SPL_ARTEFAKT_OF_POWER,
|
||||
SPL_ARTEFAKT_OF_AURAPOWER,
|
||||
SPL_ARTEFAKT_OF_REGENERATION,
|
||||
LUASPL_ARTEFAKT_OF_POWER,
|
||||
LUASPL_ARTEFAKT_OF_AURAPOWER,
|
||||
LUASPL_ARTEFAKT_OF_REGENERATION,
|
||||
SPL_FIREBALL,
|
||||
SPL_HAGEL,
|
||||
SPL_RUSTWEAPON,
|
||||
|
@ -162,8 +162,8 @@ extern "C" {
|
|||
LUASPL_INVISIBILITY_ILLAUN,
|
||||
LUASPL_INVISIBILITY_CERDDOR,
|
||||
LUASPL_INVISIBILITY_TYBIED,
|
||||
SPL_ARTEFAKT_CHASTITYBELT,
|
||||
SPL_ARTEFAKT_RUNESWORD,
|
||||
LUASPL_ARTEFAKT_CHASTITYBELT,
|
||||
LUASPL_ARTEFAKT_RUNESWORD,
|
||||
SPL_FUMBLECURSE,
|
||||
SPL_ICASTLE,
|
||||
SPL_GWYRRD_DESTROY_MAGIC,
|
||||
|
@ -183,7 +183,7 @@ extern "C" {
|
|||
SPL_WISPS,
|
||||
SPL_SPARKLE_CHAOS,
|
||||
SPL_SPARKLE_DREAM,
|
||||
SPL_BAG_OF_HOLDING,
|
||||
LUASPL_BAG_OF_HOLDING,
|
||||
SPL_PULLASTRAL,
|
||||
SPL_FETCHASTRAL,
|
||||
SPL_ILLAUN_EARN_SILVER,
|
||||
|
@ -206,7 +206,7 @@ extern "C" {
|
|||
SPL_AURA_OF_FEAR, /* 175? */
|
||||
SPL_SHADOWCALL, /* 176? */
|
||||
SPL_MALLORNTREEGROW,
|
||||
SPL_INVISIBILITY2_ILLAUN,
|
||||
LUASPL_INVISIBILITY2_ILLAUN,
|
||||
SPL_BIGRECRUIT,
|
||||
SPL_IMMOLATION,
|
||||
SPL_FIREODEM, /* 181 */
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
// kernel includes
|
||||
#include <kernel/faction.h>
|
||||
#include <kernel/item.h>
|
||||
#include <kernel/region.h>
|
||||
#include <kernel/unit.h>
|
||||
|
||||
// util includes
|
||||
|
@ -80,6 +81,22 @@ public:
|
|||
return E_OK;
|
||||
}
|
||||
|
||||
int set_region(const char * param, const region& r) {
|
||||
if (mtype==0) return E_INVALID_MESSAGE;
|
||||
|
||||
int i = get_param(param);
|
||||
if (i==mtype->nparameters) {
|
||||
return E_INVALID_PARAMETER_NAME;
|
||||
}
|
||||
if (strcmp(mtype->types[i]->name, "region")!=0) {
|
||||
return E_INVALID_PARAMETER_TYPE;
|
||||
}
|
||||
|
||||
args[i].v = (void*)&r;
|
||||
|
||||
return E_OK;
|
||||
}
|
||||
|
||||
int set_string(const char * param, const char * value) {
|
||||
if (mtype==0) return E_INVALID_MESSAGE;
|
||||
|
||||
|
@ -155,6 +172,7 @@ bind_message(lua_State * L)
|
|||
.def(tostring(self))
|
||||
|
||||
.def("set_unit", &lua_message::set_unit)
|
||||
.def("set_region", &lua_message::set_region)
|
||||
.def("set_resource", &lua_message::set_resource)
|
||||
.def("set_int", &lua_message::set_int)
|
||||
.def("set_string", &lua_message::set_string)
|
||||
|
|
|
@ -116,6 +116,15 @@ region_getresource(const region& r, const char * type)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
region_setresource(const region& r, const char * type, int value)
|
||||
{
|
||||
const resource_type * rtype = rt_find(type);
|
||||
if (rtype==rt_find("money")) rsetmoney(&r, value);
|
||||
if (rtype==rt_find("peasant")) return rsetpeasants(&r, value);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
region_setroad(region& r, int dir, lua_Number size)
|
||||
{
|
||||
|
@ -260,6 +269,7 @@ bind_region(lua_State * L)
|
|||
|
||||
.def("next", ®ion_next)
|
||||
.def("get_resource", ®ion_getresource)
|
||||
.def("set_resource", ®ion_setresource)
|
||||
.def_readonly("x", ®ion::x)
|
||||
.def_readonly("y", ®ion::y)
|
||||
.def_readwrite("age", ®ion::age)
|
||||
|
|
|
@ -3980,9 +3980,9 @@
|
|||
<text locale="de">Schattenruf</text>
|
||||
<text locale="en">Shadow Call</text>
|
||||
</string>
|
||||
<string name="regeneration">
|
||||
<text locale="de">Regeneration</text>
|
||||
<text locale="en">Regeneration</text>
|
||||
<string name="create_ror">
|
||||
<text locale="de">Erscahffe einen Ring der Regeneration</text>
|
||||
<text locale="en">Create A Ring Of Regeneration</text>
|
||||
</string>
|
||||
<string name="raise_mob">
|
||||
<text locale="de">Mob aufwiegeln</text>
|
||||
|
@ -5069,6 +5069,37 @@
|
|||
ship needs an own spirit.
|
||||
</text>
|
||||
</string>
|
||||
<string name="create_runesword">
|
||||
<text locale="de">Mit diesem Spruch erzeugt man ein Runenschwert. Die
|
||||
Klinge des schwarzen Schwertes ist mit alten, magischen Runen verziert,
|
||||
und ein seltsames Eigenleben erfüllt die warme Klinge. Um es zu benutzen,
|
||||
muss man ein Schwertkämpfer von beachtlichem Talent (7) sein. Der Träger
|
||||
des Runenschwertes erhält einen Talentbonus von +4 im Kampf und wird so
|
||||
gut wie immun gegen alle Formen von Magie.</text>
|
||||
<text locale="en">This spell creates a magical sword. It requires a skill
|
||||
of at least 7, but adds +4 to the combat skill of its' owner as well as
|
||||
making them almost immune against magical attacks.</text>
|
||||
</string>
|
||||
<string name="create_bagofholding">
|
||||
<text locale="de">Dieser Beutel umschließt eine kleine Dimensionsfalte, in
|
||||
der bis zu 200 Gewichtseinheiten transportiert werden können, ohne dass
|
||||
sie auf das Traggewicht angerechnet werden. Pferde und andere Lebewesen
|
||||
sowie besonders sperrige Dinge (Wagen und Katapulte) können nicht in dem
|
||||
Beutel transportiert werden. Auch ist es nicht möglich, einen
|
||||
Zauberbeutel in einem anderen zu transportieren. Der Beutel selber wiegt 1
|
||||
GE.</text>
|
||||
<text locale="en">This bag encloses a dimensional rift in which up to 200
|
||||
units of weight can be carries. Horses and other large objects cannot be
|
||||
put into the bag. The bag itself has a weight of 1.</text>
|
||||
</string>
|
||||
<string name="create_rop">
|
||||
<text locale="de">Dieses mächtige Ritual erschafft einen Ring der Macht.
|
||||
Ein Ring der Macht erhöht die Stärke jedes Zaubers, den sein Träger
|
||||
zaubert, als wäre der Magier eine Stufe besser.
|
||||
</text>
|
||||
<text locale="en">A ring of power adds +1 to the power of each spell cast
|
||||
by its' wearer.</text>
|
||||
</string>
|
||||
<string name="create_aots">
|
||||
<text locale="de">Der Spruch ermöglicht es einem Magier,
|
||||
ein Amulett des Wahren Sehens zu erschaffen. Das
|
||||
|
@ -6737,3 +6768,9 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -72,6 +72,13 @@
|
|||
<resource name="permaura" amount="5" cost="fixed"/>
|
||||
</spell>
|
||||
|
||||
<spell name="create_invisibility_sphere" type="illaun" ship="true" rank="5" level="13">
|
||||
<function name="cast" value="luaspell"/>
|
||||
<resource name="aura" amount="150" cost="fixed"/>
|
||||
<resource name="money" amount="30000" cost="fixed"/>
|
||||
<resource name="permaura" amount="3" cost="fixed"/>
|
||||
</spell>
|
||||
|
||||
<!-- cerddor spells -->
|
||||
<spell name="create_roi" type="cerddor" ship="true" rank="5" level="6">
|
||||
<function name="cast" value="luaspell"/>
|
||||
|
@ -115,4 +122,46 @@
|
|||
<resource name="money" amount="3000" cost="fixed"/>
|
||||
</spell>
|
||||
|
||||
<spell name="create_rop" type="tybied" ship="true" rank="5" level="9">
|
||||
<function name="cast" value="luaspell"/>
|
||||
<resource name="aura" amount="100" cost="fixed"/>
|
||||
<resource name="permaura" amount="1" cost="fixed"/>
|
||||
<resource name="money" amount="4000" cost="fixed"/>
|
||||
</spell>
|
||||
|
||||
<spell name="create_bagofholding" type="tybied" ship="true" rank="5" level="10">
|
||||
<function name="cast" value="luaspell"/>
|
||||
<resource name="aura" amount="30" cost="fixed"/>
|
||||
<resource name="permaura" amount="1" cost="fixed"/>
|
||||
<resource name="money" amount="5000" cost="fixed"/>
|
||||
</spell>
|
||||
|
||||
<!-- gray magic -->
|
||||
<spell name="create_runesword" type="gray" ship="true" rank="5" level="6">
|
||||
<function name="cast" value="luaspell"/>
|
||||
<resource name="aura" amount="100" cost="fixed"/>
|
||||
<resource name="permaura" amount="1" cost="fixed"/>
|
||||
<resource name="money" amount="1000" cost="fixed"/>
|
||||
<resource name="laensword" amount="1" cost="fixed"/>
|
||||
</spell>
|
||||
|
||||
<spell name="create_chastitybelt" type="gray" ship="true" rank="5" level="7">
|
||||
<function name="cast" value="luaspell"/>
|
||||
<resource name="aura" amount="50" cost="fixed"/>
|
||||
<resource name="permaura" amount="1" cost="fixed"/>
|
||||
<resource name="money" amount="3000" cost="fixed"/>
|
||||
</spell>
|
||||
|
||||
<spell name="create_focus" type="gray" ship="true" rank="5" level="9">
|
||||
<function name="cast" value="luaspell"/>
|
||||
<resource name="aura" amount="100" cost="fixed"/>
|
||||
<resource name="permaura" amount="1" cost="fixed"/>
|
||||
</spell>
|
||||
|
||||
<spell name="create_ror" type="gray" ship="true" rank="5" level="9">
|
||||
<function name="cast" value="luaspell"/>
|
||||
<resource name="aura" amount="100" cost="fixed"/>
|
||||
<resource name="permaura" amount="1" cost="fixed"/>
|
||||
</spell>
|
||||
|
||||
</spells>
|
||||
|
|
|
@ -54,3 +54,152 @@ function create_antimagic(r, mage, level, force)
|
|||
return create_item(mage, level, "antimagic")
|
||||
end
|
||||
|
||||
-- Erschaffe eine Sphäre der Unsichtbarkeit
|
||||
function create_invisibility_sphere(r, mage, level, force)
|
||||
return create_item(mage, level, "sphereofinv")
|
||||
end
|
||||
|
||||
-- Erschaffe einen Gürtel der Keuschheit
|
||||
function create_chastitybelt(r, mage, level, force)
|
||||
return create_item(mage, level, "ao_chastity")
|
||||
end
|
||||
|
||||
-- Erschaffe ein Runenschwert
|
||||
function create_runesword(r, mage, level, force)
|
||||
return create_item(mage, level, "runesword")
|
||||
end
|
||||
|
||||
-- Erschaffe ein Aurafokus
|
||||
function create_focus(r, mage, level, force)
|
||||
return create_item(mage, level, "aurafocus")
|
||||
end
|
||||
|
||||
-- Erschaffe einen Ring der Macht
|
||||
function create_rop(r, mage, level, force)
|
||||
return create_item(mage, level, "rop")
|
||||
end
|
||||
|
||||
-- Erschaffe einen Ring der Regeneration
|
||||
function create_ror(r, mage, level, force)
|
||||
return create_item(mage, level, "ror")
|
||||
end
|
||||
|
||||
-- Erschaffe einen Zauberbeutel
|
||||
function create_bagofholding(r, mage, level, force)
|
||||
return create_item(mage, level, "magicbag")
|
||||
end
|
||||
|
||||
-- TODO:
|
||||
function earnsilver(r, mage, level, force)
|
||||
local want = 50 * force
|
||||
|
||||
endfunction 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
|
||||
local function create_item(mage, level, name)
|
||||
local msg = creation_message(mage, name)
|
||||
msg:send_faction(mage.faction)
|
||||
mage:add_item(name, 1);
|
||||
return level
|
||||
end
|
||||
|
||||
-- Erschaffe ein Flammenschwert
|
||||
function create_firesword(r, mage, level, force)
|
||||
return create_item(mage, level, "firesword")
|
||||
end
|
||||
|
||||
-- Erschaffe einen Gürtel der Trollstärke
|
||||
function create_trollbelt(r, mage, level, force)
|
||||
return create_item(mage, level, "trollbelt")
|
||||
end
|
||||
|
||||
-- Erschaffe einen Ring der Unsichtbarkeit
|
||||
function create_roi(r, mage, level, force)
|
||||
return create_item(mage, level, "roi")
|
||||
end
|
||||
|
||||
-- Erschaffe einen Ring der flinken Finger
|
||||
function create_roqf(r, mage, level, force)
|
||||
return create_item(mage, level, "roqf")
|
||||
end
|
||||
|
||||
-- Erschaffe ein Amulett des wahren Sehens
|
||||
function create_aots(r, mage, level, force)
|
||||
return create_item(mage, level, "aots")
|
||||
end
|
||||
|
||||
-- Erschaffe einen magischen Kräuterbeutel
|
||||
function create_magicherbbag(r, mage, level, force)
|
||||
return create_item(mage, level, "magicherbbag")
|
||||
end
|
||||
|
||||
-- Erschaffe einen Taktikkristal
|
||||
function create_dreameye(r, mage, level, force)
|
||||
return create_item(mage, level, "dreameye")
|
||||
end
|
||||
|
||||
-- Erschaffe einen Antimagiekristall
|
||||
function create_antimagic(r, mage, level, force)
|
||||
return create_item(mage, level, "antimagic")
|
||||
end
|
||||
|
||||
-- Erschaffe eine Sphäre der Unsichtbarkeit
|
||||
function create_invisibility_sphere(r, mage, level, force)
|
||||
return create_item(mage, level, "sphereofinv")
|
||||
end
|
||||
|
||||
-- Erschaffe einen Gürtel der Keuschheit
|
||||
function create_chastitybelt(r, mage, level, force)
|
||||
return create_item(mage, level, "ao_chastity")
|
||||
end
|
||||
|
||||
-- Erschaffe ein Runenschwert
|
||||
function create_runesword(r, mage, level, force)
|
||||
return create_item(mage, level, "runesword")
|
||||
end
|
||||
|
||||
-- Erschaffe ein Aurafokus
|
||||
function create_focus(r, mage, level, force)
|
||||
return create_item(mage, level, "aurafocus")
|
||||
end
|
||||
|
||||
-- Erschaffe einen Ring der Macht
|
||||
function create_rop(r, mage, level, force)
|
||||
return create_item(mage, level, "rop")
|
||||
end
|
||||
|
||||
-- Erschaffe einen Ring der Regeneration
|
||||
function create_ror(r, mage, level, force)
|
||||
return create_item(mage, level, "ror")
|
||||
end
|
||||
|
||||
-- Erschaffe einen Zauberbeutel
|
||||
function create_bagofholding(r, mage, level, force)
|
||||
return create_item(mage, level, "magicbag")
|
||||
end
|
||||
|
||||
-- TODO:
|
||||
function earnsilver(r, mage, level, force)
|
||||
local money = r:get_resource("money")
|
||||
local wanted = 50 * force
|
||||
local amount = wanted
|
||||
if wanted > money then
|
||||
amount = money
|
||||
end
|
||||
r:set_resource("money", money - amount)
|
||||
mage:add_item("money", amount)
|
||||
|
||||
msg = message("income")
|
||||
msg:set_unit("unit", mage)
|
||||
msg:set_region("region", r)
|
||||
msg:set_int("mode", 6)
|
||||
msg:set_int("wanted", wanted)
|
||||
msg:set_int("amount", amount)
|
||||
msg:send_faction(mage.faction)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue