1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-20 11:54:48 +00:00

fixed a bug with pushing thumpers into fire traps.

This commit is contained in:
Zeno Rogue 2019-02-06 22:12:58 +01:00
parent ddd1161acc
commit bf732ff89f

View File

@ -7549,13 +7549,17 @@ void monstersTurn() {
void pushThumper(cell *th, cell *cto) {
eWall w = th->wall;
cto->wparam = th->wparam;
if(th->land == laAlchemist)
th->wall = isAlch(cwt.at) ? cwt.at->wall : cto->wall;
else th->wall = waNone;
int explode = 0;
if(cto->wall == waArrowTrap && w == waExplosiveBarrel ) explode = max<int>(cto->wparam, 1);
if(cto->wall == waFireTrap) explode = max<int>(cto->wparam, 1);
if(cto->wall == waFireTrap) {
if(w == waExplosiveBarrel)
explode = max<int>(cto->wparam, 1);
if(w == waThumperOn)
explode = 2;
}
destroyTrapsOn(cto);
if(cto->wall == waOpenPlate || cto->wall == waClosePlate) {
toggleGates(cto, cto->wall);
@ -7578,6 +7582,8 @@ void pushThumper(cell *th, cell *cto) {
else
cto->wall = w;
if(explode) cto->wall = waFireTrap, cto->wparam = explode;
if(cto->wall == waThumperOn)
cto->wparam = th->wparam;
}
bool canPushThumperOn(cell *tgt, cell *thumper, cell *player) {