- Pyramidenfindezauber interessanter gemacht.

This commit is contained in:
Christian Schlittchen 2004-02-20 22:41:49 +00:00
parent 9acad9a56e
commit d1751cb0a3
2 changed files with 34 additions and 20 deletions

View File

@ -7229,8 +7229,8 @@ sp_becomewyrm(castorder *co)
* Stufe: unterschiedlich * Stufe: unterschiedlich
* Gebiet: alle * Gebiet: alle
* Wirkung: * Wirkung:
* gibt an, ob sich der Magier in einer Pyramidenbauregion * gibt die ungefaehre Entfernung zur naechstgelegenen Pyramiden-
* befindet. * region an.
* *
* Flags: * Flags:
*/ */
@ -7241,20 +7241,32 @@ sp_wdwpyramid(castorder *co)
unit *mage = (unit *)co->magician; unit *mage = (unit *)co->magician;
int cast_level = co->level; int cast_level = co->level;
if(!(landregion(rterrain(r)))){ if(a_find(r->attribs, &at_wdwpyramid) != NULL) {
cmistake(mage, strdup(co->order), 186, MSG_MAGIC); ADDMSG(&mage->faction->msgs, msg_message("wdw_pyramidspell_found",
return 0; "unit region command", mage, r, strdup(co->order)));
} else {
region *r2;
int mindist = -1;
int minshowdist;
int maxshowdist;
for(r2 = regions; r2; r2 = r2->next) {
if(a_find(r->attribs, &at_wdwpyramid) != NULL) {
short dist = distance(mage->region, r2);
if(dist < mindist) {
mindist = dist;
}
}
} }
if(a_find(r->attribs, &at_wdwpyramid) != NULL) { assert(mindist >= 1);
add_message(&mage->faction->msgs, new_message(mage->faction,
"wdw_pyramidspell_found%u:mage%r:region%s:command",
mage, r, strdup(co->order)));
} else { minshowdist = mindist - rand()%5;
add_message(&mage->faction->msgs, new_message(mage->faction, maxshowdist = minshowdist + 4;
"wdw_pyramidspell_notfound%u:mage%r:region%s:command",
mage, r, strdup(co->order))); ADDMSG(&mage->faction->msgs, msg_message("wdw_pyramidspell_notfound",
"unit region command mindist maxdist", mage, r, strdup(co->order),
max(1, minshowdist), maxshowdist));
} }
return cast_level; return cast_level;

View File

@ -5633,9 +5633,11 @@
<arg name="unit" type="unit"></arg> <arg name="unit" type="unit"></arg>
<arg name="region" type="region"></arg> <arg name="region" type="region"></arg>
<arg name="command" type="string"></arg> <arg name="command" type="string"></arg>
<arg name="mindist" type="int"></arg>
<arg name="maxdist" type="int"></arg>
</type> </type>
<text locale="de">"$unit($unit) in $region($region): '$command' - In dieser Regione können keine Pyramiden gebaut werden."</text> <text locale="de">"$unit($unit) in $region($region): '$command' - In dieser Region können keine Pyramiden gebaut werden. Die nächste Pyramidenregion ist zwischen $int($mindist) und $int($maxdist) Regionen entfernt."</text>
<text locale="en">"$unit($unit) in $region($region): '$command' - No pyramids may be build in this region."</text> <text locale="en">"$unit($unit) in $region($region): '$command' - No pyramids may be build in this region. The closest region to build a pyramid in is between $int($mindist) and $int($maxdist) regions away."</text>
<text locale="fr">"$unit($unit) in $region($region): '$command' - No pyramids may be build in this region."</text> <text locale="fr">"$unit($unit) in $region($region): '$command' - No pyramids may be build in this region. The closest region to build a pyramid in is between $int($mindist) and $int($maxdist) regions away."</text>
</message> </message>
</messages> </messages>