diff --git a/game.cpp b/game.cpp index 6e1a7bd8..235d7fd2 100644 --- a/game.cpp +++ b/game.cpp @@ -4613,7 +4613,7 @@ vector hexdfs; void moveHexSnake(cell *from, cell *c, int d, bool mounted) { if(from->wall == waBoat) from->wall = waSea; moveEffect(from, c, c->monst); - from->monst = c->monst; from->mondir = d; + from->monst = c->monst; from->mondir = d; from->hitpoints = c->hitpoints; c->monst = moHexSnakeTail; preventbarriers(from); diff --git a/graph.cpp b/graph.cpp index fa9cead2..d77db571 100644 --- a/graph.cpp +++ b/graph.cpp @@ -1826,7 +1826,7 @@ bool drawMonster(const transmatrix& Vparam, int ct, cell *c, int col) { if(isIvy(c) || isWorm(c) || isMutantIvy(c) || c->monst == moFriendlyIvy) { - if((m == moHexSnake || m == moHexSnakeTail) && c->land == laSnakeNest) { + if((m == moHexSnake || m == moHexSnakeTail) && c->hitpoints == 2) { int d = c->mondir; if(d == NODIR) forCellIdEx(c2, i, c) diff --git a/landgen.cpp b/landgen.cpp index c69b2bfd..ba20eb17 100644 --- a/landgen.cpp +++ b/landgen.cpp @@ -1626,7 +1626,7 @@ void giantLandSwitch(cell *c, int d, cell *from) { for(int t=0; ttype; t++) if(c->mov[t]->mpdist > c->mpdist && !pseudohept(c->mov[t])) i = t; if(i != -1 && !peace::on) - generateSnake(c, i); + generateSnake(c, i, 1); } else if(hrand(16000) < 50+items[itRedGem]+yendor::hardness() && (nonbitrunc?hrand(10)<3:!ishept(c)) && !c->monst) c->monst = moRedTroll, @@ -1641,7 +1641,7 @@ void giantLandSwitch(cell *c, int d, cell *from) { for(int t=0; ttype; t++) if(c->mov[t]->mpdist > c->mpdist) gooddir.push_back(t); if(size(gooddir)) - generateSnake(c, gooddir[hrand(size(gooddir))]); + generateSnake(c, gooddir[hrand(size(gooddir))], 2); } else if(hrand(10000) < items[itSnake] - 10 + yendor::hardness() && !c->monst && !c->wall && !peace::on) { c->monst = pick(moRedTroll, moMiner, moSkeleton, moBomberbird); diff --git a/monstergen.cpp b/monstergen.cpp index f7af3067..9a2192a6 100644 --- a/monstergen.cpp +++ b/monstergen.cpp @@ -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<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)) {