mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 13:07:16 +00:00
replaced weaSea with seaDeepWater in Galapagos and Irradiated, and adjusted the rules -- effects like snakepile now create shallow water
This commit is contained in:
parent
8d8972e314
commit
6d29728326
18
landgen.cpp
18
landgen.cpp
@ -155,18 +155,18 @@ EX eMonster emerald_monster() {
|
||||
|
||||
EX void build_pool(cell *c, bool with_boat) {
|
||||
bool vacant = true;
|
||||
if(c->monst || !among(c->wall, waNone, waSea, waBoat)) vacant = false;
|
||||
forCellCM(c1, c) if(!among(c1->land, laNone, laVariant) || c1->monst || !among(c1->wall, waNone, waSea, waBoat)) vacant = false;
|
||||
if(c->monst || !among(c->wall, waNone, waDeepWater, waBoat)) vacant = false;
|
||||
forCellCM(c1, c) if(!among(c1->land, laNone, laVariant) || c1->monst || !among(c1->wall, waNone, waDeepWater, waBoat)) vacant = false;
|
||||
if(vacant) {
|
||||
c->wall = waSea;
|
||||
forCellEx(c1, c) if(c1->wall != waBoat) c1->wall = waSea;
|
||||
c->wall = waDeepWater;
|
||||
forCellEx(c1, c) if(c1->wall != waBoat) c1->wall = waDeepWater;
|
||||
if(with_boat) c->move(hrand(c->type))->wall = waBoat;
|
||||
}
|
||||
}
|
||||
|
||||
EX void place_elemental_wall(cell *c) {
|
||||
if(c->land == laEFire) c->wall = waEternalFire;
|
||||
else if(c->land == laEWater) c->wall = waSea;
|
||||
else if(c->land == laEWater) c->wall = waDeepWater;
|
||||
else if(c->land == laEAir) c->wall = waChasm;
|
||||
else if(c->land == laEEarth) c->wall = waStone;
|
||||
}
|
||||
@ -1747,8 +1747,8 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
if(tf == tfRear) c->wall = waStone;
|
||||
// broad tail and desaturated shell helps with water
|
||||
PSH(tfTail, tfShellSat)
|
||||
if(tf == tfTail) c->wall = waSea;
|
||||
if(tf == tfShellSat) c->wall = waSea;
|
||||
if(tf == tfTail) c->wall = waDeepWater;
|
||||
if(tf == tfShellSat) c->wall = waDeepWater;
|
||||
#undef PSH
|
||||
}
|
||||
}
|
||||
@ -2376,7 +2376,7 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
c->monst = elof;
|
||||
if(c->land != laEAir) chasmifyElemental(c);
|
||||
c->wall = waNone;
|
||||
if(c->land == laEWater) c->wall = waSea;
|
||||
if(c->land == laEWater) c->wall = waDeepWater;
|
||||
}
|
||||
else if(hrand(5000) < 100 + elkills*3 && notDippingFor(itElemental))
|
||||
c->item = localshard;
|
||||
@ -2476,7 +2476,7 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
c->item = itVarTreasure;
|
||||
}
|
||||
if(d == 7 && c->wall == waTrapdoor) {
|
||||
forCellEx(c1, c) if(among(c1->wall, waSea, waBoat))
|
||||
forCellEx(c1, c) if(among(c1->wall, waDeepWater, waBoat))
|
||||
c->wall = waNone;
|
||||
}
|
||||
break;
|
||||
|
@ -296,7 +296,7 @@ EX bool snakepile(cell *c, eMonster m) {
|
||||
else if((c->wall == waSea && c->land == laLivefjord))
|
||||
c->wall = waNone;
|
||||
else if((c->wall == waSea && isWarpedType(c->land)))
|
||||
c->wall = waNone;
|
||||
c->wall = waShallow;
|
||||
else if(isGravityLand(c->land)) {
|
||||
if(m == moHexSnake)
|
||||
c->wall = waPlatform;
|
||||
@ -325,9 +325,12 @@ EX bool snakepile(cell *c, eMonster m) {
|
||||
if(m == moDarkTroll) c->wall = waDeadwall;
|
||||
}
|
||||
else if(c->wall == waCavefloor) c->wall = waCavewall;
|
||||
else if(c->wall == waSea && c->land == laCaribbean) c->wall = waCIsland;
|
||||
else if(c->wall == waSea && c->land == laCaribbean) c->wall = waShallow;
|
||||
else if(c->wall == waSea && c->land == laWhirlpool) return false;
|
||||
else if(c->wall == waSea) c->wall = waNone;
|
||||
else if(c->wall == waSea) c->wall = waShallow;
|
||||
else if(c->wall == waDeepWater) c->wall = waShallow;
|
||||
else if(c->wall == waShallow) c->wall = waNone;
|
||||
else if(c->wall == waLake) c->wall = waShallow;
|
||||
else if(isWateryOrBoat(c) || c->wall == waFrozenLake) c->wall = waNone;
|
||||
else if(isWateryOrBoat(c) || c->wall == waFrozenLake) c->wall = waNone;
|
||||
else if(cellHalfvine(c)) {
|
||||
|
4
orbs.cpp
4
orbs.cpp
@ -432,7 +432,7 @@ EX void castLightningBolt(cellwalker lig) {
|
||||
brk = true;
|
||||
}
|
||||
|
||||
if(c->wall == waBoat && c != cwt.at) c->wall = waSea, spin = true;
|
||||
if(c->wall == waBoat && c != cwt.at) become_water(c), spin = true;
|
||||
if(c->wall == waStrandedBoat && c !=cwt.at) c->wall = waNone, spin = true;
|
||||
|
||||
if((c->wall == waNone || c->wall == waSea) && c->land == laLivefjord)
|
||||
@ -987,7 +987,7 @@ void blowoff(const movei& mi) {
|
||||
bool was_stranded = cf->wall == waStrandedBoat;
|
||||
bool willbe_stranded = ct->wall == waNone;
|
||||
if(was_stranded) cf->wall = waBoat;
|
||||
if(willbe_stranded) ct->wall = waSea;
|
||||
if(willbe_stranded) become_water(ct);
|
||||
moveBoat(mi);
|
||||
if(was_stranded) cf->wall = waNone;
|
||||
if(willbe_stranded) ct->wall = waStrandedBoat;
|
||||
|
14
passable.cpp
14
passable.cpp
@ -41,15 +41,21 @@ EX bool boatGoesThrough(cell *c) {
|
||||
c->wall == waArrowTrap;
|
||||
}
|
||||
|
||||
EX void become_water(cell *c) {
|
||||
if(isIcyLand(c))
|
||||
c->wall = waLake;
|
||||
else if(isCoastal(c) || isSealand(c))
|
||||
c->wall = waSea;
|
||||
else
|
||||
c->wall = waDeepWater;
|
||||
}
|
||||
|
||||
EX void placeWater(cell *c, cell *c2) {
|
||||
destroyTrapsOn(c);
|
||||
if(isWatery(c)) ;
|
||||
else if(c2 && isAlchAny(c2))
|
||||
c->wall = c2->wall;
|
||||
else if(isIcyLand(c))
|
||||
c->wall = waLake;
|
||||
else
|
||||
c->wall = waSea;
|
||||
else become_water(c);
|
||||
// destroy the ancient treasure!
|
||||
if(c->item == itBarrow) c->item = itNone;
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ EX bool checkNeedMove(bool checkonly, bool attacking) {
|
||||
if(in_gravity_zone(cwt.at) && passable(cwt.at, NULL, P_ISPLAYER)) return false;
|
||||
addMessage(XLAT("Nothing to stand on here!"));
|
||||
}
|
||||
else if(cwt.at->wall == waSea || cwt.at->wall == waCamelotMoat) {
|
||||
else if(among(cwt.at->wall, waSea, waCamelotMoat, waLake, waDeepWater)) {
|
||||
if(markOrb(itOrbFish)) return false;
|
||||
if(markOrb2(itOrbAether)) return false;
|
||||
if(in_gravity_zone(cwt.at) && passable(cwt.at, NULL, P_ISPLAYER)) return false;
|
||||
|
Loading…
Reference in New Issue
Block a user