… | |
… | |
1759 | op->duration--; |
1759 | op->duration--; |
1760 | |
1760 | |
1761 | int basedir = op->direction; |
1761 | int basedir = op->direction; |
1762 | if (!basedir) |
1762 | if (!basedir) |
1763 | /* spray in all directions! 8) */ |
1763 | /* spray in all directions! 8) */ |
1764 | basedir = rndm (1, 8); |
1764 | basedir = 1 + (op->facing += op->state) % 8; |
1765 | |
1765 | |
1766 | #if 0 |
1766 | #if 0 |
1767 | // this is bogus: it causes wrong places to be checked below |
1767 | // this is bogus: it causes wrong places to be checked below |
1768 | // (a wall 2 cells away will block the effect...) and |
1768 | // (a wall 2 cells away will block the effect...) and |
1769 | // doesn't work for SP_BULLET anyhow, so again tests the wrong |
1769 | // doesn't work for SP_BULLET anyhow, so again tests the wrong |
… | |
… | |
1866 | for (int i = 0; i < spell->duration; i++) |
1866 | for (int i = 0; i < spell->duration; i++) |
1867 | tmp->duration += die_roll (1, 3, op, PREFER_HIGH); |
1867 | tmp->duration += die_roll (1, 3, op, PREFER_HIGH); |
1868 | |
1868 | |
1869 | tmp->direction = dir; |
1869 | tmp->direction = dir; |
1870 | tmp->invisible = 1; |
1870 | tmp->invisible = 1; |
|
|
1871 | tmp->facing = rndm (8); // initial firing direction |
|
|
1872 | tmp->state = rndm (4) * 2 + 1; // direction increment |
1871 | |
1873 | |
1872 | op->insert (tmp); |
1874 | op->insert (tmp); |
1873 | |
1875 | |
1874 | return 1; |
1876 | return 1; |
1875 | } |
1877 | } |