i18n of spell-syntax (removing fixed syntax text and replacing with a localizable function)

This commit is contained in:
Enno Rehling 2007-09-10 06:51:11 +00:00
parent fa375ed8b4
commit 7de422f976
11 changed files with 259 additions and 184 deletions

View file

@ -221,6 +221,7 @@ report_spell(FILE * F, spell *sp, const struct locale * lang)
char buf[4096];
char * bufp = buf;
size_t size = sizeof(buf) - 1;
const char * params = sp->parameter;
rnl(F);
centre(F, spell_name(sp, lang), true);
@ -324,85 +325,137 @@ report_spell(FILE * F, spell *sp, const struct locale * lang)
rparagraph(F, buf, 0, 0, 0);
rparagraph(F, LOC(lang, "nr_spell_syntax"), 0, 0, 0);
if (!sp->syntax) {
static int targets[] = { P_REGION, P_UNIT, P_SHIP, P_BUILDING, MAXPARAMS };
int * targetp = NULL;
bufp = buf;
size = sizeof(buf) - 1;
if ((sp->sptyp & ANYTARGET) == ANYTARGET) targetp = targets;
do {
if (sp->sptyp & ISCOMBATSPELL) {
bytes = (int)strlcpy(bufp, LOC(lang, keywords[K_COMBAT]), size);
} else {
bytes = (int)strlcpy(bufp, LOC(lang, keywords[K_CAST]), size);
}
if (wrptr(&bufp, &size, bytes)!=0) WARN_STATIC_BUFFER();
/* Reihenfolge beachten: Erst REGION, dann STUFE! */
if (sp->sptyp & FARCASTING) {
bytes = snprintf(bufp, size, " [%s x y]", LOC(lang, parameters[P_REGION]));
if (wrptr(&bufp, &size, bytes)!=0) WARN_STATIC_BUFFER();
}
if (sp->sptyp & SPELLLEVEL) {
bytes = snprintf(bufp, size, " [%s n]", LOC(lang, parameters[P_LEVEL]));
}
if (wrptr(&bufp, &size, bytes)!=0) WARN_STATIC_BUFFER();
bytes = (int)strlcpy(bufp, " \"", size);
if (wrptr(&bufp, &size, bytes)!=0) WARN_STATIC_BUFFER();
bytes = (int)strlcpy(bufp, spell_name(sp, lang), size);
if (wrptr(&bufp, &size, bytes)!=0) WARN_STATIC_BUFFER();
bytes = (int)strlcpy(bufp, "\" ", size);
if (wrptr(&bufp, &size, bytes)!=0) WARN_STATIC_BUFFER();
if (sp->sptyp & ONETARGET || targetp) {
if (targetp) {
bytes = (int)snprintf(bufp, size, "%s ", parameters[*targetp]);
if (wrptr(&bufp, &size, bytes)!=0) WARN_STATIC_BUFFER();
}
if (sp->sptyp & UNITSPELL) {
bytes = (int)strlcpy(bufp, "<Einheit-Nr>", size);
} else if (sp->sptyp & SHIPSPELL) {
bytes = (int)strlcpy(bufp, "<Schiff-Nr>", size);
} else if (sp->sptyp & BUILDINGSPELL) {
bytes = (int)strlcpy(bufp, "<Gebaeude-Nr>", size);
} else {
bytes = 0;
}
if (wrptr(&bufp, &size, bytes)!=0) WARN_STATIC_BUFFER();
} else {
assert(!targetp);
if (sp->sptyp & UNITSPELL) {
bytes = (int)strlcpy(bufp, "<Einheit-Nr> [<Einheit-Nr> ...]", size);
} else if (sp->sptyp & SHIPSPELL) {
bytes = (int)strlcpy(bufp, "<Schiff-Nr> [<Schiff-Nr> ...]", size);
} else if (sp->sptyp & BUILDINGSPELL) {
bytes = (int)strlcpy(bufp, "<Gebaeude-Nr> [<Gebaeude-Nr> ...]", size);
} else {
bytes = 0;
}
if (wrptr(&bufp, &size, bytes)!=0) WARN_STATIC_BUFFER();
}
if (targetp) {
++targetp;
if (*targetp!=MAXPARAMS) {
bytes = (int)strlcpy(bufp, "\n", size);
if (wrptr(&bufp, &size, bytes)!=0) WARN_STATIC_BUFFER();
} else {
targetp = NULL;
}
}
} while (targetp);
*bufp = 0;
rparagraph(F, buf, 2, 0, 0);
bufp = buf;
size = sizeof(buf) - 1;
if (sp->sptyp & ISCOMBATSPELL) {
bytes = (int)strlcpy(bufp, LOC(lang, keywords[K_COMBAT]), size);
} else {
rparagraph(F, sp->syntax, 2, 0, 0);
bytes = (int)strlcpy(bufp, LOC(lang, keywords[K_CAST]), size);
}
if (wrptr(&bufp, &size, bytes)!=0) WARN_STATIC_BUFFER();
/* Reihenfolge beachten: Erst REGION, dann STUFE! */
if (sp->sptyp & FARCASTING) {
bytes = snprintf(bufp, size, " [%s x y]", LOC(lang, parameters[P_REGION]));
if (wrptr(&bufp, &size, bytes)!=0) WARN_STATIC_BUFFER();
}
if (sp->sptyp & SPELLLEVEL) {
bytes = snprintf(bufp, size, " [%s n]", LOC(lang, parameters[P_LEVEL]));
if (wrptr(&bufp, &size, bytes)!=0) WARN_STATIC_BUFFER();
}
bytes = (int)snprintf(bufp, size, " \"%s\"", spell_name(sp, lang));
if (wrptr(&bufp, &size, bytes)!=0) WARN_STATIC_BUFFER();
while (params && *params) {
typedef struct starget {
param_t param;
int flag;
const char * vars;
} starget;
starget targets[] = {
{ P_REGION, REGIONSPELL, NULL },
{ P_UNIT, UNITSPELL, "par_unit" },
{ P_SHIP, SHIPSPELL, "par_ship" },
{ P_BUILDING, BUILDINGSPELL, "par_building" },
{ 0, 0, NULL }
};
starget * targetp;
char cp = *params++;
int i, maxparam = 0;
const char * locp;
const char * syntaxp = sp->syntax;
if (cp=='u') {
targetp = targets+1;
locp = LOC(lang, targetp->vars);
bytes = (int)snprintf(bufp, size, " <%s>", locp);
if (*params=='+') {
++params;
if (wrptr(&bufp, &size, bytes)!=0) WARN_STATIC_BUFFER();
bytes = (int)snprintf(bufp, size, " [<%s> ...]", locp);
}
if (wrptr(&bufp, &size, bytes)!=0) WARN_STATIC_BUFFER();
} else if (cp=='s') {
targetp = targets+2;
locp = LOC(lang, targetp->vars);
bytes = (int)snprintf(bufp, size, " <%s>", locp);
if (*params=='+') {
++params;
if (wrptr(&bufp, &size, bytes)!=0) WARN_STATIC_BUFFER();
bytes = (int)snprintf(bufp, size, " [<%s> ...]", locp);
}
if (wrptr(&bufp, &size, bytes)!=0) WARN_STATIC_BUFFER();
} else if (cp=='r') {
bytes = (int)strlcpy(bufp, " <x> <y>", size);
if (*params=='+') {
++params;
if (wrptr(&bufp, &size, bytes)!=0) WARN_STATIC_BUFFER();
bytes = (int)strlcpy(bufp, " [<x> <y> ...]", size);
}
if (wrptr(&bufp, &size, bytes)!=0) WARN_STATIC_BUFFER();
} else if (cp=='b') {
targetp = targets+3;
locp = LOC(lang, targetp->vars);
bytes = (int)snprintf(bufp, size, " <%s>", locp);
if (*params=='+') {
++params;
if (wrptr(&bufp, &size, bytes)!=0) WARN_STATIC_BUFFER();
bytes = (int)snprintf(bufp, size, " [<%s> ...]", locp);
}
if (wrptr(&bufp, &size, bytes)!=0) WARN_STATIC_BUFFER();
} else if (cp=='k') {
for (targetp=targets;targetp->flag;++targetp) {
if (sp->sptyp&targetp->flag) ++maxparam;
}
if (maxparam>1) {
bytes = (int)strlcpy(bufp, " (", size);
if (wrptr(&bufp, &size, bytes)!=0) WARN_STATIC_BUFFER();
}
i = 0;
for (targetp=targets;targetp->flag;++targetp) {
if (sp->sptyp&targetp->flag) {
if (i++!=0) {
bytes = (int)strlcpy(bufp, " |", size);
if (wrptr(&bufp, &size, bytes)!=0) WARN_STATIC_BUFFER();
}
if (targetp->param) {
locp = LOC(lang, targetp->vars);
bytes = (int)snprintf(bufp, size, " %s <%s>", parameters[targetp->param], locp);
if (*params=='+') {
++params;
if (wrptr(&bufp, &size, bytes)!=0) WARN_STATIC_BUFFER();
bytes = (int)snprintf(bufp, size, " [<%s> ...]", locp);
}
} else {
bytes = (int)snprintf(bufp, size, " %s", parameters[targetp->param]);
}
if (wrptr(&bufp, &size, bytes)!=0) WARN_STATIC_BUFFER();
}
}
if (maxparam>1) {
bytes = (int)strlcpy(bufp, " )", size);
if (wrptr(&bufp, &size, bytes)!=0) WARN_STATIC_BUFFER();
}
} else {
const char * cstr = strchr(syntaxp, ':');
if (!cstr) {
locp = LOC(lang, mkname("spellpar", syntaxp));
} else {
char substr[32];
strncpy(substr, syntaxp, cstr-syntaxp);
substr[cstr-syntaxp] = 0;
locp = LOC(lang, mkname("spellpar", substr));
syntaxp = substr + 1;
}
bytes = (int)snprintf(bufp, size, " <%s>", locp);
if (wrptr(&bufp, &size, bytes)!=0) WARN_STATIC_BUFFER();
}
}
*bufp = 0;
rparagraph(F, buf, 2, 0, 0);
rnl(F);
}

View file

@ -39,7 +39,7 @@
* der Einheit und auch keine Zauber.
*
* Flag:
* (UNITSPELL | ONETARGET | TESTCANSEE)
* (UNITSPELL | TESTCANSEE)
*/
static int
sp_babbler(castorder *co)
@ -86,7 +86,7 @@ sp_babbler(castorder *co)
* Magieresistenz hier prüfen, wegen Fehlermeldung
*
* Flag:
* (UNITSPELL | ONETARGET)
* (UNITSPELL)
*/
static int
sp_readmind(castorder *co)

View file

@ -346,7 +346,7 @@ border_type bt_fogwall = {
static const char *
b_nameillusionwall(const border * b, const region * r, const struct faction * f, int gflags)
{
/* TODO: f->locale bestimmt die Sprache */
/* TODO: UNICODE: f->locale bestimmt die Sprache */
int fno = b->data.i;
unused(b);
unused(r);
@ -380,7 +380,7 @@ boolean b_blockquestportal(const border * b, const unit * u, const region * r) {
static const char *
b_namequestportal(const border * b, const region * r, const struct faction * f, int gflags)
{
/* TODO: f->locale bestimmt die Sprache */
/* TODO: UNICODE: f->locale bestimmt die Sprache */
int lock = b->data.i;
unused(b);
unused(r);

View file

@ -443,7 +443,6 @@ new_building(const struct building_type * btype, region * r, const struct locale
if (b->type->name==NULL) {
bname = LOC(lang, btype->_name);
} else {
/* TODO: optimization potential: make b->name NULL and use this as default */
bname = LOC(lang, buildingtype(btype, b, 0));
}
b->name = strdup(bname);

View file

@ -188,7 +188,6 @@ extern spell_list ** spelllist_find(spell_list ** lspells, const struct spell *
#define SHIPSPELL (1<<3) /* ZAUBER .. <Schiff-Nr> [<Schiff-Nr> ..] */
#define BUILDINGSPELL (1<<4) /* ZAUBER .. <Gebaeude-Nr> [<Gebaeude-Nr> ..] */
#define REGIONSPELL (1<<5) /* wirkt auf struct region */
#define ONETARGET (1<<6) /* ZAUBER .. <Ziel-Nr> */
#define PRECOMBATSPELL (1<<7) /* PRÄKAMPFZAUBER .. */
#define COMBATSPELL (1<<8) /* KAMPFZAUBER .. */
@ -206,7 +205,7 @@ extern spell_list ** spelllist_find(spell_list ** lspells, const struct spell *
#define SEARCHGLOBAL (1<<14) /* Ziel global anstatt nur in target_region
suchen */
#define TESTCANSEE (1<<15) /* alle Zielunits auf cansee prüfen */
#define ANYTARGET (1<<16) /* wirkt auf alle objekttypen (unit, ship, building, region) */
#define ANYTARGET (UNITSPELL|REGIONSPELL|BUILDINGSPELL|SHIPSPELL) /* wirkt auf alle objekttypen (unit, ship, building, region) */
/* Flag Spruchkostenberechnung: */
enum{

View file

@ -935,20 +935,22 @@ readunit(FILE * F, int encoding)
p = n = 0;
orderp = &u->orders;
while (obuf[0]) {
order * ord = parse_order(obuf, u->faction->locale);
if (ord!=NULL) {
if (++n<MAXORDERS) {
if (!is_persistent(ord) || ++p<MAXPERSISTENT) {
*orderp = ord;
orderp = &ord->next;
ord = NULL;
} else if (p==MAXPERSISTENT) {
log_warning(("%s had %d or more persistent orders\n", unitname(u), MAXPERSISTENT));
if (!lomem) {
order * ord = parse_order(obuf, u->faction->locale);
if (ord!=NULL) {
if (++n<MAXORDERS) {
if (!is_persistent(ord) || ++p<MAXPERSISTENT) {
*orderp = ord;
orderp = &ord->next;
ord = NULL;
} else if (p==MAXPERSISTENT) {
log_warning(("%s had %d or more persistent orders\n", unitname(u), MAXPERSISTENT));
}
} else if (n==MAXORDERS) {
log_warning(("%s had %d or more orders\n", unitname(u), MAXORDERS));
}
} else if (n==MAXORDERS) {
log_warning(("%s had %d or more orders\n", unitname(u), MAXORDERS));
if (ord!=NULL) free_order(ord);
}
if (ord!=NULL) free_order(ord);
}
freadstr(F, encoding, obuf, sizeof(obuf));
}
@ -1897,8 +1899,8 @@ writegame(const char *filename, int quiet)
wnl(F);
for (b = r->buildings; b; b = b->next) {
wi36(F, b->no);
ws(F, (const char *)b->name);
ws(F, b->display?(const char *)b->display:"");
ws(F, b->name);
ws(F, b->display?b->display:"");
wi(F, b->size);
ws(F, b->type->_name);
wnl(F);

View file

@ -108,7 +108,6 @@ extern "C" {
* UNITSPELL : ZAUBER <spruchname> <Einheit-Nr> [<Einheit-Nr> ..]
* SHIPSPELL : ZAUBER <spruchname> <Schiff-Nr> [<Schiff-Nr> ..]
* BUILDINGSPELL: ZAUBER <spruchname> <Gebaeude-Nr> [<Gebaeude-Nr> ..]
* ONETARGET : ZAUBER <spruchname> <target-nr>
* PRECOMBATSPELL : KAMPFZAUBER [STUFE n] <spruchname>
* COMBATSPELL : KAMPFZAUBER [STUFE n] <spruchname>
* POSTCOMBATSPELL: KAMPFZAUBER [STUFE n] <spruchname>

View file

@ -1326,6 +1326,13 @@ parse_spells(xmlDocPtr doc)
sp->parameter=strdup((const char *)propValue);
xmlFree(propValue);
}
propValue = xmlGetProp(node, BAD_CAST "syntax");
if (propValue) {
sp->syntax=strdup((const char *)propValue);
xmlFree(propValue);
}
/* magic type */
propValue = xmlGetProp(node, BAD_CAST "type");
assert(propValue!=NULL);

View file

@ -36,7 +36,7 @@ struct castorder;
* TODO: Der Alp-Curse sollte sich durch besondere Antimagie (Tybied)
* entfernen lassen.
*
* (UNITSPELL | ONETARGET | SEARCHGLOBAL | TESTRESISTANCE)
* (UNITSPELL | SEARCHGLOBAL | TESTRESISTANCE)
*/
extern int sp_summon_alp(struct castorder *co);

View file

@ -717,7 +717,7 @@ sp_destroy_magic(castorder *co)
* "ZAUBERE <spruchname> <Einheit-Nr> <investierte Aura>"
* "ui"
* Flags:
* (UNITSPELL|ONSHIPCAST|ONETARGET)
* (UNITSPELL|ONSHIPCAST)
* */
static int
@ -785,7 +785,7 @@ sp_transferaura(castorder *co)
* verdoppelt), und "Luftschiff".
*
* Flags:
* (SHIPSPELL|ONSHIPCAST|SPELLLEVEL|ONETARGET|TESTRESISTANCE)
* (SHIPSPELL|ONSHIPCAST|SPELLLEVEL|TESTRESISTANCE)
*/
static int
@ -934,7 +934,7 @@ sp_summonent(castorder *co)
* fertigen Steinkreis mittels des Zaubers erschaffen.
*
* Flags:
* (BUILDINGSPELL | ONETARGET)
* (BUILDINGSPELL)
*
*/
static int
@ -1412,7 +1412,7 @@ sp_kaelteschutz(castorder *co)
* Beschreibung auftaucht, aber nur visuellen Effekt hat.
*
* Flag:
* (UNITSPELL | TESTCANSEE | SPELLLEVEL | ONETARGET)
* (UNITSPELL | TESTCANSEE | SPELLLEVEL)
*/
/* Syntax: ZAUBER "Funkenregen" eh1 */
@ -2531,7 +2531,7 @@ sp_forest_fire(castorder *co)
* Magier wird selbst betroffen
*
* Flags:
* (UNITSPELL | SPELLLEVEL | ONETARGET | TESTCANSEE | TESTRESISTANCE)
* (UNITSPELL | SPELLLEVEL | TESTCANSEE | TESTRESISTANCE)
*
*/
static int
@ -3747,7 +3747,7 @@ sp_analysesong_obj(castorder *co)
* c->vigour)*10 + 100 %).
*
* Flag:
* (UNITSPELL|ONSHIPCAST|ONETARGET|TESTCANSEE)
* (UNITSPELL|ONSHIPCAST|TESTCANSEE)
*/
static int
sp_analysesong_unit(castorder *co)
@ -3795,7 +3795,7 @@ sp_analysesong_unit(castorder *co)
*
* Attackiere verbieten
* Flags:
* (UNITSPELL | ONETARGET | TESTCANSEE)
* (UNITSPELL | TESTCANSEE)
*/
static int
sp_charmingsong(castorder *co)
@ -4053,7 +4053,7 @@ sp_raisepeasantmob(castorder *co)
* angeworbene Einheit muss kontaktieren. Keine teuren Talente
*
* Flag:
* (UNITSPELL | SPELLLEVEL | ONETARGET | TESTCANSEE)
* (UNITSPELL | SPELLLEVEL | TESTCANSEE)
*/
static int
sp_migranten(castorder *co)
@ -4317,7 +4317,7 @@ sp_bigrecruit(castorder *co)
* niemand ihrer Partei, so weiß sie nichts zu berichten. Auch kann
* sie nur das erzählen, was sie selber sehen könnte.
* Flags:
* (UNITSPELL | ONETARGET | TESTCANSEE)
* (UNITSPELL | TESTCANSEE)
*/
/* restistenz der einheit prüfen */
@ -4379,7 +4379,7 @@ sp_pump(castorder *co)
* kommt Itemzahl%2 mit 50% chance
*
* Flags:
* (UNITSPELL | ONETARGET | TESTRESISTANCE | TESTCANSEE)
* (UNITSPELL | TESTRESISTANCE | TESTCANSEE)
*/
static int
sp_seduce(castorder *co)
@ -4449,7 +4449,7 @@ sp_seduce(castorder *co)
* anderen Magier nochmal gezaubert, schlägt der Zauber fehl.
*
* Flags:
* (UNITSPELL | ONSHIPCAST | ONETARGET | TESTRESISTANCE | TESTCANSEE)
* (UNITSPELL | ONSHIPCAST | TESTRESISTANCE | TESTCANSEE)
*/
static int
@ -4500,7 +4500,7 @@ sp_calm_monster(castorder *co)
* Wirkt auf bis zu 10 Personen in der Einheit
*
* Flags:
* (UNITSPELL | ONETARGET | TESTRESISTANCE | TESTCANSEE)
* (UNITSPELL | TESTRESISTANCE | TESTCANSEE)
*/
static int
@ -4840,7 +4840,7 @@ sp_icastle(castorder *co)
* (wie bei dämonischer Rassetarnung).
* Syntax: ZAUBERE "Gestaltwandlung" <einheit> <rasse>
* Flags:
* (UNITSPELL | SPELLLEVEL | ONETARGET)
* (UNITSPELL | SPELLLEVEL)
*/
int
@ -6140,7 +6140,7 @@ sp_eternizewall(castorder *co)
* übertragen, auf einen Magier eines anderen Gebietes ein Drittel.
*
* Flags:
* (UNITSPELL|ONETARGET)
* (UNITSPELL)
*
* Syntax:
* ZAUBERE \"Opfere Kraft\" <Einheit-Nr> <Aura>
@ -6297,7 +6297,7 @@ shipcurse_flyingship(ship* sh, unit * mage, double power, int duration)
* Kombinierbar mit "Günstige Winde", aber nicht mit "Sturmwind".
*
* Flag:
* (ONSHIPCAST | SHIPSPELL | ONETARGET | TESTRESISTANCE)
* (ONSHIPCAST | SHIPSPELL | TESTRESISTANCE)
*/
int
sp_flying_ship(castorder *co)
@ -6359,7 +6359,7 @@ sp_flying_ship(castorder *co)
* zuführen.
*
* Flags:
* (FARCASTING | SPELLLEVEL | UNITSPELL | ONETARGET | TESTRESISTANCE |
* (FARCASTING | SPELLLEVEL | UNITSPELL | TESTRESISTANCE |
* TESTCANSEE)
* */
int
@ -7042,7 +7042,7 @@ static spelldata spelldaten[] =
{ SPL_GOODWINDS, "goodwinds", NULL, NULL,
"s",
M_DRUIDE,
(SHIPSPELL|ONSHIPCAST|SPELLLEVEL|ONETARGET|TESTRESISTANCE),
(SHIPSPELL|ONSHIPCAST|SPELLLEVEL|TESTRESISTANCE),
5, 4,
{
{ "aura", 1, SPC_LEVEL },
@ -7091,9 +7091,9 @@ static spelldata spelldaten[] =
},
{
SPL_TRANSFERAURA_DRUIDE, "transferauradruide", NULL,
"ZAUBERE \'Meditation\' <Einheit-Nr> <investierte Aura>",
"aura",
"ui",
M_DRUIDE, (UNITSPELL|ONSHIPCAST|ONETARGET), 1, 6,
M_DRUIDE, (UNITSPELL|ONSHIPCAST), 1, 6,
{
{ "aura", 2, SPC_FIX },
{ 0, 0, 0 },
@ -7182,7 +7182,7 @@ static spelldata spelldaten[] =
SPL_GWYRRD_DESTROY_MAGIC, "gwyrrddestroymagic", NULL, NULL,
"kc?",
M_DRUIDE,
(FARCASTING | SPELLLEVEL | ONSHIPCAST | ONETARGET | TESTCANSEE | ANYTARGET),
(FARCASTING | SPELLLEVEL | ONSHIPCAST | TESTCANSEE | ANYTARGET),
2, 8,
{
{ "aura", 6, SPC_LEVEL },
@ -7207,8 +7207,7 @@ static spelldata spelldaten[] =
(spell_f)sp_treewalkenter, NULL
},
{
SPL_TREEWALKEXIT, "treewalkexit", NULL,
"ZAUBERE \'Sog des Lebens\' <Ziel-X> <Ziel-Y> <Einheit> [<Einheit> ..]",
SPL_TREEWALKEXIT, "treewalkexit", NULL, NULL,
"ru+",
M_DRUIDE, (UNITSPELL | SPELLLEVEL | TESTCANSEE), 7, 9,
{
@ -7259,7 +7258,7 @@ static spelldata spelldaten[] =
{
SPL_BLESSSTONECIRCLE, "blessstonecircle", NULL, NULL,
"b",
M_DRUIDE, (BUILDINGSPELL | ONETARGET), 5, 11,
M_DRUIDE, (BUILDINGSPELL), 5, 11,
{
{ "aura", 350, SPC_FIX },
{ "permaura", 5, SPC_FIX },
@ -7353,7 +7352,7 @@ static spelldata spelldaten[] =
{
SPL_SPARKLE_CHAOS, "sparklechaos", NULL, NULL,
"u",
M_CHAOS, (UNITSPELL | TESTCANSEE | SPELLLEVEL | ONETARGET), 5, 1,
M_CHAOS, (UNITSPELL | TESTCANSEE | SPELLLEVEL), 5, 1,
{
{ "aura", 1, SPC_LEVEL },
{ 0, 0, 0 },
@ -7415,7 +7414,7 @@ static spelldata spelldaten[] =
SPL_FUMBLECURSE, "fumblecurse", NULL, NULL,
"u",
M_CHAOS,
(UNITSPELL | SPELLLEVEL | ONETARGET | TESTCANSEE | TESTRESISTANCE),
(UNITSPELL | SPELLLEVEL | TESTCANSEE | TESTRESISTANCE),
4, 5,
{
{ "aura", 4, SPC_LEVEL },
@ -7453,9 +7452,9 @@ static spelldata spelldaten[] =
},
{
SPL_TRANSFERAURA_CHAOS, "transferaurachaos", NULL,
"ZAUBERE \'Machtuebertragung\' <Einheit-Nr> <investierte Aura>",
"aura",
"ui",
M_CHAOS, (UNITSPELL|ONSHIPCAST|ONETARGET), 1, 7,
M_CHAOS, (UNITSPELL|ONSHIPCAST), 1, 7,
{
{ "aura", 2, SPC_FIX },
{ 0, 0, 0 },
@ -7467,7 +7466,7 @@ static spelldata spelldaten[] =
},
{
SPL_FIREWALL, "firewall", NULL,
"ZAUBERE \'Feuerwand\' <Richtung>",
"direction",
"c",
M_CHAOS, (SPELLLEVEL | REGIONSPELL | TESTRESISTANCE), 4, 7,
{
@ -7569,7 +7568,7 @@ static spelldata spelldaten[] =
SPL_DRAIG_DESTROY_MAGIC, "draigdestroymagic", NULL, NULL,
"kc?",
M_CHAOS,
(FARCASTING | SPELLLEVEL | ONSHIPCAST | ONETARGET | TESTCANSEE | ANYTARGET),
(FARCASTING | SPELLLEVEL | ONSHIPCAST | TESTCANSEE | ANYTARGET),
2, 10,
{
{ "aura", 10, SPC_LEVEL },
@ -7658,7 +7657,7 @@ static spelldata spelldaten[] =
SPL_SPARKLE_DREAM, "sparkledream", NULL, NULL,
"u",
M_TRAUM,
(UNITSPELL | TESTCANSEE | SPELLLEVEL | ONETARGET | ONSHIPCAST),
(UNITSPELL | TESTCANSEE | SPELLLEVEL | ONSHIPCAST),
5, 1,
{
{ "aura", 1, SPC_LEVEL },
@ -7707,7 +7706,7 @@ static spelldata spelldaten[] =
},
{
SPL_ICASTLE, "icastle", NULL,
"ZAUBERE \"Traumschloesschen\" <Gebaeude-Typ>",
"buildingtype",
"c",
M_TRAUM, (0), 5, 3,
{
@ -7721,9 +7720,9 @@ static spelldata spelldaten[] =
},
{
SPL_TRANSFERAURA_TRAUM, "transferauratraum", NULL,
"ZAUBERE \'Traum der Magie\' <Einheit-Nr> <investierte Aura>",
"aura",
"ui",
M_TRAUM, (UNITSPELL|ONSHIPCAST|ONETARGET), 1, 3,
M_TRAUM, (UNITSPELL|ONSHIPCAST), 1, 3,
{
{ "aura", 2, SPC_FIX },
{ 0, 0, 0 },
@ -7735,9 +7734,9 @@ static spelldata spelldaten[] =
},
{
SPL_ILL_SHAPESHIFT, "shapeshift", NULL,
"ZAUBERE [STUFE n] \'Gestaltwandlung\' <Einheit-nr> <Rasse>",
"race",
"uc",
M_TRAUM, (UNITSPELL|SPELLLEVEL|ONETARGET), 5, 3,
M_TRAUM, (UNITSPELL|SPELLLEVEL), 5, 3,
{
{ "aura", 1, SPC_LEVEL },
{ 0, 0, 0 },
@ -7750,7 +7749,7 @@ static spelldata spelldaten[] =
{
SPL_DREAMREADING, "dreamreading", NULL, NULL,
"u",
M_TRAUM, (FARCASTING | UNITSPELL | ONETARGET | TESTRESISTANCE), 5, 4,
M_TRAUM, (FARCASTING | UNITSPELL | TESTRESISTANCE), 5, 4,
{
{ "aura", 8, SPC_FIX },
{ 0, 0, 0 },
@ -7787,7 +7786,7 @@ static spelldata spelldaten[] =
{
SPL_ANALYSEDREAM, "analysedream", NULL, NULL,
"u",
M_TRAUM, (UNITSPELL | ONSHIPCAST | ONETARGET | TESTCANSEE), 5, 5,
M_TRAUM, (UNITSPELL | ONSHIPCAST | TESTCANSEE), 5, 5,
{
{ "aura", 5, SPC_LEVEL },
{ 0, 0, 0 },
@ -7823,7 +7822,7 @@ static spelldata spelldaten[] =
},
{
SPL_WISPS, "wisps", NULL,
"ZAUBERE [REGION x y] [STUFE n] \'Irrlichter\' <Richtung>",
"direction",
"c",
M_TRAUM, (SPELLLEVEL | FARCASTING), 5, 7,
{
@ -7853,7 +7852,7 @@ static spelldata spelldaten[] =
SPL_ILLAUN_DESTROY_MAGIC, "illaundestroymagic", NULL, NULL,
"kc?",
M_TRAUM,
(FARCASTING | SPELLLEVEL | ONSHIPCAST | ONETARGET | TESTCANSEE | ANYTARGET),
(FARCASTING | SPELLLEVEL | ONSHIPCAST | TESTCANSEE | ANYTARGET),
2, 8,
{
{ "aura", 6, SPC_LEVEL },
@ -7930,7 +7929,7 @@ static spelldata spelldaten[] =
{
SPL_SUMMON_ALP, "summon_alp", NULL, NULL, "u",
M_TRAUM,
(UNITSPELL | ONETARGET | SEARCHGLOBAL | TESTRESISTANCE),
(UNITSPELL | SEARCHGLOBAL | TESTRESISTANCE),
5, 15,
{
{ "aura", 350, SPC_FIX },
@ -8059,7 +8058,7 @@ static spelldata spelldaten[] =
{
SPL_TRANSFERAURA_BARDE, "transfer_aura_song", NULL, NULL,
"ui",
M_BARDE, (UNITSPELL|ONSHIPCAST|ONETARGET), 1, 5,
M_BARDE, (UNITSPELL|ONSHIPCAST), 1, 5,
{
{ "aura", 2, SPC_FIX },
{ 0, 0, 0 },
@ -8073,7 +8072,7 @@ static spelldata spelldaten[] =
SPL_UNIT_ANALYSESONG, "analysesong_unit", NULL, NULL,
"u",
M_BARDE,
(UNITSPELL | ONSHIPCAST | ONETARGET | TESTCANSEE),
(UNITSPELL | ONSHIPCAST | TESTCANSEE),
5, 5,
{
{ "aura", 10, SPC_FIX },
@ -8099,7 +8098,7 @@ static spelldata spelldaten[] =
{ SPL_CALM_MONSTER, "calm_monster", NULL, NULL,
"u",
M_BARDE,
(UNITSPELL | ONSHIPCAST | ONETARGET | TESTRESISTANCE | TESTCANSEE),
(UNITSPELL | ONSHIPCAST | TESTRESISTANCE | TESTCANSEE),
5, 6,
{
{ "aura", 15, SPC_FIX },
@ -8113,7 +8112,7 @@ static spelldata spelldaten[] =
{ SPL_SEDUCE, "seduction", NULL, NULL,
"u",
M_BARDE,
(UNITSPELL | ONETARGET | TESTRESISTANCE | TESTCANSEE),
(UNITSPELL | TESTRESISTANCE | TESTCANSEE),
5, 6,
{
{ "aura", 12, SPC_FIX },
@ -8128,7 +8127,7 @@ static spelldata spelldaten[] =
SPL_HEADACHE, "headache", NULL, NULL,
"u",
M_BARDE,
(UNITSPELL | ONETARGET | TESTRESISTANCE | TESTCANSEE),
(UNITSPELL | TESTRESISTANCE | TESTCANSEE),
5, 7,
{
{ "aura", 4, SPC_LINEAR },
@ -8140,9 +8139,9 @@ static spelldata spelldaten[] =
(spell_f)sp_headache, NULL
},
{ SPL_PUMP, "sound_out", NULL,
"ZAUBERE \'Aushorchen\' <Einheit-Nr> <Zielregion-X> <Zielregion-Y>",
NULL,
"ur",
M_BARDE, (UNITSPELL | ONETARGET | TESTCANSEE), 5, 7,
M_BARDE, (UNITSPELL | TESTCANSEE), 5, 7,
{
{ "aura", 4, SPC_FIX },
{ "money", 100, SPC_FIX },
@ -8177,12 +8176,9 @@ static spelldata spelldaten[] =
(spell_f)sp_frighten, NULL
},
{
SPL_OBJ_ANALYSESONG, "analyse_object", NULL,
"ZAUBERE [STUFE n] \'Lied des Ortes analysieren\' REGION\n"
"ZAUBERE [STUFE n] \'Lied des Ortes analysieren\' GEBAEUDE <Gebaeude-Nr>\n"
"ZAUBERE [STUFE n] \'Lied des Ortes analysieren\' SCHIFF <Schiff-nr>",
SPL_OBJ_ANALYSESONG, "analyse_object", NULL, NULL,
"kc?",
M_BARDE, (SPELLLEVEL|ONSHIPCAST), 5, 8,
M_BARDE, (SPELLLEVEL | ONSHIPCAST | REGIONSPELL | BUILDINGSPELL | SHIPSPELL), 5, 8,
{
{ "aura", 3, SPC_LEVEL },
{ 0, 0, 0 },
@ -8196,7 +8192,7 @@ static spelldata spelldaten[] =
SPL_CERDDOR_DESTROY_MAGIC, "cerddor_destroymagic", NULL, NULL,
"kc?",
M_BARDE,
(FARCASTING | SPELLLEVEL | ONSHIPCAST | ONETARGET | TESTCANSEE | ANYTARGET),
(FARCASTING | SPELLLEVEL | ONSHIPCAST | TESTCANSEE | ANYTARGET),
2, 8,
{
{ "aura", 5, SPC_LEVEL },
@ -8210,7 +8206,7 @@ static spelldata spelldaten[] =
{
SPL_MIGRANT, "migration", NULL, NULL,
"u",
M_BARDE, (UNITSPELL | SPELLLEVEL | ONETARGET | TESTCANSEE), 5, 9,
M_BARDE, (UNITSPELL | SPELLLEVEL | TESTCANSEE), 5, 9,
{
{ "aura", 3, SPC_LEVEL },
{ "permaura", 1, SPC_LEVEL },
@ -8300,7 +8296,7 @@ static spelldata spelldaten[] =
{
SPL_SONG_OF_ENSLAVE, "song_of_slavery", NULL, NULL,
"u",
M_BARDE, (UNITSPELL | ONETARGET | TESTCANSEE), 5, 13,
M_BARDE, (UNITSPELL | TESTCANSEE), 5, 13,
{
{ "aura", 40, SPC_FIX },
{ 0, 0, 0 },
@ -8351,7 +8347,7 @@ static spelldata spelldaten[] =
{
SPL_ANALYSEMAGIC, "analyze_magic", NULL, NULL,
"kc?",
M_ASTRAL, (SPELLLEVEL | UNITSPELL | ONSHIPCAST | ONETARGET | TESTCANSEE | ANYTARGET), 5, 1,
M_ASTRAL, (SPELLLEVEL | UNITSPELL | ONSHIPCAST | TESTCANSEE | ANYTARGET), 5, 1,
{
{ "aura", 1, SPC_LEVEL },
{ 0, 0, 0 },
@ -8364,7 +8360,7 @@ static spelldata spelldaten[] =
{
SPL_ITEMCLOAK, "concealing_aura", NULL, NULL,
"u",
M_ASTRAL, (SPELLLEVEL | UNITSPELL | ONSHIPCAST | ONETARGET), 5, 1,
M_ASTRAL, (SPELLLEVEL | UNITSPELL | ONSHIPCAST), 5, 1,
{
{ "aura", 1, SPC_LEVEL },
{ 0, 0, 0 },
@ -8440,9 +8436,7 @@ static spelldata spelldaten[] =
(spell_f)sp_enterastral, NULL
},
{
SPL_LEAVEASTRAL, "leaveastral", NULL,
"ZAUBER [STUFE n] \'Astraler Ausgang\' <Ziel-X> <Ziel-Y> <Einheit-Nr> "
"[<Einheit-Nr> ...]",
SPL_LEAVEASTRAL, "leaveastral", NULL, NULL,
"ru+",
M_ASTRAL, (UNITSPELL |SPELLLEVEL), 7, 4,
{
@ -8456,9 +8450,9 @@ static spelldata spelldaten[] =
},
{
SPL_TRANSFERAURA_ASTRAL, "auratransfer", NULL,
"ZAUBERE \'Auratransfer\' <Einheit-Nr> <investierte Aura>",
"aura",
"ui",
M_ASTRAL, (UNITSPELL|ONSHIPCAST|ONETARGET), 1, 5,
M_ASTRAL, (UNITSPELL|ONSHIPCAST), 1, 5,
{
{ "aura", 1, SPC_FIX },
{ 0, 0, 0 },
@ -8497,7 +8491,7 @@ static spelldata spelldaten[] =
SPL_TYBIED_DESTROY_MAGIC, "destroy_magic", NULL, NULL,
"kc?",
M_ASTRAL,
(FARCASTING | SPELLLEVEL | ONSHIPCAST | ONETARGET | TESTCANSEE | ANYTARGET),
(FARCASTING | SPELLLEVEL | ONSHIPCAST | TESTCANSEE | ANYTARGET),
2, 5,
{
{ "aura", 4, SPC_LEVEL },
@ -8509,9 +8503,7 @@ static spelldata spelldaten[] =
(spell_f)sp_destroy_magic, NULL
},
{
SPL_PULLASTRAL, "pull_astral", NULL,
"ZAUBER [STUFE n] \'Astraler Ruf\' <Ziel-X> <Ziel-Y> <Einheit-Nr> "
"[<Einheit-Nr> ...]",
SPL_PULLASTRAL, "pull_astral", NULL, NULL,
"ru+",
M_ASTRAL, (UNITSPELL | SEARCHGLOBAL | SPELLLEVEL), 7, 6,
{
@ -8539,7 +8531,7 @@ static spelldata spelldaten[] =
{
SPL_STEALAURA, "steal_aura", NULL, NULL, "u",
M_ASTRAL,
(FARCASTING | SPELLLEVEL | UNITSPELL | ONETARGET | TESTRESISTANCE | TESTCANSEE),
(FARCASTING | SPELLLEVEL | UNITSPELL | TESTRESISTANCE | TESTCANSEE),
3, 6,
{
{ "aura", 2, SPC_LEVEL },
@ -8552,7 +8544,7 @@ static spelldata spelldaten[] =
},
{
SPL_FLYING_SHIP, "airship", NULL, NULL, "s",
M_ASTRAL, (ONSHIPCAST | SHIPSPELL | ONETARGET | TESTRESISTANCE), 5, 6,
M_ASTRAL, (ONSHIPCAST | SHIPSPELL | TESTRESISTANCE), 5, 6,
{
{ "aura", 10, SPC_FIX },
{ "h12", 1, SPC_FIX },
@ -8565,7 +8557,7 @@ static spelldata spelldaten[] =
{
SPL_DESTROY_MAGIC, "break_curse", NULL, NULL,
"kcc",
M_ASTRAL, (FARCASTING | SPELLLEVEL | ONSHIPCAST | ONETARGET | TESTCANSEE | ANYTARGET), 3, 7,
M_ASTRAL, (FARCASTING | SPELLLEVEL | ONSHIPCAST | TESTCANSEE | ANYTARGET), 3, 7,
{
{ "aura", 3, SPC_LEVEL },
{ 0, 0, 0 },
@ -8576,11 +8568,9 @@ static spelldata spelldaten[] =
(spell_f)sp_break_curse, NULL
},
{
SPL_ETERNIZEWALL, "eternal_walls", NULL,
"ZAUBERE \'Mauern der Ewigkeit\' <Gebaeude-Nr>",
"b",
SPL_ETERNIZEWALL, "eternal_walls", NULL, NULL, "b",
M_ASTRAL,
(SPELLLEVEL | BUILDINGSPELL | ONETARGET | TESTRESISTANCE | ONSHIPCAST),
(SPELLLEVEL | BUILDINGSPELL | TESTRESISTANCE | ONSHIPCAST),
5, 7,
{
{ "aura", 50, SPC_FIX },
@ -8592,11 +8582,8 @@ static spelldata spelldaten[] =
(spell_f)sp_eternizewall, NULL
},
{
SPL_SCHILDRUNEN, "protective_runes", NULL,
"ZAUBERE \'Runen des Schutzes\' GEBAEUDE <Gebaeude-Nr> | "
"SCHIFF <Schiff-Nr>]",
"kc",
M_ASTRAL, (ONSHIPCAST | TESTRESISTANCE), 2, 8,
SPL_SCHILDRUNEN, "protective_runes", NULL, NULL, "kc",
M_ASTRAL, (ONSHIPCAST | TESTRESISTANCE | BUILDINGSPELL | SHIPSPELL), 2, 8,
{
{ "aura", 20, SPC_FIX },
{ 0, 0, 0 },
@ -8686,12 +8673,10 @@ static spelldata spelldaten[] =
(spell_f)sp_summon_familiar, NULL
},
{
SPL_MOVECASTLE, "living_rock",
NULL,
"ZAUBER [STUFE n] \'Belebtes Gestein\' <Burg-Nr> <Richtung>",
SPL_MOVECASTLE, "living_rock", NULL, "direction",
"bc",
M_ASTRAL,
(SPELLLEVEL | BUILDINGSPELL | ONETARGET | TESTRESISTANCE),
(SPELLLEVEL | BUILDINGSPELL | TESTRESISTANCE),
5, 13,
{
{ "aura", 10, SPC_LEVEL },
@ -8717,9 +8702,8 @@ static spelldata spelldaten[] =
},
{
SPL_PERMTRANSFER, "sacrifice_strength", NULL,
"ZAUBERE \'Opfere Kraft\' <Einheit-Nr> <Aura>",
"ui",
M_ASTRAL, (UNITSPELL|ONETARGET), 1, 15,
"aura", "ui",
M_ASTRAL, (UNITSPELL), 1, 15,
{
{ "aura", 100, SPC_FIX },
{ 0, 0, 0 },

View file

@ -7472,4 +7472,36 @@
<text locale="en">an incomplete road</text>
</string>
<string name="par_unit">
<text locale="de">Einheit-Nr</text>
<text locale="en">unitid</text>
</string>
<string name="par_ship">
<text locale="de">Schiff-Nr</text>
<text locale="en">shipid</text>
</string>
<string name="par_building">
<text locale="de">Gebäude-Nr</text>
<text locale="en">buildingid</text>
</string>
<namespace name="spellpar">
<string name="aura">
<text locale="de">Aura</text>
<text locale="en">aura</text>
</string>
<string name="direction">
<text locale="de">Richtung</text>
<text locale="en">direction</text>
</string>
<string name="buildingtype">
<text locale="de">Gebäudetyp</text>
<text locale="en">buildingtype</text>
</string>
</namespace>
</strings>