o_ptr->ds = k_ptr->ds;
/* Default activation */
- if (k_ptr->act_idx > 0) o_ptr->xtra2 = k_ptr->act_idx;
+ if (k_ptr->act_idx > 0) o_ptr->xtra2 = (XTRA8)k_ptr->act_idx;
/* Hack -- worthless items are always "broken" */
if (k_info[o_ptr->k_idx].cost <= 0) o_ptr->ident |= (IDENT_BROKEN);
o_ptr->to_d -= 6;
o_ptr->to_h -= 6;
break;
- case EGO_NAZGUL:
+ case EGO_NAZGUL:
o_ptr->to_d -= 3;
o_ptr->to_h -= 3;
if (one_in_(3)) add_flag(o_ptr->art_flags, TR_COWARDICE);
}
/* Hack -- apply activatin index if needed */
- if (e_ptr->act_idx) o_ptr->xtra2 = e_ptr->act_idx;
+ if (e_ptr->act_idx) o_ptr->xtra2 = (XTRA8)e_ptr->act_idx;
/* Hack -- apply extra penalties if needed */
if ((object_is_cursed(o_ptr) || object_is_broken(o_ptr)) && !(e_ptr->gen_flags & (TRG_POWERFUL)))
bool make_object(object_type *j_ptr, BIT_FLAGS mode)
{
int prob, base;
- DEPTH obj_level;
/* Chance of "special object" */
}
}
- obj_level = k_info[j_ptr->k_idx].level;
- if (object_is_fixed_artifact(j_ptr)) obj_level = a_info[j_ptr->name1].level;
-
if (cheat_peek) object_mention(j_ptr);
/* Success */
{
object_type *i_ptr;
object_type object_type_body;
- u32b mode = AM_GOOD | (great || special ? AM_GREAT : 0L) | (special ? AM_SPECIAL : 0L) ;
+ BIT_FLAGS mode = AM_GOOD | (great || special ? AM_GREAT : 0L) | (special ? AM_SPECIAL : 0L) ;
/* Acquirement */
while (num--)
* to fall to the ground.\n
* Return the inventory slot into which the item is placed.\n
*/
-s16b inven_takeoff(int item, int amt)
+INVENTORY_IDX inven_takeoff(INVENTORY_IDX item, ITEM_NUMBER amt)
{
- int slot;
+ INVENTORY_IDX slot;
object_type forge;
object_type *q_ptr;
* @details
* The object will be dropped "near" the current location
*/
-void inven_drop(int item, int amt)
+void inven_drop(INVENTORY_IDX item, ITEM_NUMBER amt)
{
object_type forge;
object_type *q_ptr;
-
object_type *o_ptr;
char o_name[MAX_NLEN];
typedef struct {
int add; /* TR flag number or special essence id */
cptr add_name; /* Name of this ability */
- int type; /* Menu number */
+ ESSENCE_IDX type; /* Menu number */
int essence; /* Index for carrying essences */
int value; /* Needed value to add this ability */
} essence_type;
bool observe = FALSE;
int old_ds, old_dd, old_to_h, old_to_d, old_ac, old_to_a, old_pval, old_name2;
TIME_EFFECT old_timeout;
- u32b old_flgs[TR_FLAG_SIZE], new_flgs[TR_FLAG_SIZE];
+ BIT_FLAGS old_flgs[TR_FLAG_SIZE], new_flgs[TR_FLAG_SIZE];
object_type *o_ptr;
cptr q, s;
POSITION iy, ix;
byte_hack marked;
ITEM_NUMBER number;
- s16b next_o_idx, weight;
+ OBJECT_IDX next_o_idx;
+ WEIGHT weight;
for (i = 0; i < sizeof(drain_value) / sizeof(int); i++)
drain_value[i] = 0;
* @brief 付加するエッセンスの大別を選択する
* @return 選んだエッセンスの大別ID
*/
-static int choose_essence(void)
+static COMMAND_CODE choose_essence(void)
{
COMMAND_CODE mode = 0;
char choice;
"Others"
};
#endif
- const int mode_max = 7;
+ const COMMAND_CODE mode_max = 7;
#ifdef ALLOW_REPEAT
if (repeat_pull(&mode) && 1 <= mode && mode <= mode_max)
* @param mode エッセンスの大別ID
* @return なし
*/
-static void add_essence(int mode)
+static void add_essence(ESSENCE_IDX mode)
{
OBJECT_IDX item;
int max_num = 0;
choice = (always_show_list || use_menu) ? ESCAPE:1;
while (!flag)
{
- bool able[22];
+ bool able[22] = {0};
if( choice==ESCAPE ) choice = ' ';
else if( !get_com(out_val, &choice, FALSE) )break;
*/
void do_cmd_kaji(bool only_browse)
{
- int mode = 0;
+ COMMAND_CODE mode = 0;
char choice;
- int menu_line = (use_menu ? 1 : 0);
+ COMMAND_CODE menu_line = (use_menu ? 1 : 0);
if (!only_browse)
{