use for warning "glow" for Sting, Orcrist, and Grimtooth */
| 2463 | |
| 2464 | /* use for warning "glow" for Sting, Orcrist, and Grimtooth */ |
| 2465 | void |
| 2466 | Sting_effects( |
| 2467 | int orc_count) /* new count (warn_obj_cnt is old count); |
| 2468 | * -1 is a flag value */ |
| 2469 | { |
| 2470 | if (u_wield_art(ART_STING) |
| 2471 | || u_wield_art(ART_ORCRIST) |
| 2472 | || u_wield_art(ART_GRIMTOOTH)) { |
| 2473 | int oldstr = glow_strength(gw.warn_obj_cnt), |
| 2474 | newstr = glow_strength(orc_count); |
| 2475 | |
| 2476 | if (orc_count == -1 && gw.warn_obj_cnt > 0) { |
| 2477 | /* -1 means that blindness has just been toggled; give a |
| 2478 | 'continue' message that eventual 'stop' message will match */ |
| 2479 | pline("%s is %s.", bare_artifactname(uwep), |
| 2480 | glow_verb(Blind ? 0 : gw.warn_obj_cnt, TRUE)); |
| 2481 | } else if (newstr > 0 && newstr != oldstr) { |
| 2482 | /* goto_level() -> docrt() -> see_monsters() -> Sting_effects(); |
| 2483 | if "you materialize on a different level" is pending, give |
| 2484 | it now so that start-glowing message comes after it */ |
| 2485 | maybe_lvltport_feedback(); /* usually called by goto_level() */ |
| 2486 | |
| 2487 | /* 'start' message */ |
| 2488 | if (!Blind) |
| 2489 | pline("%s %s %s%c", bare_artifactname(uwep), |
| 2490 | otense(uwep, glow_verb(orc_count, FALSE)), |
| 2491 | glow_color(uwep->oartifact), |
| 2492 | (newstr > oldstr) ? '!' : '.'); |
| 2493 | else if (oldstr == 0) /* quivers */ |
| 2494 | pline("%s %s slightly.", bare_artifactname(uwep), |
| 2495 | otense(uwep, glow_verb(0, FALSE))); |
| 2496 | } else if (orc_count == 0 && gw.warn_obj_cnt > 0) { |
| 2497 | /* 'stop' message */ |
| 2498 | pline("%s stops %s.", bare_artifactname(uwep), |
| 2499 | glow_verb(Blind ? 0 : gw.warn_obj_cnt, TRUE)); |
| 2500 | } |
| 2501 | } |
| 2502 | } |
| 2503 | |
| 2504 | /* called when hero is wielding/applying/invoking a carried item, or |
| 2505 | after undergoing a transformation (alignment change, lycanthropy, |
no test coverage detected