From 708a6ceb8ecbaca361b1b26d7632981bb1922a74 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Tue, 26 May 2009 18:11:20 +0000 Subject: [PATCH] new spell lists for E2K9 new magic code for E2K9 --- src/common/gamecode/creport.c | 2 +- src/common/gamecode/give.c | 4 +- src/common/gamecode/items.c | 2 +- src/common/gamecode/laws.c | 2 +- src/common/gamecode/report.c | 2 +- src/common/gamecode/spy.c | 6 +- src/common/gamecode/study.c | 9 +- src/common/gamecode/summary.c | 4 +- src/common/kernel/eressea.c | 22 +- src/common/kernel/magic.c | 126 ++--- src/common/kernel/magic.h | 22 +- src/common/kernel/move.c | 2 +- src/common/kernel/reports.c | 5 +- src/common/kernel/spell.c | 4 +- src/common/kernel/xmlreader.c | 6 +- src/common/modules/arena.c | 6 +- src/common/races/races.c | 2 +- src/common/spells/spells.c | 323 ++++++------ src/eressea/lua/script.cpp | 2 +- src/eressea/lua/spell.cpp | 2 +- src/eressea/lua/unit.cpp | 4 +- src/eressea/server.c | 2 +- src/eressea/tolua/bind_unit.c | 4 +- src/eressea/tolua/bindings.c | 9 +- src/eressea/tolua/helpers.c | 2 +- src/res/de/strings.xml | 13 +- src/res/e2k9.xml | 6 +- src/res/e2k9/spells.xml | 904 ++++++++++++++++------------------ src/scripts/tests.lua | 19 +- 29 files changed, 742 insertions(+), 774 deletions(-) diff --git a/src/common/gamecode/creport.c b/src/common/gamecode/creport.c index 2ae12e250..5bb821279 100644 --- a/src/common/gamecode/creport.c +++ b/src/common/gamecode/creport.c @@ -1324,7 +1324,7 @@ report_computer(const char * filename, report_context * ctx, const char * charse } fprintf(F, "%d;Rekrutierungskosten\n", f->race->recruitcost); fprintf(F, "%d;Anzahl Personen\n", count_all(f)); - fprintf(F, "\"%s\";Magiegebiet\n", magietypen[f->magiegebiet]); + fprintf(F, "\"%s\";Magiegebiet\n", magic_school[f->magiegebiet]); if (f->race == new_race[RC_HUMAN]) { fprintf(F, "%d;Anzahl Immigranten\n", count_migrants(f)); diff --git a/src/common/gamecode/give.c b/src/common/gamecode/give.c index 37bddcfa4..150564b7b 100644 --- a/src/common/gamecode/give.c +++ b/src/common/gamecode/give.c @@ -370,13 +370,15 @@ give_unit(unit * u, unit * u2, order * ord) } } if (has_skill(u, SK_MAGIC)) { + sc_mage * mage; if (count_skill(u2->faction, SK_MAGIC) + u->number > skill_limit(u2->faction, SK_MAGIC)) { cmistake(u, ord, 155, MSG_COMMERCE); return; } - if (u2->faction->magiegebiet != find_magetype(u)) { + mage = get_mage(u); + if (!mage || u2->faction->magiegebiet != mage->magietyp) { cmistake(u, ord, 157, MSG_COMMERCE); return; } diff --git a/src/common/gamecode/items.c b/src/common/gamecode/items.c index db1ea09f8..2c23f6f76 100644 --- a/src/common/gamecode/items.c +++ b/src/common/gamecode/items.c @@ -108,7 +108,7 @@ use_antimagiccrystal(unit * u, const struct item_type * itype, int amount, struc for (i=0;i!=amount;++i) { int effect, duration = 2; double force; - spell *sp = find_spell(M_GRAU, "antimagiczone"); + spell *sp = find_spell(M_NONE, "antimagiczone"); attrib ** ap = &r->attribs; unused(ord); assert(sp); diff --git a/src/common/gamecode/laws.c b/src/common/gamecode/laws.c index 42c42103e..fb27ca925 100644 --- a/src/common/gamecode/laws.c +++ b/src/common/gamecode/laws.c @@ -3409,7 +3409,7 @@ update_spells(void) if (u->faction!=NULL && u->number>0) { sc_mage *m = get_mage(u); if (!is_monsters(u->faction) && m != NULL) { - if (m->magietyp == M_GRAU) continue; + if (m->magietyp == M_GRAY) continue; updatespelllist(u); } } diff --git a/src/common/gamecode/report.c b/src/common/gamecode/report.c index 448a3bba2..1be4699f3 100644 --- a/src/common/gamecode/report.c +++ b/src/common/gamecode/report.c @@ -1936,7 +1936,7 @@ report_plaintext(const char * filename, report_context * ctx, const char * chars rnl(F); sprintf(buf, "%s, %s/%s (%s)", factionname(f), LOC(f->locale, rc_name(f->race, 1)), - LOC(f->locale, mkname("school", magietypen[f->magiegebiet])), + LOC(f->locale, mkname("school", magic_school[f->magiegebiet])), f->email); centre(F, buf, true); if (f->alliance!=NULL) { diff --git a/src/common/gamecode/spy.c b/src/common/gamecode/spy.c index f516491f7..07d1dfb59 100644 --- a/src/common/gamecode/spy.c +++ b/src/common/gamecode/spy.c @@ -67,10 +67,10 @@ spy_message(int spy, const unit *u, const unit *target) ADDMSG(&u->faction->msgs, msg_message("spyreport", "spy target status", u, target, str)); if (spy > 20) { - sc_mage * m = get_mage(target); + sc_mage * mage = get_mage(target); /* bei Magiern Zaubersprüche und Magiegebiet */ - if (m) { - ADDMSG(&u->faction->msgs, msg_message("spyreport_mage", "target type", target, magietypen[find_magetype(target)])); + if (mage) { + ADDMSG(&u->faction->msgs, msg_message("spyreport_mage", "target type", target, magic_school[mage->magietyp])); } } if (spy > 6) { diff --git a/src/common/gamecode/study.c b/src/common/gamecode/study.c index bd43f9f1b..c8fe8f8a1 100644 --- a/src/common/gamecode/study.c +++ b/src/common/gamecode/study.c @@ -435,8 +435,9 @@ teach_cmd(unit * u, struct order * ord) if (sk == SK_MAGIC) { /* ist der Magier schon spezialisiert, so versteht er nur noch * Lehrer seines Gebietes */ - if (find_magetype(u2) != 0 && find_magetype(u) != find_magetype(u2)) - { + sc_mage * mage1 = get_mage(u); + sc_mage * mage2 = get_mage(u2); + if (!mage2 || !mage1 || mage1->magietyp!=mage2->magietyp) { if (feedback) { ADDMSG(&u->faction->msgs, msg_feedback(u, ord, "error_different_magic", "target", u2)); } @@ -549,7 +550,7 @@ learn_cmd(unit * u, order * ord) if (is_familiar(u)){ /* Vertraute zählen nicht zu den Magiern einer Partei, * können aber nur Graue Magie lernen */ - mtyp = M_GRAU; + mtyp = M_GRAY; if (!is_mage(u)) create_mage(u, mtyp); } else if (!has_skill(u, SK_MAGIC)) { int mmax = skill_limit(u->faction, SK_MAGIC); @@ -560,7 +561,7 @@ learn_cmd(unit * u, order * ord) return 0; } mtyp = getmagicskill(u->faction->locale); - if (mtyp == M_NONE || mtyp == M_GRAU) { + if (mtyp == M_NONE || mtyp == M_GRAY) { /* wurde kein Magiegebiet angegeben, wird davon * ausgegangen, daß das normal gelernt werden soll */ if(u->faction->magiegebiet != 0) { diff --git a/src/common/gamecode/summary.c b/src/common/gamecode/summary.c index 97e608f91..498a57f6a 100644 --- a/src/common/gamecode/summary.c +++ b/src/common/gamecode/summary.c @@ -93,12 +93,12 @@ out_faction(FILE *file, const struct faction *f) if (alliances!=NULL) { fprintf(file, "%s (%s/%d) (%.3s/%.3s), %d Einh., %d Pers., $%d, %d NMR\n", f->name, itoa36(f->no), f->alliance?f->alliance->id:0, - LOC(default_locale, rc_name(f->race, 0)), magietypen[f->magiegebiet], + LOC(default_locale, rc_name(f->race, 0)), magic_school[f->magiegebiet], f->no_units, f->num_total, f->money, turn - f->lastorders); } else { fprintf(file, "%s (%.3s/%.3s), %d Einh., %d Pers., $%d, %d NMR\n", factionname(f), LOC(default_locale, rc_name(f->race, 0)), - magietypen[f->magiegebiet], f->no_units, f->num_total, f->money, + magic_school[f->magiegebiet], f->no_units, f->num_total, f->money, turn - f->lastorders); } } diff --git a/src/common/kernel/eressea.c b/src/common/kernel/eressea.c index ab0bed052..158d15b84 100644 --- a/src/common/kernel/eressea.c +++ b/src/common/kernel/eressea.c @@ -2057,9 +2057,25 @@ init_locale(const struct locale * lang) #endif tokens = get_translations(lang, UT_MAGIC); - for (i=0;i!=MAXMAGIETYP;++i) { - var.i = i; - addtoken(tokens, LOC(lang, mkname("school", magietypen[i])), var); + if (tokens) { + const char * str = get_param(global.parameters, "rules.magic.playerschools"); + char * sstr, * tok; + if (str==NULL) { + str = "gwyrrd illaun draig cerddor tybied"; + } + + sstr = strdup(str); + tok = strtok(sstr, " "); + while (tok) { + for (i=0;i!=MAXMAGIETYP;++i) { + if (strcmp(tok, magic_school[i])==0) break; + } + assert(i!=MAXMAGIETYP); + var.i = i; + addtoken(tokens, LOC(lang, mkname("school", tok)), var); + tok = strtok(NULL, " "); + } + free(sstr); } tokens = get_translations(lang, UT_DIRECTIONS); diff --git a/src/common/kernel/magic.c b/src/common/kernel/magic.c index e04d53847..ead7de5e4 100644 --- a/src/common/kernel/magic.c +++ b/src/common/kernel/magic.c @@ -74,14 +74,15 @@ /* ------------------------------------------------------------- */ -const char *magietypen[MAXMAGIETYP] = +const char *magic_school[MAXMAGIETYP] = { "gray", "illaun", "tybied", "cerddor", "gwyrrd", - "draig" + "draig", + "common" }; attrib_type at_reportspell = { @@ -219,11 +220,11 @@ void read_spellist(struct spell_list ** slistp, struct storage * store) if (store->versionr_int(store); if (i < 0) break; - sp = find_spellbyid(M_GRAU, (spellid_t)i); + sp = find_spellbyid(M_NONE, (spellid_t)i); } else { store->r_tok_buf(store, spname, sizeof(spname)); if (strcmp(spname, "end")==0) break; - sp = find_spell(M_GRAU, spname); + sp = find_spell(M_NONE, spname); } if (sp!=NULL) { add_spell(slistp, sp); @@ -327,20 +328,6 @@ get_mage(const unit * u) return (sc_mage *) NULL; } -magic_t -find_magetype(const unit * u) -{ - sc_mage *m; - - /* Null abfangen! */ - m = get_mage(u); - - if (!m) - return 0; - - return m->magietyp; -} - /* ------------------------------------------------------------- */ /* Ausgabe der Spruchbeschreibungen * Anzeige des Spruchs nur, wenn die Stufe des besten Magiers vorher @@ -360,7 +347,7 @@ read_seenspell(attrib * a, struct storage * store) store->r_tok_buf(store, token, sizeof(token)); i = atoi(token); if (i!=0) { - sp = find_spellbyid(M_GRAU, (spellid_t)i); + sp = find_spellbyid(M_NONE, (spellid_t)i); } else { int mtype; mtype = store->r_int(store); @@ -397,7 +384,23 @@ already_seen(const faction * f, const spell * sp) return false; } -#define GRAYSPELLS 2 /* number of new gray spells per level */ +static boolean know_school(const faction * f, magic_t school) +{ + static int common = MAXMAGIETYP; + if (f->magiegebiet==school) return true; + if (common==MAXMAGIETYP) { + const char * school = get_param(global.parameters, "rules.magic.common"); + for (common=0;common!=MAXMAGIETYP;++common) { + if (strcmp(school, magic_school[common])==0) break; + } + if (common==MAXMAGIETYP) { + common = M_NONE; + } + } + return school==common; +} + +#define COMMONSPELLS 1 /* number of new common spells per level */ #define MAXSPELLS 256 /** update the spellbook with a new level @@ -406,16 +409,16 @@ already_seen(const faction * f, const spell * sp) void update_spellbook(faction * f, int level) { - spell * grayspells[MAXSPELLS]; + spell * commonspells[MAXSPELLS]; int numspells = 0; spell_list * slist; for (slist=spells;slist!=NULL;slist=slist->next) { spell * sp = slist->data; - if (sp->magietyp == M_GRAU && levelmax_spelllevel && sp->level<=level) { - grayspells[numspells++] = sp; + if (sp->magietyp == M_COMMON && levelmax_spelllevel && sp->level<=level) { + commonspells[numspells++] = sp; } else { - if (sp->magietyp == f->magiegebiet && sp->level <= level) { + if (know_school(f, sp->magietyp) && sp->level <= level) { if (!has_spell(f->spellbook, sp)) { add_spell(&f->spellbook, sp); } @@ -424,7 +427,7 @@ update_spellbook(faction * f, int level) } while (numspells>0 && level>f->max_spelllevel) { int i; - for (i=0;i!=GRAYSPELLS;++i) { + for (i=0;i!=COMMONSPELLS;++i) { int maxspell = numspells; int spellno = -1; spell * sp; @@ -433,13 +436,13 @@ update_spellbook(faction * f, int level) --maxspell; } spellno = rng_int() % maxspell; - sp = grayspells[spellno]; + sp = commonspells[spellno]; } while (maxspell>0 && sp && sp->level<=f->max_spelllevel); if (sp) { add_spell(&f->spellbook, sp); - grayspells[spellno] = 0; + commonspells[spellno] = 0; } } ++f->max_spelllevel; @@ -451,10 +454,10 @@ void wyrm_update(unit * u, struct sc_mage * mage, int sk) { spell_list * slist, ** slistp; /* Nur Wyrm-Magier bekommen den Wyrmtransformationszauber */ - spell * sp = find_spellbyid(M_GRAU, SPL_BECOMEWYRM); + spell * sp = find_spellbyid(M_GRAY, SPL_BECOMEWYRM); if (fspecial(u->faction, FS_WYRM) && !has_spell(u, sp) && sp->level<=sk) { - add_spell(mage, find_spellbyid(M_GRAU, SPL_BECOMEWYRM)); + add_spell(mage, find_spellbyid(M_GRAY, SPL_BECOMEWYRM)); } /* Transformierte Wyrm-Magier bekommen Drachenodem */ @@ -463,19 +466,19 @@ void wyrm_update(unit * u, struct sc_mage * mage, int sk) switch (urc) { /* keine breaks! Wyrme sollen alle drei Zauber können.*/ case RC_WYRM: - sp = find_spellbyid(M_GRAU, SPL_WYRMODEM); + sp = find_spellbyid(M_GRAY, SPL_WYRMODEM); slistp = get_spelllist(mage, u->faction); if (sp!=NULL && !has_spell(*slistp, sp) && sp->level<=sk) { add_spell(slistp, sp); } case RC_DRAGON: - sp = find_spellbyid(M_GRAU, SPL_DRAGONODEM); + sp = find_spellbyid(M_GRAY, SPL_DRAGONODEM); slistp = get_spelllist(mage, u->faction); if (sp!=NULL && !has_spell(*slistp, sp) && sp->level<=sk) { add_spell(slistp, sp); } case RC_FIREDRAGON: - sp = find_spellbyid(M_GRAU, SPL_FIREDRAGONODEM); + sp = find_spellbyid(M_GRAY, SPL_FIREDRAGONODEM); slistp = get_spelllist(mage, u->faction); if (sp!=NULL && !has_spell(*slistp, sp) && sp->level<=sk) { add_spell(slistp, sp); @@ -493,15 +496,14 @@ updatespelllist(unit * u) int sk = eff_skill(u, SK_MAGIC, u->region); spell_list * slist = spells; struct sc_mage * mage = get_mage(u); - magic_t gebiet = find_magetype(u); boolean ismonster = is_monsters(u->faction); - /* Magier mit keinem bzw M_GRAU bekommen weder Sprüche angezeigt noch + /* Magier mit keinem bzw M_GRAY bekommen weder Sprüche angezeigt noch * neue Sprüche in ihre List-of-known-spells. Das sind zb alle alten * Drachen, die noch den Skill Magie haben */ if (FactionSpells()) { - spells = u->faction->spellbook; + slist = u->faction->spellbook; } for (;slist!=NULL;slist=slist->next) { @@ -509,7 +511,7 @@ updatespelllist(unit * u) if (sp->level<=sk) { boolean know = u_hasspell(u, sp); - if (know || (gebiet!=M_GRAU && sp->magietyp == gebiet)) { + if (know || know_school(u->faction, sp->magietyp)) { faction * f = u->faction; if (!know) add_spell(get_spelllist(mage, u->faction), sp); @@ -966,31 +968,33 @@ pay_spell(unit * u, const spell * sp, int cast_level, int range) boolean knowsspell(const region * r, const unit * u, const spell * sp) { - /* Ist überhaupt ein gültiger Spruch angegeben? */ - if (!sp || (sp->id == SPL_NOSPELL)) { - return false; - } - /* Magier? */ - if (get_mage(u) == NULL) { - log_warning(("%s ist kein Magier, versucht aber zu zaubern.\n", - unitname(u))); - return false; - } - /* steht der Spruch in der Spruchliste? */ - if (!u_hasspell(u, sp)) { - /* ist der Spruch aus einem anderen Magiegebiet? */ - if (find_magetype(u) != sp->magietyp) { - return false; - } - if (eff_skill(u, SK_MAGIC, u->region) >= sp->level) { - log_warning(("%s ist hat die erforderliche Stufe, kennt aber %s nicht.\n", - unitname(u), spell_name(sp, default_locale))); - } - return false; - } + sc_mage * mage; + /* Ist überhaupt ein gültiger Spruch angegeben? */ + if (!sp || (sp->id == SPL_NOSPELL)) { + return false; + } + /* Magier? */ + mage = get_mage(u); + if (mage == NULL) { + log_warning(("%s ist kein Magier, versucht aber zu zaubern.\n", + unitname(u))); + return false; + } + /* steht der Spruch in der Spruchliste? */ + if (!u_hasspell(u, sp)) { + /* ist der Spruch aus einem anderen Magiegebiet? */ + if (know_school(u->faction, sp->magietyp)) { + return false; + } + if (eff_skill(u, SK_MAGIC, u->region) >= sp->level) { + log_warning(("%s ist hat die erforderliche Stufe, kennt aber %s nicht.\n", + unitname(u), spell_name(sp, default_locale))); + } + return false; + } - /* hier sollten alle potentiellen Fehler abgefangen sein */ - return true; + /* hier sollten alle potentiellen Fehler abgefangen sein */ + return true; } /* Um einen Spruch zu beherrschen, muss der Magier die Stufe des @@ -1326,7 +1330,7 @@ fumble(region * r, unit * u, const spell * sp, int cast_grade) if (btype) patzer -= btype->fumblebonus; /* CHAOSPATZERCHANCE 10 : +10% Chance zu Patzern */ - if (sp->magietyp == M_CHAOS) { + if (sp->magietyp == M_DRAIG) { patzer += CHAOSPATZERCHANCE; } if (is_cursed(u->attribs, C_MBOOST, 0) == true) { diff --git a/src/common/kernel/magic.h b/src/common/kernel/magic.h index 41d25ec5a..79e94fb22 100644 --- a/src/common/kernel/magic.h +++ b/src/common/kernel/magic.h @@ -83,16 +83,18 @@ typedef struct strarray { /* typedef unsigned char magic_t; */ enum { - M_GRAU, /* none */ - M_TRAUM, /* Illaun */ - M_ASTRAL, /* Tybied */ - M_BARDE, /* Cerddor */ - M_DRUIDE, /* Gwyrrd */ - M_CHAOS, /* Draig */ - MAXMAGIETYP, - M_NONE = (magic_t) -1 + M_GRAY = 0, /* Gray */ + M_ILLAUN = 1, /* Illaun */ + M_TYBIED = 2, /* Tybied */ + M_CERDDOR = 3, /* Cerddor */ + M_GWYRRD = 4, /* Gwyrrd */ + M_DRAIG = 5, /* Draig */ + M_COMMON = 6, /* common spells */ + MAXMAGIETYP, + /* this enum is stored in the datafile, so do not change the numbers around */ + M_NONE = (magic_t) -1 }; -extern const char *magietypen[MAXMAGIETYP]; +extern const char *magic_school[MAXMAGIETYP]; /* ------------------------------------------------------------- */ /* Magier: @@ -262,8 +264,6 @@ sc_mage * create_mage(struct unit *u, magic_t mtyp); * und initialisiert den Magiertypus mit mtyp. */ sc_mage * get_mage(const struct unit *u); /* gibt u->mage zurück, bei nicht-Magiern *NULL */ -magic_t find_magetype(const struct unit *u); - /* gibt den Magietyp der struct unit zurück, bei nicht-Magiern 0 */ boolean is_mage(const struct unit *u); /* gibt true, wenn u->mage gesetzt. */ boolean is_familiar(const struct unit *u); diff --git a/src/common/kernel/move.c b/src/common/kernel/move.c index 4b5058d31..b45f1b888 100644 --- a/src/common/kernel/move.c +++ b/src/common/kernel/move.c @@ -1323,7 +1323,7 @@ movement_speed(unit * u) * Nicht kumulativ mit anderen Beschleunigungen! */ if (mp*dk <= BP_WALKING*u->race->speed && is_astral(u->region) && is_mage(u)) { sc_mage * mage = get_mage(u); - if (mage->magietyp == M_ASTRAL || mage->magietyp == M_TRAUM) { + if (mage->magietyp == M_TYBIED || mage->magietyp == M_ILLAUN) { mp *= 2; } } diff --git a/src/common/kernel/reports.c b/src/common/kernel/reports.c index e690fe4a9..e71ac7022 100644 --- a/src/common/kernel/reports.c +++ b/src/common/kernel/reports.c @@ -801,8 +801,9 @@ spskill(char * buffer, size_t size, const struct locale * lang, const struct uni if (wrptr(&bufp, &size, bytes)!=0) WARN_STATIC_BUFFER(); if (sv->id == SK_MAGIC){ - if (find_magetype(u) != M_GRAU){ - bytes = (int)strlcpy(bufp, LOC(lang, mkname("school", magietypen[find_magetype(u)])), size); + sc_mage * mage = get_mage(u); + if (mage && mage->magietyp != M_GRAY) { + bytes = (int)strlcpy(bufp, LOC(lang, mkname("school", magic_school[mage->magietyp])), size); tsize += bytes; if (wrptr(&bufp, &size, bytes)!=0) WARN_STATIC_BUFFER(); diff --git a/src/common/kernel/spell.c b/src/common/kernel/spell.c index 33f2468d2..a1df201ab 100644 --- a/src/common/kernel/spell.c +++ b/src/common/kernel/spell.c @@ -63,7 +63,7 @@ find_spell(magic_t mtype, const char * name) while (slist) { spell * sp = slist->data; if (strcmp(name, sp->sname)==0) { - if (sp->magietyp==mtype) return sp; + if (mtype==M_NONE || sp->magietyp==mtype) return sp; spx = sp; } slist = slist->next; @@ -180,7 +180,7 @@ find_spellbyid(magic_t mtype, spellid_t id) spell* sp = slist->data; unsigned int hashid = hashstring(sp->sname); if (hashid==id) { - if (sp->magietyp==mtype || mtype==M_GRAU) { + if (sp->magietyp==mtype || mtype==M_NONE) { return sp; } } diff --git a/src/common/kernel/xmlreader.c b/src/common/kernel/xmlreader.c index eb3887adb..498e16d64 100644 --- a/src/common/kernel/xmlreader.c +++ b/src/common/kernel/xmlreader.c @@ -1204,13 +1204,13 @@ add_spells(equipment * eq, xmlNodeSetPtr nsetItems) for (i=0;i!=nsetItems->nodeNr;++i) { xmlNodePtr node = nsetItems->nodeTab[i]; xmlChar * propValue; - magic_t mtype = M_GRAU; + magic_t mtype = M_NONE; struct spell * sp; propValue = xmlGetProp(node, BAD_CAST "school"); if (propValue!=NULL) { for (mtype=0;mtype!=MAXMAGIETYP;++mtype) { - if (strcmp((const char*)propValue, magietypen[mtype])==0) break; + if (strcmp((const char*)propValue, magic_school[mtype])==0) break; } assert(mtype!=MAXMAGIETYP); xmlFree(propValue); @@ -1408,7 +1408,7 @@ parse_spells(xmlDocPtr doc) propValue = xmlGetProp(node, BAD_CAST "type"); assert(propValue!=NULL); for (sp->magietyp=0;sp->magietyp!=MAXMAGIETYP;++sp->magietyp) { - if (strcmp(magietypen[sp->magietyp], (const char *)propValue)==0) break; + if (strcmp(magic_school[sp->magietyp], (const char *)propValue)==0) break; } assert(sp->magietyp!=MAXMAGIETYP); xmlFree(propValue); diff --git a/src/common/modules/arena.c b/src/common/modules/arena.c index 12f3c8542..fbf9e6d10 100644 --- a/src/common/modules/arena.c +++ b/src/common/modules/arena.c @@ -200,7 +200,7 @@ age_hurting(attrib * a) { if (b==NULL) return AT_AGE_REMOVE; for (u=b->region->units;u;u=u->next) { if (u->building==b) { - if (u->faction->magiegebiet==M_CHAOS) { + if (u->faction->magiegebiet==M_DRAIG) { active ++; ADDMSG(&b->region->msgs, msg_message("praytoigjarjuk", "unit", u)); } @@ -208,7 +208,7 @@ age_hurting(attrib * a) { } if (active) for (u=b->region->units;u;u=u->next) if (playerrace(u->faction->race)) { int i; - if (u->faction->magiegebiet!=M_CHAOS) { + if (u->faction->magiegebiet!=M_DRAIG) { for (i=0;i!=active;++i) u->hp = (u->hp+1) / 2; /* make them suffer, but not die */ ADDMSG(&b->region->msgs, msg_message("cryinpain", "unit", u)); } @@ -282,7 +282,7 @@ tower_init(void) b->size = 10; if (i!=0) { sprintf(buf, "Turm des %s", - LOC(default_locale, mkname("school", magietypen[i]))); + LOC(default_locale, mkname("school", magic_school[i]))); } else sprintf(buf, "Turm der Ahnungslosen"); set_string(&b->name, buf); diff --git a/src/common/races/races.c b/src/common/races/races.c index 769ac6496..e1869abdf 100644 --- a/src/common/races/races.c +++ b/src/common/races/races.c @@ -38,7 +38,7 @@ oldfamiliars(unit * u) /* these familiars have no special skills. */ snprintf(fname, sizeof(fname), "%s_familiar", u->race->_name[0]); - create_mage(u, M_GRAU); + create_mage(u, M_GRAY); equip_unit(u, get_equipment(fname)); } diff --git a/src/common/spells/spells.c b/src/common/spells/spells.c index cbdf7c302..e46770c60 100644 --- a/src/common/spells/spells.c +++ b/src/common/spells/spells.c @@ -749,9 +749,9 @@ sp_transferaura(castorder *co) /* "Zu dieser Einheit kann ich keine Aura übertragen." */ cmistake(mage, co->order, 207, MSG_MAGIC); return 0; - } else if (scm_src->magietyp==M_ASTRAL) { + } else if (scm_src->magietyp==M_TYBIED) { if (scm_src->magietyp != scm_dst->magietyp) multi = 3; - } else if (scm_src->magietyp==M_GRAU) { + } else if (scm_src->magietyp==M_GRAY) { if (scm_src->magietyp != scm_dst->magietyp) multi = 4; } else if (scm_dst->magietyp!=scm_src->magietyp) { /* "Zu dieser Einheit kann ich keine Aura übertragen." */ @@ -2302,7 +2302,7 @@ sp_earthquake(castorder *co) /* ------------------------------------------------------------- */ -/* CHAOS / M_CHAOS / Draig */ +/* CHAOS / M_DRAIG / Draig */ /* ------------------------------------------------------------- */ void patzer_peasantmob(castorder *co) @@ -5177,7 +5177,7 @@ sp_disturbingdreams(castorder *co) } /* ------------------------------------------------------------- */ -/* ASTRAL / THEORIE / M_ASTRAL */ +/* ASTRAL / THEORIE / M_TYBIED */ /* ------------------------------------------------------------- */ /* Name: Magie analysieren * Stufe: 1 @@ -6767,7 +6767,7 @@ sp_becomewyrm(castorder *co) } u->race = new_race[RC_WYRM]; - add_spell(get_mage(u), find_spellbyid(M_GRAU, SPL_WYRMODEM)); + add_spell(get_mage(u), find_spellbyid(M_GRAY, SPL_WYRMODEM)); ADDMSG(&u->faction->msgs, msg_message("becomewyrm", "u", u)); @@ -6846,10 +6846,10 @@ typedef struct spelldata { static spelldata spelldaten[] = { - /* M_DRUIDE */ + /* M_GWYRRD */ { SPL_BLESSEDHARVEST, "blessedharvest", NULL, NULL, NULL, - M_DRUIDE, + M_GWYRRD, (FARCASTING | SPELLLEVEL | ONSHIPCAST | REGIONSPELL), 5, 1, { @@ -6863,7 +6863,7 @@ static spelldata spelldaten[] = }, { SPL_STONEGOLEM, "stonegolem", NULL, NULL, NULL, - M_DRUIDE, (SPELLLEVEL), 4, 1, + M_GWYRRD, (SPELLLEVEL), 4, 1, { { "aura", 2, SPC_LEVEL }, { "stone", 1, SPC_LEVEL }, @@ -6875,7 +6875,7 @@ static spelldata spelldaten[] = }, { SPL_IRONGOLEM, "irongolem", NULL, NULL, NULL, - M_DRUIDE, (SPELLLEVEL), 4, 2, + M_GWYRRD, (SPELLLEVEL), 4, 2, { { "aura", 2, SPC_LEVEL }, { "iron", 1, SPC_LEVEL }, @@ -6887,7 +6887,7 @@ static spelldata spelldaten[] = }, { SPL_TREEGROW, "treegrow", NULL, NULL, NULL, - M_DRUIDE, + M_GWYRRD, (FARCASTING | SPELLLEVEL | REGIONSPELL | TESTRESISTANCE), 5, 2, { @@ -6902,7 +6902,7 @@ static spelldata spelldaten[] = { SPL_RUSTWEAPON, "rustweapon", NULL, NULL, "u+", - M_DRUIDE, + M_GWYRRD, (FARCASTING | SPELLLEVEL | UNITSPELL | TESTCANSEE | TESTRESISTANCE), 5, 3, { @@ -6917,7 +6917,7 @@ static spelldata spelldaten[] = { SPL_KAELTESCHUTZ, "cold_protection", NULL, NULL, "u+", - M_DRUIDE, + M_GWYRRD, (UNITSPELL | SPELLLEVEL | TESTCANSEE | ONSHIPCAST), 5, 3, { @@ -6931,7 +6931,7 @@ static spelldata spelldaten[] = }, { SPL_HAGEL, "hail", NULL, NULL, NULL, - M_DRUIDE, (COMBATSPELL|SPELLLEVEL), 5, 3, + M_GWYRRD, (COMBATSPELL|SPELLLEVEL), 5, 3, { { "aura", 1, SPC_LEVEL }, { 0, 0, 0 }, @@ -6943,7 +6943,7 @@ static spelldata spelldaten[] = }, { SPL_IRONKEEPER, "ironkeeper", NULL, NULL, NULL, - M_DRUIDE, + M_GWYRRD, (FARCASTING | SPELLLEVEL | REGIONSPELL | TESTRESISTANCE), 5, 3, { @@ -6957,7 +6957,7 @@ static spelldata spelldaten[] = }, { SPL_MAGICSTREET, "magicstreet", NULL, NULL, NULL, - M_DRUIDE, + M_GWYRRD, (FARCASTING | SPELLLEVEL | REGIONSPELL | ONSHIPCAST | TESTRESISTANCE), 5, 4, { @@ -6971,7 +6971,7 @@ static spelldata spelldaten[] = }, { SPL_WINDSHIELD, "windshield", NULL, NULL, NULL, - M_DRUIDE, (PRECOMBATSPELL | SPELLLEVEL), 5, 4, + M_GWYRRD, (PRECOMBATSPELL | SPELLLEVEL), 5, 4, { { "aura", 2, SPC_LEVEL }, { 0, 0, 0 }, @@ -6983,7 +6983,7 @@ static spelldata spelldaten[] = }, { SPL_MALLORNTREEGROW, "mallorntreegrow", NULL, NULL, NULL, - M_DRUIDE, + M_GWYRRD, (FARCASTING | SPELLLEVEL | REGIONSPELL | TESTRESISTANCE), 5, 4, { @@ -6997,7 +6997,7 @@ static spelldata spelldaten[] = }, { SPL_GOODWINDS, "goodwinds", NULL, NULL, "s", - M_DRUIDE, + M_GWYRRD, (SHIPSPELL|ONSHIPCAST|SPELLLEVEL|TESTRESISTANCE), 5, 4, { @@ -7011,7 +7011,7 @@ static spelldata spelldaten[] = }, { SPL_HEALING, "healing", NULL, NULL, NULL, - M_DRUIDE, (POSTCOMBATSPELL | SPELLLEVEL), 5, 5, + M_GWYRRD, (POSTCOMBATSPELL | SPELLLEVEL), 5, 5, { { "aura", 1, SPC_LEVEL }, { 0, 0, 0 }, @@ -7023,7 +7023,7 @@ static spelldata spelldaten[] = }, { SPL_REELING_ARROWS, "reelingarrows", NULL, NULL, NULL, - M_DRUIDE, (PRECOMBATSPELL | SPELLLEVEL), 5, 5, + M_GWYRRD, (PRECOMBATSPELL | SPELLLEVEL), 5, 5, { { "aura", 15, SPC_FIX }, { 0, 0, 0 }, @@ -7035,7 +7035,7 @@ static spelldata spelldaten[] = }, { SPL_GWYRRD_FUMBLESHIELD, "gwyrrdfumbleshield", NULL, NULL, NULL, - M_DRUIDE, (PRECOMBATSPELL | SPELLLEVEL), 2, 5, + M_GWYRRD, (PRECOMBATSPELL | SPELLLEVEL), 2, 5, { { "aura", 5, SPC_LEVEL }, { 0, 0, 0 }, @@ -7047,7 +7047,7 @@ static spelldata spelldaten[] = }, { SPL_TRANSFERAURA_DRUIDE, "transferauradruide", NULL, "aura", "ui", - M_DRUIDE, (UNITSPELL|ONSHIPCAST), 1, 6, + M_GWYRRD, (UNITSPELL|ONSHIPCAST), 1, 6, { { "aura", 2, SPC_FIX }, { 0, 0, 0 }, @@ -7059,7 +7059,7 @@ static spelldata spelldaten[] = }, { SPL_EARTHQUAKE, "earthquake", NULL, NULL, NULL, - M_DRUIDE, (FARCASTING|REGIONSPELL|TESTRESISTANCE), 5, 6, + M_GWYRRD, (FARCASTING|REGIONSPELL|TESTRESISTANCE), 5, 6, { { "aura", 25, SPC_FIX }, { "laen", 2, SPC_FIX }, @@ -7072,7 +7072,7 @@ static spelldata spelldaten[] = { SPL_STORMWINDS, "stormwinds", NULL, NULL, "s+", - M_DRUIDE, + M_GWYRRD, (SHIPSPELL | ONSHIPCAST | OCEANCASTABLE | TESTRESISTANCE | SPELLLEVEL), 5, 6, { @@ -7086,7 +7086,7 @@ static spelldata spelldaten[] = }, { SPL_HOMESTONE, "homestone", NULL, NULL, NULL, - M_DRUIDE, (0), 5, 7, + M_GWYRRD, (0), 5, 7, { { "aura", 50, SPC_FIX }, { "permaura", 1, SPC_FIX }, @@ -7098,7 +7098,7 @@ static spelldata spelldaten[] = }, { SPL_WOLFHOWL, "wolfhowl", NULL, NULL, NULL, - M_DRUIDE, (PRECOMBATSPELL | SPELLLEVEL ), 5, 7, + M_GWYRRD, (PRECOMBATSPELL | SPELLLEVEL ), 5, 7, { { "aura", 2, SPC_LEVEL }, { 0, 0, 0 }, @@ -7110,7 +7110,7 @@ static spelldata spelldaten[] = }, { SPL_VERSTEINERN, "versteinern", NULL, NULL, NULL, - M_DRUIDE, (COMBATSPELL | SPELLLEVEL), 5, 8, + M_GWYRRD, (COMBATSPELL | SPELLLEVEL), 5, 8, { { "aura", 1, SPC_LEVEL }, { 0, 0, 0 }, @@ -7122,7 +7122,7 @@ static spelldata spelldaten[] = }, { SPL_STRONG_WALL, "strongwall", NULL, NULL, NULL, - M_DRUIDE, (PRECOMBATSPELL | SPELLLEVEL), 5, 8, + M_GWYRRD, (PRECOMBATSPELL | SPELLLEVEL), 5, 8, { { "aura", 2, SPC_LEVEL }, { 0, 0, 0 }, @@ -7135,7 +7135,7 @@ static spelldata spelldaten[] = { SPL_GWYRRD_DESTROY_MAGIC, "gwyrrddestroymagic", NULL, NULL, "kc?", - M_DRUIDE, + M_GWYRRD, (FARCASTING | SPELLLEVEL | ONSHIPCAST | TESTCANSEE | ANYTARGET), 2, 8, { @@ -7150,7 +7150,7 @@ static spelldata spelldaten[] = { SPL_TREEWALKENTER, "treewalkenter", NULL, NULL, "u+", - M_DRUIDE, (UNITSPELL | SPELLLEVEL | TESTCANSEE), 7, 9, + M_GWYRRD, (UNITSPELL | SPELLLEVEL | TESTCANSEE), 7, 9, { { "aura", 3, SPC_LEVEL }, { 0, 0, 0 }, @@ -7163,7 +7163,7 @@ static spelldata spelldaten[] = { SPL_TREEWALKEXIT, "treewalkexit", NULL, NULL, "ru+", - M_DRUIDE, (UNITSPELL | SPELLLEVEL | TESTCANSEE), 7, 9, + M_GWYRRD, (UNITSPELL | SPELLLEVEL | TESTCANSEE), 7, 9, { { "aura", 2, SPC_LEVEL }, { 0, 0, 0 }, @@ -7175,7 +7175,7 @@ static spelldata spelldaten[] = }, { SPL_HOLYGROUND, "holyground", NULL, NULL, NULL, - M_DRUIDE, (0), 5, 9, + M_GWYRRD, (0), 5, 9, { { "aura", 80, SPC_FIX }, { "permaura", 3, SPC_FIX }, @@ -7187,7 +7187,7 @@ static spelldata spelldaten[] = }, { SPL_SUMMONENT, "summonent", NULL, NULL, NULL, - M_DRUIDE, (SPELLLEVEL), 5, 10, + M_GWYRRD, (SPELLLEVEL), 5, 10, { { "aura", 6, SPC_LEVEL }, { 0, 0, 0 }, @@ -7199,7 +7199,7 @@ static spelldata spelldaten[] = }, { SPL_GWYRRD_FAMILIAR, "gwyrrdfamiliar", NULL, NULL, NULL, - M_DRUIDE, (NOTFAMILIARCAST), 5, 10, + M_GWYRRD, (NOTFAMILIARCAST), 5, 10, { { "aura", 100, SPC_FIX }, { "permaura", 5, SPC_FIX }, @@ -7212,7 +7212,7 @@ static spelldata spelldaten[] = { SPL_BLESSSTONECIRCLE, "blessstonecircle", NULL, NULL, "b", - M_DRUIDE, (BUILDINGSPELL), 5, 11, + M_GWYRRD, (BUILDINGSPELL), 5, 11, { { "aura", 350, SPC_FIX }, { "permaura", 5, SPC_FIX }, @@ -7224,7 +7224,7 @@ static spelldata spelldaten[] = }, { SPL_GWYRRD_ARMORSHIELD, "barkskin", NULL, NULL, NULL, - M_DRUIDE, (PRECOMBATSPELL | SPELLLEVEL), 2, 12, + M_GWYRRD, (PRECOMBATSPELL | SPELLLEVEL), 2, 12, { { "aura", 4, SPC_LEVEL }, { 0, 0, 0 }, @@ -7236,7 +7236,7 @@ static spelldata spelldaten[] = }, { SPL_DROUGHT, "summonfireelemental", NULL, NULL, NULL, - M_DRUIDE, (FARCASTING|REGIONSPELL|TESTRESISTANCE), 5, 13, + M_GWYRRD, (FARCASTING|REGIONSPELL|TESTRESISTANCE), 5, 13, { { "aura", 600, SPC_FIX }, { 0, 0, 0 }, @@ -7248,7 +7248,7 @@ static spelldata spelldaten[] = }, { SPL_MAELSTROM, "maelstrom", NULL, NULL, NULL, - M_DRUIDE, + M_GWYRRD, (OCEANCASTABLE | ONSHIPCAST | REGIONSPELL | TESTRESISTANCE), 5, 15, { @@ -7262,7 +7262,7 @@ static spelldata spelldaten[] = }, { SPL_MALLORN, "magic_roots", NULL, NULL, NULL, - M_DRUIDE, + M_GWYRRD, (FARCASTING | REGIONSPELL | TESTRESISTANCE), 5, 16, { @@ -7276,7 +7276,7 @@ static spelldata spelldaten[] = }, { SPL_GREAT_DROUGHT, "great_drought", NULL, NULL, NULL, - M_DRUIDE, + M_GWYRRD, (FARCASTING | REGIONSPELL | TESTRESISTANCE), 5, 17, { @@ -7288,11 +7288,11 @@ static spelldata spelldaten[] = }, (spell_f)sp_great_drought, NULL }, - /* M_CHAOS */ + /* M_DRAIG */ { SPL_SPARKLE_CHAOS, "sparklechaos", NULL, NULL, "u", - M_CHAOS, (UNITSPELL | TESTCANSEE | SPELLLEVEL), 5, 1, + M_DRAIG, (UNITSPELL | TESTCANSEE | SPELLLEVEL), 5, 1, { { "aura", 1, SPC_LEVEL }, { 0, 0, 0 }, @@ -7304,7 +7304,7 @@ static spelldata spelldaten[] = }, { SPL_FIREBALL, "fireball", NULL, NULL, NULL, - M_CHAOS, (COMBATSPELL | SPELLLEVEL), 5, 2, + M_DRAIG, (COMBATSPELL | SPELLLEVEL), 5, 2, { { "aura", 1, SPC_LEVEL }, { 0, 0, 0 }, @@ -7316,7 +7316,7 @@ static spelldata spelldaten[] = }, { SPL_MAGICBOOST, "magicboost", NULL, NULL, NULL, - M_CHAOS, (ONSHIPCAST), 3, 3, + M_DRAIG, (ONSHIPCAST), 3, 3, { { "aura", 2, SPC_LINEAR }, { 0, 0, 0 }, @@ -7328,7 +7328,7 @@ static spelldata spelldaten[] = }, { SPL_BLOODSACRIFICE, "bloodsacrifice", NULL, NULL, NULL, - M_CHAOS, (ONSHIPCAST), 1, 4, + M_DRAIG, (ONSHIPCAST), 1, 4, { { "hp", 4, SPC_LEVEL }, { 0, 0, 0 }, @@ -7340,7 +7340,7 @@ static spelldata spelldaten[] = }, { SPL_BERSERK, "berserk", NULL, NULL, NULL, - M_CHAOS, (PRECOMBATSPELL | SPELLLEVEL), 4, 5, + M_DRAIG, (PRECOMBATSPELL | SPELLLEVEL), 4, 5, { { "aura", 5, SPC_LEVEL }, { "peasant", 1, SPC_FIX }, @@ -7353,7 +7353,7 @@ static spelldata spelldaten[] = { SPL_FUMBLECURSE, "fumblecurse", NULL, NULL, "u", - M_CHAOS, + M_DRAIG, (UNITSPELL | SPELLLEVEL | TESTCANSEE | TESTRESISTANCE), 4, 5, { @@ -7367,7 +7367,7 @@ static spelldata spelldaten[] = }, { SPL_SUMMONUNDEAD, "summonundead", NULL, NULL, NULL, - M_CHAOS, (SPELLLEVEL | FARCASTING | ONSHIPCAST), + M_DRAIG, (SPELLLEVEL | FARCASTING | ONSHIPCAST), 5, 6, { { "aura", 5, SPC_LEVEL }, @@ -7380,7 +7380,7 @@ static spelldata spelldaten[] = }, { SPL_COMBATRUST, "combatrust", NULL, NULL, NULL, - M_CHAOS, (COMBATSPELL | SPELLLEVEL), 5, 6, + M_DRAIG, (COMBATSPELL | SPELLLEVEL), 5, 6, { { "aura", 2, SPC_LEVEL }, { 0, 0, 0 }, @@ -7392,7 +7392,7 @@ static spelldata spelldaten[] = }, { SPL_TRANSFERAURA_CHAOS, "transferaurachaos", NULL, "aura", "ui", - M_CHAOS, (UNITSPELL|ONSHIPCAST), 1, 7, + M_DRAIG, (UNITSPELL|ONSHIPCAST), 1, 7, { { "aura", 2, SPC_FIX }, { 0, 0, 0 }, @@ -7406,7 +7406,7 @@ static spelldata spelldaten[] = SPL_FIREWALL, "firewall", NULL, "direction", "c", - M_CHAOS, (SPELLLEVEL | REGIONSPELL | TESTRESISTANCE), 4, 7, + M_DRAIG, (SPELLLEVEL | REGIONSPELL | TESTRESISTANCE), 4, 7, { { "aura", 6, SPC_LEVEL }, { 0, 0, 0 }, @@ -7418,7 +7418,7 @@ static spelldata spelldaten[] = }, { SPL_PLAGUE, "plague", NULL, NULL, NULL, - M_CHAOS, + M_DRAIG, (FARCASTING | REGIONSPELL | TESTRESISTANCE), 5, 7, { @@ -7432,7 +7432,7 @@ static spelldata spelldaten[] = }, { SPL_CHAOSROW, "chaosrow", NULL, NULL, NULL, - M_CHAOS, (PRECOMBATSPELL | SPELLLEVEL), 5, 8, + M_DRAIG, (PRECOMBATSPELL | SPELLLEVEL), 5, 8, { { "aura", 3, SPC_LEVEL }, { "peasant", 10, SPC_FIX }, @@ -7444,7 +7444,7 @@ static spelldata spelldaten[] = }, { SPL_SUMMONSHADOW, "summonshadow", NULL, NULL, NULL, - M_CHAOS, (SPELLLEVEL), 5, 8, + M_DRAIG, (SPELLLEVEL), 5, 8, { { "aura", 3, SPC_LEVEL }, { 0, 0, 0 }, @@ -7456,7 +7456,7 @@ static spelldata spelldaten[] = }, { SPL_UNDEADHERO, "undeadhero", NULL, NULL, NULL, - M_CHAOS, (POSTCOMBATSPELL | SPELLLEVEL), 5, 9, + M_DRAIG, (POSTCOMBATSPELL | SPELLLEVEL), 5, 9, { { "aura", 1, SPC_LEVEL }, { 0, 0, 0 }, @@ -7468,7 +7468,7 @@ static spelldata spelldaten[] = }, { SPL_AURALEAK, "auraleak", NULL, NULL, NULL, - M_CHAOS, (REGIONSPELL | TESTRESISTANCE), 3, 9, + M_DRAIG, (REGIONSPELL | TESTRESISTANCE), 3, 9, { { "aura", 35, SPC_FIX }, { "dragonblood", 1, SPC_FIX }, @@ -7480,7 +7480,7 @@ static spelldata spelldaten[] = }, { SPL_DRAIG_FUMBLESHIELD, "draigfumbleshield", NULL, NULL, NULL, - M_CHAOS, (PRECOMBATSPELL | SPELLLEVEL), 2, 9, + M_DRAIG, (PRECOMBATSPELL | SPELLLEVEL), 2, 9, { { "aura", 6, SPC_LEVEL }, { 0, 0, 0 }, @@ -7492,7 +7492,7 @@ static spelldata spelldaten[] = }, { SPL_FOREST_FIRE, "forestfire", NULL, NULL, NULL, - M_CHAOS, (FARCASTING | REGIONSPELL | TESTRESISTANCE), 5, 10, + M_DRAIG, (FARCASTING | REGIONSPELL | TESTRESISTANCE), 5, 10, { { "aura", 50, SPC_FIX }, { "oil", 1, SPC_FIX }, @@ -7505,7 +7505,7 @@ static spelldata spelldaten[] = { SPL_DRAIG_DESTROY_MAGIC, "draigdestroymagic", NULL, NULL, "kc?", - M_CHAOS, + M_DRAIG, (FARCASTING | SPELLLEVEL | ONSHIPCAST | TESTCANSEE | ANYTARGET), 2, 10, { @@ -7520,7 +7520,7 @@ static spelldata spelldaten[] = { SPL_UNHOLYPOWER, "unholypower", NULL, NULL, "u+", - M_CHAOS, (UNITSPELL | SPELLLEVEL | TESTCANSEE), 5, 14, + M_DRAIG, (UNITSPELL | SPELLLEVEL | TESTCANSEE), 5, 14, { { "aura", 10, SPC_LEVEL }, { "peasant", 5, SPC_LEVEL }, @@ -7532,7 +7532,7 @@ static spelldata spelldaten[] = }, { SPL_DEATHCLOUD, "deathcloud", NULL, NULL, NULL, - M_CHAOS, (FARCASTING | REGIONSPELL | TESTRESISTANCE), 5, 11, + M_DRAIG, (FARCASTING | REGIONSPELL | TESTRESISTANCE), 5, 11, { { "aura", 40, SPC_FIX }, { "hp", 15, SPC_FIX }, @@ -7544,7 +7544,7 @@ static spelldata spelldaten[] = }, { SPL_SUMMONDRAGON, "summondragon", NULL, NULL, NULL, - M_CHAOS, (FARCASTING | REGIONSPELL | TESTRESISTANCE), 5, 11, + M_DRAIG, (FARCASTING | REGIONSPELL | TESTRESISTANCE), 5, 11, { { "aura", 80, SPC_FIX }, { "dragonhead", 1, SPC_FIX }, @@ -7556,7 +7556,7 @@ static spelldata spelldaten[] = }, { SPL_SUMMONSHADOWLORDS, "summonshadowlords", NULL, NULL, NULL, - M_CHAOS, (SPELLLEVEL), 5, 12, + M_DRAIG, (SPELLLEVEL), 5, 12, { { "aura", 7, SPC_LEVEL }, { 0, 0, 0 }, @@ -7568,7 +7568,7 @@ static spelldata spelldaten[] = }, { SPL_DRAIG_FAMILIAR, "draigfamiliar", NULL, NULL, NULL, - M_CHAOS, (NOTFAMILIARCAST), 5, 13, + M_DRAIG, (NOTFAMILIARCAST), 5, 13, { { "aura", 100, SPC_FIX }, { "permaura", 5, SPC_FIX }, @@ -7580,7 +7580,7 @@ static spelldata spelldaten[] = }, { SPL_CHAOSSUCTION, "chaossuction", NULL, NULL, NULL, - M_CHAOS, (0), 5, 14, + M_DRAIG, (0), 5, 14, { { "aura", 150, SPC_FIX }, { "peasant", 200, SPC_FIX }, @@ -7590,11 +7590,11 @@ static spelldata spelldaten[] = }, (spell_f)sp_chaossuction, patzer_peasantmob }, - /* M_TRAUM */ + /* M_ILLAUN */ { SPL_SPARKLE_DREAM, "sparkledream", NULL, NULL, "u", - M_TRAUM, + M_ILLAUN, (UNITSPELL | TESTCANSEE | SPELLLEVEL | ONSHIPCAST), 5, 1, { @@ -7608,7 +7608,7 @@ static spelldata spelldaten[] = }, { SPL_SHADOWKNIGHTS, "shadowknights", NULL, NULL, NULL, - M_TRAUM, (PRECOMBATSPELL | SPELLLEVEL), 4, 1, + M_ILLAUN, (PRECOMBATSPELL | SPELLLEVEL), 4, 1, { { "aura", 1, SPC_LEVEL }, { 0, 0, 0 }, @@ -7620,7 +7620,7 @@ static spelldata spelldaten[] = }, { SPL_FLEE, "flee", NULL, NULL, NULL, - M_TRAUM, (PRECOMBATSPELL | SPELLLEVEL), 5, 2, + M_ILLAUN, (PRECOMBATSPELL | SPELLLEVEL), 5, 2, { { "aura", 1, SPC_LEVEL }, { 0, 0, 0 }, @@ -7632,7 +7632,7 @@ static spelldata spelldaten[] = }, { SPL_PUTTOREST, "puttorest", NULL, NULL, NULL, - M_TRAUM, (SPELLLEVEL), 5, 2, + M_ILLAUN, (SPELLLEVEL), 5, 2, { { "aura", 3, SPC_LEVEL }, { "p2", 1, SPC_FIX }, @@ -7646,7 +7646,7 @@ static spelldata spelldaten[] = SPL_ICASTLE, "icastle", NULL, "buildingtype", "c", - M_TRAUM, (0), 5, 3, + M_ILLAUN, (0), 5, 3, { { "aura", 1, SPC_LEVEL }, { 0, 0, 0 }, @@ -7658,7 +7658,7 @@ static spelldata spelldaten[] = }, { SPL_TRANSFERAURA_TRAUM, "transferauratraum", NULL, "aura", "ui", - M_TRAUM, (UNITSPELL|ONSHIPCAST), 1, 3, + M_ILLAUN, (UNITSPELL|ONSHIPCAST), 1, 3, { { "aura", 2, SPC_FIX }, { 0, 0, 0 }, @@ -7672,7 +7672,7 @@ static spelldata spelldaten[] = SPL_ILL_SHAPESHIFT, "shapeshift", NULL, "race", "uc", - M_TRAUM, (UNITSPELL|SPELLLEVEL), 5, 3, + M_ILLAUN, (UNITSPELL|SPELLLEVEL), 5, 3, { { "aura", 1, SPC_LEVEL }, { 0, 0, 0 }, @@ -7685,7 +7685,7 @@ static spelldata spelldaten[] = { SPL_DREAMREADING, "dreamreading", NULL, NULL, "u", - M_TRAUM, (FARCASTING | UNITSPELL | TESTRESISTANCE), 5, 4, + M_ILLAUN, (FARCASTING | UNITSPELL | TESTRESISTANCE), 5, 4, { { "aura", 8, SPC_FIX }, { 0, 0, 0 }, @@ -7697,7 +7697,7 @@ static spelldata spelldaten[] = }, { SPL_TIREDSOLDIERS, "tiredsoldiers", NULL, NULL, NULL, - M_TRAUM, (PRECOMBATSPELL | SPELLLEVEL), 5, 4, + M_ILLAUN, (PRECOMBATSPELL | SPELLLEVEL), 5, 4, { { "aura", 4, SPC_LEVEL }, { 0, 0, 0 }, @@ -7709,7 +7709,7 @@ static spelldata spelldaten[] = }, { SPL_REANIMATE, "reanimate", NULL, NULL, NULL, - M_TRAUM, (POSTCOMBATSPELL | SPELLLEVEL), 4, 5, + M_ILLAUN, (POSTCOMBATSPELL | SPELLLEVEL), 4, 5, { { "aura", 1, SPC_LEVEL }, { 0, 0, 0 }, @@ -7722,7 +7722,7 @@ static spelldata spelldaten[] = { SPL_ANALYSEDREAM, "analysedream", NULL, NULL, "u", - M_TRAUM, (UNITSPELL | ONSHIPCAST | TESTCANSEE), 5, 5, + M_ILLAUN, (UNITSPELL | ONSHIPCAST | TESTCANSEE), 5, 5, { { "aura", 5, SPC_LEVEL }, { 0, 0, 0 }, @@ -7734,7 +7734,7 @@ static spelldata spelldaten[] = }, { SPL_DISTURBINGDREAMS, "disturbingdreams", NULL, NULL, NULL, - M_TRAUM, (FARCASTING | REGIONSPELL | TESTRESISTANCE), 5, 6, + M_ILLAUN, (FARCASTING | REGIONSPELL | TESTRESISTANCE), 5, 6, { { "aura", 18, SPC_FIX }, { 0, 0, 0 }, @@ -7746,7 +7746,7 @@ static spelldata spelldaten[] = }, { SPL_SLEEP, "sleep", NULL, NULL, NULL, - M_TRAUM, (COMBATSPELL | SPELLLEVEL ), 5, 7, + M_ILLAUN, (COMBATSPELL | SPELLLEVEL ), 5, 7, { { "aura", 1, SPC_LEVEL }, { 0, 0, 0 }, @@ -7760,7 +7760,7 @@ static spelldata spelldaten[] = SPL_WISPS, "wisps", NULL, "direction", "c", - M_TRAUM, (SPELLLEVEL | FARCASTING), 5, 7, + M_ILLAUN, (SPELLLEVEL | FARCASTING), 5, 7, { { "aura", 2, SPC_LEVEL }, { 0, 0, 0 }, @@ -7772,7 +7772,7 @@ static spelldata spelldaten[] = }, { SPL_GOODDREAMS, "gooddreams", NULL, NULL, NULL, - M_TRAUM, + M_ILLAUN, (FARCASTING | REGIONSPELL | TESTRESISTANCE), 5, 8, { @@ -7787,7 +7787,7 @@ static spelldata spelldaten[] = { SPL_ILLAUN_DESTROY_MAGIC, "illaundestroymagic", NULL, NULL, "kc?", - M_TRAUM, + M_ILLAUN, (FARCASTING | SPELLLEVEL | ONSHIPCAST | TESTCANSEE | ANYTARGET), 2, 8, { @@ -7801,7 +7801,7 @@ static spelldata spelldaten[] = }, { SPL_ILLAUN_FAMILIAR, "illaunfamiliar", NULL, NULL, NULL, - M_TRAUM, (NOTFAMILIARCAST), 5, 9, + M_ILLAUN, (NOTFAMILIARCAST), 5, 9, { { "aura", 100, SPC_FIX }, { "permaura", 5, SPC_FIX }, @@ -7813,7 +7813,7 @@ static spelldata spelldaten[] = }, { SPL_CLONECOPY, "clone", NULL, NULL, NULL, - M_TRAUM, (NOTFAMILIARCAST), 5, 9, + M_ILLAUN, (NOTFAMILIARCAST), 5, 9, { { "aura", 100, SPC_FIX }, { "permaura", 20, SPC_FIX }, @@ -7825,7 +7825,7 @@ static spelldata spelldaten[] = }, { SPL_BADDREAMS, "bad_dreams", NULL, NULL, NULL, - M_TRAUM, + M_ILLAUN, (FARCASTING | REGIONSPELL | TESTRESISTANCE), 5, 10, { { "aura", 90, SPC_FIX }, @@ -7838,7 +7838,7 @@ static spelldata spelldaten[] = }, { SPL_MINDBLAST, "mindblast", NULL, NULL, NULL, - M_TRAUM, (PRECOMBATSPELL | SPELLLEVEL), 5, 11, + M_ILLAUN, (PRECOMBATSPELL | SPELLLEVEL), 5, 11, { { "aura", 2, SPC_LEVEL }, { 0, 0, 0 }, @@ -7851,7 +7851,7 @@ static spelldata spelldaten[] = { SPL_ORKDREAM, "orkdream", NULL, NULL, "u+", - M_TRAUM, + M_ILLAUN, (UNITSPELL | TESTRESISTANCE | TESTCANSEE | SPELLLEVEL), 5, 12, { { "aura", 5, SPC_LEVEL }, @@ -7864,7 +7864,7 @@ static spelldata spelldaten[] = }, { SPL_SUMMON_ALP, "summon_alp", NULL, NULL, "u", - M_TRAUM, + M_ILLAUN, (UNITSPELL | SEARCHGLOBAL | TESTRESISTANCE), 5, 15, { @@ -7876,10 +7876,10 @@ static spelldata spelldaten[] = }, (spell_f)sp_summon_alp, NULL }, - /* M_BARDE */ + /* M_CERDDOR */ { SPL_DENYATTACK, "appeasement", NULL, NULL, NULL, - M_BARDE, (PRECOMBATSPELL | SPELLLEVEL ), 5, 1, + M_CERDDOR, (PRECOMBATSPELL | SPELLLEVEL ), 5, 1, { { "aura", 2, SPC_FIX }, { 0, 0, 0 }, @@ -7891,7 +7891,7 @@ static spelldata spelldaten[] = }, { SPL_HEALINGSONG, "song_of_healing", NULL, NULL, NULL, - M_BARDE, (POSTCOMBATSPELL | SPELLLEVEL), 5, 2, + M_CERDDOR, (POSTCOMBATSPELL | SPELLLEVEL), 5, 2, { { "aura", 1, SPC_LEVEL }, { 0, 0, 0 }, @@ -7903,7 +7903,7 @@ static spelldata spelldaten[] = }, { SPL_GENEROUS, "generous", NULL, NULL, NULL, - M_BARDE, + M_CERDDOR, (FARCASTING | SPELLLEVEL | ONSHIPCAST | REGIONSPELL | TESTRESISTANCE), 5, 2, { @@ -7917,7 +7917,7 @@ static spelldata spelldaten[] = }, { SPL_RAINDANCE, "raindance", NULL, NULL, NULL, - M_BARDE, + M_CERDDOR, (FARCASTING | SPELLLEVEL | ONSHIPCAST | REGIONSPELL), 5, 3, { @@ -7931,7 +7931,7 @@ static spelldata spelldaten[] = }, { SPL_SONG_OF_FEAR, "song_of_fear", NULL, NULL, NULL, - M_BARDE, (COMBATSPELL | SPELLLEVEL), 5, 3, + M_CERDDOR, (COMBATSPELL | SPELLLEVEL), 5, 3, { { "aura", 1, SPC_LEVEL }, { 0, 0, 0 }, @@ -7943,7 +7943,7 @@ static spelldata spelldaten[] = }, { SPL_RECRUIT, "courting", NULL, NULL, NULL, - M_BARDE, (SPELLLEVEL), 5, 4, + M_CERDDOR, (SPELLLEVEL), 5, 4, { { "aura", 2, SPC_LEVEL }, { 0, 0, 0 }, @@ -7955,7 +7955,7 @@ static spelldata spelldaten[] = }, { SPL_SONG_OF_CONFUSION, "song_of_confusion", NULL, NULL, NULL, - M_BARDE, (PRECOMBATSPELL | SPELLLEVEL), 5, 4, + M_CERDDOR, (PRECOMBATSPELL | SPELLLEVEL), 5, 4, { { "aura", 2, SPC_LEVEL }, { 0, 0, 0 }, @@ -7967,7 +7967,7 @@ static spelldata spelldaten[] = }, { SPL_HERO, "heroic_song", NULL, NULL, NULL, - M_BARDE, (PRECOMBATSPELL | SPELLLEVEL), 4, 5, + M_CERDDOR, (PRECOMBATSPELL | SPELLLEVEL), 4, 5, { { "aura", 2, SPC_LEVEL }, { 0, 0, 0 }, @@ -7979,7 +7979,7 @@ static spelldata spelldaten[] = }, { SPL_TRANSFERAURA_BARDE, "transfer_aura_song", NULL, "aura", "ui", - M_BARDE, (UNITSPELL|ONSHIPCAST), 1, 5, + M_CERDDOR, (UNITSPELL|ONSHIPCAST), 1, 5, { { "aura", 2, SPC_FIX }, { 0, 0, 0 }, @@ -7992,7 +7992,7 @@ static spelldata spelldaten[] = { SPL_UNIT_ANALYSESONG, "analysesong_unit", NULL, NULL, "u", - M_BARDE, + M_CERDDOR, (UNITSPELL | ONSHIPCAST | TESTCANSEE), 5, 5, { @@ -8006,7 +8006,7 @@ static spelldata spelldaten[] = }, { SPL_CERRDOR_FUMBLESHIELD, "cerrdorfumbleshield", NULL, NULL, NULL, - M_BARDE, (PRECOMBATSPELL | SPELLLEVEL), 2, 5, + M_CERDDOR, (PRECOMBATSPELL | SPELLLEVEL), 2, 5, { { "aura", 5, SPC_LEVEL }, { 0, 0, 0 }, @@ -8018,7 +8018,7 @@ static spelldata spelldaten[] = }, { SPL_CALM_MONSTER, "calm_monster", NULL, NULL, "u", - M_BARDE, + M_CERDDOR, (UNITSPELL | ONSHIPCAST | TESTRESISTANCE | TESTCANSEE), 5, 6, { @@ -8032,7 +8032,7 @@ static spelldata spelldaten[] = }, { SPL_SEDUCE, "seduction", NULL, NULL, "u", - M_BARDE, + M_CERDDOR, (UNITSPELL | TESTRESISTANCE | TESTCANSEE), 5, 6, { @@ -8047,7 +8047,7 @@ static spelldata spelldaten[] = { SPL_HEADACHE, "headache", NULL, NULL, "u", - M_BARDE, + M_CERDDOR, (UNITSPELL | TESTRESISTANCE | TESTCANSEE), 5, 7, { @@ -8062,7 +8062,7 @@ static spelldata spelldaten[] = { SPL_PUMP, "sound_out", NULL, NULL, "ur", - M_BARDE, (UNITSPELL | TESTCANSEE), 5, 7, + M_CERDDOR, (UNITSPELL | TESTCANSEE), 5, 7, { { "aura", 4, SPC_FIX }, { "money", 100, SPC_FIX }, @@ -8074,7 +8074,7 @@ static spelldata spelldaten[] = }, { SPL_BLOODTHIRST, "bloodthirst", NULL, NULL, NULL, - M_BARDE, (PRECOMBATSPELL | SPELLLEVEL), 4, 7, + M_CERDDOR, (PRECOMBATSPELL | SPELLLEVEL), 4, 7, { { "aura", 5, SPC_LEVEL }, { 0, 0, 0 }, @@ -8086,7 +8086,7 @@ static spelldata spelldaten[] = }, { SPL_FRIGHTEN, "frighten", NULL, NULL, NULL, - M_BARDE, (PRECOMBATSPELL | SPELLLEVEL), 5, 8, + M_CERDDOR, (PRECOMBATSPELL | SPELLLEVEL), 5, 8, { { "aura", 5, SPC_LEVEL }, { 0, 0, 0 }, @@ -8099,7 +8099,7 @@ static spelldata spelldaten[] = { SPL_OBJ_ANALYSESONG, "analyse_object", NULL, NULL, "kc?", - M_BARDE, (SPELLLEVEL | ONSHIPCAST | REGIONSPELL | BUILDINGSPELL | SHIPSPELL), 5, 8, + M_CERDDOR, (SPELLLEVEL | ONSHIPCAST | REGIONSPELL | BUILDINGSPELL | SHIPSPELL), 5, 8, { { "aura", 3, SPC_LEVEL }, { 0, 0, 0 }, @@ -8112,7 +8112,7 @@ static spelldata spelldaten[] = { SPL_CERDDOR_DESTROY_MAGIC, "cerddor_destroymagic", NULL, NULL, "kc?", - M_BARDE, + M_CERDDOR, (FARCASTING | SPELLLEVEL | ONSHIPCAST | TESTCANSEE | ANYTARGET), 2, 8, { @@ -8127,7 +8127,7 @@ static spelldata spelldaten[] = { SPL_MIGRANT, "migration", NULL, NULL, "u", - M_BARDE, (UNITSPELL | SPELLLEVEL | TESTCANSEE), 5, 9, + M_CERDDOR, (UNITSPELL | SPELLLEVEL | TESTCANSEE), 5, 9, { { "aura", 3, SPC_LEVEL }, { "permaura", 1, SPC_LEVEL }, @@ -8139,7 +8139,7 @@ static spelldata spelldaten[] = }, { SPL_CERDDOR_FAMILIAR, "summon_familiar", NULL, NULL, NULL, - M_BARDE, (NOTFAMILIARCAST), 5, 9, + M_CERDDOR, (NOTFAMILIARCAST), 5, 9, { { "aura", 100, SPC_FIX }, { "permaura", 5, SPC_FIX }, @@ -8151,7 +8151,7 @@ static spelldata spelldaten[] = }, { SPL_RAISEPEASANTS, "raise_mob", NULL, NULL, NULL, - M_BARDE, (SPELLLEVEL | REGIONSPELL | TESTRESISTANCE), 5, 10, + M_CERDDOR, (SPELLLEVEL | REGIONSPELL | TESTRESISTANCE), 5, 10, { { "aura", 4, SPC_LEVEL }, { 0, 0, 0 }, @@ -8164,7 +8164,7 @@ static spelldata spelldaten[] = { SPL_SONG_RESISTMAGIC, "song_resist_magic", NULL, NULL, NULL, - M_BARDE, + M_CERDDOR, (FARCASTING | SPELLLEVEL | REGIONSPELL | TESTRESISTANCE), 2, 10, { @@ -8178,7 +8178,7 @@ static spelldata spelldaten[] = }, { SPL_DEPRESSION, "melancholy", NULL, NULL, NULL, - M_BARDE, (FARCASTING | REGIONSPELL | TESTRESISTANCE), 5, 11, + M_CERDDOR, (FARCASTING | REGIONSPELL | TESTRESISTANCE), 5, 11, { { "aura", 40, SPC_FIX }, { 0, 0, 0 }, @@ -8190,7 +8190,7 @@ static spelldata spelldaten[] = }, { SPL_SONG_SUSCEPTMAGIC, "song_suscept_magic", NULL, NULL, NULL, - M_BARDE, + M_CERDDOR, (FARCASTING | SPELLLEVEL | REGIONSPELL | TESTRESISTANCE), 2, 12, { @@ -8204,7 +8204,7 @@ static spelldata spelldaten[] = }, { SPL_SONG_OF_PEACE, "song_of_peace", NULL, NULL, NULL, - M_BARDE, (SPELLLEVEL | REGIONSPELL | TESTRESISTANCE), 5, 12, + M_CERDDOR, (SPELLLEVEL | REGIONSPELL | TESTRESISTANCE), 5, 12, { { "aura", 20, SPC_LEVEL }, { 0, 0, 0 }, @@ -8217,7 +8217,7 @@ static spelldata spelldaten[] = { SPL_SONG_OF_ENSLAVE, "song_of_slavery", NULL, NULL, "u", - M_BARDE, (UNITSPELL | TESTCANSEE), 5, 13, + M_CERDDOR, (UNITSPELL | TESTCANSEE), 5, 13, { { "aura", 40, SPC_FIX }, { 0, 0, 0 }, @@ -8229,7 +8229,7 @@ static spelldata spelldaten[] = }, { SPL_BIGRECRUIT, "big_recruit", NULL, NULL, NULL, - M_BARDE, (SPELLLEVEL), 5, 14, + M_CERDDOR, (SPELLLEVEL), 5, 14, { { "aura", 20, SPC_LEVEL }, { 0, 0, 0 }, @@ -8241,7 +8241,7 @@ static spelldata spelldaten[] = }, { SPL_RALLYPEASANTMOB, "calm_riot", NULL, NULL, NULL, - M_BARDE, (FARCASTING), 5, 15, + M_CERDDOR, (FARCASTING), 5, 15, { { "aura", 30, SPC_FIX }, { 0, 0, 0 }, @@ -8254,7 +8254,7 @@ static spelldata spelldaten[] = { SPL_RAISEPEASANTMOB, "incite_riot", NULL, NULL, NULL, - M_BARDE, (FARCASTING | REGIONSPELL | TESTRESISTANCE), 5, 16, + M_CERDDOR, (FARCASTING | REGIONSPELL | TESTRESISTANCE), 5, 16, { { "aura", 40, SPC_FIX }, { 0, 0, 0 }, @@ -8264,11 +8264,11 @@ static spelldata spelldaten[] = }, (spell_f)sp_raisepeasantmob, NULL }, - /* M_ASTRAL */ + /* M_TYBIED */ { SPL_ANALYSEMAGIC, "analyze_magic", NULL, NULL, "kc?", - M_ASTRAL, (SPELLLEVEL | UNITSPELL | ONSHIPCAST | TESTCANSEE | ANYTARGET), 5, 1, + M_TYBIED, (SPELLLEVEL | UNITSPELL | ONSHIPCAST | TESTCANSEE | ANYTARGET), 5, 1, { { "aura", 1, SPC_LEVEL }, { 0, 0, 0 }, @@ -8281,7 +8281,7 @@ static spelldata spelldaten[] = { SPL_ITEMCLOAK, "concealing_aura", NULL, NULL, "u", - M_ASTRAL, (SPELLLEVEL | UNITSPELL | ONSHIPCAST), 5, 1, + M_TYBIED, (SPELLLEVEL | UNITSPELL | ONSHIPCAST), 5, 1, { { "aura", 1, SPC_LEVEL }, { 0, 0, 0 }, @@ -8293,7 +8293,7 @@ static spelldata spelldaten[] = }, { SPL_TYBIED_FUMBLESHIELD, "tybiedfumbleshield", NULL, NULL, NULL, - M_ASTRAL, (PRECOMBATSPELL | SPELLLEVEL), 2, 2, + M_TYBIED, (PRECOMBATSPELL | SPELLLEVEL), 2, 2, { { "aura", 3, SPC_LEVEL }, { 0, 0, 0 }, @@ -8307,7 +8307,7 @@ static spelldata spelldaten[] = { SPL_SHOWASTRAL, "show_astral", NULL, NULL, NULL, - M_ASTRAL, (SPELLLEVEL), 5, 2, + M_TYBIED, (SPELLLEVEL), 5, 2, { { "aura", 1, SPC_LEVEL }, { 0, 0, 0 }, @@ -8320,7 +8320,7 @@ static spelldata spelldaten[] = #endif { SPL_RESISTMAGICBONUS, "resist_magic", NULL, NULL, "u+", - M_ASTRAL, + M_TYBIED, (UNITSPELL | SPELLLEVEL | ONSHIPCAST | TESTCANSEE), 2, 3, { @@ -8334,7 +8334,7 @@ static spelldata spelldaten[] = }, { SPL_KEEPLOOT, "keeploot", NULL, NULL, NULL, - M_ASTRAL, ( POSTCOMBATSPELL | SPELLLEVEL ), 5, 3, + M_TYBIED, ( POSTCOMBATSPELL | SPELLLEVEL ), 5, 3, { { "aura", 1, SPC_LEVEL }, { 0, 0, 0 }, @@ -8346,7 +8346,7 @@ static spelldata spelldaten[] = }, { SPL_ENTERASTRAL, "enterastral", 0, 0, "u+", - M_ASTRAL, (UNITSPELL|SPELLLEVEL), 7, 4, + M_TYBIED, (UNITSPELL|SPELLLEVEL), 7, 4, { { "aura", 2, SPC_LEVEL }, { 0, 0, 0 }, @@ -8359,7 +8359,7 @@ static spelldata spelldaten[] = { SPL_LEAVEASTRAL, "leaveastral", NULL, NULL, "ru+", - M_ASTRAL, (UNITSPELL |SPELLLEVEL), 7, 4, + M_TYBIED, (UNITSPELL |SPELLLEVEL), 7, 4, { { "aura", 2, SPC_LEVEL }, { 0, 0, 0 }, @@ -8371,7 +8371,7 @@ static spelldata spelldaten[] = }, { SPL_TRANSFERAURA_ASTRAL, "auratransfer", NULL, "aura", "ui", - M_ASTRAL, (UNITSPELL|ONSHIPCAST), 1, 5, + M_TYBIED, (UNITSPELL|ONSHIPCAST), 1, 5, { { "aura", 1, SPC_FIX }, { 0, 0, 0 }, @@ -8383,7 +8383,7 @@ static spelldata spelldaten[] = }, { SPL_SHOCKWAVE, "shockwave", NULL, NULL, NULL, - M_ASTRAL, (COMBATSPELL|SPELLLEVEL), 5, 5, + M_TYBIED, (COMBATSPELL|SPELLLEVEL), 5, 5, { { "aura", 1, SPC_LEVEL }, { 0, 0, 0 }, @@ -8395,7 +8395,7 @@ static spelldata spelldaten[] = }, { SPL_ANTIMAGICZONE, "antimagiczone", NULL, NULL, NULL, - M_ASTRAL, (FARCASTING | SPELLLEVEL | REGIONSPELL | TESTRESISTANCE), + M_TYBIED, (FARCASTING | SPELLLEVEL | REGIONSPELL | TESTRESISTANCE), 2, 5, { { "aura", 3, SPC_LEVEL }, @@ -8409,7 +8409,7 @@ static spelldata spelldaten[] = { SPL_TYBIED_DESTROY_MAGIC, "destroy_magic", NULL, NULL, "kc?", - M_ASTRAL, + M_TYBIED, (FARCASTING | SPELLLEVEL | ONSHIPCAST | TESTCANSEE | ANYTARGET), 2, 5, { @@ -8424,7 +8424,7 @@ static spelldata spelldaten[] = { SPL_PULLASTRAL, "pull_astral", NULL, NULL, "ru+", - M_ASTRAL, (UNITSPELL | SEARCHGLOBAL | SPELLLEVEL), 7, 6, + M_TYBIED, (UNITSPELL | SEARCHGLOBAL | SPELLLEVEL), 7, 6, { { "aura", 2, SPC_LEVEL }, { 0, 0, 0 }, @@ -8437,7 +8437,7 @@ static spelldata spelldaten[] = { SPL_FETCHASTRAL, "fetch_astral", NULL, NULL, "u+", - M_ASTRAL, (UNITSPELL | SEARCHGLOBAL | SPELLLEVEL), 7, 6, + M_TYBIED, (UNITSPELL | SEARCHGLOBAL | SPELLLEVEL), 7, 6, { { "aura", 2, SPC_LEVEL }, { 0, 0, 0 }, @@ -8449,7 +8449,7 @@ static spelldata spelldaten[] = }, { SPL_STEALAURA, "steal_aura", NULL, NULL, "u", - M_ASTRAL, + M_TYBIED, (FARCASTING | SPELLLEVEL | UNITSPELL | TESTRESISTANCE | TESTCANSEE), 3, 6, { @@ -8463,7 +8463,7 @@ static spelldata spelldaten[] = }, { SPL_FLYING_SHIP, "airship", NULL, NULL, "s", - M_ASTRAL, (ONSHIPCAST | SHIPSPELL | TESTRESISTANCE), 5, 6, + M_TYBIED, (ONSHIPCAST | SHIPSPELL | TESTRESISTANCE), 5, 6, { { "aura", 10, SPC_FIX }, { "h12", 1, SPC_FIX }, @@ -8476,7 +8476,7 @@ static spelldata spelldaten[] = { SPL_DESTROY_MAGIC, "break_curse", NULL, "spellid", "kcc?", - M_ASTRAL, (FARCASTING | SPELLLEVEL | ONSHIPCAST | TESTCANSEE | ANYTARGET), 3, 7, + M_TYBIED, (FARCASTING | SPELLLEVEL | ONSHIPCAST | TESTCANSEE | ANYTARGET), 3, 7, { { "aura", 3, SPC_LEVEL }, { 0, 0, 0 }, @@ -8488,7 +8488,7 @@ static spelldata spelldaten[] = }, { SPL_ETERNIZEWALL, "eternal_walls", NULL, NULL, "b", - M_ASTRAL, + M_TYBIED, (SPELLLEVEL | BUILDINGSPELL | TESTRESISTANCE | ONSHIPCAST), 5, 7, { @@ -8502,7 +8502,7 @@ static spelldata spelldaten[] = }, { SPL_SCHILDRUNEN, "protective_runes", NULL, NULL, "kc", - M_ASTRAL, (ONSHIPCAST | TESTRESISTANCE | BUILDINGSPELL | SHIPSPELL), 2, 8, + M_TYBIED, (ONSHIPCAST | TESTRESISTANCE | BUILDINGSPELL | SHIPSPELL), 2, 8, { { "aura", 20, SPC_FIX }, { 0, 0, 0 }, @@ -8516,7 +8516,7 @@ static spelldata spelldaten[] = { SPL_REDUCESHIELD, "fish_shield", NULL, NULL, NULL, - M_ASTRAL, (PRECOMBATSPELL | SPELLLEVEL), 2, 8, + M_TYBIED, (PRECOMBATSPELL | SPELLLEVEL), 2, 8, { { "aura", 4, SPC_LEVEL }, { 0, 0, 0 }, @@ -8529,7 +8529,7 @@ static spelldata spelldaten[] = { SPL_SPEED, "combat_speed", NULL, NULL, NULL, - M_ASTRAL, (PRECOMBATSPELL | SPELLLEVEL), 5, 9, + M_TYBIED, (PRECOMBATSPELL | SPELLLEVEL), 5, 9, { { "aura", 5, SPC_LEVEL }, { 0, 0, 0 }, @@ -8542,7 +8542,7 @@ static spelldata spelldaten[] = { SPL_VIEWREALITY, "view_reality", NULL, NULL, NULL, - M_ASTRAL, (0), 5, 10, + M_TYBIED, (0), 5, 10, { { "aura", 40, SPC_FIX }, { 0, 0, 0 }, @@ -8555,7 +8555,7 @@ static spelldata spelldaten[] = { SPL_SPEED2, "double_time", NULL, NULL, "u+", - M_ASTRAL, (UNITSPELL | SPELLLEVEL | ONSHIPCAST | TESTCANSEE), 5, 11, + M_TYBIED, (UNITSPELL | SPELLLEVEL | ONSHIPCAST | TESTCANSEE), 5, 11, { { "aura", 5, SPC_LEVEL }, { 0, 0, 0 }, @@ -8568,7 +8568,7 @@ static spelldata spelldaten[] = { SPL_ARMORSHIELD, "armor_shield", NULL, NULL, NULL, - M_ASTRAL, (PRECOMBATSPELL | SPELLLEVEL), 2, 12, + M_TYBIED, (PRECOMBATSPELL | SPELLLEVEL), 2, 12, { { "aura", 4, SPC_LEVEL }, { 0, 0, 0 }, @@ -8581,7 +8581,7 @@ static spelldata spelldaten[] = { SPL_TYBIED_FAMILIAR, "summon_familiar", NULL, NULL, NULL, - M_ASTRAL, (NOTFAMILIARCAST), 5, 12, + M_TYBIED, (NOTFAMILIARCAST), 5, 12, { { "aura", 100, SPC_FIX }, { "permaura", 5, SPC_FIX }, @@ -8593,7 +8593,7 @@ static spelldata spelldaten[] = }, { SPL_MOVECASTLE, "living_rock", NULL, "direction", "bc", - M_ASTRAL, (SPELLLEVEL | BUILDINGSPELL | TESTRESISTANCE), 5, 13, + M_TYBIED, (SPELLLEVEL | BUILDINGSPELL | TESTRESISTANCE), 5, 13, { { "aura", 10, SPC_LEVEL }, { "permaura", 1, SPC_FIX }, @@ -8605,7 +8605,7 @@ static spelldata spelldaten[] = }, { SPL_DISRUPTASTRAL, "astral_disruption", NULL, NULL, NULL, - M_ASTRAL, (REGIONSPELL | SPELLLEVEL), 4, 14, + M_TYBIED, (REGIONSPELL | SPELLLEVEL), 4, 14, { { "aura", 140, SPC_FIX }, { 0, 0, 0 }, @@ -8618,7 +8618,7 @@ static spelldata spelldaten[] = { SPL_PERMTRANSFER, "sacrifice_strength", NULL, "aura", "ui", - M_ASTRAL, (UNITSPELL), 1, 15, + M_TYBIED, (UNITSPELL), 1, 15, { { "aura", 100, SPC_FIX }, { 0, 0, 0 }, @@ -8628,12 +8628,12 @@ static spelldata spelldaten[] = }, (spell_f)sp_permtransfer, NULL }, - /* M_GRAU */ + /* M_GRAY */ /* Definitionen von Create_Artefaktsprüchen */ { SPL_METEORRAIN, "meteor_rain", NULL, NULL, NULL, - M_GRAU, (COMBATSPELL | SPELLLEVEL), 5, 3, + M_GRAY, (COMBATSPELL | SPELLLEVEL), 5, 3, { { "aura", 1, SPC_LEVEL }, { 0, 0, 0 }, @@ -8646,7 +8646,7 @@ static spelldata spelldaten[] = { SPL_BECOMEWYRM, "wyrm_transformation", NULL, NULL, NULL, - M_GRAU, 0, 5, 1, + M_GRAY, 0, 5, 1, { { "aura", 1, SPC_FIX }, { "permaura", 1, SPC_FIX }, @@ -8659,7 +8659,7 @@ static spelldata spelldaten[] = /* Monstersprüche */ { SPL_FIREDRAGONODEM, "fiery_dragonbreath", NULL, NULL, NULL, - M_GRAU, (COMBATSPELL), 5, 3, + M_GRAY, (COMBATSPELL), 5, 3, { { "aura", 1, SPC_FIX }, { 0, 0, 0 }, @@ -8671,7 +8671,7 @@ static spelldata spelldaten[] = }, { SPL_DRAGONODEM, "icy_dragonbreath", NULL, NULL, NULL, - M_GRAU, (COMBATSPELL), 5, 6, + M_GRAY, (COMBATSPELL), 5, 6, { { "aura", 2, SPC_FIX }, { 0, 0, 0 }, @@ -8683,7 +8683,7 @@ static spelldata spelldaten[] = }, { SPL_WYRMODEM, "powerful_dragonbreath", NULL, NULL, NULL, - M_GRAU, (COMBATSPELL), 5, 12, + M_GRAY, (COMBATSPELL), 5, 12, { { "aura", 3, SPC_FIX }, { 0, 0, 0 }, @@ -8695,7 +8695,7 @@ static spelldata spelldaten[] = }, { SPL_DRAINODEM, "drain_skills", NULL, NULL, NULL, - M_GRAU, (COMBATSPELL), 5, 12, + M_GRAY, (COMBATSPELL), 5, 12, { { "aura", 4, SPC_FIX }, { 0, 0, 0 }, @@ -8708,7 +8708,7 @@ static spelldata spelldaten[] = { SPL_AURA_OF_FEAR, "aura_of_fear", NULL, NULL, NULL, - M_GRAU, (COMBATSPELL), 5, 12, + M_GRAY, (COMBATSPELL), 5, 12, { { "aura", 1, SPC_LEVEL }, { 0, 0, 0 }, @@ -8721,7 +8721,7 @@ static spelldata spelldaten[] = { SPL_SHADOWCALL, "shadowcall", NULL, NULL, NULL, - M_GRAU, (PRECOMBATSPELL), 5, 12, + M_GRAY, (PRECOMBATSPELL), 5, 12, { { "aura", 2, SPC_LEVEL }, { 0, 0, 0 }, @@ -8734,7 +8734,7 @@ static spelldata spelldaten[] = { SPL_IMMOLATION, "immolation", NULL, NULL, NULL, - M_GRAU, (COMBATSPELL), 5, 12, + M_GRAY, (COMBATSPELL), 5, 12, { { "aura", 2, SPC_LEVEL }, { 0, 0, 0 }, @@ -8746,7 +8746,7 @@ static spelldata spelldaten[] = }, { SPL_FIREODEM, "firestorm", NULL, NULL, NULL, - M_GRAU, (COMBATSPELL), 5, 8, + M_GRAY, (COMBATSPELL), 5, 8, { { "aura", 2, SPC_FIX }, { 0, 0, 0 }, @@ -8758,7 +8758,7 @@ static spelldata spelldaten[] = }, { SPL_ICEODEM, "coldfront", NULL, NULL, NULL, - M_GRAU, (COMBATSPELL), 5, 8, + M_GRAY, (COMBATSPELL), 5, 8, { { "aura", 2, SPC_FIX }, { 0, 0, 0 }, @@ -8770,7 +8770,7 @@ static spelldata spelldaten[] = }, { SPL_ACIDODEM, "acidrain", NULL, NULL, NULL, - M_GRAU, (COMBATSPELL), 5, 8, + M_GRAY, (COMBATSPELL), 5, 8, { { "aura", 2, SPC_FIX }, { 0, 0, 0 }, @@ -8912,4 +8912,5 @@ register_spells(void) register_shipcurse(); register_buildingcurse(); register_function((pf_generic)&sp_wdwpyramid, "wdwpyramid"); + register_function((pf_generic)&sp_summon_familiar, "cast_familiar"); } diff --git a/src/eressea/lua/script.cpp b/src/eressea/lua/script.cpp index ba171ce3f..81179f4c0 100644 --- a/src/eressea/lua/script.cpp +++ b/src/eressea/lua/script.cpp @@ -152,7 +152,7 @@ lua_initfamiliar(unit * u) } snprintf(fname, sizeof(fname), "%s_familiar", u->race->_name[0]); - create_mage(u, M_GRAU); + create_mage(u, M_GRAY); equip_unit(u, get_equipment(fname)); } diff --git a/src/eressea/lua/spell.cpp b/src/eressea/lua/spell.cpp index 93e893212..ffc57c7d5 100644 --- a/src/eressea/lua/spell.cpp +++ b/src/eressea/lua/spell.cpp @@ -20,7 +20,7 @@ using namespace luabind; static const char * spell_getschool(const spell& sp) { - return magietypen[sp.magietyp]; + return magic_school[sp.magietyp]; } void diff --git a/src/eressea/lua/unit.cpp b/src/eressea/lua/unit.cpp index 337787d0a..2230839ed 100644 --- a/src/eressea/lua/unit.cpp +++ b/src/eressea/lua/unit.cpp @@ -422,7 +422,7 @@ static const char * unit_getmagic(const unit * u) { sc_mage * mage = get_mage(u); - return mage?magietypen[mage->magietyp]:NULL; + return mage?magic_school[mage->magietyp]:NULL; } static void @@ -431,7 +431,7 @@ unit_setmagic(unit * u, const char * type) sc_mage * mage = get_mage(u); magic_t mtype; for (mtype=0;mtype!=MAXMAGIETYP;++mtype) { - if (strcmp(magietypen[mtype], type)==0) break; + if (strcmp(magic_school[mtype], type)==0) break; } if (mtype==MAXMAGIETYP) return; if (mage==NULL) { diff --git a/src/eressea/server.c b/src/eressea/server.c index e3810f820..f18df0f03 100644 --- a/src/eressea/server.c +++ b/src/eressea/server.c @@ -609,7 +609,7 @@ write_spells(void) strcat(components, LOC(loc, spc->type->_name[0])); strcat(components, ","); } - fprintf(F, "%s;%d;%s;%s\n", LOC(loc, mkname("spell", sp->sname)), sp->level, LOC(loc, mkname("school", magietypen[sp->magietyp])), components); + fprintf(F, "%s;%d;%s;%s\n", LOC(loc, mkname("spell", sp->sname)), sp->level, LOC(loc, mkname("school", magic_school[sp->magietyp])), components); } fclose(F); } diff --git a/src/eressea/tolua/bind_unit.c b/src/eressea/tolua/bind_unit.c index 0428f5b59..9fd07969f 100644 --- a/src/eressea/tolua/bind_unit.c +++ b/src/eressea/tolua/bind_unit.c @@ -218,7 +218,7 @@ static const char * unit_getmagic(const unit * u) { sc_mage * mage = get_mage(u); - return mage?magietypen[mage->magietyp]:NULL; + return mage?magic_school[mage->magietyp]:NULL; } static int tolua_unit_get_magic(lua_State* tolua_S) @@ -234,7 +234,7 @@ unit_setmagic(unit * u, const char * type) sc_mage * mage = get_mage(u); magic_t mtype; for (mtype=0;mtype!=MAXMAGIETYP;++mtype) { - if (strcmp(magietypen[mtype], type)==0) break; + if (strcmp(magic_school[mtype], type)==0) break; } if (mtype==MAXMAGIETYP) return; if (mage==NULL) { diff --git a/src/eressea/tolua/bindings.c b/src/eressea/tolua/bindings.c index 550ab1718..8e260ccb9 100644 --- a/src/eressea/tolua/bindings.c +++ b/src/eressea/tolua/bindings.c @@ -733,7 +733,7 @@ tolua_write_spells(lua_State* tolua_S) if (sp->sp_function!=fun) { xmlNodePtr node = xmlNewNode(NULL, BAD_CAST "spell"); xmlNewProp(node, BAD_CAST "name", BAD_CAST sp->sname); - xmlNewProp(node, BAD_CAST "type", BAD_CAST magietypen[sp->magietyp]); + xmlNewProp(node, BAD_CAST "type", BAD_CAST magic_school[sp->magietyp]); xmlNewProp(node, BAD_CAST "rank", xml_i(sp->rank)); xmlNewProp(node, BAD_CAST "level", xml_i(sp->level)); xmlNewProp(node, BAD_CAST "index", xml_i(sp->id)); @@ -779,7 +779,7 @@ tolua_write_spells(lua_State* tolua_S) static int tolua_get_spell_text(lua_State *tolua_S) { - const struct locale * loc = find_locale("en"); + const struct locale * loc = default_locale; spell * self = (spell *)tolua_tousertype(tolua_S, 1, 0); lua_pushstring(tolua_S, spell_info(self, loc)); return 1; @@ -789,7 +789,7 @@ static int tolua_get_spell_school(lua_State *tolua_S) { spell * self = (spell *)tolua_tousertype(tolua_S, 1, 0); - lua_pushstring(tolua_S, magietypen[self->magietyp]); + lua_pushstring(tolua_S, magic_school[self->magietyp]); return 1; } @@ -804,8 +804,9 @@ tolua_get_spell_level(lua_State *tolua_S) static int tolua_get_spell_name(lua_State *tolua_S) { + const struct locale * lang = default_locale; spell * self = (spell *)tolua_tousertype(tolua_S, 1, 0); - lua_pushstring(tolua_S, self->sname); + lua_pushstring(tolua_S, spell_name(self, lang)); return 1; } diff --git a/src/eressea/tolua/helpers.c b/src/eressea/tolua/helpers.c index 5694ffc26..107a17989 100644 --- a/src/eressea/tolua/helpers.c +++ b/src/eressea/tolua/helpers.c @@ -244,7 +244,7 @@ lua_initfamiliar(unit * u) lua_pop(L, 1); } - create_mage(u, M_GRAU); + create_mage(u, M_GRAY); snprintf(fname, sizeof(fname), "%s_familiar", u->race->_name[0]); equip_unit(u, get_equipment(fname)); diff --git a/src/res/de/strings.xml b/src/res/de/strings.xml index 464cfe407..2a9b21e33 100644 --- a/src/res/de/strings.xml +++ b/src/res/de/strings.xml @@ -4493,7 +4493,7 @@ Wiederbelebung - Ressurection + Resurrection Traumbilder analysieren @@ -4665,11 +4665,10 @@ - - Dieser mächtige Bann raubt dem Opfer seinen freien Willen und - unterwirft sie den Befehlen des Barden. Für einige Zeit wird das Opfer + Dieser mächtige Bann raubt dem Opfer seinen freien Willen + und unterwirft sie den Befehlen des Barden. Für einige Zeit wird das Opfer sich völlig von seinen eigenen Leuten abwenden und der Partei des Barden - zugehörig fühlen." + zugehörig fühlen. @@ -6668,6 +6667,10 @@ + + Gemein + common + Kein Magiegebiet no magic school yet diff --git a/src/res/e2k9.xml b/src/res/e2k9.xml index feab6b43e..c62f56bd7 100644 --- a/src/res/e2k9.xml +++ b/src/res/e2k9.xml @@ -123,9 +123,11 @@ - - + + + + diff --git a/src/res/e2k9/spells.xml b/src/res/e2k9/spells.xml index 0451a1b2f..84ab3f5c3 100644 --- a/src/res/e2k9/spells.xml +++ b/src/res/e2k9/spells.xml @@ -1,545 +1,548 @@ - + - - - - - - + + + + - - + + + + + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - + + + - - - - - + + + - - - - - - - + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + - + + + + + + + + - + - + - - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - + + - + - + - - - - - - - + - - - - + - + - - - - + - - - - + - + - - - - - - - - + - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - + - - - - + - - - - + - + - + - + - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - + - - - - + - - - - - - - + - - - - - - - - - - + - + - + - + - + - - - - - - - - - - - - + - - - - - + + - + - + @@ -547,138 +550,63 @@ - + - - - - - - - - - - + - - - - - - - + - - - - - - - + - - - - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - - - - - - - - - + - + - + - + + + + + + + + diff --git a/src/scripts/tests.lua b/src/scripts/tests.lua index 75fc278c1..115057a13 100644 --- a/src/scripts/tests.lua +++ b/src/scripts/tests.lua @@ -255,7 +255,7 @@ local function test_spells() u:clear_orders() u:add_item("money", 10000) u:set_skill("magic", 5) - u:add_order("LERNE MAGIE Tybied") + u:add_order("LERNE MAGIE Illaun") process_orders() local sp local nums = 0 @@ -264,8 +264,9 @@ local function test_spells() nums = nums + 1 end end + assert(nums>0) for sp in u.spells do - nums = nums - 1 + nums = nums - 1 end assert(nums==0) end @@ -312,8 +313,6 @@ local function test_alliance() assert(f1.alliance~=nil) assert(f2.alliance~=nil) assert(f2.alliance==f1.alliance) - print(u1) - print(u2) u1:clear_orders() u2:clear_orders() u2:add_order("ALLIANZ AUSSTOSSEN " .. itoa36(f1.id)) @@ -337,6 +336,15 @@ local function test_alliance() assert(f2.alliance~=nil) end +local function spells_csv() + local f = io.open("spells.csv", "w") + for sp in spells() do + f:write('"' .. sp.name .. '",' .. sp.level .. ',' .. sp.school .. ',"' .. sp.text .. '"\n') + end + f:close() + fail = 1 +end + loadscript("extensions.lua") tests = { ["alliance"] = test_alliance, @@ -356,7 +364,6 @@ tests = { ["spells"] = test_spells } mytests = { - ["spells"] = test_spells } fail = 0 for k, v in pairs(tests) do @@ -369,6 +376,8 @@ for k, v in pairs(tests) do end end +-- spells_csv() + if fail > 0 then print(fail .. " tests failed.") io.stdin:read()