… | |
… | |
1862 | { |
1862 | { |
1863 | --op->speed_left; |
1863 | --op->speed_left; |
1864 | return true; |
1864 | return true; |
1865 | } |
1865 | } |
1866 | |
1866 | |
1867 | int on_battleground; |
|
|
1868 | |
|
|
1869 | sint16 nx = freearr_x[dir] + op->x; |
1867 | sint16 nx = freearr_x[dir] + op->x; |
1870 | sint16 ny = freearr_y[dir] + op->y; |
1868 | sint16 ny = freearr_y[dir] + op->y; |
1871 | |
|
|
1872 | on_battleground = op_on_battleground (op, 0, 0); |
|
|
1873 | |
1869 | |
1874 | if (out_of_map (op->map, nx, ny)) |
1870 | if (out_of_map (op->map, nx, ny)) |
1875 | return false; |
1871 | return false; |
1876 | |
1872 | |
1877 | /* If braced, or can't move to the square, and it is not out of the |
1873 | /* If braced, or can't move to the square, and it is not out of the |
… | |
… | |
1948 | return true; |
1944 | return true; |
1949 | } |
1945 | } |
1950 | else |
1946 | else |
1951 | return false; |
1947 | return false; |
1952 | } |
1948 | } |
|
|
1949 | |
|
|
1950 | bool on_battleground = op_on_battleground (op, 0, 0); |
1953 | |
1951 | |
1954 | /* in certain circumstances, you shouldn't attack friendly |
1952 | /* in certain circumstances, you shouldn't attack friendly |
1955 | * creatures. Note that if you are braced, you can't push |
1953 | * creatures. Note that if you are braced, you can't push |
1956 | * someone, but put it inside this loop so that you won't |
1954 | * someone, but put it inside this loop so that you won't |
1957 | * attack them either. |
1955 | * attack them either. |