forked from github/server
multiple errors in dragon-magic (power-related)
This commit is contained in:
parent
387ba63313
commit
012cdf5066
|
@ -1146,21 +1146,23 @@ cr_output_region(FILE * F, report_context * ctx, seen_region * sr)
|
|||
pnormalize(&nx, &ny, pl);
|
||||
}
|
||||
|
||||
if (ny==pl->maxy) {
|
||||
oc[o][0] = nx;
|
||||
oc[o++][1] = pl->miny-1;
|
||||
}
|
||||
if (nx==pl->maxx) {
|
||||
oc[o][0] = pl->minx-1;
|
||||
oc[o++][1] = ny;
|
||||
}
|
||||
if (ny==pl->miny) {
|
||||
oc[o][0] = nx;
|
||||
oc[o++][1] = pl->maxy+1;
|
||||
}
|
||||
if (nx==pl->minx) {
|
||||
oc[o][0] = pl->maxx+1;
|
||||
oc[o++][1] = ny;
|
||||
if (pl) {
|
||||
if (ny==pl->maxy) {
|
||||
oc[o][0] = nx;
|
||||
oc[o++][1] = pl->miny-1;
|
||||
}
|
||||
if (nx==pl->maxx) {
|
||||
oc[o][0] = pl->minx-1;
|
||||
oc[o++][1] = ny;
|
||||
}
|
||||
if (ny==pl->miny) {
|
||||
oc[o][0] = nx;
|
||||
oc[o++][1] = pl->maxy+1;
|
||||
}
|
||||
if (nx==pl->minx) {
|
||||
oc[o][0] = pl->maxx+1;
|
||||
oc[o++][1] = ny;
|
||||
}
|
||||
}
|
||||
while (o--) {
|
||||
cr_region_header(F, plid, oc[o][0], oc[o][1], r->uid);
|
||||
|
|
|
@ -1873,10 +1873,9 @@ do_extra_spell(troop at, const att *a)
|
|||
const spell *sp = a->data.sp;
|
||||
fighter *fi = at.fighter;
|
||||
unit *au = fi->unit;
|
||||
int power;
|
||||
double power;
|
||||
|
||||
/* nur bei Monstern können mehrere 'Magier' in einer Einheit sein */
|
||||
power = sp->level * au->number;
|
||||
power = sp->level * MagicPower();
|
||||
if (sp->sp_function==NULL) {
|
||||
log_error(("spell '%s' has no function.\n", sp->sname));
|
||||
} else {
|
||||
|
|
|
@ -105,7 +105,7 @@ MagicRegeneration(void)
|
|||
return value;
|
||||
}
|
||||
|
||||
static double
|
||||
double
|
||||
MagicPower(void)
|
||||
{
|
||||
static double value = -1.0;
|
||||
|
|
|
@ -384,6 +384,8 @@ extern struct spell_list ** get_spelllist(struct sc_mage * mage, struct faction
|
|||
|
||||
extern void write_spelllist(const struct spell_list * slist, struct storage * store);
|
||||
extern void read_spellist(struct spell_list ** slistp, struct storage * store);
|
||||
extern double MagicPower(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -601,7 +601,7 @@ sp_dragonodem(fighter * fi, int level, double power, spell * sp)
|
|||
/* 11-26 HP */
|
||||
damage = spell_damage(4);
|
||||
/* Jungdrache 3->54, Drache 6->216, Wyrm 12->864 Treffer */
|
||||
force = lovar(get_force(level,6));
|
||||
force = lovar(get_force(power, 6));
|
||||
|
||||
enemies = count_enemies(b, fi, FIGHT_ROW, BEHIND_ROW-1, SELECT_ADVANCE);
|
||||
|
||||
|
@ -697,7 +697,7 @@ sp_drainodem(fighter * fi, int level, double power, spell * sp)
|
|||
/* 11-26 HP */
|
||||
damage = spell_damage(4);
|
||||
/* Jungdrache 3->54, Drache 6->216, Wyrm 12->864 Treffer */
|
||||
force = lovar(get_force(level,6));
|
||||
force = lovar(get_force(power, 6));
|
||||
|
||||
enemies = count_enemies(b, fi, FIGHT_ROW, BEHIND_ROW-1, SELECT_ADVANCE);
|
||||
|
||||
|
|
Loading…
Reference in New Issue