#include "angband.h"
+#include "util.h"
+
#include "player-move.h"
#include "player-status.h"
+#include "player-effects.h"
+#include "player-skill.h"
+#include "player-race.h"
+#include "player-class.h"
+#include "player-personality.h"
#include "floor.h"
#include "floor-events.h"
+#include "feature.h"
#include "artifact.h"
#include "avatar.h"
+#include "spells.h"
#include "spells-status.h"
+#include "object.h"
#include "object-hook.h"
#include "monster.h"
#include "monster-status.h"
#include "realm-hex.h"
#include "cmd-pet.h"
#include "cmd-spell.h"
-#include "player-effects.h"
-
-/* Hack, monk armour */
-static bool monk_armour_aux;
-static bool monk_notify_aux;
-
+#include "dungeon.h"
+#include "objectkind.h"
+#include "monsterrace.h"
+#include "autopick.h"
+#include "cmd-dump.h"
+#include "melee.h"
+#include "world.h"
/*!
* @var horror_desc
bool omoi = FALSE;
bool yoiyami = FALSE;
bool down_saving = FALSE;
+
#if 0
bool have_dd_s = FALSE, have_dd_t = FALSE;
#endif
if (CAN_TWO_HANDS_WIELDING())
{
if (p_ptr->migite && (empty_hands(FALSE) == EMPTY_HAND_LARM) &&
- object_allow_two_hands_wielding(&inventory[INVEN_RARM]))
+ object_allow_two_hands_wielding(&p_ptr->inventory_list[INVEN_RARM]))
{
p_ptr->ryoute = TRUE;
}
else if (p_ptr->hidarite && (empty_hands(FALSE) == EMPTY_HAND_RARM) &&
- object_allow_two_hands_wielding(&inventory[INVEN_LARM]))
+ object_allow_two_hands_wielding(&p_ptr->inventory_list[INVEN_LARM]))
{
p_ptr->ryoute = TRUE;
}
new_speed -= (p_ptr->lev) / 10;
p_ptr->skill_stl -= (p_ptr->lev) / 10;
}
- else if ((!inventory[INVEN_RARM].k_idx || p_ptr->migite) &&
- (!inventory[INVEN_LARM].k_idx || p_ptr->hidarite))
+ else if ((!p_ptr->inventory_list[INVEN_RARM].k_idx || p_ptr->migite) &&
+ (!p_ptr->inventory_list[INVEN_LARM].k_idx || p_ptr->hidarite))
{
new_speed += 3;
if (!(prace_is_(RACE_KLACKON) ||
if (p_ptr->lev > 24)
p_ptr->free_act = TRUE;
}
- if ((!inventory[INVEN_RARM].k_idx || p_ptr->migite) &&
- (!inventory[INVEN_LARM].k_idx || p_ptr->hidarite))
+ if ((!p_ptr->inventory_list[INVEN_RARM].k_idx || p_ptr->migite) &&
+ (!p_ptr->inventory_list[INVEN_LARM].k_idx || p_ptr->hidarite))
{
p_ptr->to_a += p_ptr->lev / 2 + 5;
p_ptr->dis_to_a += p_ptr->lev / 2 + 5;
break;
case RACE_ENT:
/* Ents dig like maniacs, but only with their hands. */
- if (!inventory[INVEN_RARM].k_idx)
+ if (!p_ptr->inventory_list[INVEN_RARM].k_idx)
p_ptr->skill_dig += p_ptr->lev * 10;
/* Ents get tougher and stronger as they age, but lose dexterity. */
if (p_ptr->lev > 25) p_ptr->stat_add[A_STR]++;
p_ptr->stat_add[A_CON] += 4;
}
- /* Scan the usable inventory */
+ /* Scan the usable p_ptr->inventory_list */
for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
{
int bonus_to_h, bonus_to_d;
- o_ptr = &inventory[i];
-
- /* Skip non-objects */
+ o_ptr = &p_ptr->inventory_list[i];
if (!o_ptr->k_idx) continue;
- /* Extract the item flags */
object_flags(o_ptr, flgs);
p_ptr->cursed |= (o_ptr->curse_flags & (0xFFFFFFF0L));
}
/* Shield skill bonus */
- if (object_is_armour(&inventory[INVEN_RARM]) || object_is_armour(&inventory[INVEN_LARM]))
+ if (object_is_armour(&p_ptr->inventory_list[INVEN_RARM]) || object_is_armour(&p_ptr->inventory_list[INVEN_LARM]))
{
p_ptr->ac += p_ptr->skill_exp[GINOU_SHIELD] * (1 + p_ptr->lev / 22) / 2000;
p_ptr->dis_ac += p_ptr->skill_exp[GINOU_SHIELD] * (1 + p_ptr->lev / 22) / 2000;
/* Monks get extra ac for armour _not worn_ */
if (((p_ptr->pclass == CLASS_MONK) || (p_ptr->pclass == CLASS_FORCETRAINER)) && !heavy_armor())
{
- if (!(inventory[INVEN_BODY].k_idx))
+ if (!(p_ptr->inventory_list[INVEN_BODY].k_idx))
{
p_ptr->to_a += (p_ptr->lev * 3) / 2;
p_ptr->dis_to_a += (p_ptr->lev * 3) / 2;
}
- if (!(inventory[INVEN_OUTER].k_idx) && (p_ptr->lev > 15))
+ if (!(p_ptr->inventory_list[INVEN_OUTER].k_idx) && (p_ptr->lev > 15))
{
p_ptr->to_a += ((p_ptr->lev - 13) / 3);
p_ptr->dis_to_a += ((p_ptr->lev - 13) / 3);
}
- if (!(inventory[INVEN_LARM].k_idx) && (p_ptr->lev > 10))
+ if (!(p_ptr->inventory_list[INVEN_LARM].k_idx) && (p_ptr->lev > 10))
{
p_ptr->to_a += ((p_ptr->lev - 8) / 3);
p_ptr->dis_to_a += ((p_ptr->lev - 8) / 3);
}
- if (!(inventory[INVEN_HEAD].k_idx) && (p_ptr->lev > 4))
+ if (!(p_ptr->inventory_list[INVEN_HEAD].k_idx) && (p_ptr->lev > 4))
{
p_ptr->to_a += (p_ptr->lev - 2) / 3;
p_ptr->dis_to_a += (p_ptr->lev - 2) / 3;
}
- if (!(inventory[INVEN_HANDS].k_idx))
+ if (!(p_ptr->inventory_list[INVEN_HANDS].k_idx))
{
p_ptr->to_a += (p_ptr->lev / 2);
p_ptr->dis_to_a += (p_ptr->lev / 2);
}
- if (!(inventory[INVEN_FEET].k_idx))
+ if (!(p_ptr->inventory_list[INVEN_FEET].k_idx))
{
p_ptr->to_a += (p_ptr->lev / 3);
p_ptr->dis_to_a += (p_ptr->lev / 3);
for (i = INVEN_RARM; i <= INVEN_FEET; i++)
{
ARMOUR_CLASS ac = 0;
- o_ptr = &inventory[i];
+ o_ptr = &p_ptr->inventory_list[i];
if (!o_ptr->k_idx) continue;
if (!object_is_armour(o_ptr)) continue;
if (!object_is_cursed(o_ptr)) continue;
if (has_melee_weapon(INVEN_RARM) && has_melee_weapon(INVEN_LARM))
{
int penalty1, penalty2;
- penalty1 = ((100 - p_ptr->skill_exp[GINOU_NITOURYU] / 160) - (130 - inventory[INVEN_RARM].weight) / 8);
- penalty2 = ((100 - p_ptr->skill_exp[GINOU_NITOURYU] / 160) - (130 - inventory[INVEN_LARM].weight) / 8);
- if ((inventory[INVEN_RARM].name1 == ART_QUICKTHORN) && (inventory[INVEN_LARM].name1 == ART_TINYTHORN))
+ penalty1 = ((100 - p_ptr->skill_exp[GINOU_NITOURYU] / 160) - (130 - p_ptr->inventory_list[INVEN_RARM].weight) / 8);
+ penalty2 = ((100 - p_ptr->skill_exp[GINOU_NITOURYU] / 160) - (130 - p_ptr->inventory_list[INVEN_LARM].weight) / 8);
+ if ((p_ptr->inventory_list[INVEN_RARM].name1 == ART_QUICKTHORN) && (p_ptr->inventory_list[INVEN_LARM].name1 == ART_TINYTHORN))
{
penalty1 = penalty1 / 2 - 5;
penalty2 = penalty2 / 2 - 5;
if (penalty1 > 0) penalty1 /= 2;
if (penalty2 > 0) penalty2 /= 2;
}
- else if ((inventory[INVEN_LARM].tval == TV_SWORD) && ((inventory[INVEN_LARM].sval == SV_MAIN_GAUCHE) || (inventory[INVEN_LARM].sval == SV_WAKIZASHI)))
+ else if ((p_ptr->inventory_list[INVEN_LARM].tval == TV_SWORD) && ((p_ptr->inventory_list[INVEN_LARM].sval == SV_MAIN_GAUCHE) || (p_ptr->inventory_list[INVEN_LARM].sval == SV_WAKIZASHI)))
{
penalty1 = MAX(0, penalty1 - 10);
penalty2 = MAX(0, penalty2 - 10);
}
- if ((inventory[INVEN_RARM].name1 == ART_MUSASI_KATANA) && (inventory[INVEN_LARM].name1 == ART_MUSASI_WAKIZASI))
+ if ((p_ptr->inventory_list[INVEN_RARM].name1 == ART_MUSASI_KATANA) && (p_ptr->inventory_list[INVEN_LARM].name1 == ART_MUSASI_WAKIZASI))
{
penalty1 = MIN(0, penalty1);
penalty2 = MIN(0, penalty2);
}
else
{
- if ((inventory[INVEN_RARM].name1 == ART_MUSASI_KATANA) && (penalty1 > 0))
+ if ((p_ptr->inventory_list[INVEN_RARM].name1 == ART_MUSASI_KATANA) && (penalty1 > 0))
penalty1 /= 2;
- if ((inventory[INVEN_LARM].name1 == ART_MUSASI_WAKIZASI) && (penalty2 > 0))
+ if ((p_ptr->inventory_list[INVEN_LARM].name1 == ART_MUSASI_WAKIZASI) && (penalty2 > 0))
penalty2 /= 2;
}
- if (inventory[INVEN_RARM].tval == TV_POLEARM) penalty1 += 10;
- if (inventory[INVEN_LARM].tval == TV_POLEARM) penalty2 += 10;
+ if (p_ptr->inventory_list[INVEN_RARM].tval == TV_POLEARM) penalty1 += 10;
+ if (p_ptr->inventory_list[INVEN_LARM].tval == TV_POLEARM) penalty2 += 10;
p_ptr->to_h[0] -= (s16b)penalty1;
p_ptr->to_h[1] -= (s16b)penalty2;
p_ptr->dis_to_h[0] -= (s16b)penalty1;
/* Examine the "current bow" */
- o_ptr = &inventory[INVEN_BOW];
+ o_ptr = &p_ptr->inventory_list[INVEN_BOW];
/* It is hard to carholdry a heavy bow */
p_ptr->heavy_shoot = is_heavy_shoot(o_ptr);
for (i = 0; i < 2; i++)
{
/* Examine the "main weapon" */
- o_ptr = &inventory[INVEN_RARM + i];
+ o_ptr = &p_ptr->inventory_list[INVEN_RARM + i];
object_flags(o_ptr, flgs);
if (p_ptr->riding) p_ptr->levitation = riding_levitation;
- monk_armour_aux = FALSE;
+ p_ptr->monk_armour_aux = FALSE;
if (heavy_armor())
{
- monk_armour_aux = TRUE;
+ p_ptr->monk_armour_aux = TRUE;
}
for (i = 0; i < 2; i++)
{
if (has_melee_weapon(INVEN_RARM + i))
{
- OBJECT_TYPE_VALUE tval = inventory[INVEN_RARM + i].tval - TV_WEAPON_BEGIN;
- OBJECT_SUBTYPE_VALUE sval = inventory[INVEN_RARM + i].sval;
+ OBJECT_TYPE_VALUE tval = p_ptr->inventory_list[INVEN_RARM + i].tval - TV_WEAPON_BEGIN;
+ OBJECT_SUBTYPE_VALUE sval = p_ptr->inventory_list[INVEN_RARM + i].sval;
p_ptr->to_h[i] += (p_ptr->weapon_exp[tval][sval] - WEAPON_EXP_BEGINNER) / 200;
p_ptr->dis_to_h[i] += (p_ptr->weapon_exp[tval][sval] - WEAPON_EXP_BEGINNER) / 200;
}
else if (p_ptr->pclass == CLASS_NINJA)
{
- if ((s_info[CLASS_NINJA].w_max[tval][sval] <= WEAPON_EXP_BEGINNER) || (inventory[INVEN_LARM - i].tval == TV_SHIELD))
+ if ((s_info[CLASS_NINJA].w_max[tval][sval] <= WEAPON_EXP_BEGINNER) || (p_ptr->inventory_list[INVEN_LARM - i].tval == TV_SHIELD))
{
p_ptr->to_h[i] -= 40;
p_ptr->dis_to_h[i] -= 40;
{
msg_print(_("こんな重い弓を装備しているのは大変だ。", "You have trouble wielding such a heavy bow."));
}
- else if (inventory[INVEN_BOW].k_idx)
+ else if (p_ptr->inventory_list[INVEN_BOW].k_idx)
{
msg_print(_("この弓なら装備していても辛くない。", "You have no trouble wielding your bow."));
}
if (p_ptr->icky_wield[i])
{
msg_print(_("今の装備はどうも自分にふさわしくない気がする。", "You do not feel comfortable with your weapon."));
- if (is_loading_now)
+ if (current_world_ptr->is_loading_now)
{
chg_virtue(V_FAITH, -1);
}
p_ptr->old_riding_ryoute = p_ptr->riding_ryoute;
}
- if (((p_ptr->pclass == CLASS_MONK) || (p_ptr->pclass == CLASS_FORCETRAINER) || (p_ptr->pclass == CLASS_NINJA)) && (monk_armour_aux != monk_notify_aux))
+ if (((p_ptr->pclass == CLASS_MONK) || (p_ptr->pclass == CLASS_FORCETRAINER) || (p_ptr->pclass == CLASS_NINJA)) && (p_ptr->monk_armour_aux != p_ptr->monk_notify_aux))
{
if (heavy_armor())
{
msg_print(_("装備が重くてバランスを取れない。", "The weight of your armor disrupts your balance."));
- if (is_loading_now)
+ if (current_world_ptr->is_loading_now)
{
chg_virtue(V_HARMONY, -1);
}
msg_print(_("バランスがとれるようになった。", "You regain your balance."));
}
- monk_notify_aux = monk_armour_aux;
+ p_ptr->monk_notify_aux = p_ptr->monk_armour_aux;
}
for (i = 0; i < INVEN_PACK; i++)
{
#if 0
- if ((inventory[i].tval == TV_SORCERY_BOOK) && (inventory[i].sval == 2)) have_dd_s = TRUE;
- if ((inventory[i].tval == TV_TRUMP_BOOK) && (inventory[i].sval == 1)) have_dd_t = TRUE;
+ if ((p_ptr->inventory_list[i].tval == TV_SORCERY_BOOK) && (p_ptr->inventory_list[i].sval == 2)) have_dd_s = TRUE;
+ if ((p_ptr->inventory_list[i].tval == TV_TRUMP_BOOK) && (p_ptr->inventory_list[i].sval == 1)) have_dd_t = TRUE;
#endif
- if ((inventory[i].tval == TV_NATURE_BOOK) && (inventory[i].sval == 2)) have_sw = TRUE;
- if ((inventory[i].tval == TV_CRAFT_BOOK) && (inventory[i].sval == 2)) have_kabe = TRUE;
+ if ((p_ptr->inventory_list[i].tval == TV_NATURE_BOOK) && (p_ptr->inventory_list[i].sval == 2)) have_sw = TRUE;
+ if ((p_ptr->inventory_list[i].tval == TV_CRAFT_BOOK) && (p_ptr->inventory_list[i].sval == 2)) have_kabe = TRUE;
}
for (this_o_idx = current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].o_idx; this_o_idx; this_o_idx = next_o_idx)
p_ptr->align = 0;
int i, j, neutral[2];
- for (m_idx = m_max - 1; m_idx >= 1; m_idx--)
+ for (m_idx = current_floor_ptr->m_max - 1; m_idx >= 1; m_idx--)
{
monster_type *m_ptr;
monster_race *r_ptr;
{
if (has_melee_weapon(INVEN_RARM + i))
{
- if (inventory[INVEN_RARM + i].name1 == ART_IRON_BALL) p_ptr->align -= 1000;
+ if (p_ptr->inventory_list[INVEN_RARM + i].name1 == ART_IRON_BALL) p_ptr->align -= 1000;
}
}
/* Loop through all wielded items */
for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
{
- o_ptr = &inventory[i];
+ o_ptr = &p_ptr->inventory_list[i];
/* Skip empty slots */
if (!o_ptr->k_idx) continue;
p_ptr->cumber_glove = FALSE;
/* Get the gloves */
- o_ptr = &inventory[INVEN_HANDS];
+ o_ptr = &p_ptr->inventory_list[INVEN_HANDS];
/* Examine the gloves */
object_flags(o_ptr, flgs);
/* Weigh the armor */
cur_wgt = 0;
- if (inventory[INVEN_RARM].tval > TV_SWORD) cur_wgt += inventory[INVEN_RARM].weight;
- if (inventory[INVEN_LARM].tval > TV_SWORD) cur_wgt += inventory[INVEN_LARM].weight;
- cur_wgt += inventory[INVEN_BODY].weight;
- cur_wgt += inventory[INVEN_HEAD].weight;
- cur_wgt += inventory[INVEN_OUTER].weight;
- cur_wgt += inventory[INVEN_HANDS].weight;
- cur_wgt += inventory[INVEN_FEET].weight;
+ if (p_ptr->inventory_list[INVEN_RARM].tval > TV_SWORD) cur_wgt += p_ptr->inventory_list[INVEN_RARM].weight;
+ if (p_ptr->inventory_list[INVEN_LARM].tval > TV_SWORD) cur_wgt += p_ptr->inventory_list[INVEN_LARM].weight;
+ cur_wgt += p_ptr->inventory_list[INVEN_BODY].weight;
+ cur_wgt += p_ptr->inventory_list[INVEN_HEAD].weight;
+ cur_wgt += p_ptr->inventory_list[INVEN_OUTER].weight;
+ cur_wgt += p_ptr->inventory_list[INVEN_HANDS].weight;
+ cur_wgt += p_ptr->inventory_list[INVEN_FEET].weight;
/* Subtract a percentage of maximum mana. */
switch (p_ptr->pclass)
case CLASS_FORCETRAINER:
case CLASS_SORCERER:
{
- if (inventory[INVEN_RARM].tval <= TV_SWORD) cur_wgt += inventory[INVEN_RARM].weight;
- if (inventory[INVEN_LARM].tval <= TV_SWORD) cur_wgt += inventory[INVEN_LARM].weight;
+ if (p_ptr->inventory_list[INVEN_RARM].tval <= TV_SWORD) cur_wgt += p_ptr->inventory_list[INVEN_RARM].weight;
+ if (p_ptr->inventory_list[INVEN_LARM].tval <= TV_SWORD) cur_wgt += p_ptr->inventory_list[INVEN_LARM].weight;
break;
}
case CLASS_BARD:
case CLASS_TOURIST:
{
- if (inventory[INVEN_RARM].tval <= TV_SWORD) cur_wgt += inventory[INVEN_RARM].weight * 2 / 3;
- if (inventory[INVEN_LARM].tval <= TV_SWORD) cur_wgt += inventory[INVEN_LARM].weight * 2 / 3;
+ if (p_ptr->inventory_list[INVEN_RARM].tval <= TV_SWORD) cur_wgt += p_ptr->inventory_list[INVEN_RARM].weight * 2 / 3;
+ if (p_ptr->inventory_list[INVEN_LARM].tval <= TV_SWORD) cur_wgt += p_ptr->inventory_list[INVEN_LARM].weight * 2 / 3;
break;
}
case CLASS_BEASTMASTER:
case CLASS_MIRROR_MASTER:
{
- if (inventory[INVEN_RARM].tval <= TV_SWORD) cur_wgt += inventory[INVEN_RARM].weight / 2;
- if (inventory[INVEN_LARM].tval <= TV_SWORD) cur_wgt += inventory[INVEN_LARM].weight / 2;
+ if (p_ptr->inventory_list[INVEN_RARM].tval <= TV_SWORD) cur_wgt += p_ptr->inventory_list[INVEN_RARM].weight / 2;
+ if (p_ptr->inventory_list[INVEN_LARM].tval <= TV_SWORD) cur_wgt += p_ptr->inventory_list[INVEN_LARM].weight / 2;
break;
}
case CLASS_RED_MAGE:
case CLASS_WARRIOR_MAGE:
{
- if (inventory[INVEN_RARM].tval <= TV_SWORD) cur_wgt += inventory[INVEN_RARM].weight / 3;
- if (inventory[INVEN_LARM].tval <= TV_SWORD) cur_wgt += inventory[INVEN_LARM].weight / 3;
+ if (p_ptr->inventory_list[INVEN_RARM].tval <= TV_SWORD) cur_wgt += p_ptr->inventory_list[INVEN_RARM].weight / 3;
+ if (p_ptr->inventory_list[INVEN_LARM].tval <= TV_SWORD) cur_wgt += p_ptr->inventory_list[INVEN_LARM].weight / 3;
break;
}
case CLASS_PALADIN:
case CLASS_CHAOS_WARRIOR:
{
- if (inventory[INVEN_RARM].tval <= TV_SWORD) cur_wgt += inventory[INVEN_RARM].weight / 5;
- if (inventory[INVEN_LARM].tval <= TV_SWORD) cur_wgt += inventory[INVEN_LARM].weight / 5;
+ if (p_ptr->inventory_list[INVEN_RARM].tval <= TV_SWORD) cur_wgt += p_ptr->inventory_list[INVEN_RARM].weight / 5;
+ if (p_ptr->inventory_list[INVEN_LARM].tval <= TV_SWORD) cur_wgt += p_ptr->inventory_list[INVEN_LARM].weight / 5;
break;
}
object_type *q_ptr;
BIT_FLAGS flgs[TR_FLAG_SIZE];
- /* Scan the usable inventory */
+ /* Scan the usable p_ptr->inventory_list */
for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
{
- q_ptr = &inventory[i];
-
- /* Skip non-objects */
+ q_ptr = &p_ptr->inventory_list[i];
if (!q_ptr->k_idx) continue;
/* Do not apply current equip */
if (i == INVEN_BOW) continue;
- /* Extract the item flags */
object_flags(q_ptr, flgs);
/* Boost shots */
*/
bool has_melee_weapon(int i)
{
- return ((inventory[i].k_idx && object_is_melee_weapon(&inventory[i])) ? TRUE : FALSE);
+ return ((p_ptr->inventory_list[i].k_idx && object_is_melee_weapon(&p_ptr->inventory_list[i])) ? TRUE : FALSE);
}
/*!
{
BIT_FLAGS16 status = EMPTY_HAND_NONE;
- if (!inventory[INVEN_RARM].k_idx) status |= EMPTY_HAND_RARM;
- if (!inventory[INVEN_LARM].k_idx) status |= EMPTY_HAND_LARM;
+ if (!p_ptr->inventory_list[INVEN_RARM].k_idx) status |= EMPTY_HAND_RARM;
+ if (!p_ptr->inventory_list[INVEN_LARM].k_idx) status |= EMPTY_HAND_LARM;
if (riding_control && (status != EMPTY_HAND_NONE) && p_ptr->riding && !(p_ptr->pet_extra_flags & PF_RYOUTE))
{
if ((p_ptr->pclass != CLASS_MONK) && (p_ptr->pclass != CLASS_FORCETRAINER) && (p_ptr->pclass != CLASS_NINJA)) return FALSE;
/* Weight the armor */
- if (inventory[INVEN_RARM].tval > TV_SWORD) monk_arm_wgt += inventory[INVEN_RARM].weight;
- if (inventory[INVEN_LARM].tval > TV_SWORD) monk_arm_wgt += inventory[INVEN_LARM].weight;
- monk_arm_wgt += inventory[INVEN_BODY].weight;
- monk_arm_wgt += inventory[INVEN_HEAD].weight;
- monk_arm_wgt += inventory[INVEN_OUTER].weight;
- monk_arm_wgt += inventory[INVEN_HANDS].weight;
- monk_arm_wgt += inventory[INVEN_FEET].weight;
+ if (p_ptr->inventory_list[INVEN_RARM].tval > TV_SWORD) monk_arm_wgt += p_ptr->inventory_list[INVEN_RARM].weight;
+ if (p_ptr->inventory_list[INVEN_LARM].tval > TV_SWORD) monk_arm_wgt += p_ptr->inventory_list[INVEN_LARM].weight;
+ monk_arm_wgt += p_ptr->inventory_list[INVEN_BODY].weight;
+ monk_arm_wgt += p_ptr->inventory_list[INVEN_HEAD].weight;
+ monk_arm_wgt += p_ptr->inventory_list[INVEN_OUTER].weight;
+ monk_arm_wgt += p_ptr->inventory_list[INVEN_HANDS].weight;
+ monk_arm_wgt += p_ptr->inventory_list[INVEN_FEET].weight;
return (monk_arm_wgt > (100 + (p_ptr->lev * 4)));
}
for (i = 0; i < INVEN_PACK; i++)
{
- o_ptr = &inventory[i];
+ o_ptr = &p_ptr->inventory_list[i];
if (o_ptr->k_idx && check_book_realm(o_ptr->tval, o_ptr->sval)) return FALSE;
}
}
else power *= 2;
- if (!is_loading_now)
+ if (!current_world_ptr->is_loading_now)
return; /* No effect yet, just loaded... */
if (!m_ptr->ml)