special throne in Vlad's tower: effect is 1 to 13 inclusive */
| 235 | |
| 236 | /* special throne in Vlad's tower: effect is 1 to 13 inclusive */ |
| 237 | staticfn void |
| 238 | special_throne_effect(int effect) { |
| 239 | coordxy tx = u.ux, ty = u.uy; |
| 240 | |
| 241 | switch (effect) { |
| 242 | case 1: |
| 243 | case 2: |
| 244 | case 3: |
| 245 | case 4: |
| 246 | /* 4 chances of a wish, but then the throne disappears. |
| 247 | |
| 248 | This is the only way the throne can disappear from sitting |
| 249 | on it, so if you sit on it enough (enduring the negative |
| 250 | effects) you are guaranteed an eventual wish. */ |
| 251 | makewish(); |
| 252 | levl[tx][ty].typ = ROOM, levl[tx][ty].flags = 0; |
| 253 | map_background(tx, ty, FALSE); |
| 254 | newsym_force(tx, ty); |
| 255 | pline_The("throne disintegrates, having spent its power."); |
| 256 | break; |
| 257 | case 5: |
| 258 | /* permanent level drain */ |
| 259 | pline("Sitting on the throne was a terrible experience."); |
| 260 | if (!Drain_resistance) { |
| 261 | losexp("a bad experience sitting on a throne"); |
| 262 | if (u.ulevelmax > u.ulevel) |
| 263 | u.ulevelmax -= 1; |
| 264 | } |
| 265 | break; |
| 266 | case 6: |
| 267 | { |
| 268 | /* grease hands and inventory |
| 269 | |
| 270 | Same rules for which items can be affected as grease_ok in apply.c */ |
| 271 | struct obj *otmp; |
| 272 | |
| 273 | pline("A greasy liquid sprays all over you!"); |
| 274 | for (otmp = gi.invent; otmp; otmp = otmp->nobj) |
| 275 | if (otmp->oclass != COIN_CLASS) |
| 276 | otmp->greased = 1; |
| 277 | make_glib(rn1(101, 100)); |
| 278 | update_inventory(); |
| 279 | break; |
| 280 | } |
| 281 | case 7: |
| 282 | /* lose an intrinsic */ |
| 283 | attrcurse(); |
| 284 | pline_The("throne somehow seems to be amused."); |
| 285 | break; |
| 286 | case 8: |
| 287 | { |
| 288 | /* level teleport to Vibrating Square level */ |
| 289 | d_level vs_level; |
| 290 | find_hell(&vs_level); |
| 291 | vs_level.dlevel = svd.dungeons[vs_level.dnum].num_dunlevs - 1; |
| 292 | if (u.uhave.amulet) |
| 293 | You_feel("extremely disoriented for a moment."); |
| 294 | else |
no test coverage detected