Fix bewachender Bauernmob

fix doppelt base36 nummer in Meldung
fix keine Erfahrungstage bei scheitern an Magieresistenz

Nicht getestet, da der source derzeit nicht kompiliert
This commit is contained in:
Katja Zedel 2002-03-01 19:32:25 +00:00
parent c41a989809
commit fbd5190b50
4 changed files with 20 additions and 9 deletions

View File

@ -2591,6 +2591,12 @@ bewache_an(void)
if (rterrain(r) != T_OCEAN) {
if (!fval(u, RCF_ILLUSIONARY) && u->race != new_race[RC_SPELL]) {
#ifdef WACH_WAFF
/* Monster der Monsterpartei dürfen immer bewachen */
if (u->faction == findfaction(MONSTER_FACTION)){
guard(u, GUARD_ALL);
continue;
}
if (!armedmen(u)) {
add_message(&u->faction->msgs,
msg_error(u, S->s, "unit_unarmed", ""));

View File

@ -1685,8 +1685,7 @@ verify_targets(castorder *co)
parameters[P_TEMP]), itoa36(spobj->data.i));
add_message(&mage->faction->msgs, new_message(mage->faction,
"spellunitnotfound%u:unit%r:region%s:command%s:id",
mage, mage->region, strdup(co->order),
strdup(tbuf)));
mage, mage->region, strdup(co->order), strdup(tbuf)));
break;
} else {
/* Einheit wurde nun gefunden, pointer umsetzen */
@ -1843,7 +1842,7 @@ verify_targets(castorder *co)
add_message(&mage->faction->msgs, new_message(mage->faction,
"spellunitresists%u:unit%r:region%s:command%s:id",
mage, mage->region, strdup(co->order),
strdup(itoa36(spobj->data.i))));
strdup(spobj->data.i)));
break;
}
@ -1866,7 +1865,7 @@ verify_targets(castorder *co)
resists++;
add_message(&mage->faction->msgs, new_message(mage->faction,
"spellbuildingresists%u:unit%r:region%s:command%i:id",
mage, mage->region, strdup(co->order), spobj->data.i));
mage, mage->region, strdup(co->order), strdup(spobj->data.i)));
break;
}
success++;
@ -1886,7 +1885,7 @@ verify_targets(castorder *co)
resists++;
add_message(&mage->faction->msgs, new_message(mage->faction,
"spellshipresists%u:unit%r:region%s:command%i:id",
mage, mage->region, strdup(co->order), spobj->data.i));
mage, mage->region, strdup(co->order), strdup(spobj->data.i)));
break;
}
success++;
@ -3194,6 +3193,7 @@ magic(void)
/* zwar wurde mindestens ein Ziel gefunden, das widerstand
* jedoch dem Zauber. Kosten abziehen und abbrechen. */
pay_spell(u, sp, level, co->distance);
countspells(u,1);
sprintf(buf, "%s gelingt es %s zu zaubern, doch der Spruch zeigt "
"keine Wirkung.", unitname(u), sp->name);
addmessage(0, u->faction, buf, MSG_MAGIC, ML_MISTAKE);

View File

@ -2408,6 +2408,7 @@ patzer_peasantmob(castorder *co)
attrib *a;
region *r;
unit *mage = (unit *)co->magician;
strlist *S;
if (mage->region->land){
r = mage->region;
@ -2423,7 +2424,11 @@ patzer_peasantmob(castorder *co)
u = createunit(r, findfaction(MONSTER_FACTION), n, new_race[RC_PEASANT]);
set_string(&u->name, "Bauernmob");
guard(u, GUARD_ALL);
/* guard(u, GUARD_ALL); hier zu früh! Befehl BEWACHE setzten */
sprintf(buf, "BEWACHE");
S = makestrlist(buf);
addlist(&u->orders, S);
set_string(&u->thisorder, LOC(u->faction->locale, "defaultorder"));
a = a_new(&at_unitdissolve);
a->data.ca[0] = 1; /* An rpeasants(r). */
a->data.ca[1] = 10; /* 10% */

View File

@ -3948,7 +3948,7 @@
</type>
<locale name="en">
<nr section="none">
<text>"$unit($unit) in $region($region): '$command' - Unit $int36($id) could not be located."</text>
<text>"$unit($unit) in $region($region): '$command' - Unit $id could not be located."</text>
</nr>
</locale>
</message>