forked from github/server
Dämonenhunger halbiert Talente nicht http://eressea.upb.de/mantis/bug_view_page.php?bug_id=0000217 Falsche Trefferzählung http://eressea.upb.de/mantis/bug_view_page.php?bug_id=0000216 Bauernblutverteilung http://eressea.upb.de/mantis/bug_view_page.php?bug_id=0000206 (Alles) im diplomatiestatus http://eressea.upb.de/mantis/bug_view_page.php?bug_id=0000200 VERKAUFEN ALLES berücksichtigt keine Karawanserei
This commit is contained in:
parent
8ee6431125
commit
3ca1a267b0
|
@ -2941,7 +2941,7 @@ produce(void)
|
|||
case K_SELL:
|
||||
/* sell returns true if the sale is not limited
|
||||
* by the region limit */
|
||||
limited = !sell(u, &sellorders, ord) & limited;
|
||||
limited &= !sell(u, &sellorders, ord);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -3027,6 +3027,8 @@ produce(void)
|
|||
|
||||
if (sellorders) {
|
||||
int limit = rpeasants(r) / TRADE_FRACTION;
|
||||
if (rterrain(r) == T_DESERT && buildingtype_exists(r, bt_find("caravan")))
|
||||
limit *= 2;
|
||||
expandselling(r, sellorders, limited?limit:INT_MAX);
|
||||
}
|
||||
|
||||
|
|
|
@ -166,7 +166,6 @@ get_food(region *r)
|
|||
{
|
||||
unit *u;
|
||||
int peasantfood = rpeasants(r)*10;
|
||||
unit * demon = r->units;
|
||||
|
||||
/* 1. Versorgung von eigenen Einheiten. Das vorhandene Silber
|
||||
* wird zunächst so auf die Einheiten aufgeteilt, dass idealerweise
|
||||
|
@ -238,33 +237,27 @@ get_food(region *r)
|
|||
*/
|
||||
for (u = r->units; u; u = u->next) {
|
||||
if (u->race == new_race[RC_DAEMON]) {
|
||||
unit * donor = r->units;
|
||||
int hungry = u->number;
|
||||
|
||||
while (demon!=NULL && hungry>0) {
|
||||
while (donor!=NULL && hungry>0) {
|
||||
/* alwayy start with the first known uint that may have some blood */
|
||||
static const struct potion_type * pt_blood;
|
||||
unit * ud = demon;
|
||||
if (pt_blood==NULL) pt_blood = pt_find("peasantblood");
|
||||
demon = NULL; /* this will be re-set in the loop */
|
||||
while (ud!=NULL) {
|
||||
if (ud->race==new_race[RC_DAEMON]) {
|
||||
if (get_effect(ud, pt_blood)) {
|
||||
/* new best guess for first blood-donor: */
|
||||
if (demon==NULL) demon = ud;
|
||||
while (donor!=NULL) {
|
||||
if (donor->race==new_race[RC_DAEMON]) {
|
||||
if (get_effect(donor, pt_blood)) {
|
||||
/* if he's in our faction, drain him: */
|
||||
if (ud->faction==u->faction) break;
|
||||
if (donor->faction==u->faction) break;
|
||||
}
|
||||
}
|
||||
ud=ud->next;
|
||||
donor = donor->next;
|
||||
}
|
||||
if (ud!=NULL) {
|
||||
int blut = get_effect(ud, pt_blood);
|
||||
if (donor != NULL) {
|
||||
int blut = get_effect(donor, pt_blood);
|
||||
blut = min(blut, hungry);
|
||||
change_effect(ud, pt_blood, -blut);
|
||||
change_effect(donor, pt_blood, -blut);
|
||||
hungry -= blut;
|
||||
} else {
|
||||
break;
|
||||
/* no more help for us */
|
||||
}
|
||||
}
|
||||
if (r->planep == NULL || !fval(r->planep, PFL_NOFEED)) {
|
||||
|
@ -276,7 +269,9 @@ get_food(region *r)
|
|||
peasantfood = 0;
|
||||
}
|
||||
if (hungry > 0) {
|
||||
hunger(hungry, u); /* nicht gefütterte dämonen hungern */
|
||||
/* nicht gefütterte dämonen hungern */
|
||||
if (hunger(hungry, u)) fset(u, UFL_HUNGER);
|
||||
/* used to be: hunger(hungry, u); */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1690,7 +1690,7 @@ show_allies(const faction * f, const ally * allies)
|
|||
hh = 0;
|
||||
scat(factionname(sf->faction));
|
||||
scat(" (");
|
||||
if (mode == HELP_ALL) {
|
||||
if ((mode & HELP_ALL) == HELP_ALL) {
|
||||
scat("Alles");
|
||||
} else
|
||||
for (h = 1; h < HELP_ALL; h *= 2) {
|
||||
|
|
|
@ -994,7 +994,11 @@ terminate(troop dt, troop at, int type, const char *damage, boolean missile)
|
|||
boolean magic = false;
|
||||
int da = dice_rand(damage);
|
||||
|
||||
if(fval(au, UFL_WERE)) {
|
||||
#ifdef SHOW_KILLS
|
||||
++at.fighter->hits;
|
||||
#endif
|
||||
|
||||
if (fval(au, UFL_WERE)) {
|
||||
int level = fspecial(du->faction, FS_LYCANTROPE);
|
||||
da += level;
|
||||
}
|
||||
|
@ -1188,13 +1192,14 @@ terminate(troop dt, troop at, int type, const char *damage, boolean missile)
|
|||
return false;
|
||||
}
|
||||
#ifdef SHOW_KILLS
|
||||
++at.fighter->kills;
|
||||
++at.fighter->kills;
|
||||
assert(at.fighter->kills>=at.fighter->hits);
|
||||
#endif
|
||||
|
||||
#ifdef SMALL_BATTLE_MESSAGES
|
||||
if (b->small) {
|
||||
strcat(smallbuf, ", die tödlich ist");
|
||||
}
|
||||
if (b->small) {
|
||||
strcat(smallbuf, ", die tödlich ist");
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Sieben Leben */
|
||||
|
@ -1850,9 +1855,6 @@ hits(troop at, troop dt, weapon * awp)
|
|||
strcat(smallbuf, " und trifft.");
|
||||
battlerecord(b,smallbuf);
|
||||
}
|
||||
#endif
|
||||
#ifdef SHOW_KILLS
|
||||
++at.fighter->hits;
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -716,9 +716,9 @@ sp_drainodem(fighter * fi, int level, double power, spell * sp)
|
|||
assert(dt.fighter);
|
||||
if (hits(at, dt, NULL)) {
|
||||
drain_exp(dt.fighter->unit, 90);
|
||||
drained++;
|
||||
++drained;
|
||||
killed += terminate(dt, at, AT_COMBATSPELL, damage, false);
|
||||
}
|
||||
killed += terminate(dt, at, AT_COMBATSPELL, damage, false);
|
||||
--force;
|
||||
}
|
||||
|
||||
|
|
|
@ -840,7 +840,7 @@ enum {
|
|||
#define HELP_GUARD 16 /* Laesst Steuern eintreiben etc. */
|
||||
#define HELP_FSTEALTH 32 /* Parteitarnung anzeigen. */
|
||||
#define HELP_TRAVEL 64 /* Laesst Regionen betreten. */
|
||||
#define HELP_ALL (127-HELP_OBSERVE) /* Alle "positiven" HELPs zusammen */
|
||||
#define HELP_ALL (127-HELP_TRAVEL-HELP_OBSERVE) /* Alle "positiven" HELPs zusammen */
|
||||
/* HELP_OBSERVE deaktiviert */
|
||||
/* ------------------------------------------------------------- */
|
||||
/* Prototypen */
|
||||
|
|
|
@ -511,7 +511,7 @@ travel_route(const unit * u, region * r, region_list * route)
|
|||
/* kein travelthru in der letzten region! */
|
||||
while (route) {
|
||||
travelthru(u, r);
|
||||
r = route->data;
|
||||
r = route->data;
|
||||
route = route->next;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue