MCPcopy Create free account
hub / github.com/crawl/crawl / flight_allowed

Function flight_allowed

crawl-ref/source/player.cc:5298–5318  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5296}
5297
5298bool 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
5320void float_player()
5321{

Callers 1

fly_playerFunction · 0.85

Calls 3

get_formFunction · 0.85
mprFunction · 0.85
forbids_flightMethod · 0.80

Tested by

no test coverage detected