forked from github/server
- untote helden wwurden nicht aus total vernichteten einheiten genommen
This commit is contained in:
parent
051c705809
commit
6e5da8ac25
2 changed files with 108 additions and 109 deletions
|
@ -1411,8 +1411,6 @@ fighters(battle *b, fighter *af, int minrow, int maxrow, int mask)
|
||||||
cv_init(fightervp);
|
cv_init(fightervp);
|
||||||
|
|
||||||
cv_foreach(fig, b->fighters) {
|
cv_foreach(fig, b->fighters) {
|
||||||
if (!fig->alive) continue;
|
|
||||||
|
|
||||||
row = get_unitrow(fig);
|
row = get_unitrow(fig);
|
||||||
if (row >= minrow && row <= maxrow) {
|
if (row >= minrow && row <= maxrow) {
|
||||||
switch (mask) {
|
switch (mask) {
|
||||||
|
|
|
@ -306,8 +306,9 @@ sp_combatrosthauch(fighter * fi, int level, double power, spell * sp)
|
||||||
|
|
||||||
for (fig = fgs->begin; fig != fgs->end; ++fig) {
|
for (fig = fgs->begin; fig != fgs->end; ++fig) {
|
||||||
fighter *df = *fig;
|
fighter *df = *fig;
|
||||||
if (!force)
|
|
||||||
break;
|
if (df->alive==0) continue;
|
||||||
|
if (force<=0) break;
|
||||||
|
|
||||||
/* da n min(force, x), sollte force maximal auf 0 sinken */
|
/* da n min(force, x), sollte force maximal auf 0 sinken */
|
||||||
assert(force >= 0);
|
assert(force >= 0);
|
||||||
|
@ -934,6 +935,7 @@ sp_chaosrow(fighter * fi, int level, double power, spell * sp)
|
||||||
fighter *df = *fig;
|
fighter *df = *fig;
|
||||||
int n = df->unit->number;
|
int n = df->unit->number;
|
||||||
|
|
||||||
|
if (df->alive==0) continue;
|
||||||
if (power<=0.0) break;
|
if (power<=0.0) break;
|
||||||
/* force sollte wegen des max(0,x) nicht unter 0 fallen können */
|
/* force sollte wegen des max(0,x) nicht unter 0 fallen können */
|
||||||
|
|
||||||
|
@ -1029,7 +1031,7 @@ sp_flee(fighter * fi, int level, double power, spell * sp)
|
||||||
|
|
||||||
for (fig = fgs->begin; fig != fgs->end; ++fig) {
|
for (fig = fgs->begin; fig != fgs->end; ++fig) {
|
||||||
fighter *df = *fig;
|
fighter *df = *fig;
|
||||||
for (n = 0; n < df->alive; n++) {
|
for (n=0; n!=df->alive; ++n) {
|
||||||
if (force < 0)
|
if (force < 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -1665,8 +1667,7 @@ sp_healing(fighter * fi, int level, double power, spell * sp)
|
||||||
for (fig = fgs->begin; fig != fgs->end; ++fig) {
|
for (fig = fgs->begin; fig != fgs->end; ++fig) {
|
||||||
fighter *df = *fig;
|
fighter *df = *fig;
|
||||||
|
|
||||||
if (!healhp)
|
if (healhp<=0) break;
|
||||||
break;
|
|
||||||
|
|
||||||
/* Untote kann man nicht heilen */
|
/* Untote kann man nicht heilen */
|
||||||
if (fval(df->unit->race, RCF_NOHEAL))
|
if (fval(df->unit->race, RCF_NOHEAL))
|
||||||
|
@ -1674,8 +1675,8 @@ sp_healing(fighter * fi, int level, double power, spell * sp)
|
||||||
|
|
||||||
hp = unit_max_hp(df->unit);
|
hp = unit_max_hp(df->unit);
|
||||||
for (n = 0; n < df->unit->number; n++) {
|
for (n = 0; n < df->unit->number; n++) {
|
||||||
if (!healhp)
|
if (healhp<=0) break;
|
||||||
break;
|
|
||||||
wound = hp - df->person[n].hp;
|
wound = hp - df->person[n].hp;
|
||||||
if ( wound > 0 && wound < hp) {
|
if ( wound > 0 && wound < hp) {
|
||||||
int heal = min(healhp, wound);
|
int heal = min(healhp, wound);
|
||||||
|
|
Loading…
Reference in a new issue