Make ray bounceback depend on the wall type.
This commit is contained in:
@@ -4071,11 +4071,14 @@ boolean say; /* Announce out of sight hit/miss events if true */
|
|||||||
|
|
||||||
if (!ZAP_POS(levl[sx][sy].typ)
|
if (!ZAP_POS(levl[sx][sy].typ)
|
||||||
|| (closed_door(sx, sy) && range >= 0)) {
|
|| (closed_door(sx, sy) && range >= 0)) {
|
||||||
int bounce;
|
int bounce, bchance;
|
||||||
uchar rmn;
|
uchar rmn;
|
||||||
boolean fireball;
|
boolean fireball;
|
||||||
|
|
||||||
make_bounce:
|
make_bounce:
|
||||||
|
bchance = (levl[sx][sy].typ == STONE) ? 10
|
||||||
|
: (In_mines(&u.uz) && IS_WALL(levl[sx][sy].typ)) ? 20
|
||||||
|
: 75;
|
||||||
bounce = 0;
|
bounce = 0;
|
||||||
fireball = (type == ZT_SPELL(ZT_FIRE));
|
fireball = (type == ZT_SPELL(ZT_FIRE));
|
||||||
if ((--range > 0 && isok(lsx, lsy) && cansee(lsx, lsy))
|
if ((--range > 0 && isok(lsx, lsy) && cansee(lsx, lsy))
|
||||||
@@ -4092,7 +4095,7 @@ boolean say; /* Announce out of sight hit/miss events if true */
|
|||||||
} else
|
} else
|
||||||
pline_The("%s bounces!", fltxt);
|
pline_The("%s bounces!", fltxt);
|
||||||
}
|
}
|
||||||
if (!dx || !dy || !rn2(20)) {
|
if (!dx || !dy || !rn2(bchance)) {
|
||||||
dx = -dx;
|
dx = -dx;
|
||||||
dy = -dy;
|
dy = -dy;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user