"Double Trouble" spell cast by the Wizard; caller is responsible for only casting this when there is currently one wizard in existence; the clone can't use it unless/until its creator has been killed off */
| 514 | only casting this when there is currently one wizard in existence; |
| 515 | the clone can't use it unless/until its creator has been killed off */ |
| 516 | void |
| 517 | clonewiz(void) |
| 518 | { |
| 519 | struct monst *mtmp2; |
| 520 | |
| 521 | if ((mtmp2 = makemon(&mons[PM_WIZARD_OF_YENDOR], u.ux, u.uy, MM_NOWAIT)) |
| 522 | != 0) { |
| 523 | mtmp2->msleeping = mtmp2->mtame = mtmp2->mpeaceful = 0; |
| 524 | if (!u.uhave.amulet && rn2(2)) { /* give clone a fake */ |
| 525 | (void) add_to_minv(mtmp2, |
| 526 | mksobj(FAKE_AMULET_OF_YENDOR, TRUE, FALSE)); |
| 527 | } |
| 528 | if (!Protection_from_shape_changers) { |
| 529 | mtmp2->m_ap_type = M_AP_MONSTER; |
| 530 | mtmp2->mappearance = ROLL_FROM(wizapp); |
| 531 | } |
| 532 | newsym(mtmp2->mx, mtmp2->my); |
| 533 | } |
| 534 | } |
| 535 | |
| 536 | /* also used by newcham() */ |
| 537 | int |
no test coverage detected