study while confused: returns TRUE if the book is destroyed */
| 186 | |
| 187 | /* study while confused: returns TRUE if the book is destroyed */ |
| 188 | staticfn boolean |
| 189 | confused_book(struct obj *spellbook) |
| 190 | { |
| 191 | boolean gone = FALSE; |
| 192 | |
| 193 | if (!rn2(3) && spellbook->otyp != SPE_BOOK_OF_THE_DEAD) { |
| 194 | spellbook->in_use = TRUE; /* in case called from learn() */ |
| 195 | pline( |
| 196 | "Being confused you have difficulties in controlling your actions."); |
| 197 | display_nhwindow(WIN_MESSAGE, FALSE); |
| 198 | You("accidentally tear the spellbook to pieces."); |
| 199 | trycall(spellbook); |
| 200 | useup(spellbook); |
| 201 | gone = TRUE; |
| 202 | } else { |
| 203 | You("find yourself reading the %s line over and over again.", |
| 204 | spellbook == svc.context.spbook.book ? "next" : "first"); |
| 205 | } |
| 206 | return gone; |
| 207 | } |
| 208 | |
| 209 | /* pacify or tame an undead monster */ |
| 210 | staticfn void |