forked from github/server
- sp_mindblast hatte auf Einheiten ohne Talente unproportionierte Auswirkungen (tausende von Toten)
This commit is contained in:
parent
75ea8e150b
commit
4f14c6fbfb
|
@ -542,40 +542,25 @@ sp_mindblast(fighter * fi, int level, double power, spell * sp)
|
|||
dt = select_enemy(b, fi, minrow, maxrow);
|
||||
assert(dt.fighter);
|
||||
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);
|
||||
if (sk != NOSKILL) {
|
||||
/* Skill abziehen */
|
||||
int n = 30+rand()%61;
|
||||
skill * sv = get_skill(du, sk);
|
||||
while (n>0) {
|
||||
if (n>=30*du->number) {
|
||||
reduce_skill(du, sv, 1);
|
||||
n-=30;
|
||||
int n = 1 + rand() % 3;
|
||||
/* Skill abziehen */
|
||||
reduce_skill(du, sv, n);
|
||||
} else {
|
||||
if (rand()%(30*du->number)<n) reduce_skill(du, sv, 1);
|
||||
n = 0;
|
||||
}
|
||||
/* Keine Skills mehr, Einheit töten */
|
||||
rmtroop(dt);
|
||||
++killed;
|
||||
}
|
||||
--enemies;
|
||||
} else {
|
||||
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++;
|
||||
++k;
|
||||
}
|
||||
--force;
|
||||
} while (force && enemies);
|
||||
|
||||
sprintf(buf, "%d Krieger %s Erinnerungen",
|
||||
k, k == 1 ? "verliert" : "verlieren");
|
||||
sprintf(buf, "%d Krieger %s Erinnerungen", k, k == 1 ? "verliert" : "verlieren");
|
||||
|
||||
if (killed > 0) {
|
||||
scat(", ");
|
||||
|
|
Loading…
Reference in New Issue