details of gas cloud creation which are common to create_gas_cloud() and create_gas_cloud_selection() */
| 1179 | /* details of gas cloud creation which are common to create_gas_cloud() |
| 1180 | and create_gas_cloud_selection() */ |
| 1181 | staticfn void |
| 1182 | make_gas_cloud( |
| 1183 | NhRegion *cloud, |
| 1184 | int damage, |
| 1185 | boolean inside_cloud) |
| 1186 | { |
| 1187 | if (!gi.in_mklev && !svc.context.mon_moving) |
| 1188 | set_heros_fault(cloud); /* assume player has created it */ |
| 1189 | cloud->inside_f = INSIDE_GAS_CLOUD; |
| 1190 | cloud->expire_f = EXPIRE_GAS_CLOUD; |
| 1191 | cloud->arg = cg.zeroany; |
| 1192 | cloud->arg.a_int = damage; |
| 1193 | cloud->visible = TRUE; |
| 1194 | cloud->glyph = cmap_to_glyph(damage ? S_poisoncloud : S_cloud); |
| 1195 | add_region(cloud); |
| 1196 | |
| 1197 | if (!gi.in_mklev && !inside_cloud && is_hero_inside_gas_cloud()) { |
| 1198 | You("are enveloped in a cloud of %s!", |
| 1199 | /* FIXME: "steam" is wrong if this cloud is just the trail of |
| 1200 | a fog cloud's movement; changing to "vapor" would handle |
| 1201 | that but seems a step backward when it really is steam */ |
| 1202 | damage ? "noxious gas" : "steam"); |
| 1203 | iflags.last_msg = PLNMSG_ENVELOPED_IN_GAS; |
| 1204 | } |
| 1205 | } |
| 1206 | |
| 1207 | /* Create a gas cloud which starts at (x,y) and grows outward from it via |
| 1208 | * breadth-first search. |
no test coverage detected