simplified shield for messages */
| 5567 | |
| 5568 | /* simplified shield for messages */ |
| 5569 | const char * |
| 5570 | shield_simple_name(struct obj *shield) |
| 5571 | { |
| 5572 | if (shield) { |
| 5573 | /* xname() describes unknown (unseen) reflection as smooth */ |
| 5574 | if (shield->otyp == SHIELD_OF_REFLECTION) |
| 5575 | return shield->dknown ? "silver shield" : "smooth shield"; |
| 5576 | /* |
| 5577 | * We might distinguish between wooden vs metallic or |
| 5578 | * light vs heavy to give small benefit to spell casters. |
| 5579 | * Fighter types probably care more about the former for |
| 5580 | * vulnerability to fire or rust. |
| 5581 | * |
| 5582 | * We could do that both ways: light wooden shield, light |
| 5583 | * metallic shield (there aren't any), heavy wooden shield, |
| 5584 | * and heavy metallic shield but that's getting away from |
| 5585 | * "simple name" which is intended to be shorter as well |
| 5586 | * as less detailed than xname(). |
| 5587 | */ |
| 5588 | #if 0 |
| 5589 | /* spellcasting uses a division like this */ |
| 5590 | return (weight(shield) > (int) objects[SMALL_SHIELD].oc_weight) |
| 5591 | ? "heavy shield" |
| 5592 | : "light shield"; |
| 5593 | #endif |
| 5594 | } |
| 5595 | return "shield"; |
| 5596 | } |
| 5597 | |
| 5598 | /* for completeness */ |
| 5599 | const char * |
no test coverage detected