diff --git a/src/common/gamecode/laws.c b/src/common/gamecode/laws.c index 1d41c9df6..08cce2e11 100644 --- a/src/common/gamecode/laws.c +++ b/src/common/gamecode/laws.c @@ -2886,6 +2886,7 @@ age_building(building * b) region * rt = r_standard_to_astral(r); unit * u, * mage = NULL; + if (fval(rt->terrain, FORBIDDEN_REGION)) rt = NULL; /* step 1: give unicorns to people in the building, * find out if there's a magician in there. */ for (u=r->units;u;u=u->next) { diff --git a/src/common/kernel/teleport.c b/src/common/kernel/teleport.c index d588c5dd4..93443212e 100644 --- a/src/common/kernel/teleport.c +++ b/src/common/kernel/teleport.c @@ -92,14 +92,8 @@ astralregions(const region * r, boolean (*valid)(const region *)) region * r_standard_to_astral(const region *r) { - region *r2; - if (rplane(r) != get_normalplane()) return NULL; - - r2 = tpregion(r); - if (r2==NULL || fval(r2->terrain, FORBIDDEN_REGION)) return NULL; - - return r2; + return tpregion(r); } region * diff --git a/src/common/spells/spells.c b/src/common/spells/spells.c index 4a60ea90c..74b586fab 100644 --- a/src/common/spells/spells.c +++ b/src/common/spells/spells.c @@ -1752,7 +1752,7 @@ sp_treewalkenter(castorder *co) } rt = r_standard_to_astral(r); - if (rt==NULL || is_cursed(rt->attribs, C_ASTRALBLOCK, 0)) { + if (rt==NULL || is_cursed(rt->attribs, C_ASTRALBLOCK, 0) || fval(rt->terrain, FORBIDDEN_REGION)) { ADDMSG(&mage->faction->msgs, msg_feedback(mage, co->order, "spellfail_astralblock", "")); return 0; } @@ -3396,7 +3396,7 @@ sp_chaossuction(castorder *co) rt = r_standard_to_astral(r); - if (rt==NULL) { + if (rt==NULL || fval(rt->terrain, FORBIDDEN_REGION)) { /* Hier gibt es keine Verbindung zur astralen Welt.*/ cmistake(mage, co->order, 216, MSG_MAGIC); return 0; @@ -5338,7 +5338,7 @@ sp_enterastral(castorder *co) return 0; } - if (!rt) { + if (!rt || fval(rt->terrain, FORBIDDEN_REGION)) { ADDMSG(&mage->faction->msgs, msg_feedback(mage, co->order, "feedback_no_astralregion", "")); return 0; } @@ -5775,7 +5775,7 @@ sp_showastral(castorder *co) switch(getplaneid(r)) { case 0: rt = r_standard_to_astral(r); - if (!rt) { + if (!rt || fval(rt->terrain, FORBIDDEN_REGION)) { /* Hier gibt es keine Verbindung zur astralen Welt */ cmistake(mage, co->order, 216, MSG_MAGIC); return 0; @@ -5905,7 +5905,7 @@ sp_disruptastral(castorder *co) switch(getplaneid(r)) { case 0: rt = r_standard_to_astral(r); - if (!rt) { + if (!rt || fval(rt->terrain, FORBIDDEN_REGION)) { /* "Hier gibt es keine Verbindung zur astralen Welt." */ cmistake(mage, co->order, 216, MSG_MAGIC); return 0;