OSDN Git Service

[Refactor] #38824 get_item() を choose_object() に置換完了。 / Replaced get_item() to choose...
[hengband/hengband.git] / src / spells3.c
index 4df7378..450cf07 100644 (file)
@@ -14,6 +14,7 @@
 #include "angband.h"
 #include "object-hook.h"
 #include "melee.h"
+#include "player-status.h"
 
 /*! テレポート先探索の試行数 / Maximum number of tries for teleporting */
 #define MAX_TRIES 100
@@ -118,13 +119,8 @@ bool teleport_away(MONSTER_IDX m_idx, POSITION dis, BIT_FLAGS mode)
        /* Forget the counter target */
        reset_target(m_ptr);
 
-       /* Update the monster (new location) */
        update_monster(m_idx, TRUE);
-
-       /* Redraw the old grid */
        lite_spot(oy, ox);
-
-       /* Redraw the new grid */
        lite_spot(ny, nx);
 
        if (r_info[m_ptr->r_idx].flags7 & (RF7_LITE_MASK | RF7_DARK_MASK))
@@ -223,13 +219,8 @@ void teleport_monster_to(MONSTER_IDX m_idx, POSITION ty, POSITION tx, int power,
        m_ptr->fy = ny;
        m_ptr->fx = nx;
 
-       /* Update the monster (new location) */
        update_monster(m_idx, TRUE);
-
-       /* Redraw the old grid */
        lite_spot(oy, ox);
-
-       /* Redraw the new grid */
        lite_spot(ny, nx);
 
        if (r_info[m_ptr->r_idx].flags7 & (RF7_LITE_MASK | RF7_DARK_MASK))
@@ -933,7 +924,7 @@ bool reset_recall(void)
                        do_cmd_write_nikki(NIKKI_TRUMP, select_dungeon, _("フロア・リセットで", "using a scroll of reset recall"));
                                        /* Accept request */
 #ifdef JP
-msg_format("%sの帰還レベルを %d 階にセット。", d_name+d_info[select_dungeon].name, dummy, dummy * 50);
+               msg_format("%sの帰還レベルを %d 階にセット。", d_name+d_info[select_dungeon].name, dummy, dummy * 50);
 #else
                msg_format("Recall depth set to level %d (%d').", dummy, dummy * 50);
 #endif
@@ -1046,8 +1037,6 @@ msg_format("%s(%c)は劣化を跳ね返した!",o_name, index_to_label(t) );
 
                chg_virtue(V_HARMONY, 1);
                chg_virtue(V_ENCHANT, -2);
-
-               /* Recalculate bonuses */
                p_ptr->update |= (PU_BONUS);
 
                p_ptr->window |= (PW_EQUIP | PW_PLAYER);
@@ -1211,20 +1200,8 @@ void brand_weapon(int brand_type)
        q = _("どの武器を強化しますか? ", "Enchant which weapon? ");
        s = _("強化できる武器がない。", "You have nothing to enchant.");
 
-       if (!get_item(&item, q, s, (USE_EQUIP | IGNORE_BOTHHAND_SLOT))) return;
-
-       /* Get the item (in the pack) */
-       if (item >= 0)
-       {
-               o_ptr = &inventory[item];
-       }
-
-       /* Get the item (on the floor) */
-       else
-       {
-               o_ptr = &o_list[0 - item];
-       }
-
+       o_ptr = choose_object(&item, q, s, (USE_EQUIP | IGNORE_BOTHHAND_SLOT));
+       if (!o_ptr) return;
 
        /* you can never modify artifacts / ego-items */
        /* you can never modify cursed items */
@@ -1532,13 +1509,12 @@ void call_the_(void)
 #ifdef JP
                msg_format("あなたは%sを壁に近すぎる場所で唱えてしまった!",
                        ((mp_ptr->spell_book == TV_LIFE_BOOK) ? "祈り" : "呪文"));
-               msg_print("大きな爆発音があった!");
 #else
                msg_format("You %s the %s too close to a wall!",
                        ((mp_ptr->spell_book == TV_LIFE_BOOK) ? "recite" : "cast"),
                        ((mp_ptr->spell_book == TV_LIFE_BOOK) ? "prayer" : "spell"));
-               msg_print("There is a loud explosion!");
 #endif
+               msg_print(_("大きな爆発音があった!", "There is a loud explosion!"));
 
                if (one_in_(666))
                {
@@ -1625,10 +1601,8 @@ void fetch(DIRECTION dir, WEIGHT wgt, bool require_los)
        }
        else
        {
-               /* Use a direction */
-               ty = p_ptr->y; /* Where to drop the item */
+               ty = p_ptr->y; 
                tx = p_ptr->x;
-
                do
                {
                        ty += ddy[dir];
@@ -1655,8 +1629,8 @@ void fetch(DIRECTION dir, WEIGHT wgt, bool require_los)
        cave[p_ptr->y][p_ptr->x].o_idx = i; /* 'move' it */
 
        o_ptr->next_o_idx = 0;
-       o_ptr->iy = (byte)p_ptr->y;
-       o_ptr->ix = (byte)p_ptr->x;
+       o_ptr->iy = p_ptr->y;
+       o_ptr->ix = p_ptr->x;
 
        object_desc(o_name, o_ptr, OD_NAME_ONLY);
        msg_format(_("%^sがあなたの足元に飛んできた。", "%^s flies through the air to your feet."), o_name);
@@ -1715,7 +1689,6 @@ bool warding_glyph(void)
        cave[p_ptr->y][p_ptr->x].mimic = feat_glyph;
 
        note_spot(p_ptr->y, p_ptr->x);
-
        lite_spot(p_ptr->y, p_ptr->x);
 
        return TRUE;
@@ -1741,9 +1714,7 @@ bool place_mirror(void)
        cave[p_ptr->y][p_ptr->x].info |= CAVE_GLOW;
 
        note_spot(p_ptr->y, p_ptr->x);
-
        lite_spot(p_ptr->y, p_ptr->x);
-
        update_local_illumination(p_ptr->y, p_ptr->x);
 
        return TRUE;
@@ -1767,8 +1738,7 @@ bool explosive_rune(void)
        cave[p_ptr->y][p_ptr->x].info |= CAVE_OBJECT;
        cave[p_ptr->y][p_ptr->x].mimic = feat_explosive_rune;
 
-       note_spot(p_ptr->y, p_ptr->x);
-       
+       note_spot(p_ptr->y, p_ptr->x);  
        lite_spot(p_ptr->y, p_ptr->x);
 
        return TRUE;
@@ -1793,7 +1763,6 @@ void identify_pack(void)
                /* Skip non-objects */
                if (!o_ptr->k_idx) continue;
 
-               /* Identify it */
                identify_item(o_ptr);
 
                /* Auto-inscription */
@@ -1927,20 +1896,8 @@ bool alchemy(void)
        q = _("どのアイテムを金に変えますか?", "Turn which item to gold? ");
        s = _("金に変えられる物がありません。", "You have nothing to turn to gold.");
 
-       if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return (FALSE);
-
-       /* Get the item (in the pack) */
-       if (item >= 0)
-       {
-               o_ptr = &inventory[item];
-       }
-
-       /* Get the item (on the floor) */
-       else
-       {
-               o_ptr = &o_list[0 - item];
-       }
-
+       o_ptr = choose_object(&item, q, s, (USE_INVEN | USE_FLOOR));
+       if (!o_ptr) return (FALSE);
 
        /* See how many items */
        if (o_ptr->number > 1)
@@ -1952,7 +1909,6 @@ bool alchemy(void)
                if (amt <= 0) return FALSE;
        }
 
-
        old_number = o_ptr->number;
        o_ptr->number = amt;
        object_desc(o_name, o_ptr, 0);
@@ -2069,7 +2025,6 @@ bool enchant(object_type *o_ptr, int n, int eflag)
        bool    a = object_is_artifact(o_ptr);
        bool    force = (eflag & ENCH_FORCE);
 
-
        /* Large piles resist enchantment */
        prob = o_ptr->number * 100;
 
@@ -2145,12 +2100,8 @@ bool enchant(object_type *o_ptr, int n, int eflag)
        /* Failure */
        if (!res) return (FALSE);
 
-       /* Recalculate bonuses */
-       p_ptr->update |= (PU_BONUS);
-
        /* Combine / Reorder the pack (later) */
-       p_ptr->notice |= (PN_COMBINE | PN_REORDER);
-
+       p_ptr->update |= (PU_BONUS | PU_COMBINE | PU_REORDER);
        p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER);
 
        calc_android_exp();
@@ -2188,19 +2139,8 @@ bool enchant_spell(HIT_PROB num_hit, HIT_POINT num_dam, ARMOUR_CLASS num_ac)
        q = _("どのアイテムを強化しますか? ", "Enchant which item? ");
        s = _("強化できるアイテムがない。", "You have nothing to enchant.");
 
-       if (!get_item(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT))) return (FALSE);
-
-       /* Get the item (in the pack) */
-       if (item >= 0)
-       {
-               o_ptr = &inventory[item];
-       }
-
-       /* Get the item (on the floor) */
-       else
-       {
-               o_ptr = &o_list[0 - item];
-       }
+       o_ptr = choose_object(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT));
+       if (!o_ptr) return (FALSE);
 
        object_desc(o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
 #ifdef JP
@@ -2238,10 +2178,10 @@ bool enchant_spell(HIT_PROB num_hit, HIT_POINT num_dam, ARMOUR_CLASS num_ac)
 bool artifact_scroll(void)
 {
        OBJECT_IDX item;
-       bool            okay = FALSE;
-       object_type     *o_ptr;
+       bool okay = FALSE;
+       object_type *o_ptr;
        GAME_TEXT o_name[MAX_NLEN];
-       cptr            q, s;
+       cptr q, s;
 
        /* Enchant weapon/armour */
        item_tester_hook = item_tester_hook_nameless_weapon_armour;
@@ -2249,18 +2189,8 @@ bool artifact_scroll(void)
        q = _("どのアイテムを強化しますか? ", "Enchant which item? ");
        s = _("強化できるアイテムがない。", "You have nothing to enchant.");
 
-       if (!get_item(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT))) return (FALSE);
-
-       /* Get the item (in the pack) */
-       if (item >= 0)
-       {
-               o_ptr = &inventory[item];
-       }
-       /* Get the item (on the floor) */
-       else
-       {
-               o_ptr = &o_list[0 - item];
-       }
+       o_ptr = choose_object(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT));
+       if (!o_ptr) return (FALSE);
 
        object_desc(o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
 #ifdef JP
@@ -2298,8 +2228,7 @@ bool artifact_scroll(void)
 #ifdef JP
                msg_format("%sは既に強化されています!", o_name );
 #else
-               msg_format("The %s %s already %s!",
-                   o_name, ((o_ptr->number > 1) ? "are" : "is"),
+               msg_format("The %s %s already %s!", o_name, ((o_ptr->number > 1) ? "are" : "is"),
                    ((o_ptr->number > 1) ? "customized items" : "a customized item"));
 #endif
        }
@@ -2308,21 +2237,20 @@ bool artifact_scroll(void)
        {
                if (o_ptr->number > 1)
                {
+                       msg_print(_("複数のアイテムに魔法をかけるだけのエネルギーはありません!", "Not enough energy to enchant more than one object!"));
 #ifdef JP
-                       msg_print("複数のアイテムに魔法をかけるだけのエネルギーはありません!");
                        msg_format("%d 個の%sが壊れた!",(o_ptr->number)-1, o_name);
 #else
-                       msg_print("Not enough enough energy to enchant more than one object!");
                        msg_format("%d of your %s %s destroyed!",(o_ptr->number)-1, o_name, (o_ptr->number>2?"were":"was"));
 #endif
 
                        if (item >= 0)
                        {
-                               inven_item_increase(item, 1-(o_ptr->number));
+                               inven_item_increase(item, 1 - (o_ptr->number));
                        }
                        else
                        {
-                               floor_item_increase(0-item, 1-(o_ptr->number));
+                               floor_item_increase(0 - item, 1 - (o_ptr->number));
                        }
                }
                okay = create_artifact(o_ptr, TRUE);
@@ -2381,12 +2309,7 @@ bool identify_item(object_type *o_ptr)
        /* Player touches it */
        o_ptr->marked |= OM_TOUCHED;
 
-       /* Recalculate bonuses */
-       p_ptr->update |= (PU_BONUS);
-
-       /* Combine / Reorder the pack (later) */
-       p_ptr->notice |= (PN_COMBINE | PN_REORDER);
-
+       p_ptr->update |= (PU_BONUS | PU_COMBINE | PU_REORDER);
        p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER);
 
        strcpy(record_o_name, o_name);
@@ -2440,21 +2363,9 @@ bool ident_spell(bool only_equip)
 
        s = _("鑑定するべきアイテムがない。", "You have nothing to identify.");
 
-       if (!get_item(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT))) return (FALSE);
-
-       /* Get the item (in the pack) */
-       if (item >= 0)
-       {
-               o_ptr = &inventory[item];
-       }
-
-       /* Get the item (on the floor) */
-       else
-       {
-               o_ptr = &o_list[0 - item];
-       }
+       o_ptr = choose_object(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT));
+       if (!o_ptr) return (FALSE);
 
-       /* Identify it */
        old_known = identify_item(o_ptr);
 
        object_desc(o_name, o_ptr, 0);
@@ -2502,27 +2413,16 @@ bool mundane_spell(bool only_equip)
        q = _("どれを使いますか?", "Use which item? ");
        s = _("使えるものがありません。", "You have nothing you can use.");
 
-       if (!get_item(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT))) return (FALSE);
-
-       /* Get the item (in the pack) */
-       if (item >= 0)
-       {
-               o_ptr = &inventory[item];
-       }
-
-       /* Get the item (on the floor) */
-       else
-       {
-               o_ptr = &o_list[0 - item];
-       }
+       o_ptr = choose_object(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT));
+       if (!o_ptr) return (FALSE);
 
        msg_print(_("まばゆい閃光が走った!", "There is a bright flash of light!"));
        {
                POSITION iy = o_ptr->iy;                 /* Y-position on map, or zero */
                POSITION ix = o_ptr->ix;                 /* X-position on map, or zero */
-               s16b next_o_idx = o_ptr->next_o_idx; /* Next object in stack (if any) */
+               OBJECT_IDX next_o_idx = o_ptr->next_o_idx; /* Next object in stack (if any) */
                byte marked = o_ptr->marked;         /* Object is marked */
-               s16b weight = o_ptr->number * o_ptr->weight;
+               WEIGHT weight = o_ptr->number * o_ptr->weight;
                u16b inscription = o_ptr->inscription;
 
                /* Wipe it clean */
@@ -2579,21 +2479,9 @@ bool identify_fully(bool only_equip)
 
        s = _("*鑑定*するべきアイテムがない。", "You have nothing to *identify*.");
 
-       if (!get_item(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT))) return (FALSE);
-
-       /* Get the item (in the pack) */
-       if (item >= 0)
-       {
-               o_ptr = &inventory[item];
-       }
-
-       /* Get the item (on the floor) */
-       else
-       {
-               o_ptr = &o_list[0 - item];
-       }
+       o_ptr = choose_object(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT));
+       if (!o_ptr) return (FALSE);
 
-       /* Identify it */
        old_known = identify_item(o_ptr);
 
        /* Mark the item as fully known */
@@ -2668,19 +2556,8 @@ bool recharge(int power)
        q = _("どのアイテムに魔力を充填しますか? ", "Recharge which item? ");
        s = _("魔力を充填すべきアイテムがない。", "You have nothing to recharge.");
 
-       if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return (FALSE);
-
-       /* Get the item (in the pack) */
-       if (item >= 0)
-       {
-               o_ptr = &inventory[item];
-       }
-
-       /* Get the item (on the floor) */
-       else
-       {
-               o_ptr = &o_list[0 - item];
-       }
+       o_ptr = choose_object(&item, q, s, (USE_INVEN | USE_FLOOR));
+       if (!o_ptr) return (FALSE);
 
        /* Get the object kind. */
        k_ptr = &k_info[o_ptr->k_idx];
@@ -2923,8 +2800,7 @@ bool recharge(int power)
        }
 
        /* Combine / Reorder the pack (later) */
-       p_ptr->notice |= (PN_COMBINE | PN_REORDER);
-
+       p_ptr->update |= (PU_COMBINE | PU_REORDER);
        p_ptr->window |= (PW_INVEN);
 
        /* Something was done */
@@ -2951,20 +2827,8 @@ bool bless_weapon(void)
        q = _("どのアイテムを祝福しますか?", "Bless which weapon? ");
        s = _("祝福できる武器がありません。", "You have weapon to bless.");
 
-       if (!get_item(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT)))
-               return FALSE;
-
-       /* Get the item (in the pack) */
-       if (item >= 0)
-       {
-               o_ptr = &inventory[item];
-       }
-
-       /* Get the item (on the floor) */
-       else
-       {
-               o_ptr = &o_list[0 - item];
-       }
+       o_ptr = choose_object(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT));
+       if (!o_ptr) return FALSE;
 
        object_desc(o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
 
@@ -3018,8 +2882,7 @@ bool bless_weapon(void)
        if (have_flag(flgs, TR_BLESSED))
        {
 #ifdef JP
-msg_format("%s は既に祝福されている。",
-    o_name    );
+               msg_format("%s は既に祝福されている。", o_name);
 #else
                msg_format("%s %s %s blessed already.",
                    ((item >= 0) ? "Your" : "The"), o_name,
@@ -3079,22 +2942,17 @@ msg_format("%s は既に祝福されている。",
                        msg_print(_("周囲が凡庸な雰囲気で満ちた...", "There is a static feeling in the air..."));
 
 #ifdef JP
-msg_format("%s は劣化した!",
-     o_name    );
+                       msg_format("%s は劣化した!", o_name);
 #else
-                       msg_format("%s %s %s disenchanted!",
-                           ((item >= 0) ? "Your" : "The"), o_name,
-                           ((o_ptr->number > 1) ? "were" : "was"));
+                       msg_format("%s %s %s disenchanted!", ((item >= 0) ? "Your" : "The"), o_name,
+                               ((o_ptr->number > 1) ? "were" : "was"));
 #endif
 
                }
        }
 
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
-
        p_ptr->window |= (PW_EQUIP | PW_PLAYER);
-
        calc_android_exp();
 
        return TRUE;
@@ -3120,20 +2978,8 @@ bool pulish_shield(void)
        q = _("どの盾を磨きますか?", "Pulish which weapon? ");
        s = _("磨く盾がありません。", "You have weapon to pulish.");
 
-       if (!get_item(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT)))
-               return FALSE;
-
-       /* Get the item (in the pack) */
-       if (item >= 0)
-       {
-               o_ptr = &inventory[item];
-       }
-
-       /* Get the item (on the floor) */
-       else
-       {
-               o_ptr = &o_list[0 - item];
-       }
+       o_ptr = choose_object(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT));
+       if (!o_ptr) return FALSE;
 
        object_desc(o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
 
@@ -3351,7 +3197,7 @@ void display_spell_list(void)
        TERM_LEN y, x;
        int m[9];
        const magic_type *s_ptr;
-       char name[MAX_NLEN];
+       GAME_TEXT name[MAX_NLEN];
        char out_val[160];
 
 
@@ -3999,7 +3845,7 @@ bool rustproof(void)
        OBJECT_IDX item;
        object_type *o_ptr;
        GAME_TEXT o_name[MAX_NLEN];
-       cptr        q, s;
+       cptr q, s;
 
        /* Select a piece of armour */
        item_tester_hook = object_is_armour;
@@ -4007,19 +3853,8 @@ bool rustproof(void)
        q = _("どの防具に錆止めをしますか?", "Rustproof which piece of armour? ");
        s = _("錆止めできるものがありません。", "You have nothing to rustproof.");
 
-       if (!get_item(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT))) return FALSE;
-
-       /* Get the item (in the pack) */
-       if (item >= 0)
-       {
-               o_ptr = &inventory[item];
-       }
-
-       /* Get the item (on the floor) */
-       else
-       {
-               o_ptr = &o_list[0 - item];
-       }
+       o_ptr = choose_object(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT));
+       if (!o_ptr) return FALSE;
 
        object_desc(o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
 
@@ -4106,8 +3941,6 @@ msg_format("%sが%sを包み込もうとしたが、%sはそれを跳ね返し
 
                /* Break it */
                o_ptr->ident |= (IDENT_BROKEN);
-
-               /* Recalculate bonuses */
                p_ptr->update |= (PU_BONUS);
 
                /* Recalculate mana */
@@ -4172,8 +4005,6 @@ bool curse_weapon_object(bool force, object_type *o_ptr)
 
                /* Break it */
                o_ptr->ident |= (IDENT_BROKEN);
-
-               /* Recalculate bonuses */
                p_ptr->update |= (PU_BONUS);
 
                /* Recalculate mana */
@@ -4251,7 +4082,7 @@ bool brand_bolts(void)
  * @details
  * Note that this function is one of the more "dangerous" ones...
  */
-static IDX poly_r_idx(MONRACE_IDX r_idx)
+static MONRACE_IDX poly_r_idx(MONRACE_IDX r_idx)
 {
        monster_race *r_ptr = &r_info[r_idx];
 
@@ -4492,16 +4323,8 @@ bool eat_magic(int power)
        q = _("どのアイテムから魔力を吸収しますか?", "Drain which item? ");
        s = _("魔力を吸収できるアイテムがありません。", "You have nothing to drain.");
 
-       if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return FALSE;
-
-       if (item >= 0)
-       {
-               o_ptr = &inventory[item];
-       }
-       else
-       {
-               o_ptr = &o_list[0 - item];
-       }
+       o_ptr = choose_object(&item, q, s, (USE_INVEN | USE_FLOOR));
+       if (!o_ptr) return FALSE;
 
        k_ptr = &k_info[o_ptr->k_idx];
        lev = k_info[o_ptr->k_idx].level;
@@ -4737,7 +4560,7 @@ bool eat_magic(int power)
        /* Redraw mana and hp */
        p_ptr->redraw |= (PR_MANA);
 
-       p_ptr->notice |= (PN_COMBINE | PN_REORDER);
+       p_ptr->update |= (PU_COMBINE | PU_REORDER);
        p_ptr->window |= (PW_INVEN);
 
        return TRUE;