1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-24 17:10:36 +00:00

fixed special cases of the Whirlpool

This commit is contained in:
Zeno Rogue 2017-10-30 23:57:46 +01:00
parent b174dc78b3
commit 3100c0bc9c

View File

@ -922,6 +922,8 @@ namespace whirlpool {
cell *prev = whirlline[size(whirlline)-2];
for(int i=0; i<at->type; i++)
if(at->mov[i] && (euclid || at->mov[i]->master->alt) && celldistAlt(at->mov[i]) == d && at->mov[i] != prev) {
if(at->mov[i] == whirlline[0]) return; // loops in weird geometries?
if(at->mov[i] == whirlline[size(whirlline)/2]) return; // even weirder geometry?
whirlline.push_back(at->mov[i]);
goto again;
}
@ -931,6 +933,8 @@ namespace whirlpool {
if(wto->wall == waBoat || wto->monst)
return;
wto->wall = waSea;
if(hrand(35000) < 40 + items[itWhirlpool] + yendor::hardness())
wto->monst = moCShark;
else if(hrand(5000) < 500)