* Fix für Kampfbug unbewaffnete

* Fix für crashbug transfermen
* fix für crash dungeons wenn start/ziel nicht existieren
* Astralraum mit Koordinaten
This commit is contained in:
Enno Rehling 2002-01-28 00:25:32 +00:00
parent 51348305ae
commit 597f38d182
5 changed files with 19 additions and 6 deletions

View File

@ -1905,7 +1905,7 @@ attack(battle *b, troop ta, const att *a)
ta.fighter->action_counter++;
}
if (wp && hits(ta, td, wp)) {
if (hits(ta, td, wp)) {
const char * d;
if (wp == NULL) d = au->race->def_damage;
else if (riding(ta)) d = wp->type->damage[1];

View File

@ -150,7 +150,7 @@ create_teleport_plane(void)
astral_plane = create_new_plane(1, "Astralraum",
TE_CENTER_X-500, TE_CENTER_X+500,
TE_CENTER_Y-500, TE_CENTER_Y+500,
PFL_NOCOORDS);
0);
}
/* Regionsbereich aufbauen. */

View File

@ -745,10 +745,11 @@ transfermen(unit * u, unit * u2, int n)
/* TODO: Das ist schnarchlahm! und gehört ncht hierhin */
a = a_find(u2->attribs, &at_effect);
while (a) {
attrib * an = a->nexttype;
effect_data * olde = (effect_data*)a->data.v;
int e = get_effect(u, olde->type);
if (e!=0) change_effect(u2, olde->type, -e);
a = a->nexttype;
a = an;
}
}
else if (r->land)

View File

@ -127,7 +127,10 @@ make_dungeon(const dungeon * data)
if (rn && rn->terrain==T_OCEAN) terraform(rn, T_FIREWALL);
}
if (size==0) break;
assert(r!=rnext);
if (r==rnext) {
/* error */
break;
}
r = rnext;
n = (n+1) % 2;
}
@ -161,7 +164,8 @@ void
make_dungeongate(region * source, region * target, const struct dungeon * d)
{
building *bsource, *btarget;
if (source==NULL || target==NULL || d==NULL) return;
bsource = new_building(bt_find("castle"), source, default_locale);
set_string(&bsource->name, "Pforte zur Hölle");
bsource->size = 50;

View File

@ -433,7 +433,7 @@ create_underworld(void)
int x, y;
region *r;
attrib *a;
plane * hell = create_new_plane(-1, "Hölle", 100000, 100000, 100020, 100020, PFL_NOCOORDS);
plane * hell = create_new_plane(-1, "Hölle", 100000, 100000, 100020, 100020, PFL_NONE);
for(x=0;x<=20;x++) {
for(y=0;y<=20;y++) {
@ -2779,6 +2779,13 @@ heal_all(void)
return 0;
}
static void
fix_astralplane(void)
{
plane * astralplane = getplanebyname("Astralraum");
freset(astralplane, PFL_NOCOORDS);
}
void
korrektur(void)
{
@ -2786,6 +2793,7 @@ korrektur(void)
setup_locales();
#endif
fix_astralplane();
fix_firewalls();
fix_gates();
#ifdef TEST_GM_COMMANDS