1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-05-08 00:01:24 +00:00

fixed Vine Spirits sometimes considering some halfvine-related moves illegal

This commit is contained in:
Zeno Rogue
2026-04-17 17:42:11 +02:00
parent 3cf234d202
commit a8a75fd0ca
3 changed files with 9 additions and 15 deletions

View File

@@ -382,22 +382,13 @@ bool slimepassable(cell *w, cell *c) {
// only travel to halfvines correctly
if(cellHalfvine(c)) {
int i=0;
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);
if(angledist(c, halfvine_direction(c), u) > 1) return false;
}
// only travel from halfvines correctly
if(cellHalfvine(w)) {
int i=0;
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(angledist(w, halfvine_direction(w), c->c.spin(u)) > 1) return false;
}
if(!hv) return false;
return true;
return hv;
}
bool sharkpassable(cell *w, cell *c) {