mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-20 14:13:02 +00:00
fixed a bug with pushing thumpers into fire traps.
This commit is contained in:
parent
ddd1161acc
commit
bf732ff89f
10
game.cpp
10
game.cpp
@ -7549,13 +7549,17 @@ void monstersTurn() {
|
|||||||
|
|
||||||
void pushThumper(cell *th, cell *cto) {
|
void pushThumper(cell *th, cell *cto) {
|
||||||
eWall w = th->wall;
|
eWall w = th->wall;
|
||||||
cto->wparam = th->wparam;
|
|
||||||
if(th->land == laAlchemist)
|
if(th->land == laAlchemist)
|
||||||
th->wall = isAlch(cwt.at) ? cwt.at->wall : cto->wall;
|
th->wall = isAlch(cwt.at) ? cwt.at->wall : cto->wall;
|
||||||
else th->wall = waNone;
|
else th->wall = waNone;
|
||||||
int explode = 0;
|
int explode = 0;
|
||||||
if(cto->wall == waArrowTrap && w == waExplosiveBarrel ) explode = max<int>(cto->wparam, 1);
|
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);
|
destroyTrapsOn(cto);
|
||||||
if(cto->wall == waOpenPlate || cto->wall == waClosePlate) {
|
if(cto->wall == waOpenPlate || cto->wall == waClosePlate) {
|
||||||
toggleGates(cto, cto->wall);
|
toggleGates(cto, cto->wall);
|
||||||
@ -7578,6 +7582,8 @@ void pushThumper(cell *th, cell *cto) {
|
|||||||
else
|
else
|
||||||
cto->wall = w;
|
cto->wall = w;
|
||||||
if(explode) cto->wall = waFireTrap, cto->wparam = explode;
|
if(explode) cto->wall = waFireTrap, cto->wparam = explode;
|
||||||
|
if(cto->wall == waThumperOn)
|
||||||
|
cto->wparam = th->wparam;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool canPushThumperOn(cell *tgt, cell *thumper, cell *player) {
|
bool canPushThumperOn(cell *tgt, cell *thumper, cell *player) {
|
||||||
|
Loading…
Reference in New Issue
Block a user