#include "angband.h"
#include "util.h"
+#include "term.h"
+#include "core.h"
+#include "cmd-dump.h"
+#include "cmd-magiceat.h"
#include "floor.h"
#include "floor-events.h"
#include "floor-save.h"
+#include "autopick.h"
+#include "objectkind.h"
#include "object-boost.h"
#include "object-flavor.h"
#include "object-hook.h"
#include "artifact.h"
#include "cmd-spell.h"
#include "rumor.h"
-#include "player-status.h"
#include "spells.h"
#include "spells-status.h"
#include "realm-hex.h"
#include "dungeon-file.h"
#include "files.h"
+#include "player-status.h"
#include "player-effects.h"
+#include "player-class.h"
+#include "player-personality.h"
#include "scores.h"
#include "shoot.h"
#include "view-mainwindow.h"
+#include "monsterrace.h"
+#include "autopick.h"
/*
*/
building_type building[MAX_BLDG];
+MONRACE_IDX battle_mon[4];
+u32b mon_odds[4];
+int battle_odds;
+PRICE kakekin;
+int sel_monster;
+
+bool reinit_wilderness = FALSE;
+MONSTER_IDX today_mon;
/*!
* @brief 闘技場のモンスターID及び報酬アイテムテーブル
char out_val[160], tmp_str[80];
concptr p;
- if ((current_world_ptr->game_turn - old_battle) > TURNS_PER_TICK * 250)
+ if ((current_world_ptr->game_turn - current_world_ptr->arena_start_turn) > TURNS_PER_TICK * 250)
{
update_gambling_monsters();
- old_battle = current_world_ptr->game_turn;
+ current_world_ptr->arena_start_turn = current_world_ptr->game_turn;
}
screen_save();
GAME_TEXT o_name[MAX_NLEN];
object_type *o_ptr;
- /* Loop for inventory and right/left arm */
+ /* Loop for p_ptr->inventory_list and right/left arm */
for (i = 0; i <= INVEN_LARM; i++)
{
- o_ptr = &inventory[i];
+ o_ptr = &p_ptr->inventory_list[i];
/* Living Tsuchinoko worthes $1000000 */
if ((o_ptr->tval == TV_CAPTURE) && (o_ptr->pval == MON_TSUCHINOKO))
for (i = 0; i < INVEN_PACK; i++)
{
- o_ptr = &inventory[i];
+ o_ptr = &p_ptr->inventory_list[i];
/* Corpse of Tsuchinoko worthes $200000 */
if ((o_ptr->tval == TV_CORPSE) && (o_ptr->sval == SV_CORPSE) && (o_ptr->pval == MON_TSUCHINOKO))
for (i = 0; i < INVEN_PACK; i++)
{
- o_ptr = &inventory[i];
+ o_ptr = &p_ptr->inventory_list[i];
/* Bones of Tsuchinoko worthes $100000 */
if ((o_ptr->tval == TV_CORPSE) && (o_ptr->sval == SV_SKELETON) && (o_ptr->pval == MON_TSUCHINOKO))
for (i = 0; i < INVEN_PACK; i++)
{
- o_ptr = &inventory[i];
+ o_ptr = &p_ptr->inventory_list[i];
if ((o_ptr->tval == TV_CORPSE) && (o_ptr->sval == SV_CORPSE) && (streq(r_name + r_info[o_ptr->pval].name, r_name + r_info[today_mon].name)))
{
char buf[MAX_NLEN+20];
for (i = 0; i < INVEN_PACK; i++)
{
- o_ptr = &inventory[i];
+ o_ptr = &p_ptr->inventory_list[i];
if ((o_ptr->tval == TV_CORPSE) && (o_ptr->sval == SV_SKELETON) && (streq(r_name + r_info[o_ptr->pval].name, r_name + r_info[today_mon].name)))
{
/* Need reverse order --- Positions will be changed in the loop */
for (i = INVEN_PACK-1; i >= 0; i--)
{
- o_ptr = &inventory[i];
+ o_ptr = &p_ptr->inventory_list[i];
if ((o_ptr->tval == TV_CORPSE) && (o_ptr->pval == current_world_ptr->bounty_r_idx[j]))
{
char buf[MAX_NLEN+20];
concptr q, s;
TERM_LEN row = 2;
TERM_LEN wid = 38, mgn = 2;
- bool old_character_xtra = character_xtra;
+ bool old_character_xtra = current_world_ptr->character_xtra;
char ch;
PRICE total = 0;
PRICE cost = 0; /* First time no price */
clear_bldg(0, 22);
/* Store copy of original wielded weapon */
- i_ptr = &inventory[INVEN_RARM];
+ i_ptr = &p_ptr->inventory_list[INVEN_RARM];
object_copy(&orig_weapon, i_ptr);
item_tester_hook = item_tester_hook_orthodox_melee_weapons;
q = _("第一の武器は?", "What is your first weapon? ");
s = _("比べるものがありません。", "You have nothing to compare.");
- o_ptr[0] = choose_object(&item, q, s, (USE_EQUIP | USE_INVEN | IGNORE_BOTHHAND_SLOT));
+ o_ptr[0] = choose_object(&item, q, s, (USE_EQUIP | USE_INVEN | IGNORE_BOTHHAND_SLOT), 0);
if (!o_ptr[0])
{
screen_load();
item_tester_hook = item_tester_hook_orthodox_melee_weapons;
/* Hack -- prevent "icky" message */
- character_xtra = TRUE;
+ current_world_ptr->character_xtra = TRUE;
/* Diaplay selected weapon's infomation */
for (i = 0; i < n; i++)
p_ptr->update |= PU_BONUS;
handle_stuff();
- character_xtra = old_character_xtra;
+ current_world_ptr->character_xtra = old_character_xtra;
#ifdef JP
put_str(format("[ 比較対象: 's'で変更 ($%d) ]", cost), 1, (wid + mgn));
s = _("比べるものがありません。", "You have nothing to compare.");
/* Get the second weapon */
- o_ptr[1] = choose_object(&item2, q, s, (USE_EQUIP | USE_INVEN | IGNORE_BOTHHAND_SLOT));
+ o_ptr[1] = choose_object(&item2, q, s, (USE_EQUIP | USE_INVEN | IGNORE_BOTHHAND_SLOT), 0);
if (!o_ptr[1]) continue;
total += cost;
/* Only forge broken weapons */
item_tester_hook = item_tester_hook_broken_weapon;
- o_ptr = choose_object(&item, q, s, (USE_INVEN | USE_EQUIP));
+ o_ptr = choose_object(&item, q, s, (USE_INVEN | USE_EQUIP), 0);
if (!o_ptr) return (0);
/* It is worthless */
/* Only forge broken weapons */
item_tester_hook = item_tester_hook_orthodox_melee_weapons;
- mo_ptr = choose_object(&mater, q, s, (USE_INVEN | USE_EQUIP));
+ mo_ptr = choose_object(&mater, q, s, (USE_INVEN | USE_EQUIP), 0);
if (!mo_ptr) return (0);
if (mater == item)
{
q = _("どのアイテムを改良しますか?", "Improve which item? ");
s = _("改良できるものがありません。", "You have nothing to improve.");
- o_ptr = choose_object(&item, q, s, (USE_INVEN | USE_EQUIP | IGNORE_BOTHHAND_SLOT));
+ o_ptr = choose_object(&item, q, s, (USE_INVEN | USE_EQUIP | IGNORE_BOTHHAND_SLOT), item_tester_tval);
if (!o_ptr) return (FALSE);
/* Check if the player has enough money */
q = _("どのアイテムに魔力を充填しますか? ", "Recharge which item? ");
s = _("魔力を充填すべきアイテムがない。", "You have nothing to recharge.");
- o_ptr = choose_object(&item, q, s, (USE_INVEN | USE_FLOOR));
+ o_ptr = choose_object(&item, q, s, (USE_INVEN | USE_FLOOR), 0);
if (!o_ptr) return;
k_ptr = &k_info[o_ptr->k_idx];
/* Calculate cost */
for ( i = 0; i < INVEN_PACK; i++)
{
- o_ptr = &inventory[i];
+ o_ptr = &p_ptr->inventory_list[i];
/* skip non magic device */
if (o_ptr->tval < TV_STAFF || o_ptr->tval > TV_ROD) continue;
for (i = 0; i < INVEN_PACK; i++)
{
- o_ptr = &inventory[i];
+ o_ptr = &p_ptr->inventory_list[i];
k_ptr = &k_info[o_ptr->k_idx];
/* skip non magic device */
/* Interact */
while (1)
{
- /* Recall */
if (recall)
{
/*** Recall on screen ***/
old_i = i;
}
- /* Command */
query = inkey();
/* Normal commands */
}
else if ((which == 2) && p_ptr->inside_arena)
{
- if (!p_ptr->exit_bldg && m_cnt > 0)
+ if (!p_ptr->exit_bldg && current_floor_ptr->m_cnt > 0)
{
prt(_("ゲートは閉まっている。モンスターがあなたを待っている!", "The gates are closed. The monster awaits!"), 0, 0);
}
forget_view();
/* Hack -- Increase "icky" depth */
- character_icky++;
+ current_world_ptr->character_icky++;
command_arg = 0;
command_rep = 0;
}
/* Hack -- Decrease "icky" depth */
- character_icky--;
+ current_world_ptr->character_icky--;
Term_clear();