push Statue/Fire with Orb of Winter

This commit is contained in:
Zeno Rogue 2020-09-15 20:01:30 +02:00
parent 313204f732
commit b782452a4a
4 changed files with 7 additions and 7 deletions

View File

@ -1222,7 +1222,7 @@ EX eItem targetRangedOrb(cell *c, orbAction a) {
auto& c2 = mi.t;
if(!mi.op()) nowhereToBlow = true;
else if(isBoat(c) && !isWatery(c2) && c2->wall != waNone) nowhereToBlow = true;
else if(c->wall == waBigStatue && !canPushStatueOn(c2)) nowhereToBlow = true;
else if(c->wall == waBigStatue && !canPushStatueOn(c2, P_BLOW)) nowhereToBlow = true;
else {
if(!isCheck(a)) blowoff(mi), apply_impact(c);
return itOrbAir;

View File

@ -216,7 +216,7 @@ EX bool passable(cell *w, cell *from, flagtype flags) {
if(from && isWatery(from) && isWatery(w) && F(P_CHAIN) && !againstCurrent(w, from))
return true;
if(w->wall == waBigStatue && from && canPushStatueOn(from)) return true;
if(w->wall == waBigStatue && from && canPushStatueOn(from, flags)) return true;
}
if(F(P_EARTHELEM)) {
@ -402,8 +402,8 @@ bool sharkpassable(cell *w, cell *c) {
return true;
}
EX bool canPushStatueOn(cell *c) {
return passable(c, NULL, P_MONSTER) && !snakelevel(c) &&
EX bool canPushStatueOn(cell *c, flagtype flags) {
return passable(c, NULL, P_MONSTER | flags) && !snakelevel(c) &&
!isWorm(c->monst) && !isReptile(c->wall) && !peace::on &&
!among(c->wall, waBoat, waFireTrap, waArrowTrap);
}

View File

@ -734,7 +734,7 @@ bool pcmove::after_escape() {
cell*& c2 = mi.t;
if(c2->wall == waBigStatue && !c2->monst && !nonAdjacentPlayer(c2, cwt.at) && fmsMove) {
if(!canPushStatueOn(cwt.at)) {
if(!canPushStatueOn(cwt.at, P_ISPLAYER)) {
if(vmsg()) {
if(isFire(cwt.at))
addMessage(XLAT("You have to escape first!"));

View File

@ -1056,7 +1056,7 @@ void movePlayer(monster *m, int delta) {
if(HEAT(c2) > .5) HEAT(c2) = .5;
}
else if(c2->wall == waBigStatue && canPushStatueOn(m->base) && !nonAdjacent(c2, m->base)) {
else if(c2->wall == waBigStatue && canPushStatueOn(m->base, P_ISPLAYER) && !nonAdjacent(c2, m->base)) {
visibleFor(300);
c2->wall = m->base->wall;
if(cellUnstable(cwt.at))
@ -2309,7 +2309,7 @@ void moveMonster(monster *m, int delta) {
}
if(isLeader(m->type)) {
if(c2 != m->base) {
if(c2->wall == waBigStatue && canPushStatueOn(m->base)) {
if(c2->wall == waBigStatue && canPushStatueOn(m->base, 0)) {
c2->wall = m->base->wall;
if(cellUnstable(m->base))
m->base->wall = waChasm;