Unicode WIP:

- i18n for more spells.
This commit is contained in:
Enno Rehling 2007-07-17 18:42:47 +00:00
parent d48d8ec348
commit 6fe368d790
4 changed files with 188 additions and 142 deletions

View File

@ -2576,9 +2576,8 @@ cast_cmd(unit * u, order * ord)
return 0;
}
if (range > 1024) { /* (2^10) weiter als 10 Regionen entfernt */
ADDMSG(&u->faction->msgs, msg_message("spellfail::nocontact",
"mage region command target", u, u->region, ord,
regionname(target_r, u->faction)));
ADDMSG(&u->faction->msgs, msg_feedback(u, ord, "spellfail::nocontact",
"target", target_r));
return 0;
}
}

View File

@ -1753,7 +1753,7 @@ sp_treewalkenter(castorder *co)
rt = r_standard_to_astral(r);
if (rt==NULL || is_cursed(rt->attribs, C_ASTRALBLOCK, 0)) {
cmistake(mage, co->order, 192, MSG_MAGIC);
ADDMSG(&mage->faction->msgs, msg_feedback(mage, co->order, "spellfail_astralblock", ""));
return 0;
}
@ -1859,7 +1859,7 @@ sp_treewalkexit(castorder *co)
return 0;
}
if (is_cursed(r->attribs, C_ASTRALBLOCK, 0)) {
cmistake(mage, co->order, 192, MSG_MAGIC);
ADDMSG(&mage->faction->msgs, msg_feedback(mage, co->order, "spellfail_astralblock", ""));
return 0;
}
@ -3447,10 +3447,13 @@ sp_chaossuction(castorder *co)
rt = r_standard_to_astral(r);
if (rt==NULL || is_cursed(rt->attribs, C_ASTRALBLOCK, 0)) {
if (rt==NULL) {
/* Hier gibt es keine Verbindung zur astralen Welt.*/
cmistake(mage, co->order, 216, MSG_MAGIC);
return 0;
} else if (is_cursed(rt->attribs, C_ASTRALBLOCK, 0)) {
ADDMSG(&mage->faction->msgs, msg_feedback(mage, co->order, "spellfail_astralblock", ""));
return 0;
}
create_special_direction(r, rt, 2, "vortex_desc", "vortex");
@ -4767,6 +4770,7 @@ sp_icastle(castorder *co)
spellparameter *pa = co->par;
icastle_data * data;
const xmlChar * bname;
message * msg;
if ((type=findbuildingtype(pa->param[0]->data.xs, mage->faction->locale)) == NULL) {
type = bt_find("castle");
@ -4807,9 +4811,9 @@ sp_icastle(castorder *co)
"icastle_create", "unit region command", mage, mage->region,
co->order));
addmessage(r, 0,
"Verwundert blicken die Bauern auf ein plötzlich erschienenes Gebäude.",
MSG_EVENT, ML_INFO);
msg = msg_message("sp_icastle_effect", "region", r);
report_spell(mage, r, msg);
msg_release(msg);
return cast_level;
}
@ -5021,21 +5025,24 @@ sp_clonecopy(castorder *co)
region *target_region = co->rt;
unit *mage = co->magician.u;
int cast_level = co->level;
message * msg;
char name[NAMESIZE];
if (get_clone(mage) != NULL ) {
cmistake(mage, co->order, 298, MSG_MAGIC);
return 0;
}
sprintf(buf, "Klon von %s", unitname(mage));
clone = create_unit(target_region, mage->faction, 1, new_race[RC_CLONE], 0, buf, mage);
snprintf(name, sizeof(name), (const char*)LOC(mage->faction->locale, "clone_of"), unitname(mage));
clone = create_unit(target_region, mage->faction, 1, new_race[RC_CLONE], 0, (const xmlChar *)name, mage);
setstatus(clone, ST_FLEE);
fset(clone, UFL_LOCKED);
create_newclone(mage, clone);
sprintf(buf, "%s erschafft einen Klon.", unitname(mage));
addmessage(r, mage->faction, buf, MSG_MAGIC, ML_INFO);
msg = msg_message("sp_clone_effet", "mage", mage);
r_addmessage(r, mage->faction, msg);
msg_release(msg);
return cast_level;
}
@ -5050,6 +5057,7 @@ sp_dreamreading(castorder *co)
int cast_level = co->level;
spellparameter *pa = co->par;
double power = co->force;
message * msg;
/* wenn kein Ziel gefunden, Zauber abbrechen */
if (pa->param[0]->flag == TARGET_NOTFOUND) return 0;
@ -5072,15 +5080,14 @@ sp_dreamreading(castorder *co)
return 0;
}
u2 = createunit(u->region,mage->faction, RS_FARVISION, new_race[RC_SPELL]);
u2 = create_unit(u->region,mage->faction, RS_FARVISION, new_race[RC_SPELL], 0, (const xmlChar*)"spell/dreamreading", NULL);
set_number(u2, 1);
set_string(&u2->name, "sp_dreamreading");
u2->age = 2; /* Nur für diese Runde. */
set_level(u2, SK_OBSERVATION, eff_skill(u, SK_OBSERVATION, u2->region));
sprintf(buf, "%s verliert sich in die Träume von %s und erhält einen "
"Eindruck von %s.", unitname(mage), unitname(u), regionname(u->region, mage->faction));
addmessage(r, mage->faction, buf, MSG_EVENT, ML_INFO);
msg = msg_message("sp_dreamreading_effect", "mage unit region", mage, u, u->region);
r_addmessage(r, mage->faction, msg);
msg_release(msg);
return cast_level;
}
@ -5104,6 +5111,7 @@ sp_sweetdreams(castorder *co)
curse * c;
unit *u;
variant effect;
message * msg;
/* sollte nie negativ werden */
if (opfer < 1) break;
@ -5125,9 +5133,12 @@ sp_sweetdreams(castorder *co)
effect.i = 5;
c = create_curse(mage,&u->attribs, ct_find("orcish"), power, duration, effect, men);
sprintf(buf, "%s verschafft %s ein interessanteres Nachtleben.",
unitname(mage), unitname(u));
addmessage(r, mage->faction, buf, MSG_EVENT, ML_INFO);
msg = msg_message("sp_sweetdreams_effect", "mage unit region", mage, u, r);
r_addmessage(r, mage->faction, msg);
if (u->faction!=mage->faction) {
r_addmessage(r, u->faction, msg);
}
msg_release(msg);
}
return cast_level;
}
@ -5147,9 +5158,7 @@ sp_disturbingdreams(castorder *co)
effect.i = 10;
c = create_curse(mage, &r->attribs, ct_find("badlearn"), power, duration, effect, 0);
sprintf(buf, "%s sorgt für schlechten Schlaf in %s.",
unitname(mage), regionname(r, mage->faction));
addmessage(0, mage->faction, buf, MSG_EVENT, ML_INFO);
ADDMSG(&mage->faction->msgs, msg_message("sp_disturbingdreams_effect", "mage region", mage, r));
return cast_level;
}
@ -5405,12 +5414,8 @@ sp_enterastral(castorder *co)
return 0;
}
if (is_cursed(rt->attribs, C_ASTRALBLOCK, 0) ||
is_cursed(ro->attribs, C_ASTRALBLOCK, 0)) {
sprintf(buf, "%s in %s: 'ZAUBER %s': Es kann kein Kontakt zu "
"dieser astralen Region hergestellt werden.", unitname(mage),
regionname(mage->region, mage->faction), spell_name(sp, mage->faction->locale));
addmessage(r, mage->faction, buf, MSG_MAGIC, ML_MISTAKE);
if (is_cursed(rt->attribs, C_ASTRALBLOCK, 0) || is_cursed(ro->attribs, C_ASTRALBLOCK, 0)) {
ADDMSG(&mage->faction->msgs, msg_feedback(mage, co->order, "spellfail_astralblock", ""));
return 0;
}
@ -5506,10 +5511,8 @@ sp_pullastral(castorder *co)
rl2 = rl2->next;
}
if (!rl2) {
sprintf(buf, "%s in %s: 'ZAUBER %s': Es kann kein Kontakt zu "
"dieser Region hergestellt werden.", unitname(mage),
regionname(mage->region, mage->faction), spell_name(sp, mage->faction->locale));
addmessage(r, mage->faction, buf, MSG_MAGIC, ML_MISTAKE);
ADDMSG(&u->faction->msgs, msg_feedback(u, ord, "spellfail::nocontact",
"target", rt));
free_regionlist(rl);
return 0;
}
@ -5523,12 +5526,8 @@ sp_pullastral(castorder *co)
return 0;
}
if (is_cursed(rt->attribs, C_ASTRALBLOCK, 0) ||
is_cursed(ro->attribs, C_ASTRALBLOCK, 0)) {
sprintf(buf, "%s in %s: 'ZAUBER %s': Es kann kein Kontakt zu "
"dieser Region hergestellt werden.", unitname(mage),
regionname(mage->region, mage->faction), spell_name(sp, mage->faction->locale));
addmessage(r, mage->faction, buf, MSG_MAGIC, ML_MISTAKE);
if (is_cursed(rt->attribs, C_ASTRALBLOCK, 0) || is_cursed(ro->attribs, C_ASTRALBLOCK, 0)) {
ADDMSG(&mage->faction->msgs, msg_feedback(mage, co->order, "spellfail_astralblock", ""));
return 0;
}
@ -5629,8 +5628,7 @@ sp_leaveastral(castorder *co)
ro = r;
rt = pa->param[0]->data.r;
if (!rt) {
addmessage(r, mage->faction, "Dorthin führt kein Weg.",
MSG_MAGIC, ML_MISTAKE);
ADDMSG(&mage->faction->msgs, msg_feedback(mage, co->order, "spellfail::noway", ""));
return 0;
}
rl = astralregions(r, inhabitable);
@ -5640,8 +5638,7 @@ sp_leaveastral(castorder *co)
rl2 = rl2->next;
}
if (rl2==NULL) {
addmessage(r, mage->faction, "Dorthin führt kein Weg.",
MSG_MAGIC, ML_MISTAKE);
ADDMSG(&mage->faction->msgs, msg_feedback(mage, co->order, "spellfail::noway", ""));
free_regionlist(rl);
return 0;
}
@ -5653,8 +5650,7 @@ sp_leaveastral(castorder *co)
}
if (ro==NULL || is_cursed(ro->attribs, C_ASTRALBLOCK, 0) || is_cursed(rt->attribs, C_ASTRALBLOCK, 0)) {
sprintf(buf, "Die Wege aus dieser astralen Region sind blockiert.");
addmessage(r, mage->faction, buf, MSG_MAGIC, ML_MISTAKE);
ADDMSG(&mage->faction->msgs, msg_feedback(mage, co->order, "spellfail_astralblock", ""));
return 0;
}
@ -5778,8 +5774,7 @@ sp_fetchastral(castorder *co)
}
if (is_cursed(rt->attribs, C_ASTRALBLOCK, 0)) {
ADDMSG(&mage->faction->msgs, msg_message("spellfail_distance",
"command region unit", co->order, mage->region, mage));
ADDMSG(&mage->faction->msgs, msg_feedback(mage, co->order, "spellfail_distance", ""));
continue;
}
@ -5952,8 +5947,7 @@ sp_viewreality(castorder *co)
}
if (is_cursed(r->attribs, C_ASTRALBLOCK, 0)) {
/* sprintf(buf, "Die materielle Welt ist hier nicht sichtbar.");*/
cmistake(mage, co->order, 218, MSG_MAGIC);
ADDMSG(&mage->faction->msgs, msg_feedback(mage, co->order, "spellfail_astralblock", ""));
return 0;
}
@ -5961,9 +5955,8 @@ sp_viewreality(castorder *co)
/* Irgendwann mal auf Curses u/o Attribut umstellen. */
for (rl2=rl; rl2; rl2=rl2->next) {
u = createunit(rl2->data, mage->faction, RS_FARVISION, new_race[RC_SPELL]);
u = create_unit(rl2->data, mage->faction, RS_FARVISION, new_race[RC_SPELL], 0, (const xmlChar*)"spell/viewreality", NULL);
set_level(u, SK_OBSERVATION, co->level/2);
set_string(&u->name, "Zauber: Blick in die Realität");
u->age = 2;
}
@ -6066,8 +6059,6 @@ sp_disruptastral(castorder *co)
effect.i = 100;
create_curse(mage, &rl2->data->attribs, ct_find("astralblock"),
power, duration, effect, 0);
addmessage(r2, 0, "Mächtige Magie verhindert den Kontakt zur Realität.",
MSG_COMMENT, ML_IMPORTANT);
}
free_regionlist(rl);

View File

@ -7392,6 +7392,11 @@
<text locale="en">a magical attack</text>
</string>
<string name="clone_of">
<text locale="de">Klon von %s</text>
<text locale="en">Clone of %s</text>
</string>
<string name="attack_structural">
<text locale="de">ein Angriff, der GEbäudeschaden verursacht</text>
<text locale="en">an attack causing structural damage to buildings</text>

View File

@ -1451,6 +1451,14 @@
<text locale="de">"Heer $int($index): $name"</text>
<text locale="en">"Army $int($index): $name"</text>
</message>
<message name="sp_icastle_effect" section="magic">
<type>
<arg name="region" type="region"/>
</type>
<text locale="de">"Verwundert blicken die Bauern von $region($region) auf ein neues Gebäude."</text>
</message>
<message name="sp_bloodsacrifice_effect" section="magic">
<type>
<arg name="unit" type="unit"/>
@ -1461,6 +1469,7 @@
<text locale="de">"$unit($unit) in $region($region): '$order($command)' - $unit($unit) gewinnt durch das Ritual $int($amount) Aura."</text>
<text locale="en">"$unit($unit) in $region($region): '$order($command)' - $unit($unit) receives $int($amount) aura."</text>
</message>
<message name="sp_holyground_effect" section="magic">
<type>
<arg name="mage" type="unit"/>
@ -4475,15 +4484,6 @@
<text locale="fr">"$unit($unit) in $region($region): '$order($command)' - There is an active spell in this region that prevents this."</text>
<text locale="en">"$unit($unit) in $region($region): '$order($command)' - There is an active spell in this region that prevents this."</text>
</message>
<message name="error218" section="errors">
<type>
<arg name="unit" type="unit"/>
<arg name="region" type="region"/>
<arg name="command" type="order"/>
</type>
<text locale="de">"$unit($unit) in $region($region): '$order($command)' - Die materielle Welt ist hier nicht sichtbar."</text>
<text locale="en">"$unit($unit) in $region($region): '$order($command)' - The material world is not visible from here."</text>
</message>
<message name="spell_astral_only" section="errors">
<type>
<arg name="unit" type="unit"/>
@ -4782,13 +4782,13 @@
<text locale="de">"$unit($unit) in $region($region): '$order($command)' - Der Zauber funktioniert nur in der Geisterwelt."</text>
<text locale="en">"$unit($unit) in $region($region): '$order($command)' - This spell will only work in the realm of spirits."</text>
</message>
<message name="error192" section="errors">
<message name="spellfail_astralblock" section="errors">
<type>
<arg name="unit" type="unit"/>
<arg name="region" type="region"/>
<arg name="command" type="order"/>
</type>
<text locale="de">"$unit($unit) in $region($region): '$order($command)' - Die Wege zur Geisterwelt scheinen blockiert zu sein."</text>
<text locale="de">"$unit($unit) in $region($region): '$order($command)' - Die Wege zwischen Geisterwelt und Realität scheinen blockiert zu sein."</text>
<text locale="en">"$unit($unit) in $region($region): '$order($command)' - The paths to the spirit world seem to be blocked."</text>
</message>
<message name="error191" section="errors">
@ -7115,6 +7115,40 @@
<text locale="en">"$unit($mage) puts a curse on the lands of $region($region) and a drought sets in."</text>
</message>
<message name="sp_clone_effect" section="magic">
<type>
<arg name="mage" type="unit"/>
</type>
<text locale="de">"$unit($mage) erschafft einen Klon."</text>
<text locale="en">"$unit($mage) creates a clone."</text>
</message>
<message name="sp_dreamreading_effect" section="magic">
<type>
<arg name="mage" type="unit"/>
<arg name="unit" type="unit"/>
<arg name="region" type="region"/>
</type>
<text locale="de">"$unit($mage) verliert sich in die Träume von $unit($unit) und erhält einen Eindruck von $region($region)."</text>
</message>
<message name="sp_sweetdreams_effect" section="magic">
<type>
<arg name="mage" type="unit"/>
<arg name="unit" type="unit"/>
<arg name="region" type="region"/>
</type>
<text locale="de">"$unit($mage) verschafft $unit($unit) ein schönes Nachtleben in $region($region)."</text>
</message>
<message name="sp_disturbingdreams_effect" section="magic">
<type>
<arg name="mage" type="unit"/>
<arg name="region" type="region"/>
</type>
<text locale="de">"$unit($mage) sorgt für schlechten Schlaf in $region($region)."</text>
</message>
<message name="summon_effect" section="magic">
<type>
<arg name="mage" type="unit"/>
@ -7262,15 +7296,24 @@
<text locale="de">"$unit($mage) in $region($region): '$order($command)' - Dieser Zauber kann nicht mit Stufenangabe gezaubert werden."</text>
<text locale="en">"$unit($mage) in $region($region): '$order($command)' - This spell cannot be cast with variable level."</text>
</message>
<message name="spellfail::nocontact" section="magic">
<message name="spellfail::noway" section="magic">
<type>
<arg name="mage" type="unit"/>
<arg name="unit" type="unit"/>
<arg name="region" type="region"/>
<arg name="command" type="order"/>
<arg name="target" type="string"/>
</type>
<text locale="de">"$unit($mage) in $region($region): '$order($command)' - Zur Region $target kann kein Kontakt hergestellt werden."</text>
<text locale="en">"$unit($mage) in $region($region): '$order($command)' - The region $target could not be contacted."</text>
<text locale="de">"$unit($unit) in $region($region): '$order($command)' - Dorthin führt kein Weg."</text>
<text locale="en">"$unit($unit) in $region($region): '$order($command)' - There is no way leading there."</text>
</message>
<message name="spellfail::nocontact" section="magic">
<type>
<arg name="unit" type="unit"/>
<arg name="region" type="region"/>
<arg name="command" type="order"/>
<arg name="target" type="region"/>
</type>
<text locale="de">"$unit($unit) in $region($region): '$order($command)' - Zu $region($target) kann kein Kontakt hergestellt werden."</text>
<text locale="en">"$unit($unit) in $region($region): '$order($command)' - $region($target) could not be contacted."</text>
</message>
<message name="spellfail::contact" section="magic">
<type>
@ -7585,6 +7628,14 @@
<text locale="en">"The $ship($ship) is blessed with favourable winds$if($lt($duration,3),", but the spell is starting to wear thin",""). ($int36($id))"</text>
</message>
<message name="curseinfo::astralblock" section="magic">
<type>
<arg name="id" type="int"/>
</type>
<text locale="de">"Mächtige Magie verhindert den Kontakt zur Realität. ($int36($id))"</text>
<text locale="en">"Powerful magic disrupts our contact with reality. ($int36($id))"</text>
</message>
<message name="curseinfo::shipnodrift_0" section="magic">
<type>
<arg name="ship" type="ship"/>