forked from github/server
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:
parent
c41a989809
commit
fbd5190b50
|
@ -2591,6 +2591,12 @@ bewache_an(void)
|
||||||
if (rterrain(r) != T_OCEAN) {
|
if (rterrain(r) != T_OCEAN) {
|
||||||
if (!fval(u, RCF_ILLUSIONARY) && u->race != new_race[RC_SPELL]) {
|
if (!fval(u, RCF_ILLUSIONARY) && u->race != new_race[RC_SPELL]) {
|
||||||
#ifdef WACH_WAFF
|
#ifdef WACH_WAFF
|
||||||
|
/* Monster der Monsterpartei dürfen immer bewachen */
|
||||||
|
if (u->faction == findfaction(MONSTER_FACTION)){
|
||||||
|
guard(u, GUARD_ALL);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (!armedmen(u)) {
|
if (!armedmen(u)) {
|
||||||
add_message(&u->faction->msgs,
|
add_message(&u->faction->msgs,
|
||||||
msg_error(u, S->s, "unit_unarmed", ""));
|
msg_error(u, S->s, "unit_unarmed", ""));
|
||||||
|
|
|
@ -1685,8 +1685,7 @@ verify_targets(castorder *co)
|
||||||
parameters[P_TEMP]), itoa36(spobj->data.i));
|
parameters[P_TEMP]), itoa36(spobj->data.i));
|
||||||
add_message(&mage->faction->msgs, new_message(mage->faction,
|
add_message(&mage->faction->msgs, new_message(mage->faction,
|
||||||
"spellunitnotfound%u:unit%r:region%s:command%s:id",
|
"spellunitnotfound%u:unit%r:region%s:command%s:id",
|
||||||
mage, mage->region, strdup(co->order),
|
mage, mage->region, strdup(co->order), strdup(tbuf)));
|
||||||
strdup(tbuf)));
|
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
/* Einheit wurde nun gefunden, pointer umsetzen */
|
/* Einheit wurde nun gefunden, pointer umsetzen */
|
||||||
|
@ -1843,7 +1842,7 @@ verify_targets(castorder *co)
|
||||||
add_message(&mage->faction->msgs, new_message(mage->faction,
|
add_message(&mage->faction->msgs, new_message(mage->faction,
|
||||||
"spellunitresists%u:unit%r:region%s:command%s:id",
|
"spellunitresists%u:unit%r:region%s:command%s:id",
|
||||||
mage, mage->region, strdup(co->order),
|
mage, mage->region, strdup(co->order),
|
||||||
strdup(itoa36(spobj->data.i))));
|
strdup(spobj->data.i)));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1866,7 +1865,7 @@ verify_targets(castorder *co)
|
||||||
resists++;
|
resists++;
|
||||||
add_message(&mage->faction->msgs, new_message(mage->faction,
|
add_message(&mage->faction->msgs, new_message(mage->faction,
|
||||||
"spellbuildingresists%u:unit%r:region%s:command%i:id",
|
"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;
|
break;
|
||||||
}
|
}
|
||||||
success++;
|
success++;
|
||||||
|
@ -1886,7 +1885,7 @@ verify_targets(castorder *co)
|
||||||
resists++;
|
resists++;
|
||||||
add_message(&mage->faction->msgs, new_message(mage->faction,
|
add_message(&mage->faction->msgs, new_message(mage->faction,
|
||||||
"spellshipresists%u:unit%r:region%s:command%i:id",
|
"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;
|
break;
|
||||||
}
|
}
|
||||||
success++;
|
success++;
|
||||||
|
@ -3194,6 +3193,7 @@ magic(void)
|
||||||
/* zwar wurde mindestens ein Ziel gefunden, das widerstand
|
/* zwar wurde mindestens ein Ziel gefunden, das widerstand
|
||||||
* jedoch dem Zauber. Kosten abziehen und abbrechen. */
|
* jedoch dem Zauber. Kosten abziehen und abbrechen. */
|
||||||
pay_spell(u, sp, level, co->distance);
|
pay_spell(u, sp, level, co->distance);
|
||||||
|
countspells(u,1);
|
||||||
sprintf(buf, "%s gelingt es %s zu zaubern, doch der Spruch zeigt "
|
sprintf(buf, "%s gelingt es %s zu zaubern, doch der Spruch zeigt "
|
||||||
"keine Wirkung.", unitname(u), sp->name);
|
"keine Wirkung.", unitname(u), sp->name);
|
||||||
addmessage(0, u->faction, buf, MSG_MAGIC, ML_MISTAKE);
|
addmessage(0, u->faction, buf, MSG_MAGIC, ML_MISTAKE);
|
||||||
|
|
|
@ -2408,6 +2408,7 @@ patzer_peasantmob(castorder *co)
|
||||||
attrib *a;
|
attrib *a;
|
||||||
region *r;
|
region *r;
|
||||||
unit *mage = (unit *)co->magician;
|
unit *mage = (unit *)co->magician;
|
||||||
|
strlist *S;
|
||||||
|
|
||||||
if (mage->region->land){
|
if (mage->region->land){
|
||||||
r = mage->region;
|
r = mage->region;
|
||||||
|
@ -2423,7 +2424,11 @@ patzer_peasantmob(castorder *co)
|
||||||
|
|
||||||
u = createunit(r, findfaction(MONSTER_FACTION), n, new_race[RC_PEASANT]);
|
u = createunit(r, findfaction(MONSTER_FACTION), n, new_race[RC_PEASANT]);
|
||||||
set_string(&u->name, "Bauernmob");
|
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 = a_new(&at_unitdissolve);
|
||||||
a->data.ca[0] = 1; /* An rpeasants(r). */
|
a->data.ca[0] = 1; /* An rpeasants(r). */
|
||||||
a->data.ca[1] = 10; /* 10% */
|
a->data.ca[1] = 10; /* 10% */
|
||||||
|
|
|
@ -3948,7 +3948,7 @@
|
||||||
</type>
|
</type>
|
||||||
<locale name="en">
|
<locale name="en">
|
||||||
<nr section="none">
|
<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>
|
</nr>
|
||||||
</locale>
|
</locale>
|
||||||
</message>
|
</message>
|
||||||
|
|
Loading…
Reference in New Issue