#include "snipe.h"
#include "player-race.h"
#include "view-mainwindow.h"
+#include "player-inventory.h"
/*!
* @brief 持ち物一覧を表示するコマンドのメインルーチン / Display p_ptr->inventory_list
#include "floor-save.h"
#include "feature.h"
#include "player-skill.h"
+#include "player-inventory.h"
#include "view-mainwindow.h"
#include "dungeon-file.h"
extern INVENTORY_IDX label_to_inven(int c);
extern INVENTORY_IDX label_to_equip(int c);
extern s16b wield_slot(object_type *o_ptr);
-extern concptr mention_use(int i);
-extern concptr describe_use(int i);
+
extern bool check_book_realm(const OBJECT_TYPE_VALUE book_tval, const OBJECT_SUBTYPE_VALUE book_sval);
extern bool item_tester_okay(object_type *o_ptr, OBJECT_TYPE_VALUE tval);
extern void display_inven(OBJECT_TYPE_VALUE tval);
}
/*!
- * @brief 所持/装備オブジェクトIDの部位表現を返す /
- * Return a string mentioning how a given item is carried
- * @param i 部位表現を求めるプレイヤーの所持/装備オブジェクトID
- * @return 部位表現の文字列ポインタ
- */
-concptr mention_use(int i)
-{
- concptr p;
-
- /* Examine the location */
- switch (i)
- {
-#ifdef JP
- case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "運搬中" : ((p_ptr->ryoute && p_ptr->migite) ? " 両手" : (left_hander ? " 左手" : " 右手")); break;
-#else
- case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "Just lifting" : (p_ptr->migite ? "Wielding" : "On arm"); break;
-#endif
-
-#ifdef JP
- case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "運搬中" : ((p_ptr->ryoute && p_ptr->hidarite) ? " 両手" : (left_hander ? " 右手" : " 左手")); break;
-#else
- case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "Just lifting" : (p_ptr->hidarite ? "Wielding" : "On arm"); break;
-#endif
-
- case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < p_ptr->inventory_list[i].weight / 10) ? _("運搬中", "Just holding") : _("射撃用", "Shooting"); break;
- case INVEN_RIGHT: p = (left_hander ? _("左手指", "On left hand") : _("右手指", "On right hand")); break;
- case INVEN_LEFT: p = (left_hander ? _("右手指", "On right hand") : _("左手指", "On left hand")); break;
- case INVEN_NECK: p = _(" 首", "Around neck"); break;
- case INVEN_LITE: p = _(" 光源", "Light source"); break;
- case INVEN_BODY: p = _(" 体", "On body"); break;
- case INVEN_OUTER: p = _("体の上", "About body"); break;
- case INVEN_HEAD: p = _(" 頭", "On head"); break;
- case INVEN_HANDS: p = _(" 手", "On hands"); break;
- case INVEN_FEET: p = _(" 足", "On feet"); break;
- default: p = _("ザック", "In pack"); break;
- }
-
- /* Return the result */
- return p;
-}
-
-
-/*!
- * @brief 所持/装備オブジェクトIDの現在の扱い方の状態表現を返す /
- * Return a string describing how a given item is being worn.
- * @param i 状態表現を求めるプレイヤーの所持/装備オブジェクトID
- * @return 状態表現内容の文字列ポインタ
- * @details
- * Currently, only used for items in the equipment, not p_ptr->inventory_list.
- */
-concptr describe_use(int i)
-{
- concptr p;
-
- switch (i)
- {
-#ifdef JP
- case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "運搬中の" : ((p_ptr->ryoute && p_ptr->migite) ? "両手に装備している" : (left_hander ? "左手に装備している" : "右手に装備している")); break;
-#else
- case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "just lifting" : (p_ptr->migite ? "attacking monsters with" : "wearing on your arm"); break;
-#endif
-
-#ifdef JP
- case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "運搬中の" : ((p_ptr->ryoute && p_ptr->hidarite) ? "両手に装備している" : (left_hander ? "右手に装備している" : "左手に装備している")); break;
-#else
- case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "just lifting" : (p_ptr->hidarite ? "attacking monsters with" : "wearing on your arm"); break;
-#endif
-
- case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < p_ptr->inventory_list[i].weight / 10) ? _("持つだけで精一杯の", "just holding") : _("射撃用に装備している", "shooting missiles with"); break;
- case INVEN_RIGHT: p = (left_hander ? _("左手の指にはめている", "wearing on your left hand") : _("右手の指にはめている", "wearing on your right hand")); break;
- case INVEN_LEFT: p = (left_hander ? _("右手の指にはめている", "wearing on your right hand") : _("左手の指にはめている", "wearing on your left hand")); break;
- case INVEN_NECK: p = _("首にかけている", "wearing around your neck"); break;
- case INVEN_LITE: p = _("光源にしている", "using to light the way"); break;
- case INVEN_BODY: p = _("体に着ている", "wearing on your body"); break;
- case INVEN_OUTER: p = _("身にまとっている", "wearing on your back"); break;
- case INVEN_HEAD: p = _("頭にかぶっている", "wearing on your head"); break;
- case INVEN_HANDS: p = _("手につけている", "wearing on your hands"); break;
- case INVEN_FEET: p = _("足にはいている", "wearing on your feet"); break;
- default: p = _("ザックに入っている", "carrying in your pack"); break;
- }
-
- /* Return the result */
- return p;
-}
-
-
-/*!
* @brief tval/sval指定のベースアイテムがプレイヤーの使用可能な魔法書かどうかを返す /
* Hack: Check if a spellbook is one of the realms we can use. -- TY
* @param book_tval ベースアイテムのtval
#include "angband.h"
#include "core.h"
#include "util.h"
+#include "player-inventory.h"
+
#include "term.h"
#include "object.h"
#include "objectkind.h"
return target_item_label;
}
+
+/*!
+ * @brief 所持/装備オブジェクトIDの部位表現を返す /
+ * Return a string mentioning how a given item is carried
+ * @param i 部位表現を求めるプレイヤーの所持/装備オブジェクトID
+ * @return 部位表現の文字列ポインタ
+ */
+concptr mention_use(int i)
+{
+ concptr p;
+
+ /* Examine the location */
+ switch (i)
+ {
+#ifdef JP
+ case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "運搬中" : ((p_ptr->ryoute && p_ptr->migite) ? " 両手" : (left_hander ? " 左手" : " 右手")); break;
+#else
+ case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "Just lifting" : (p_ptr->migite ? "Wielding" : "On arm"); break;
+#endif
+
+#ifdef JP
+ case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "運搬中" : ((p_ptr->ryoute && p_ptr->hidarite) ? " 両手" : (left_hander ? " 右手" : " 左手")); break;
+#else
+ case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "Just lifting" : (p_ptr->hidarite ? "Wielding" : "On arm"); break;
+#endif
+
+ case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < p_ptr->inventory_list[i].weight / 10) ? _("運搬中", "Just holding") : _("射撃用", "Shooting"); break;
+ case INVEN_RIGHT: p = (left_hander ? _("左手指", "On left hand") : _("右手指", "On right hand")); break;
+ case INVEN_LEFT: p = (left_hander ? _("右手指", "On right hand") : _("左手指", "On left hand")); break;
+ case INVEN_NECK: p = _(" 首", "Around neck"); break;
+ case INVEN_LITE: p = _(" 光源", "Light source"); break;
+ case INVEN_BODY: p = _(" 体", "On body"); break;
+ case INVEN_OUTER: p = _("体の上", "About body"); break;
+ case INVEN_HEAD: p = _(" 頭", "On head"); break;
+ case INVEN_HANDS: p = _(" 手", "On hands"); break;
+ case INVEN_FEET: p = _(" 足", "On feet"); break;
+ default: p = _("ザック", "In pack"); break;
+ }
+
+ /* Return the result */
+ return p;
+}
+
+
+/*!
+ * @brief 所持/装備オブジェクトIDの現在の扱い方の状態表現を返す /
+ * Return a string describing how a given item is being worn.
+ * @param i 状態表現を求めるプレイヤーの所持/装備オブジェクトID
+ * @return 状態表現内容の文字列ポインタ
+ * @details
+ * Currently, only used for items in the equipment, not p_ptr->inventory_list.
+ */
+concptr describe_use(int i)
+{
+ concptr p;
+
+ switch (i)
+ {
+#ifdef JP
+ case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "運搬中の" : ((p_ptr->ryoute && p_ptr->migite) ? "両手に装備している" : (left_hander ? "左手に装備している" : "右手に装備している")); break;
+#else
+ case INVEN_RARM: p = p_ptr->heavy_wield[0] ? "just lifting" : (p_ptr->migite ? "attacking monsters with" : "wearing on your arm"); break;
+#endif
+
+#ifdef JP
+ case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "運搬中の" : ((p_ptr->ryoute && p_ptr->hidarite) ? "両手に装備している" : (left_hander ? "右手に装備している" : "左手に装備している")); break;
+#else
+ case INVEN_LARM: p = p_ptr->heavy_wield[1] ? "just lifting" : (p_ptr->hidarite ? "attacking monsters with" : "wearing on your arm"); break;
+#endif
+
+ case INVEN_BOW: p = (adj_str_hold[p_ptr->stat_ind[A_STR]] < p_ptr->inventory_list[i].weight / 10) ? _("持つだけで精一杯の", "just holding") : _("射撃用に装備している", "shooting missiles with"); break;
+ case INVEN_RIGHT: p = (left_hander ? _("左手の指にはめている", "wearing on your left hand") : _("右手の指にはめている", "wearing on your right hand")); break;
+ case INVEN_LEFT: p = (left_hander ? _("右手の指にはめている", "wearing on your right hand") : _("左手の指にはめている", "wearing on your left hand")); break;
+ case INVEN_NECK: p = _("首にかけている", "wearing around your neck"); break;
+ case INVEN_LITE: p = _("光源にしている", "using to light the way"); break;
+ case INVEN_BODY: p = _("体に着ている", "wearing on your body"); break;
+ case INVEN_OUTER: p = _("身にまとっている", "wearing on your back"); break;
+ case INVEN_HEAD: p = _("頭にかぶっている", "wearing on your head"); break;
+ case INVEN_HANDS: p = _("手につけている", "wearing on your hands"); break;
+ case INVEN_FEET: p = _("足にはいている", "wearing on your feet"); break;
+ default: p = _("ザックに入っている", "carrying in your pack"); break;
+ }
+
+ /* Return the result */
+ return p;
+}
+
extern bool is_ring_slot(int i);
extern bool get_item_okay(OBJECT_IDX i);
+extern concptr mention_use(int i);
+extern concptr describe_use(int i);
\ No newline at end of file
#include "player-status.h"
#include "player-class.h"
#include "player-damage.h"
+#include "player-inventory.h"
#include "spells-summon.h"
#include "quest.h"
#include "artifact.h"
floor_item_increase(0 - item, 1 - (o_ptr->number));
}
}
- okay = create_artifact(o_ptr, TRUE);
+ okay = become_random_artifact(o_ptr, TRUE);
}
/* Failure */