mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-07-04 18:52:51 +00:00
clear boats from removed Orbs of Water
This commit is contained in:
parent
43a3e8f030
commit
43702b82a1
12
landgen.cpp
12
landgen.cpp
@ -296,6 +296,12 @@ EX eItem random_curse() {
|
|||||||
return pick(itCurseWeakness, itCurseDraining, itCurseWater, itCurseFatigue, itCurseRepulsion, itCurseGluttony);
|
return pick(itCurseWeakness, itCurseDraining, itCurseWater, itCurseFatigue, itCurseRepulsion, itCurseGluttony);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EX void clear_item(cell *c) {
|
||||||
|
if(c->item == itOrbWater && c->wall == waStrandedBoat)
|
||||||
|
c->wall = waNone;
|
||||||
|
c->item = itNone;
|
||||||
|
}
|
||||||
|
|
||||||
EX void giantLandSwitch(cell *c, int d, cell *from) {
|
EX void giantLandSwitch(cell *c, int d, cell *from) {
|
||||||
bool fargen = d == 9;
|
bool fargen = d == 9;
|
||||||
switch(c->land) {
|
switch(c->land) {
|
||||||
@ -552,7 +558,7 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
|
|||||||
// no Plates or Trapdoors in the Princess cell
|
// no Plates or Trapdoors in the Princess cell
|
||||||
if(d < 3 && (c->wall == waClosePlate || c->wall == waOpenPlate || c->wall == waTrapdoor))
|
if(d < 3 && (c->wall == waClosePlate || c->wall == waOpenPlate || c->wall == waTrapdoor))
|
||||||
c->wall = waNone;
|
c->wall = waNone;
|
||||||
if(d > 1) c->item = itNone;
|
if(d > 1) clear_item(c);
|
||||||
// the Princess herself
|
// the Princess herself
|
||||||
if(d == 0) {
|
if(d == 0) {
|
||||||
c->monst = moPrincess;
|
c->monst = moPrincess;
|
||||||
@ -2407,7 +2413,7 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
|
|||||||
if(hrand(1500) < PT(30 + kills[moHexDemon] + kills[moAltDemon] + kills[moMonk] + kills[moPair] + kills[moCrusher], 100) && notDippingFor(itRuins)) {
|
if(hrand(1500) < PT(30 + kills[moHexDemon] + kills[moAltDemon] + kills[moMonk] + kills[moPair] + kills[moCrusher], 100) && notDippingFor(itRuins)) {
|
||||||
c->item = itRuins;
|
c->item = itRuins;
|
||||||
forCellEx(c2, c) if(c2->monst == moMonk)
|
forCellEx(c2, c) if(c2->monst == moMonk)
|
||||||
c->item = itNone;
|
clear_item(c);
|
||||||
}
|
}
|
||||||
if(hrand_monster(7000) < kf && !c->monst) {
|
if(hrand_monster(7000) < kf && !c->monst) {
|
||||||
c->monst = genRuinMonster(c);
|
c->monst = genRuinMonster(c);
|
||||||
@ -2545,7 +2551,7 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
|
|||||||
if(d == 7) {
|
if(d == 7) {
|
||||||
c->wall = waNone;
|
c->wall = waNone;
|
||||||
|
|
||||||
c->item = itNone; c->monst = moNone;
|
clear_item(c); c->monst = moNone;
|
||||||
|
|
||||||
if(hrand(100) < 25)
|
if(hrand(100) < 25)
|
||||||
c->wall = hrand(2) ? waBigTree : waSmallTree;
|
c->wall = hrand(2) ? waBigTree : waSmallTree;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user