(void) learnscrolltyp(sobj->otyp);
}
+char *
+erode_obj_text(otmp, buf)
+struct obj *otmp;
+char *buf;
+{
+ int erosion = greatest_erosion(otmp);
+ if (erosion)
+ wipeout_text(buf,
+ (int)(strlen(buf) * erosion / (2*MAX_ERODE)),
+ otmp->o_id ^ (unsigned)ubirthday);
+ return buf;
+}
+
char *
tshirt_text(tshirt, buf)
struct obj *tshirt;
"Furinkan High School Athletic Dept.", /* Ranma 1/2 */
"Hel-LOOO, Nurse!", /* Animaniacs */
};
- int erosion;
Strcpy(buf, shirt_msgs[tshirt->o_id % SIZE(shirt_msgs)]);
- erosion = greatest_erosion(tshirt);
- if (erosion)
- wipeout_text(buf,
- (int)(strlen(buf) * erosion / (2*MAX_ERODE)),
- tshirt->o_id ^ (unsigned)ubirthday);
- return buf;
+ return erode_obj_text(tshirt, buf);
+}
+
+char *
+apron_text(apron, buf)
+struct obj *apron;
+char *buf;
+{
+ static const char *apron_msgs[] = {
+ "Kiss the cook",
+ "I'm making SCIENCE!",
+ "Don't mess with the chef",
+ "Don't make me poison you",
+ "Gehennom's Kitchen",
+ "Rat: The other white meat",
+ "If you can't stand the heat, get out of Gehennom!",
+ "If we weren't meant to eat animals, why are they made out of meat?",
+ "If you don't like the food, I'll stab you",
+ };
+ Strcpy(buf, apron_msgs[apron->o_id % SIZE(apron_msgs)]);
+ return erode_obj_text(apron, buf);
}
int
if (!Blind) u.uconduct.literate++;
useup(scroll);
return(1);
- } else if (scroll->otyp == T_SHIRT) {
+ } else if (scroll->otyp == T_SHIRT ||
+ scroll->otyp == ALCHEMY_SMOCK) {
char buf[BUFSZ];
if (Blind) {
You_cant("feel any Braille writing.");
return 0;
}
/* can't read shirt worn under suit (under cloak is ok though) */
- if (uarm && scroll == uarmu) {
+ if (scroll->otyp == T_SHIRT && uarm && scroll == uarmu) {
pline("%s shirt is obscured by %s%s.",
scroll->unpaid ? "That" : "Your",
shk_your(buf, uarm), suit_simple_name(uarm));
u.uconduct.literate++;
if(flags.verbose)
pline("It reads:");
- pline("\"%s\"", tshirt_text(scroll, buf));
+ pline("\"%s\"", (scroll->otyp == T_SHIRT)
+ ? tshirt_text(scroll, buf)
+ : apron_text(scroll, buf));
+ return 1;
+ } else if (scroll->otyp == CREDIT_CARD) {
+ static const char *card_msgs[] = {
+ "Leprechaun Gold Tru$t - Shamrock Card",
+ "Magic Memory Vault Charge Card",
+ "Larn National Bank", /* Larn */
+ "First Bank of Omega", /* Omega */
+ "Bank of Zork - Frobozz Magic Card", /* Zork */
+ "Ankh-Morpork Merchant's Guild Barter Card",
+ "Ankh-Morpork Thieves' Guild Unlimited Transaction Card",
+ "Ransmannsby Moneylenders Association",
+ "Bank of Gehennom - 99% Interest Card",
+ "Yendorian Express - Copper Card",
+ "Yendorian Express - Silver Card",
+ "Yendorian Express - Gold Card",
+ "Yendorian Express - Mithril Card",
+ "Yendorian Express - Platinum Card", /* must be last */
+ };
+ if (Blind) {
+ You("feel the embossed numbers:");
+ } else {
+ if(flags.verbose)
+ pline("It reads:");
+ pline("\"%s\"", scroll->oartifact ? card_msgs[SIZE(card_msgs)-1]
+ : card_msgs[scroll->o_id % (SIZE(card_msgs)-1)]);
+ }
+ /* Make a credit card number */
+ pline("\"%d0%d %d%d1 0%d%d0\"", ((scroll->o_id % 89)+10), (scroll->o_id % 4),
+ (((scroll->o_id * 499) % 899999) + 100000), (scroll->o_id % 10),
+ (!(scroll->o_id % 3)), ((scroll->o_id * 7) % 10));
+ u.uconduct.literate++;
+ return 1;
+ } else if (scroll->otyp == CAN_OF_GREASE) {
+ pline("This %s has no label.", singular(scroll, xname));
+ return 0;
+ } else if (scroll->otyp == MAGIC_MARKER) {
+ if (Blind) {
+ You_cant("feel any Braille writing.");
+ return 0;
+ }
+ if (flags.verbose)
+ pline("It reads:");
+ pline("\"Magic Marker(TM) Red Ink Marker Pen. Water Soluble.\"");
+ u.uconduct.literate++;
+ return 1;
+ } else if (scroll->oclass == COIN_CLASS) {
+ if (Blind)
+ You("feel the embossed words:");
+ else if (flags.verbose)
+ You("read:");
+ pline("\"1 Zorkmid. 857 GUE. In Frobs We Trust.\"");
+ u.uconduct.literate++;
+ return 1;
+ } else if (scroll->oartifact == ART_ORB_OF_FATE) {
+ if (Blind)
+ You("feel the engraved signature:");
+ else pline("It is signed:");
+ pline("\"Odin.\"");
+ u.uconduct.literate++;
+ return 1;
+ } else if (scroll->otyp == CANDY_BAR) {
+ static const char *wrapper_msgs[] = {
+ "Apollo", /* Lost */
+ "Moon Crunchy", /* South Park */
+ "Snacky Cake",
+ "Chocolate Nuggie",
+ "The Small Bar",
+ "Crispy Yum Yum",
+ "Nilla Crunchie",
+ "Berry Bar",
+ "Choco Nummer",
+ "Om-nom", /* Cat Macro */
+ "Fruity Oaty", /* Serenity */
+ "Wonka" /* Charlie and the Chocolate Factory */
+ };
+ if (Blind) {
+ You_cant("feel any Braille writing.");
+ return 0;
+ }
+ pline("The wrapper reads: \"%s\"", wrapper_msgs[scroll->o_id % SIZE(wrapper_msgs)]);
+ u.uconduct.literate++;
return 1;
} else if (scroll->oclass != SCROLL_CLASS
&& scroll->oclass != SPBOOK_CLASS) {