| 5296 | } |
| 5297 | |
| 5298 | bool flight_allowed(bool quiet, string *fail_reason) |
| 5299 | { |
| 5300 | string msg; |
| 5301 | bool success = true; |
| 5302 | |
| 5303 | if (get_form()->forbids_flight()) |
| 5304 | { |
| 5305 | msg = you.form == transformation::tree ? "Your roots keep you in place." |
| 5306 | : "You can't fly in this form."; |
| 5307 | success = false; |
| 5308 | } |
| 5309 | |
| 5310 | if (!success) |
| 5311 | { |
| 5312 | if (fail_reason) |
| 5313 | *fail_reason = msg; |
| 5314 | if (!quiet) |
| 5315 | mpr(msg); |
| 5316 | } |
| 5317 | return success; |
| 5318 | } |
| 5319 | |
| 5320 | void float_player() |
| 5321 | { |
no test coverage detected