From 58d8742cf97fe708a229a5210887fed755f9343b Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Mon, 16 Jul 2018 20:06:52 +0200 Subject: [PATCH] fixed the generation of some lands in other geometries --- landgen.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/landgen.cpp b/landgen.cpp index 67f31887..843d3ceb 100644 --- a/landgen.cpp +++ b/landgen.cpp @@ -276,7 +276,7 @@ void giantLandSwitch(cell *c, int d, cell *from) { if(gp::on) ; else { int q = 0, s = 0; - if(!ishept(c)) for(int i=0; i<6; i++) + if(!ishept(c)) for(int i=0; itype; i++) if(cdist50(c->mov[i]) == 3 && polarb50(c->mov[i]) == 1 && !ishept(c->mov[i])) q++, s += i; if(q == 1 && c->mov[s]->land == laPalace) { @@ -509,14 +509,14 @@ void giantLandSwitch(cell *c, int d, cell *from) { } } // seal entrances to the Land of Power. - if(d == 7 && c->type == 7) { + if(d == 7 && ctof(c)) { bool onwall = false; for(int i=0; i<7; i++) if(c->mov[i] && c->mov[i]->land == laBarrier) onwall = true; - if(!onwall) for(int i=0; i<7; i++) { + if(!onwall) for(int i=0; itype; i++) { cell *c2 = c->mov[i]; if(!c2) continue; - cell *c3 = c2->mov[(c->spn(i) + 3) % 6]; + cell *c3 = c2->mov[(c->spn(i) + 3) % c2->type]; if(c3->land != laPower && c3->land != laBarrier) if(c2->wall != waFire && c2->wall != waGlass) { if(isFire(c)) c->monst = moWitchWinter;