Levitation overrides Flying; set or clear BFlying|I_SPECIAL */
| 128 | |
| 129 | /* Levitation overrides Flying; set or clear BFlying|I_SPECIAL */ |
| 130 | void |
| 131 | float_vs_flight(void) |
| 132 | { |
| 133 | boolean stuck_in_floor = (u.utrap && u.utraptype != TT_PIT); |
| 134 | |
| 135 | /* floating overrides flight; so does being trapped in the floor */ |
| 136 | if ((HLevitation || ELevitation) |
| 137 | || ((HFlying || EFlying) && stuck_in_floor)) |
| 138 | BFlying |= I_SPECIAL; |
| 139 | else |
| 140 | BFlying &= ~I_SPECIAL; |
| 141 | /* being trapped on the ground (bear trap, web, molten lava survived |
| 142 | with fire resistance, former lava solidified via cold, tethered |
| 143 | to a buried iron ball) overrides floating--the floor is reachable */ |
| 144 | if ((HLevitation || ELevitation) && stuck_in_floor) |
| 145 | BLevitation |= I_SPECIAL; |
| 146 | else |
| 147 | BLevitation &= ~I_SPECIAL; |
| 148 | |
| 149 | /* riding blocks stealth unless hero+steed fly, so a change in flying |
| 150 | might cause a change in stealth */ |
| 151 | steed_vs_stealth(); |
| 152 | |
| 153 | disp.botl = TRUE; |
| 154 | } |
| 155 | |
| 156 | /* riding blocks stealth unless hero+steed fly */ |
| 157 | void |
no test coverage detected