forked from github/server
einbau der letzten bugfixes aus dem beta-1-0 branch
This commit is contained in:
parent
42480c7a58
commit
0223ef5b2e
|
@ -862,6 +862,33 @@ spellcost(unit *u, spell * sp)
|
||||||
return aura;
|
return aura;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ------------------------------------------------------------- */
|
||||||
|
/* SPC_LINEAR ist am höchstwertigen, dann müssen Komponenten für die
|
||||||
|
* Stufe des Magiers vorhanden sein.
|
||||||
|
* SPC_LINEAR hat die gewünschte Stufe als multiplikator,
|
||||||
|
* nur SPC_FIX muss nur einmal vorhanden sein, ist also am
|
||||||
|
* niedrigstwertigen und sollte von den beiden anderen Typen
|
||||||
|
* überschrieben werden */
|
||||||
|
int
|
||||||
|
spl_costtyp(spell * sp)
|
||||||
|
{
|
||||||
|
int k;
|
||||||
|
int costtyp = SPC_FIX;
|
||||||
|
|
||||||
|
for (k = 0; k < MAXINGREDIENT; k++) {
|
||||||
|
if (costtyp == SPC_LINEAR) return SPC_LINEAR;
|
||||||
|
|
||||||
|
if (sp->komponenten[k][2] == SPC_LINEAR) {
|
||||||
|
return SPC_LINEAR;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (costtyp==SPC_FIX) {
|
||||||
|
costtyp = SPC_LEVEL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return costtyp;
|
||||||
|
}
|
||||||
|
|
||||||
/* ------------------------------------------------------------- */
|
/* ------------------------------------------------------------- */
|
||||||
/* durch Komponenten und cast_level begrenzter maximal möglicher
|
/* durch Komponenten und cast_level begrenzter maximal möglicher
|
||||||
* Level
|
* Level
|
||||||
|
@ -2866,9 +2893,13 @@ magic(void)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (level < co->level){
|
if (level < co->level){
|
||||||
sprintf(buf, "%s hat nur genügend Komponenten um %s auf Stufe %d "
|
/* Sprüche mit Fixkosten werden immer auf Stufe des Spruchs
|
||||||
"zu zaubern.", unitname(u), sp->name, level);
|
* gezaubert, co->level ist aber defaultmäßig Stufe des Magiers */
|
||||||
addmessage(0, u->faction, buf, MSG_MAGIC, ML_INFO);
|
if (spl_costtyp(sp) != SPC_FIX) {
|
||||||
|
sprintf(buf, "%s hat nur genügend Komponenten um %s auf Stufe %d "
|
||||||
|
"zu zaubern.", unitname(u), sp->name, level);
|
||||||
|
addmessage(0, u->faction, buf, MSG_MAGIC, ML_INFO);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
co->level = level;
|
co->level = level;
|
||||||
|
|
||||||
|
|
|
@ -1367,10 +1367,7 @@ sail(region * starting_point, unit * u, region * next_point, boolean move_on_lan
|
||||||
* befahrene Region. */
|
* befahrene Region. */
|
||||||
tt[step] = starting_point;
|
tt[step] = starting_point;
|
||||||
|
|
||||||
while (current_point!=next_point &&
|
while (current_point!=next_point && m < k && next_point)
|
||||||
((rterrain(current_point) == T_OCEAN
|
|
||||||
|| is_cursed(u->ship->attribs, C_SHIP_FLYING, 0))
|
|
||||||
&& next_point != 0 && m < k))
|
|
||||||
{
|
{
|
||||||
direction_t dir = reldirection(current_point, next_point);
|
direction_t dir = reldirection(current_point, next_point);
|
||||||
|
|
||||||
|
@ -1515,6 +1512,7 @@ sail(region * starting_point, unit * u, region * next_point, boolean move_on_lan
|
||||||
rv[l] = current_point;
|
rv[l] = current_point;
|
||||||
l++;
|
l++;
|
||||||
}
|
}
|
||||||
|
if (rterrain(current_point) != T_OCEAN && !is_cursed(u->ship->attribs, C_SHIP_FLYING, 0)) break;
|
||||||
next_point = movewhere(current_point, u);
|
next_point = movewhere(current_point, u);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue