mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-10 15:59:53 +00:00
Kraken variant of pseudohept
This commit is contained in:
parent
4bf892442f
commit
e3c3a4202e
2
game.cpp
2
game.cpp
@ -809,7 +809,7 @@ bool passable_for(eMonster m, cell *w, cell *from, flagtype extra) {
|
|||||||
}
|
}
|
||||||
if((extra & P_ONPLAYER) && isPlayerOn(w))
|
if((extra & P_ONPLAYER) && isPlayerOn(w))
|
||||||
return true;
|
return true;
|
||||||
if(pseudohept(w) || pseudohept(from)) return false;
|
if(kraken_pseudohept(w) || kraken_pseudohept(from)) return false;
|
||||||
if(w->wall != waBoat && !slimepassable(w, from)) return false;
|
if(w->wall != waBoat && !slimepassable(w, from)) return false;
|
||||||
forCellEx(w2, w) if(w2->wall != waBoat && !passable(w2, w, P_FISH | P_MONSTER)) return false;
|
forCellEx(w2, w) if(w2->wall != waBoat && !passable(w2, w, P_FISH | P_MONSTER)) return false;
|
||||||
return true;
|
return true;
|
||||||
|
@ -2612,7 +2612,7 @@ void setcolors(cell *c, int& wcol, int &fcol) {
|
|||||||
fcol = 0x2020FF;
|
fcol = 0x2020FF;
|
||||||
else if(c->land == laKraken) {
|
else if(c->land == laKraken) {
|
||||||
fcol = 0x0000A0;
|
fcol = 0x0000A0;
|
||||||
int mafcol = (pseudohept(c) ? 64 : 8);
|
int mafcol = (kraken_pseudohept(c) ? 64 : 8);
|
||||||
/* bool nearshore = false;
|
/* bool nearshore = false;
|
||||||
for(int i=0; i<c->type; i++)
|
for(int i=0; i<c->type; i++)
|
||||||
if(c->mov[i]->wall != waSea && c->mov[i]->wall != waBoat)
|
if(c->mov[i]->wall != waSea && c->mov[i]->wall != waBoat)
|
||||||
|
@ -1402,7 +1402,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
|||||||
forCellEx(c2, c) c2->wall = waNone;
|
forCellEx(c2, c) c2->wall = waNone;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(d == 8 && !pseudohept(c) && hrand(20000) < 10 + 3 * items[itKraken] + 2 * yendor::hardness() && c->wall == waSea && !c->item && !c->monst && !safety) {
|
if(d == 8 && !kraken_pseudohept(c) && hrand(20000) < 10 + 3 * items[itKraken] + 2 * yendor::hardness() && c->wall == waSea && !c->item && !c->monst && !safety) {
|
||||||
bool ok = true;
|
bool ok = true;
|
||||||
forCellEx(c2, c)
|
forCellEx(c2, c)
|
||||||
if(c2->wall != waSea || c2->item || c2->monst)
|
if(c2->wall != waSea || c2->item || c2->monst)
|
||||||
|
@ -439,14 +439,14 @@ void wandering() {
|
|||||||
playSeenSound(c);
|
playSeenSound(c);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(!peace::on && c->land == laKraken && ((sphere && !hrand(15)) || wchance(items[itKraken], 240)) && !pseudohept(c)) {
|
if(!peace::on && c->land == laKraken && ((sphere && !hrand(15)) || wchance(items[itKraken], 240)) && !kraken_pseudohept(c)) {
|
||||||
bool b = sphere || canReachPlayer(c, moKrakenH);
|
bool b = sphere || canReachPlayer(c, moKrakenH);
|
||||||
if(sphere && (haveKraken() || !items[itOrbFish])) {
|
if(sphere && (haveKraken() || !items[itOrbFish])) {
|
||||||
c->monst = moViking; c->wall = waBoat; c->item = itOrbFish;
|
c->monst = moViking; c->wall = waBoat; c->item = itOrbFish;
|
||||||
playSeenSound(c);
|
playSeenSound(c);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(b) forCellEx(c2, c) if((sphere || c2->cpdist > gamerange()) && !pseudohept(c2)) {
|
if(b) forCellEx(c2, c) if((sphere || c2->cpdist > gamerange()) && !kraken_pseudohept(c2)) {
|
||||||
forCellCM(c3, c2) if(c3->monst || c3->wall != waSea)
|
forCellCM(c3, c2) if(c3->monst || c3->wall != waSea)
|
||||||
goto notfound;
|
goto notfound;
|
||||||
c2->monst = moKrakenH;
|
c2->monst = moKrakenH;
|
||||||
|
@ -1090,6 +1090,15 @@ bool pseudohept(cell *c) {
|
|||||||
return pattern_threecolor(c) == 0;
|
return pattern_threecolor(c) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// while Krakens movement is usually restricted to non-pseudohept cells,
|
||||||
|
// there is one special case when this does not work (because non-pseudohept cells have varying degrees)
|
||||||
|
bool kraken_pseudohept(cell *c) {
|
||||||
|
if(!euclid && !(S7&1) && gp_threecolor() == 1)
|
||||||
|
return ishept(c);
|
||||||
|
else
|
||||||
|
return pseudohept(c);
|
||||||
|
}
|
||||||
|
|
||||||
bool warptype(cell *c) {
|
bool warptype(cell *c) {
|
||||||
if(a4 && nonbitrunc) {
|
if(a4 && nonbitrunc) {
|
||||||
if(euclid)
|
if(euclid)
|
||||||
|
Loading…
Reference in New Issue
Block a user