- sp_mindblast hatte auf Einheiten ohne Talente unproportionierte Auswirkungen (tausende von Toten)
This commit is contained in:
Enno Rehling 2004-05-22 16:26:03 +00:00
parent 75ea8e150b
commit 4f14c6fbfb
1 changed files with 57 additions and 72 deletions

View File

@ -542,40 +542,25 @@ sp_mindblast(fighter * fi, int level, double power, spell * sp)
dt = select_enemy(b, fi, minrow, maxrow); dt = select_enemy(b, fi, minrow, maxrow);
assert(dt.fighter); assert(dt.fighter);
du = dt.fighter->unit; du = dt.fighter->unit;
if (humanoidrace(du->race) && is_magic_resistant(mage, du, 0) == false) { if (humanoidrace(du->race) && !is_magic_resistant(mage, du, 0)) {
sk = random_skill(du); sk = random_skill(du);
if (sk != NOSKILL) { if (sk != NOSKILL) {
/* Skill abziehen */
int n = 30+rand()%61;
skill * sv = get_skill(du, sk); skill * sv = get_skill(du, sk);
while (n>0) { int n = 1 + rand() % 3;
if (n>=30*du->number) { /* Skill abziehen */
reduce_skill(du, sv, 1); reduce_skill(du, sv, n);
n-=30;
} else { } else {
if (rand()%(30*du->number)<n) reduce_skill(du, sv, 1); /* Keine Skills mehr, Einheit töten */
n = 0; rmtroop(dt);
} ++killed;
} }
--enemies; --enemies;
} else { ++k;
troop t;
/* Keine Skills mehr, Einheit töten */
t.fighter = dt.fighter;
t.index = 0;
while(dt.fighter->alive - dt.fighter->removed) {
rmtroop(t);
enemies--;
killed++;
}
}
k++;
} }
--force; --force;
} while (force && enemies); } while (force && enemies);
sprintf(buf, "%d Krieger %s Erinnerungen", sprintf(buf, "%d Krieger %s Erinnerungen", k, k == 1 ? "verliert" : "verlieren");
k, k == 1 ? "verliert" : "verlieren");
if (killed > 0) { if (killed > 0) {
scat(", "); scat(", ");