1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-12-21 05:18:05 +00:00

Rock Snakes from the Snake Nest now keep their colors in other lands

This commit is contained in:
Zeno Rogue
2018-06-17 12:15:46 +02:00
parent 9e712ae8ea
commit 95a2f617cf
4 changed files with 7 additions and 6 deletions

View File

@@ -673,8 +673,9 @@ void wandering() {
}
}
void generateSnake(cell *c, int i) {
void generateSnake(cell *c, int i, int color) {
c->monst = moHexSnake;
c->hitpoints = color;
int cpair = (1<<pattern_threecolor(c)) | (1<<pattern_threecolor(c->mov[i]));
preventbarriers(c);
int len = nonbitrunc ? 2 : ROCKSNAKELENGTH;
@@ -689,7 +690,7 @@ void generateSnake(cell *c, int i) {
cell *c3 = c2->mov[i];
if(c3->monst || c3->bardir != NODIR || c3->wall) break;
c2 = c3;
c2->monst = moHexSnakeTail;
c2->monst = moHexSnakeTail; c2->hitpoints = color;
i = (j + (c2->type%4 == 0 ? c2->type/2 : (len%2 ? 2 : c2->type - 2))) % c2->type;
createMov(c2, i);
if(!inpair(c2->mov[i], cpair)) {