if (use_graphics)
{
+ char buf[1024];
+
/* Process "graf.prf" */
process_pref_file("graf.prf");
+
+ /* Access the "character" pref file */
+ sprintf(buf, "graf-%s.prf", player_base);
+
+ /* Process "graf-<playername>.prf" */
+ process_pref_file(buf);
}
/* Normal symbols */
else
{
+ char buf[1024];
+
/* Process "font.prf" */
process_pref_file("font.prf");
+
+ /* Access the "character" pref file */
+ sprintf(buf, "font-%s.prf", player_base);
+
+ /* Process "font-<playername>.prf" */
+ process_pref_file(buf);
}
}
(*f1) = a_ptr->flags1;
(*f2) = a_ptr->flags2;
(*f3) = a_ptr->flags3;
- if (!cursed_p(o_ptr))
- {
- (*f3) &= ~(TR3_HEAVY_CURSE | TR3_CURSED);
- }
}
/* Ego-item */
(*f3) |= o_ptr->art_flags3;
}
- /* Extra powers */
- if (!(o_ptr->art_name))
- {
- switch (o_ptr->xtra1)
- {
- case EGO_XTRA_SUSTAIN:
- {
- /* Choose a sustain */
- switch (o_ptr->xtra2 % 6)
- {
- case 0: (*f2) |= (TR2_SUST_STR); break;
- case 1: (*f2) |= (TR2_SUST_INT); break;
- case 2: (*f2) |= (TR2_SUST_WIS); break;
- case 3: (*f2) |= (TR2_SUST_DEX); break;
- case 4: (*f2) |= (TR2_SUST_CON); break;
- case 5: (*f2) |= (TR2_SUST_CHR); break;
- }
-
- break;
- }
-
- case EGO_XTRA_POWER:
- {
- /* Choose a power */
- switch (o_ptr->xtra2 % 11)
- {
- case 0: (*f2) |= (TR2_RES_BLIND); break;
- case 1: (*f2) |= (TR2_RES_CONF); break;
- case 2: (*f2) |= (TR2_RES_SOUND); break;
- case 3: (*f2) |= (TR2_RES_SHARDS); break;
- case 4: (*f2) |= (TR2_RES_NETHER); break;
- case 5: (*f2) |= (TR2_RES_NEXUS); break;
- case 6: (*f2) |= (TR2_RES_CHAOS); break;
- case 7: (*f2) |= (TR2_RES_DISEN); break;
- case 8: (*f2) |= (TR2_RES_POIS); break;
- case 9: (*f2) |= (TR2_RES_DARK); break;
- case 10: (*f2) |= (TR2_RES_LITE); break;
- }
-
- break;
- }
-
- case EGO_XTRA_ABILITY:
- {
- /* Choose an ability */
- switch (o_ptr->xtra2 % 8)
- {
- case 0: (*f3) |= (TR3_FEATHER); break;
- case 1: (*f3) |= (TR3_LITE); break;
- case 2: (*f3) |= (TR3_SEE_INVIS); break;
- case 3: (*f3) |= (TR3_TELEPATHY); break;
- case 4: (*f3) |= (TR3_SLOW_DIGEST); break;
- case 5: (*f3) |= (TR3_REGEN); break;
- case 6: (*f2) |= (TR2_FREE_ACT); break;
- case 7: (*f2) |= (TR2_HOLD_LIFE); break;
- }
-
- break;
- }
- }
- }
-
if ((o_ptr->tval > TV_CAPTURE) && o_ptr->xtra3)
{
if (o_ptr->xtra3 < 33)
(*f1) = a_ptr->flags1;
(*f2) = a_ptr->flags2;
(*f3) = a_ptr->flags3;
-
- if (!cursed_p(o_ptr))
- {
- (*f3) &= ~(TR3_HEAVY_CURSE | TR3_CURSED);
- }
}
/* Random artifact ! */
(*f2) |= o_ptr->art_flags2;
(*f3) |= o_ptr->art_flags3;
}
-
- if (!(o_ptr->art_name))
- {
- /* Extra powers */
- switch (o_ptr->xtra1)
- {
- case EGO_XTRA_SUSTAIN:
- {
- /* Choose a sustain */
- switch (o_ptr->xtra2 % 6)
- {
- case 0: (*f2) |= (TR2_SUST_STR); break;
- case 1: (*f2) |= (TR2_SUST_INT); break;
- case 2: (*f2) |= (TR2_SUST_WIS); break;
- case 3: (*f2) |= (TR2_SUST_DEX); break;
- case 4: (*f2) |= (TR2_SUST_CON); break;
- case 5: (*f2) |= (TR2_SUST_CHR); break;
- }
-
- break;
- }
-
- case EGO_XTRA_POWER:
- {
- /* Choose a power */
- switch (o_ptr->xtra2 % 11)
- {
- case 0: (*f2) |= (TR2_RES_BLIND); break;
- case 1: (*f2) |= (TR2_RES_CONF); break;
- case 2: (*f2) |= (TR2_RES_SOUND); break;
- case 3: (*f2) |= (TR2_RES_SHARDS); break;
- case 4: (*f2) |= (TR2_RES_NETHER); break;
- case 5: (*f2) |= (TR2_RES_NEXUS); break;
- case 6: (*f2) |= (TR2_RES_CHAOS); break;
- case 7: (*f2) |= (TR2_RES_DISEN); break;
- case 8: (*f2) |= (TR2_RES_POIS); break;
- case 9: (*f2) |= (TR2_RES_DARK); break;
- case 10: (*f2) |= (TR2_RES_LITE); break;
- }
-
- break;
- }
-
- case EGO_XTRA_ABILITY:
- {
- /* Choose an ability */
- switch (o_ptr->xtra2 % 8)
- {
- case 0: (*f3) |= (TR3_FEATHER); break;
- case 1: (*f3) |= (TR3_LITE); break;
- case 2: (*f3) |= (TR3_SEE_INVIS); break;
- case 3: (*f3) |= (TR3_TELEPATHY); break;
- case 4: (*f3) |= (TR3_SLOW_DIGEST); break;
- case 5: (*f3) |= (TR3_REGEN); break;
- case 6: (*f2) |= (TR2_FREE_ACT); break;
- case 7: (*f2) |= (TR2_HOLD_LIFE); break;
- }
-
- break;
- }
- }
- }
}
if ((o_ptr->tval > TV_CAPTURE) && o_ptr->xtra3)
(*f2) |= (TR2_RES_ACID | TR2_RES_ELEC | TR2_RES_FIRE | TR2_RES_COLD);;
}
}
-
- if (cursed_p(o_ptr))
- {
- if (o_ptr->art_flags3 & TR3_CURSED)
- (*f3) |= (TR3_CURSED);
- if (o_ptr->art_flags3 & TR3_HEAVY_CURSE)
- (*f3) |= (TR3_HEAVY_CURSE);
- }
}
#endif
}
- case ART_BELANGIL:
+ case ART_FIONA:
{
#ifdef JP
return "¥¢¥¤¥¹¡¦¥Ü¡¼¥ë(48) : 5+d5 ¥¿¡¼¥óËè";
#endif
}
- case ART_DAL:
+ case ART_FLORA:
{
#ifdef JP
return "¶²Éݽüµî/ÆǾä· : 5 ¥¿¡¼¥óËè";
#endif
}
- case ART_OLORIN:
+ case ART_GANDALF:
{
#ifdef JP
return "õº÷¡¢Á´´¶ÃΡ¢Á´´ÕÄê : 1000 ¥¿¡¼¥óËè";
}
case ART_KUSANAGI:
- case ART_ANGUIREL:
+ case ART_WEREWINDLE:
{
#ifdef JP
return "ƨÁö : 35 ¥¿¡¼¥óËè";
#endif
}
- case ART_OROME:
+ case ART_DESTINY:
{
#ifdef JP
return "´äÀÐÍϲò : 5 ¥¿¡¼¥óËè";
#endif
}
- case ART_BELEGENNON:
+ case ART_LOHENGRIN:
{
#ifdef JP
return ("²óÉü (777)¡¢Ìþ¤·¡¢»Îµ¤¹âÍÈ : 300 ¥¿¡¼¥óËè");
#endif
}
- case ART_CELEBORN:
+ case ART_JULIAN:
{
#ifdef JP
return "Ëõ»¦ : 500 ¥¿¡¼¥óËè";
#endif
}
- case ART_GONDOR:
+ case ART_AMBER:
{
#ifdef JP
return "ÂÎÎϲóÉü(500) : 500 ¥¿¡¼¥óËè";
#endif
}
- case ART_THRAIN:
+ case ART_JUDGE:
{
#ifdef JP
-return "ÂÎÎϤȰú¤Âؤ¨¤ËÀéΤ´ã¤Èµ¢´Ô";
+return "ÂÎÎϤȰú¤Âؤ¨¤ËÀéΤ´ã¤Èµ¢´Ô : 20+d20 ¥¿¡¼¥óËè";
#else
- return "clairvoyance and recall, draining you";
+ return "clairvoyance and recall, draining you every 20+d20 turns";
#endif
}
}
case ART_CARLAMMAS:
- case ART_VIOLET:
+ case ART_HERMIT:
{
#ifdef JP
return "Âмٰ·ë³¦ : 225+d225 ¥¿¡¼¥óËè";
#endif
}
- case ART_BARAHIR:
+ case ART_FRAKIR:
{
#ifdef JP
return "Ã⩹¶·â(100) : 100+d100 ¥¿¡¼¥óËè";
case ART_DOR: case ART_TERROR: case ART_STONEMASK:
{
#ifdef JP
-return "Á´Êý¸þ¤Ø¤Î¶²Éݤθ÷Àþ";
+ return "Á´Êý¸þ¤Ø¤Î¶²Éݤθ÷Àþ : 3*(¥ì¥Ù¥ë+10) ¥¿¡¼¥óËè";
#else
- return "rays of fear in every direction";
+ return "rays of fear in every direction every 3*(level+10) turns";
#endif
}
case EGO_RING_DRAGON_F:
if (o_ptr->sval == SV_RING_FLAMES)
#ifdef JP
-return "²Ð±ê¤Î¥Ö¥ì¥¹¤È²Ð¤Ø¤ÎÂÑÀ";
+return "²Ð±ê¤Î¥Ö¥ì¥¹ (200) ¤È²Ð¤Ø¤ÎÂÑÀ : 200 ¥¿¡¼¥óËè";
#else
- return "breath of fire and resist fire";
+ return "breath of fire (200) and resist fire every 200 turns";
#endif
else
#ifdef JP
case EGO_RING_DRAGON_C:
if (o_ptr->sval == SV_RING_ICE)
#ifdef JP
-return "Î䵤¤Î¥Ö¥ì¥¹¤ÈÎ䵤¤Ø¤ÎÂÑÀ";
+return "Î䵤¤Î¥Ö¥ì¥¹ (200) ¤ÈÎ䵤¤Ø¤ÎÂÑÀ : 200 ¥¿¡¼¥óËè";
#else
- return "breath of cold and resist cold";
+ return "breath of cold (200) and resist cold every 200 turns";
#endif
else
#ifdef JP
#endif
case EGO_RING_TRUE:
#ifdef JP
-return "»Îµ¤¹âÍÈ¡¢½ËÊ¡¡¢µæ¶Ë¤ÎÂÑÀ";
+return "»Îµ¤¹âÍÈ¡¢½ËÊ¡¡¢µæ¶Ë¤ÎÂÑÀ : 777 ¥¿¡¼¥óËè";
#else
- return "hero, bless, and ultimate resistance";
+ return "hero, bless, and ultimate resistance every 777 turns";
#endif
}
}
{
case SV_RING_FLAMES:
#ifdef JP
-return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë¤È²Ð¤Ø¤ÎÂÑÀ";
+return "¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë (100) ¤È²Ð¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
#else
- return "ball of fire and resist fire";
+ return "ball of fire (100) and resist fire every 50+d50 turns";
#endif
case SV_RING_ICE:
#ifdef JP
-return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë¤ÈÎ䵤¤Ø¤ÎÂÑÀ";
+return "¥³¡¼¥ë¥É¡¦¥Ü¡¼¥ë (100) ¤ÈÎ䵤¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
#else
- return "ball of cold and resist cold";
+ return "ball of cold (100) and resist cold every 50+d50 turns";
#endif
case SV_RING_ACID:
#ifdef JP
-return "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë¤È»À¤Ø¤ÎÂÑÀ";
+return "¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë (100) ¤È»À¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
#else
- return "ball of acid and resist acid";
+ return "ball of acid (100) and resist acid every 50+d50 turns";
#endif
case SV_RING_ELEC:
#ifdef JP
-return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë¤ÈÅÅ·â¤Ø¤ÎÂÑÀ";
+return "¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë (100) ¤ÈÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50 ¥¿¡¼¥óËè";
#else
- return "ball of elec and resist elec";
+ return "ball of elec (100) and resist elec every 50+d50 turns";
#endif
default:
cptr info[128];
u32b flag;
+ char o_name[MAX_NLEN];
+ int wid, hgt;
/* Extract the flags */
object_flags(o_ptr, &f1, &f2, &f3);
- if( o_ptr->name1)
+ /* Extract the description */
{
- char temp[70*20];
+ char temp[70 * 20];
- roff_to_buf( a_text + a_info[ o_ptr->name1 ].text ,77-15,temp);
- for(j=0;temp[j];j+=1+strlen(&temp[j]))
- { info[i]=&temp[j];i++;}
+ roff_to_buf(o_ptr->name1 ? (a_text + a_info[o_ptr->name1].text) :
+ (k_text + k_info[lookup_kind(o_ptr->tval, o_ptr->sval)].text),
+ 77 - 15, temp);
+ for (j = 0; temp[j]; j += 1 + strlen(&temp[j]))
+ { info[i] = &temp[j]; i++;}
}
/* Mega-Hack -- describe activation */
#endif
}
- if (o_ptr->name2 == EGO_2HAND)
+ if (o_ptr->name2 == EGO_2WEAPON)
{
#ifdef JP
info[i++] = "¤½¤ì¤ÏÆóÅáή¤Ç¤ÎÌ¿ÃæΨ¤ò¸þ¾å¤µ¤»¤ë¡£";
#ifdef JP
info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤ÏÈó¾ï¤Ë»È¤¤¤ä¤¹¤¤¡£";
#else
- info[i++] = "It is made for riding.";
+ info[i++] = "It is made for use while riding.";
#endif
else
#ifdef JP
info[i++] = "¤½¤ì¤Ï¾èÇÏÃæ¤Ç¤â»È¤¤¤ä¤¹¤¤¡£";
#else
- info[i++] = "It is suitable for riding.";
+ info[i++] = "It is suitable for use while riding.";
#endif
}
#endif
}
+ if (f3 & (TR3_SLAY_HUMAN))
+ {
+#ifdef JP
+info[i++] = "¤½¤ì¤Ï¿Í´Ö¤ËÂФ·¤ÆÆä˶²¤ë¤Ù¤ÎϤòȯ´ø¤¹¤ë¡£";
+#else
+ info[i++] = "It is especially deadly against humans.";
+#endif
+
+ }
- if (f1 & (TR1_FORCE_WEPON))
+ if (f1 & (TR1_FORCE_WEAPON))
{
#ifdef JP
info[i++] = "¤½¤ì¤Ï»ÈÍѼԤÎËâÎϤò»È¤Ã¤Æ¹¶·â¤¹¤ë¡£";
#endif
}
+ if (f3 & (TR3_WARNING))
+ {
+#ifdef JP
+info[i++] = "¤½¤ì¤Ï´í¸±¤ËÂФ·¤Æ·Ù¹ð¤òȯ¤¹¤ë¡£";
+#else
+ info[i++] = "It warns you of danger";
+#endif
+
+ }
if (f2 & (TR2_REFLECT))
{
#ifdef JP
}
- if (f3 & (TR3_DRAIN_EXP))
+ if (f3 & TR3_BLESSED)
{
#ifdef JP
-info[i++] = "¤½¤ì¤Ï·Ð¸³ÃͤòµÛ¤¤¼è¤ë¡£";
+info[i++] = "¤½¤ì¤Ï¿À¤Ë½ËÊ¡¤µ¤ì¤Æ¤¤¤ë¡£";
#else
- info[i++] = "It drains experience.";
+ info[i++] = "It has been blessed by the gods.";
#endif
}
- if (f3 & (TR3_TELEPORT))
+
+ if (cursed_p(o_ptr))
{
+ if (o_ptr->curse_flags & TRC_PERMA_CURSE)
+ {
#ifdef JP
-info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤Ê¥Æ¥ì¥Ý¡¼¥È¤ò°ú¤µ¯¤³¤¹¡£";
+info[i++] = "¤½¤ì¤Ï±Ê±ó¤Î¼ö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
#else
- info[i++] = "It induces random teleportation.";
+ info[i++] = "It is permanently cursed.";
#endif
+ }
+ else if (o_ptr->curse_flags & TRC_HEAVY_CURSE)
+ {
+#ifdef JP
+info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
+#else
+ info[i++] = "It is heavily cursed.";
+#endif
+
+ }
+ else
+ {
+#ifdef JP
+info[i++] = "¤½¤ì¤Ï¼ö¤ï¤ì¤Æ¤¤¤ë¡£";
+#else
+ info[i++] = "It is cursed.";
+#endif
+
+ }
}
- if (f3 & TR3_AGGRAVATE)
+
+ if ((f3 & TR3_TY_CURSE) || (o_ptr->curse_flags & TRC_TY_CURSE))
+ {
+#ifdef JP
+info[i++] = "¤½¤ì¤ÏÂÀ¸Å¤Î²Ò¡¹¤·¤¤±åÇ°¤¬½É¤Ã¤Æ¤¤¤ë¡£";
+#else
+ info[i++] = "It carries an ancient foul curse.";
+#endif
+
+ }
+ if ((f3 & TR3_AGGRAVATE) || (o_ptr->curse_flags & TRC_AGGRAVATE))
{
#ifdef JP
info[i++] = "¤½¤ì¤ÏÉÕ¶á¤Î¥â¥ó¥¹¥¿¡¼¤òÅܤ餻¤ë¡£";
#endif
}
+ if ((f3 & (TR3_DRAIN_EXP)) || (o_ptr->curse_flags & TRC_DRAIN_EXP))
+ {
+#ifdef JP
+info[i++] = "¤½¤ì¤Ï·Ð¸³ÃͤòµÛ¤¤¼è¤ë¡£";
+#else
+ info[i++] = "It drains experience.";
+#endif
- if (f3 & TR3_BLESSED)
+ }
+ if (o_ptr->curse_flags & TRC_SLOW_REGEN)
{
#ifdef JP
-info[i++] = "¤½¤ì¤Ï¿À¤Ë½ËÊ¡¤µ¤ì¤Æ¤¤¤ë¡£";
+info[i++] = "¤½¤ì¤Ï²óÉüÎϤò¼å¤á¤ë¡£";
#else
- info[i++] = "It has been blessed by the gods.";
+ info[i++] = "It slows your regenerative powers.";
#endif
}
+ if (o_ptr->curse_flags & TRC_ADD_L_CURSE)
+ {
+#ifdef JP
+info[i++] = "¤½¤ì¤Ï¼å¤¤¼ö¤¤¤òÁý¤ä¤¹¡£";
+#else
+ info[i++] = "It adds weak curses.";
+#endif
- if (cursed_p(o_ptr))
+ }
+ if (o_ptr->curse_flags & TRC_ADD_H_CURSE)
{
- if (f3 & TR3_PERMA_CURSE)
- {
#ifdef JP
-info[i++] = "¤½¤ì¤Ï±Ê±ó¤Î¼ö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
+info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤òÁý¤ä¤¹¡£";
#else
- info[i++] = "It is permanently cursed.";
+ info[i++] = "It adds heavy curses.";
#endif
- }
- else if (f3 & TR3_HEAVY_CURSE)
- {
+ }
+ if (o_ptr->curse_flags & TRC_CALL_ANIMAL)
+ {
#ifdef JP
-info[i++] = "¤½¤ì¤Ï¶¯ÎϤʼö¤¤¤¬¤«¤±¤é¤ì¤Æ¤¤¤ë¡£";
+info[i++] = "¤½¤ì¤Ïưʪ¤ò¸Æ¤Ó´ó¤»¤ë¡£";
#else
- info[i++] = "It is heavily cursed.";
+ info[i++] = "It attracts animals.";
#endif
- }
- else
- {
+ }
+ if (o_ptr->curse_flags & TRC_CALL_DEMON)
+ {
#ifdef JP
-info[i++] = "¤½¤ì¤Ï¼ö¤ï¤ì¤Æ¤¤¤ë¡£";
+info[i++] = "¤½¤ì¤Ï°Ëâ¤ò¸Æ¤Ó´ó¤»¤ë¡£";
#else
- info[i++] = "It is cursed.";
+ info[i++] = "It attracts demons.";
#endif
- }
}
+ if (o_ptr->curse_flags & TRC_CALL_DRAGON)
+ {
+#ifdef JP
+info[i++] = "¤½¤ì¤Ï¥É¥é¥´¥ó¤ò¸Æ¤Ó´ó¤»¤ë¡£";
+#else
+ info[i++] = "It attracts dragons.";
+#endif
- if (f3 & TR3_TY_CURSE)
+ }
+ if (o_ptr->curse_flags & TRC_COWARDICE)
{
#ifdef JP
-info[i++] = "¤½¤ì¤ÏÂÀ¸Å¤Î²Ò¡¹¤·¤¤±åÇ°¤¬½É¤Ã¤Æ¤¤¤ë¡£";
+info[i++] = "¤½¤ì¤Ï¶²ÉÝ´¶¤ò°ú¤µ¯¤³¤¹¡£";
#else
- info[i++] = "It carries an ancient foul curse.";
+ info[i++] = "It makes you subject to cowardice.";
+#endif
+
+ }
+ if ((f3 & (TR3_TELEPORT)) || (o_ptr->curse_flags & TRC_TELEPORT))
+ {
+#ifdef JP
+info[i++] = "¤½¤ì¤Ï¥é¥ó¥À¥à¤Ê¥Æ¥ì¥Ý¡¼¥È¤ò°ú¤µ¯¤³¤¹¡£";
+#else
+ info[i++] = "It induces random teleportation.";
+#endif
+
+ }
+ if (o_ptr->curse_flags & TRC_LOW_MELEE)
+ {
+#ifdef JP
+info[i++] = "¤½¤ì¤Ï¹¶·â¤ò³°¤·¤ä¤¹¤¤¡£";
+#else
+ info[i++] = "It causes you miss blows.";
+#endif
+
+ }
+ if (o_ptr->curse_flags & TRC_LOW_AC)
+ {
+#ifdef JP
+info[i++] = "¤½¤ì¤Ï¹¶·â¤ò¼õ¤±¤ä¤¹¤¤¡£";
+#else
+ info[i++] = "It helps your enemys' blows.";
+#endif
+
+ }
+ if (o_ptr->curse_flags & TRC_LOW_MAGIC)
+ {
+#ifdef JP
+info[i++] = "¤½¤ì¤ÏËâË¡¤ò¾§¤¨¤Ë¤¯¤¯¤¹¤ë¡£";
+#else
+ info[i++] = "It encumbers you while spellcasting.";
+#endif
+
+ }
+ if (o_ptr->curse_flags & TRC_FAST_DIGEST)
+ {
+#ifdef JP
+info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤Î¿·ÄÄÂå¼Õ¤ò®¤¯¤¹¤ë¡£";
+#else
+ info[i++] = "It speeds your metabolism.";
+#endif
+
+ }
+ if (o_ptr->curse_flags & TRC_DRAIN_HP)
+ {
+#ifdef JP
+info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎÂÎÎϤòµÛ¤¤¼è¤ë¡£";
+#else
+ info[i++] = "It drains you.";
+#endif
+
+ }
+ if (o_ptr->curse_flags & TRC_DRAIN_MANA)
+ {
+#ifdef JP
+info[i++] = "¤½¤ì¤Ï¤¢¤Ê¤¿¤ÎËâÎϤòµÛ¤¤¼è¤ë¡£";
+#else
+ info[i++] = "It drains your mana.";
#endif
}
/* Save the screen */
screen_save();
+ /* Get size */
+ Term_get_size(&wid, &hgt);
+
+ /* Display Item name */
+ object_desc(o_name, o_ptr, TRUE, 3);
+ prt(format("%s", o_name), 0, 0);
+
/* Erase the screen */
- for (k = 1; k < 24; k++) prt("", k, 13);
+ for (k = 1; k < hgt; k++) prt("", k, 13);
/* Label the information */
if ((o_ptr->tval == TV_STATUE) && (o_ptr->sval == SV_PHOTO))
prt(info[j], k++, 15);
/* Every 20 entries (lines 2 to 21), start over */
- if ((k == 22) && (j+1 < i))
+ if ((k == hgt - 2) && (j+1 < i))
{
#ifdef JP
prt("-- ³¤¯ --", k, 15);
int show_inven(int target_item)
{
int i, j, k, l, z = 0;
- int col, len, lim;
+ int col, cur_col, len, lim;
object_type *o_ptr;
char o_name[MAX_NLEN];
char tmp_val[80];
int out_index[23];
byte out_color[23];
- char out_desc[23][80];
+ char out_desc[23][MAX_NLEN];
int target_item_label = 0;
+ int wid, hgt;
/* Starting column */
col = command_gap;
+ /* Get size */
+ Term_get_size(&wid, &hgt);
+
/* Default "max-length" */
- len = 79 - col;
+ len = wid - col - 1;
/* Maximum space allowed for descriptions */
- lim = 79 - 3;
+ lim = wid - 4;
/* Require space for weight (if needed) */
if (show_weights) lim -= 9;
/* Require space for icon */
- if (show_item_graph) lim -= 2;
+ if (show_item_graph)
+ {
+ lim -= 2;
+ if (use_bigtile) lim--;
+ }
/* Find the "final" slot */
for (i = 0; i < INVEN_PACK; i++)
if (show_weights) l += 9;
/* Account for icon if displayed */
- if (show_item_graph) l += 2;
+ if (show_item_graph)
+ {
+ l += 2;
+ if (use_bigtile) l++;
+ }
/* Maintain the maximum length */
if (l > len) len = l;
}
/* Find the column to start in */
- col = (len > 76) ? 0 : (79 - len);
+ col = (len > wid - 4) ? 0 : (wid - len - 1);
/* Output each entry */
for (j = 0; j < k; j++)
/* Clear the line with the (possibly indented) index */
put_str(tmp_val, j + 1, col);
+ cur_col = col + 3;
+
/* Display graphics for object, if desired */
if (show_item_graph)
{
if (a & 0x80) a |= 0x40;
#endif
- Term_draw(col + 3, j + 1, a, c);
+ Term_draw(cur_col, j + 1, a, c);
+ if (use_bigtile)
+ {
+ cur_col++;
+ if (a & 0x80)
+ Term_draw(cur_col, j + 1, 255, -1);
+ }
+ cur_col += 2;
}
/* Display the entry itself */
- c_put_str(out_color[j], out_desc[j], j + 1, show_item_graph ? (col + 5) : (col + 3));
+ c_put_str(out_color[j], out_desc[j], j + 1, cur_col);
/* Display the weight if needed */
if (show_weights)
(void)sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
#endif
- put_str(tmp_val, j + 1, 71);
+ put_str(tmp_val, j + 1, wid - 9);
}
}
int show_equip(int target_item)
{
int i, j, k, l;
- int col, len, lim;
+ int col, cur_col, len, lim;
object_type *o_ptr;
char tmp_val[80];
char o_name[MAX_NLEN];
int out_index[23];
byte out_color[23];
- char out_desc[23][80];
+ char out_desc[23][MAX_NLEN];
int target_item_label = 0;
+ int wid, hgt;
/* Starting column */
col = command_gap;
+ /* Get size */
+ Term_get_size(&wid, &hgt);
+
/* Maximal length */
- len = 79 - col;
+ len = wid - col - 1;
/* Maximum space allowed for descriptions */
- lim = 79 - 3;
+ lim = wid - 4;
/* Require space for labels (if needed) */
#ifdef JP
/* Hack -- Find a column to start in */
#ifdef JP
- col = (len > 74) ? 0 : (79 - len);
+ col = (len > wid - 6) ? 0 : (wid - len - 1);
#else
- col = (len > 76) ? 0 : (79 - len);
+ col = (len > wid - 4) ? 0 : (wid - len - 1);
#endif
/* Clear the line with the (possibly indented) index */
put_str(tmp_val, j+1, col);
+ cur_col = col + 3;
+
+ /* Display graphics for object, if desired */
if (show_item_graph)
{
byte a = object_attr(o_ptr);
if (a & 0x80) a |= 0x40;
#endif
- Term_draw(col + 3, j + 1, a, c);
+ Term_draw(cur_col, j + 1, a, c);
+ if (use_bigtile)
+ {
+ cur_col++;
+ if (a & 0x80)
+ Term_draw(cur_col, j + 1, 255, -1);
+ }
+ cur_col += 2;
}
/* Use labels */
(void)sprintf(tmp_val, "%-14s: ", mention_use(i));
#endif
- put_str(tmp_val, j+1, show_item_graph ? col + 5 : col + 3);
+ put_str(tmp_val, j+1, cur_col);
/* Display the entry itself */
#ifdef JP
- c_put_str(out_color[j], out_desc[j], j+1, show_item_graph ? col + 14 : col + 12);
+ c_put_str(out_color[j], out_desc[j], j+1, cur_col + 9);
#else
- c_put_str(out_color[j], out_desc[j], j+1, show_item_graph ? col + 21 : col + 19);
+ c_put_str(out_color[j], out_desc[j], j+1, cur_col + 16);
#endif
-
}
/* No labels */
else
{
/* Display the entry itself */
- c_put_str(out_color[j], out_desc[j], j+1, show_item_graph ? col + 5 : col + 3);
+ c_put_str(out_color[j], out_desc[j], j+1, cur_col);
}
/* Display the weight if needed */
(void)sprintf(tmp_val, "%3d.%d lb", wgt / 10, wgt % 10);
#endif
- put_str(tmp_val, j+1, 71);
+ put_str(tmp_val, j+1, wid - 9);
}
}
if (item_tester_okay(&inventory[j]))
return TRUE;
- (void)scan_floor(floor_list, &floor_num, py, px, 0x01);
+ floor_num = scan_floor(floor_list, py, px, 0x01);
if (floor_num)
return TRUE;
#ifdef ALLOW_EASY_FLOOR /* TNB */
- if (easy_floor) return get_item_floor(cp, pmt, str, mode);
+ if (easy_floor || use_menu) return get_item_floor(cp, pmt, str, mode);
#endif /* ALLOW_EASY_FLOOR -- TNB */
}
}
-
/* Require at least one legal choice */
if (!allow_floor && (i1 > i2) && (e1 > e2))
{
#ifdef JP
if (inven) strcat(out_val, format(" %s »ý¤Áʪ,", use_menu ? "'4'or'6'" : "'/'"));
#else
- if (inven) strcat(out_val, " / for Inven,");
+if (inven) strcat(out_val, format(" %s for Inven,", use_menu ? "4 or 6" : "'/'"));
#endif
}
case 'x':
case 'X':
case '\r':
+ case '\n':
{
- /* Validate the item */
- if (!get_item_okay(get_item_label))
+ if (command_wrk == USE_FLOOR)
{
- bell();
- break;
+ /* Special index */
+ (*cp) = -get_item_label;
}
-
- /* Allow player to "refuse" certain actions */
- if (!get_item_allow(get_item_label))
+ else
{
- done = TRUE;
- break;
+ /* Validate the item */
+ if (!get_item_okay(get_item_label))
+ {
+ bell();
+ break;
+ }
+
+ /* Allow player to "refuse" certain actions */
+ if (!get_item_allow(get_item_label))
+ {
+ done = TRUE;
+ break;
+ }
+
+ /* Accept that choice */
+ (*cp) = get_item_label;
}
- /* Accept that choice */
- (*cp) = get_item_label;
item = TRUE;
done = TRUE;
break;
* mode & 0x02 -- Marked items only
* mode & 0x04 -- Stop after first
*/
-bool scan_floor(int *items, int *item_num, int y, int x, int mode)
+int scan_floor(int *items, int y, int x, int mode)
{
int this_o_idx, next_o_idx;
int num = 0;
- (*item_num) = 0;
-
/* Sanity */
- if (!in_bounds(y, x)) return (FALSE);
+ if (!in_bounds(y, x)) return 0;
/* Scan all objects in the grid */
for (this_o_idx = cave[y][x].o_idx; this_o_idx; this_o_idx = next_o_idx)
if ((mode & 0x02) && !o_ptr->marked) continue;
/* Accept this item */
- items[num++] = this_o_idx;
+ /* XXX Hack -- Enforce limit */
+ if (num <= 23)
+ items[num] = this_o_idx;
+
+ num++;
/* Only one */
if (mode & 0x04) break;
-
- /* XXX Hack -- Enforce limit */
- if (num == 23) break;
}
- /* Number of items */
- (*item_num) = num;
-
/* Result */
- return (num != 0);
+ return num;
}
/*
* Display a list of the items on the floor at the given location.
*/
-int show_floor(int target_item, int y, int x)
+int show_floor(int target_item, int y, int x, int *min_width)
{
int i, j, k, l;
int col, len, lim;
int out_index[23];
byte out_color[23];
- char out_desc[23][80];
+ char out_desc[23][MAX_NLEN];
int target_item_label = 0;
int floor_list[23], floor_num;
+ int wid, hgt;
+
+ /* Get size */
+ Term_get_size(&wid, &hgt);
/* Default length */
- len = 79 - 50;
+ len = MAX((*min_width), 20);
/* Maximum space allowed for descriptions */
- lim = 79 - 3;
+ lim = wid - 4;
/* Require space for weight (if needed) */
if (show_weights) lim -= 9;
/* Scan for objects in the grid, using item_tester_okay() */
- (void) scan_floor(floor_list, &floor_num, y, x, 0x01);
+ floor_num = scan_floor(floor_list, y, x, 0x01);
/* Display the inventory */
- for (k = 0, i = 0; i < floor_num; i++)
+ for (k = 0, i = 0; i < floor_num && i < 23; i++)
{
o_ptr = &o_list[floor_list[i]];
k++;
}
+ /* Save width */
+ *min_width = len;
+
/* Find the column to start in */
- col = (len > 76) ? 0 : (79 - len);
+ col = (len > wid - 4) ? 0 : (wid - len - 1);
/* Output each entry */
for (j = 0; j < k; j++)
sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10);
#endif
- put_str(tmp_val, j + 1, 71);
+ put_str(tmp_val, j + 1, wid - 9);
}
}
char out_val[160];
int floor_num, floor_list[23], floor_top = 0;
+ int min_width = 0;
extern bool select_spellbook;
extern bool select_the_force;
if (floor)
{
/* Scan all objects in the grid */
- (void) scan_floor(floor_list, &floor_num, py, px, 0x01);
+ floor_num = scan_floor(floor_list, py, px, 0x01);
}
/* Accept inventory */
n2 = I2A(k - floor_top);
/* Redraw if needed */
- if (command_see) get_item_label = show_floor(menu_line, py, px);
+ if (command_see) get_item_label = show_floor(menu_line, py, px, &min_width);
}
/* Viewing inventory */
/* Append */
#ifdef JP
-if (allow_equip)
-{
- if (use_menu)
- {
- if (allow_floor)
- strcat(out_val, " '6' ÁõÈ÷ÉÊ,");
- else
- strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
- }
- else strcat(out_val, " '/' ÁõÈ÷ÉÊ,");
-}
-else if (select_the_force)
- strcat(out_val, " 'w'Îýµ¤½Ñ,");
+ if (allow_equip)
+ {
+ if (!use_menu)
+ strcat(out_val, " '/' ÁõÈ÷ÉÊ,");
+ else if (allow_floor)
+ strcat(out_val, " '6' ÁõÈ÷ÉÊ,");
+ else
+ strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
+ }
+ else if (select_the_force)
+ strcat(out_val, " 'w'Îýµ¤½Ñ,");
#else
-if (allow_equip)
-{
- if (use_menu)
- {
- if (allow_floor)
- strcat(out_val, " 6 for Equip,");
- else
- strcat(out_val, " 4 or 6 for Equip,");
- }
- else strcat(out_val, " / for Equip,");
-}
-else if (select_the_force)
- strcat(out_val, " w for the Force,");
+ if (allow_equip)
+ {
+ if (!use_menu)
+ strcat(out_val, " / for Equip,");
+ else if (allow_floor)
+ strcat(out_val, " 6 for Equip,");
+ else
+ strcat(out_val, " 4 or 6 for Equip,");
+ }
+ else if (select_the_force)
+ strcat(out_val, " w for the Force,");
#endif
/* Append */
+ if (allow_floor)
+ {
#ifdef JP
-if (allow_floor)
-{
- if (use_menu)
- {
- if (allow_equip)
- strcat(out_val, " '4' ¾²¾å,");
- else
- strcat(out_val, " '4'or'6' ¾²¾å,");
- }
- else strcat(out_val, " '-'¾²¾å,");
-}
+ if (!use_menu)
+ strcat(out_val, " '-'¾²¾å,");
+ if (allow_equip)
+ strcat(out_val, " '4' ¾²¾å,");
+ else
+ strcat(out_val, " '4'or'6' ¾²¾å,");
#else
- if (allow_floor) strcat(out_val, " - for floor,");
+ if (!use_menu)
+ strcat(out_val, " - for floor,");
+ if (allow_equip)
+ strcat(out_val, " 4 for floor,");
+ else
+ strcat(out_val, " 4 or 6 for floor,");
#endif
+ }
}
/* Append */
+ if (allow_inven)
+ {
#ifdef JP
-if (allow_inven)
-{
- if (use_menu)
- {
- if (allow_floor)
- strcat(out_val, " '4' »ý¤Áʪ,");
- else
- strcat(out_val, " '4'or'6' »ý¤Áʪ,");
- }
- else strcat(out_val, " '/' »ý¤Áʪ,");
-}
+ if (!use_menu)
+ strcat(out_val, " '/' »ý¤Áʪ,");
+ else if (allow_floor)
+ strcat(out_val, " '4' »ý¤Áʪ,");
+ else
+ strcat(out_val, " '4'or'6' »ý¤Áʪ,");
#else
- if (allow_inven) strcat(out_val, " / for Inven,");
-#endif
+ if (!use_menu)
+ strcat(out_val, " / for Inven,");
+ else if (allow_floor)
+ strcat(out_val, " 4 for Inven,");
+ else
+ strcat(out_val, " 4 or 6 for Inven,");
+#endif
+ }
/* Append */
+ if (allow_floor)
+ {
#ifdef JP
-if (allow_floor)
-{
- if (use_menu)
- {
- if (allow_floor)
- strcat(out_val, " '6' ¾²¾å,");
- else
- strcat(out_val, " '4'or'6' ¾²¾å,");
- }
- else strcat(out_val, " '-'¾²¾å,");
-}
+ if (!use_menu)
+ strcat(out_val, " '-'¾²¾å,");
+ else if (allow_inven)
+ strcat(out_val, " '6' ¾²¾å,");
+ else
+ strcat(out_val, " '4'or'6' ¾²¾å,");
#else
- if (allow_floor) strcat(out_val, " - for floor,");
+ if (!use_menu)
+ strcat(out_val, " - for floor,");
+ else if (allow_inven)
+ strcat(out_val, " 6 for floor,");
+ else
+ strcat(out_val, " 4 or 6 for floor,");
#endif
-
+ }
}
/* Viewing floor */
if (allow_inven && allow_equip)
{
#ifdef JP
-strcat(out_val, " '4' ÁõÈ÷ÉÊ, '6' »ý¤Áʪ,");
+ strcat(out_val, " '4' ÁõÈ÷ÉÊ, '6' »ý¤Áʪ,");
#else
- strcat(out_val, " / for Inven,");
+ strcat(out_val, " 4 for Equip, 6 for Inven,");
#endif
}
else if (allow_inven)
{
#ifdef JP
-strcat(out_val, " '4'or'6' »ý¤Áʪ,");
+ strcat(out_val, " '4'or'6' »ý¤Áʪ,");
#else
- strcat(out_val, " / for Inven,");
+ strcat(out_val, " 4 or 6 for Inven,");
#endif
}
else if (allow_equip)
{
#ifdef JP
-strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
+ strcat(out_val, " '4'or'6' ÁõÈ÷ÉÊ,");
#else
- strcat(out_val, " / for Equip,");
+ strcat(out_val, " 4 or 6 for Equip,");
#endif
}
else if (allow_inven)
{
#ifdef JP
-strcat(out_val, " '/' »ý¤Áʪ,");
+ strcat(out_val, " '/' »ý¤Áʪ,");
#else
strcat(out_val, " / for Inven,");
#endif
else if (allow_equip)
{
#ifdef JP
-strcat(out_val, " '/'ÁõÈ÷ÉÊ,");
+ strcat(out_val, " '/'ÁõÈ÷ÉÊ,");
#else
strcat(out_val, " / for Equip,");
#endif
}
+
+ /* Append */
+ if (command_see && !use_menu)
+ {
+#ifdef JP
+ strcat(out_val, " Enter ¼¡,");
+#else
+ strcat(out_val, " Enter for scroll down,");
+#endif
+ }
}
/* Finish the prompt */
int max_line = 1;
if (command_wrk == USE_INVEN) max_line = max_inven;
else if (command_wrk == USE_EQUIP) max_line = max_equip;
- else if (command_wrk == USE_FLOOR) max_line = floor_num;
+ else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
switch (which)
{
case ESCAPE:
/* Switch inven/equip */
if (command_wrk == USE_INVEN) max_line = max_inven;
else if (command_wrk == USE_EQUIP) max_line = max_equip;
- else if (command_wrk == USE_FLOOR) max_line = floor_num;
+ else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
if (menu_line > max_line) menu_line = max_line;
/* Need to redraw */
/* Switch inven/equip */
if (command_wrk == USE_INVEN) max_line = max_inven;
else if (command_wrk == USE_EQUIP) max_line = max_equip;
- else if (command_wrk == USE_FLOOR) max_line = floor_num;
+ else if (command_wrk == USE_FLOOR) max_line = MIN(23, floor_num);
if (menu_line > max_line) menu_line = max_line;
/* Need to redraw */
case 'x':
case 'X':
case '\r':
+ case '\n':
{
- /* Validate the item */
- if (!get_item_okay(get_item_label))
+ if (command_wrk == USE_FLOOR)
{
- bell();
- break;
+ /* Special index */
+ (*cp) = -get_item_label;
}
-
- /* Allow player to "refuse" certain actions */
- if (!get_item_allow(get_item_label))
+ else
{
- done = TRUE;
- break;
+ /* Validate the item */
+ if (!get_item_okay(get_item_label))
+ {
+ bell();
+ break;
+ }
+
+ /* Allow player to "refuse" certain actions */
+ if (!get_item_allow(get_item_label))
+ {
+ done = TRUE;
+ break;
+ }
+
+ /* Accept that choice */
+ (*cp) = get_item_label;
}
- /* Accept that choice */
- (*cp) = get_item_label;
item = TRUE;
done = TRUE;
break;
break;
}
+ case '\n':
+ case '\r':
+ case '+':
+ {
+ int i, o_idx;
+ cave_type *c_ptr = &cave[py][px];
+
+ if (command_wrk != (USE_FLOOR)) break;
+
+ /* Get the object being moved. */
+ o_idx = c_ptr->o_idx;
+
+ /* Only rotate a pile of two or more objects. */
+ if (!(o_idx && o_list[o_idx].next_o_idx)) break;
+
+ /* Remove the first object from the list. */
+ excise_object_idx(o_idx);
+
+ /* Find end of the list. */
+ i = c_ptr->o_idx;
+ while (o_list[i].next_o_idx)
+ i = o_list[i].next_o_idx;
+
+ /* Add after the last object. */
+ o_list[i].next_o_idx = o_idx;
+
+ /* Re-scan floor list */
+ floor_num = scan_floor(floor_list, py, px, 0x01);
+
+ /* Hack -- Fix screen */
+ if (command_see)
+ {
+ /* Load screen */
+ screen_load();
+
+ /* Save screen */
+ screen_save();
+ }
+
+ break;
+ }
+
case '/':
{
if (command_wrk == (USE_INVEN))
break;
}
- case '\n':
#if 0
+ case '\n':
case '\r':
-#endif
{
/* Choose "default" inventory item */
if (command_wrk == (USE_INVEN))
done = TRUE;
break;
}
+#endif
case 'w':
{
else if (command_wrk == USE_FLOOR)
{
k = islower(which) ? A2I(which) : -1;
- if (k < 0 || k >= floor_num)
+ if (k < 0 || k >= floor_num || k >= 23)
{
bell();
break;
}
/* Remember this object index */
- floor_list[floor_num] = this_o_idx;
+ if (floor_num <= 23)
+ floor_list[floor_num] = this_o_idx;
/* Count non-gold objects */
floor_num++;
- if (floor_num == 23) break;
-
/* Remember this index */
floor_o_idx = this_o_idx;
}