| 1396 | } |
| 1397 | |
| 1398 | staticfn void |
| 1399 | seffect_confuse_monster(struct obj **sobjp) |
| 1400 | { |
| 1401 | struct obj *sobj = *sobjp; |
| 1402 | boolean sblessed = sobj->blessed, |
| 1403 | scursed = sobj->cursed, |
| 1404 | confused = (Confusion != 0), |
| 1405 | altfeedback = (Blind || Invisible); |
| 1406 | const char *const hands = makeplural(body_part(HAND)); |
| 1407 | |
| 1408 | if (gy.youmonst.data->mlet != S_HUMAN || scursed) { |
| 1409 | if (!HConfusion) |
| 1410 | You_feel("confused."); |
| 1411 | make_confused(HConfusion + rnd(100), FALSE); |
| 1412 | } else if (confused) { |
| 1413 | if (!sblessed) { |
| 1414 | Your("%s begin to %s%s.", hands, |
| 1415 | altfeedback ? "tingle" : "glow ", |
| 1416 | altfeedback ? "" : hcolor(NH_PURPLE)); |
| 1417 | make_confused(HConfusion + rnd(100), FALSE); |
| 1418 | } else { |
| 1419 | pline("A %s%s surrounds your %s.", |
| 1420 | altfeedback ? "" : hcolor(NH_RED), |
| 1421 | altfeedback ? "faint buzz" : " glow", body_part(HEAD)); |
| 1422 | make_confused(0L, TRUE); |
| 1423 | } |
| 1424 | } else { |
| 1425 | /* scroll vs spell */ |
| 1426 | int incr = (sobj->oclass == SCROLL_CLASS) ? 3 : 0; |
| 1427 | |
| 1428 | if (!sblessed) { |
| 1429 | if (altfeedback) |
| 1430 | Your("%s tingle%s.", hands, u.umconf ? " even more" : ""); |
| 1431 | else if (!u.umconf) |
| 1432 | Your("%s begin to glow %s.", hands, hcolor(NH_RED)); |
| 1433 | else |
| 1434 | pline_The("%s glow of your %s intensifies.", hcolor(NH_RED), |
| 1435 | hands); |
| 1436 | incr += rnd(2); |
| 1437 | } else { |
| 1438 | if (altfeedback) |
| 1439 | Your("%s tingle %s sharply.", hands, |
| 1440 | u.umconf ? "even more" : "very"); |
| 1441 | else |
| 1442 | Your("%s glow %s brilliant %s.", hands, |
| 1443 | u.umconf ? "an even more" : "a", hcolor(NH_RED)); |
| 1444 | incr += rn1(8, 2); |
| 1445 | } |
| 1446 | /* after a while, repeated uses become less effective */ |
| 1447 | if (u.umconf >= 40) |
| 1448 | incr = 1; |
| 1449 | u.umconf += (unsigned) incr; |
| 1450 | } |
| 1451 | } |
| 1452 | |
| 1453 | staticfn void |
| 1454 | seffect_scare_monster(struct obj **sobjp) |
no test coverage detected