prompt the player to create a stinking cloud and then create it if they give a location */
| 3079 | /* prompt the player to create a stinking cloud and then create it if they |
| 3080 | give a location */ |
| 3081 | staticfn void |
| 3082 | do_stinking_cloud(struct obj *sobj, boolean mention_stinking) |
| 3083 | { |
| 3084 | coord cc; |
| 3085 | |
| 3086 | pline("Where do you want to center the %scloud?", |
| 3087 | mention_stinking ? "stinking " : ""); |
| 3088 | cc.x = u.ux; |
| 3089 | cc.y = u.uy; |
| 3090 | getpos_sethilite(display_stinking_cloud_positions, can_center_cloud); |
| 3091 | if (getpos(&cc, TRUE, "the desired position") < 0) { |
| 3092 | pline1(Never_mind); |
| 3093 | return; |
| 3094 | } else if (!can_center_cloud(cc.x, cc.y)) { |
| 3095 | if (Hallucination) |
| 3096 | pline("Ugh... someone cut the cheese."); |
| 3097 | else |
| 3098 | pline("%s a whiff of rotten eggs.", |
| 3099 | sobj->oclass == SCROLL_CLASS ? "The scroll crumbles with" |
| 3100 | : "You smell"); |
| 3101 | return; |
| 3102 | } |
| 3103 | (void) create_gas_cloud(cc.x, cc.y, 15 + 10 * bcsign(sobj), |
| 3104 | 8 + 4 * bcsign(sobj)); |
| 3105 | } |
| 3106 | |
| 3107 | /* some creatures have special data structures that only make sense in their |
| 3108 | * normal locations -- if the player tries to create one elsewhere, or to |
no test coverage detected