1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-22 17:37:39 +00:00

hybrid:: refactored the common parts of prod and sl2, also used them when applicable

This commit is contained in:
Zeno Rogue
2019-08-24 14:07:46 +02:00
parent ab80b28782
commit 1e6970ca28
20 changed files with 169 additions and 224 deletions

View File

@@ -748,7 +748,7 @@ EX void generateSnake(cell *c, int i, int snakecolor) {
c2 = c3;
c2->monst = moHexSnakeTail; c2->hitpoints = snakecolor;
int t = c2->type;
if(prod) t -= 2;
if(hybri) t -= 2;
i = (j + (t%4 == 0 ? t/2 : (len%2 ? 2 : t - 2))) % t;
createMov(c2, i);
if(!inpair(c2->move(i), cpair)) {