mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-27 06:27:17 +00:00
fixed the key being generated on ivy
This commit is contained in:
parent
0708c0e2bc
commit
0323e4100e
@ -745,18 +745,27 @@ EX void checkTide(cell *c) {
|
||||
#endif
|
||||
}
|
||||
|
||||
EX bool makeEmpty(cell *c) {
|
||||
EX bool makeNoMonster(cell *c) {
|
||||
changes.ccell(c);
|
||||
if(isAnyIvy(c->monst)) killMonster(c, moPlayer, 0);
|
||||
else if(c->monst == moPair) {
|
||||
changes.ccell(c->move(c->mondir));
|
||||
if(c->move(c->mondir)->monst == moPair)
|
||||
c->move(c->mondir)->monst = moNone;
|
||||
}
|
||||
else if(isWorm(c->monst)) {
|
||||
if(!items[itOrbDomination]) return false;
|
||||
}
|
||||
else if(isMultitile(c->monst)) {
|
||||
return false;
|
||||
}
|
||||
else c->monst = moNone;
|
||||
return true;
|
||||
}
|
||||
|
||||
EX bool makeEmpty(cell *c) {
|
||||
if(c->monst != moPrincess) {
|
||||
if(isAnyIvy(c->monst)) killMonster(c, moPlayer, 0);
|
||||
else if(c->monst == moPair) {
|
||||
if(c->move(c->mondir)->monst == moPair)
|
||||
c->move(c->mondir)->monst = moNone;
|
||||
}
|
||||
else if(isWorm(c->monst)) {
|
||||
if(!items[itOrbDomination]) return false;
|
||||
}
|
||||
else c->monst = moNone;
|
||||
if(!makeNoMonster(c)) return false;
|
||||
}
|
||||
|
||||
if(c->land == laCanvas) ;
|
||||
|
@ -278,10 +278,12 @@ EX namespace yendor {
|
||||
goto retry;
|
||||
}
|
||||
|
||||
auto rollbacks = std::move(changes.rollbacks);
|
||||
for(int i=-1; i<key->type; i++) {
|
||||
cell *c2 = i >= 0 ? key->move(i) : key;
|
||||
checkTide(c2);
|
||||
c2->monst = moNone; c2->item = itNone;
|
||||
makeNoMonster(c2);
|
||||
c2->item = itNone;
|
||||
if(!passable(c2, NULL, P_MIRROR | P_MONSTER)) {
|
||||
if(c2->wall == waCavewall) c2->wall = waCavefloor;
|
||||
else if(c2->wall == waDeadwall) c2->wall = waDeadfloor2;
|
||||
@ -311,6 +313,7 @@ EX namespace yendor {
|
||||
if(c2->land == laMirrorWall && i == -1)
|
||||
c2->wall = waNone;
|
||||
}
|
||||
changes.rollbacks = std::move(rollbacks);
|
||||
key->item = itKey;
|
||||
|
||||
bool split_found = false;
|
||||
|
Loading…
Reference in New Issue
Block a user