can hero move onto a spot containing one or more boulders? used for m and travel and during boulder push failure */
| 142 | /* can hero move onto a spot containing one or more boulders? |
| 143 | used for m<dir> and travel and during boulder push failure */ |
| 144 | staticfn boolean |
| 145 | could_move_onto_boulder(coordxy sx, coordxy sy) |
| 146 | { |
| 147 | /* can if able to phaze through rock (must be poly'd, so not riding) */ |
| 148 | if (Passes_walls) |
| 149 | return TRUE; |
| 150 | /* can't when riding */ |
| 151 | if (u.usteed) |
| 152 | return FALSE; |
| 153 | /* can if a giant, unless doing so allows hero to pass into a |
| 154 | diagonal squeeze at the same time */ |
| 155 | if (throws_rocks(gy.youmonst.data)) |
| 156 | return (!u.dx || !u.dy || !(IS_OBSTRUCTED(levl[u.ux][sy].typ) |
| 157 | && IS_OBSTRUCTED(levl[sx][u.uy].typ))); |
| 158 | /* can if tiny (implies carrying very little else couldn't move at all) */ |
| 159 | if (verysmall(gy.youmonst.data)) |
| 160 | return TRUE; |
| 161 | /* can squeeze to spot if carrying extremely little, otherwise can't */ |
| 162 | return squeezeablylightinvent(); |
| 163 | } |
| 164 | |
| 165 | staticfn void |
| 166 | dopush( |
no outgoing calls