mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2026-09-17 17:31:21 +00:00
fixed Vine Spirits sometimes considering some halfvine-related moves illegal
This commit is contained in:
+1
-3
@@ -987,9 +987,7 @@ void celldrawer::draw_grid_edge(int t, color_t col, int prec) {
|
|||||||
|
|
||||||
void celldrawer::draw_halfvine() {
|
void celldrawer::draw_halfvine() {
|
||||||
|
|
||||||
int i =-1;
|
int i = halfvine_direction(c);
|
||||||
for(int t=0;t<6; t++) if(c->move(t) && c->move(t)->wall == c->wall)
|
|
||||||
i = t;
|
|
||||||
|
|
||||||
qfi.spin = ddspin(c, i, M_PI/S3);
|
qfi.spin = ddspin(c, i, M_PI/S3);
|
||||||
shiftmatrix V2 = V * qfi.spin;
|
shiftmatrix V2 = V * qfi.spin;
|
||||||
|
|||||||
@@ -413,4 +413,9 @@ EX bool looks_like_player(eMonster m) {
|
|||||||
return among(m, moPlayer, moMimic, moIllusion, moShadow);
|
return among(m, moPlayer, moMimic, moIllusion, moShadow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EX int halfvine_direction(cell *c) {
|
||||||
|
for(int t=0; t<c->type; t++) if(c->move(t) && c->move(t)->wall == c->wall) return t;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-12
@@ -382,22 +382,13 @@ bool slimepassable(cell *w, cell *c) {
|
|||||||
|
|
||||||
// only travel to halfvines correctly
|
// only travel to halfvines correctly
|
||||||
if(cellHalfvine(c)) {
|
if(cellHalfvine(c)) {
|
||||||
int i=0;
|
if(angledist(c, halfvine_direction(c), u) > 1) return false;
|
||||||
for(int t=0; t<c->type; t++) if(c->move(t) && c->move(t)->wall == c->wall) i=t;
|
|
||||||
int z = i-u; if(z<0) z=-z; z%=6;
|
|
||||||
if(z>1) return false;
|
|
||||||
hv=(group == ogroup);
|
|
||||||
}
|
}
|
||||||
// only travel from halfvines correctly
|
// only travel from halfvines correctly
|
||||||
if(cellHalfvine(w)) {
|
if(cellHalfvine(w)) {
|
||||||
int i=0;
|
if(angledist(w, halfvine_direction(w), c->c.spin(u)) > 1) return false;
|
||||||
for(int t=0; t<w->type; t++) if(w->move(t) && w->move(t)->wall == w->wall) i=t;
|
|
||||||
int z = i-c->c.spin(u); if(z<0) z=-z; z%=6;
|
|
||||||
if(z>1) return false;
|
|
||||||
hv=(group == ogroup);
|
|
||||||
}
|
}
|
||||||
if(!hv) return false;
|
return hv;
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool sharkpassable(cell *w, cell *c) {
|
bool sharkpassable(cell *w, cell *c) {
|
||||||
|
|||||||
Reference in New Issue
Block a user