mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-03-26 21:37:02 +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))
|
||||
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;
|
||||
forCellEx(w2, w) if(w2->wall != waBoat && !passable(w2, w, P_FISH | P_MONSTER)) return false;
|
||||
return true;
|
||||
|
@ -2612,7 +2612,7 @@ void setcolors(cell *c, int& wcol, int &fcol) {
|
||||
fcol = 0x2020FF;
|
||||
else if(c->land == laKraken) {
|
||||
fcol = 0x0000A0;
|
||||
int mafcol = (pseudohept(c) ? 64 : 8);
|
||||
int mafcol = (kraken_pseudohept(c) ? 64 : 8);
|
||||
/* bool nearshore = false;
|
||||
for(int i=0; i<c->type; i++)
|
||||
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;
|
||||
}
|
||||
|
||||
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;
|
||||
forCellEx(c2, c)
|
||||
if(c2->wall != waSea || c2->item || c2->monst)
|
||||
|
@ -439,14 +439,14 @@ void wandering() {
|
||||
playSeenSound(c);
|
||||
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);
|
||||
if(sphere && (haveKraken() || !items[itOrbFish])) {
|
||||
c->monst = moViking; c->wall = waBoat; c->item = itOrbFish;
|
||||
playSeenSound(c);
|
||||
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)
|
||||
goto notfound;
|
||||
c2->monst = moKrakenH;
|
||||
|
@ -1090,6 +1090,15 @@ bool pseudohept(cell *c) {
|
||||
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) {
|
||||
if(a4 && nonbitrunc) {
|
||||
if(euclid)
|
||||
|
Loading…
x
Reference in New Issue
Block a user