#include "angband.h"
#include "object-hook.h"
+#include "object-curse.h"
static void one_sustain(object_type *o_ptr);
{
object_type *j_ptr;
- s16b this_o_idx, next_o_idx = 0;
-
- s16b prev_o_idx = 0;
-
+ OBJECT_IDX this_o_idx, next_o_idx = 0;
+ OBJECT_IDX prev_o_idx = 0;
/* Object */
j_ptr = &o_list[o_idx];
for (this_o_idx = m_ptr->hold_o_idx; this_o_idx; this_o_idx = next_o_idx)
{
object_type *o_ptr;
-
- /* Acquire object */
o_ptr = &o_list[this_o_idx];
/* Acquire next object */
next_o_idx = o_ptr->next_o_idx;
- /* Done */
if (this_o_idx == o_idx)
{
/* No previous */
/* Forget next pointer */
o_ptr->next_o_idx = 0;
- /* Done */
break;
}
for (this_o_idx = c_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
{
object_type *o_ptr;
-
- /* Acquire object */
o_ptr = &o_list[this_o_idx];
/* Acquire next object */
next_o_idx = o_ptr->next_o_idx;
- /* Done */
if (this_o_idx == o_idx)
{
/* No previous */
/* Forget next pointer */
o_ptr->next_o_idx = 0;
- /* Done */
break;
}
/* Dungeon floor */
if (!(j_ptr->held_m_idx))
{
- int y, x;
+ POSITION y, x;
- /* Location */
y = j_ptr->iy;
x = j_ptr->ix;
/* Visual update */
lite_spot(y, x);
}
-
- /* Wipe the object */
object_wipe(j_ptr);
/* Count objects */
for (this_o_idx = c_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
{
object_type *o_ptr;
-
- /* Acquire object */
o_ptr = &o_list[this_o_idx];
/* Acquire next object */
next_o_idx = o_ptr->next_o_idx;
-
- /* Wipe the object */
object_wipe(o_ptr);
/* Count objects */
* @param i2 整理したい配列の終点
* @return なし
*/
-static void compact_objects_aux(IDX i1, IDX i2)
+static void compact_objects_aux(OBJECT_IDX i1, OBJECT_IDX i2)
{
- IDX i;
+ OBJECT_IDX i;
cave_type *c_ptr;
object_type *o_ptr;
/* Do nothing */
if (i1 == i2) return;
-
/* Repair objects */
for (i = 1; i < o_max; i++)
{
- /* Acquire object */
o_ptr = &o_list[i];
/* Skip "dead" objects */
o_ptr->next_o_idx = i2;
}
}
-
-
- /* Acquire object */
o_ptr = &o_list[i1];
-
/* Monster */
if (o_ptr->held_m_idx)
{
/* Dungeon */
else
{
- int y, x;
+ POSITION y, x;
/* Acquire location */
y = o_ptr->iy;
}
}
-
/* Structure copy */
o_list[i2] = o_list[i1];
*/
void compact_objects(int size)
{
- IDX i;
- int y, x, num, cnt;
+ OBJECT_IDX i;
+ POSITION y, x;
+ int num, cnt;
int cur_lev, cur_dis, chance;
object_type *o_ptr;
-
/* Compact */
if (size)
{
- /* Message */
msg_print(_("アイテム情報を圧縮しています...", "Compacting objects..."));
-
- /* Redraw map */
p_ptr->redraw |= (PR_MAP);
-
- /* Window stuff */
p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
}
/* Apply the saving throw */
if (randint0(100) < chance) continue;
- /* Delete the object */
delete_object_idx(i);
/* Count it */
/* Hack -- see above */
c_ptr->o_idx = 0;
}
-
- /* Wipe the object */
object_wipe(o_ptr);
}
for (i = 1; i < o_max; i++)
{
object_type *o_ptr;
-
- /* Acquire object */
o_ptr = &o_list[i];
/* Skip live objects */
/* Warn the player (except during dungeon creation) */
if (character_dungeon) msg_print(_("アイテムが多すぎる!", "Too many objects!"));
- /* Oops */
return (0);
}
OBJECT_IDX get_obj_num(DEPTH level)
{
int i, j, p;
- int k_idx;
+ KIND_OBJECT_IDX k_idx;
long value, total;
object_kind *k_ptr;
alloc_entry *table = alloc_kind_table;
if (table[i].level < table[j].level) i = j;
}
-
- /* Result */
return (table[i].index);
}
*/
value += (value * o_ptr->pval / o_ptr->number / (k_ptr->pval * 2));
- /* Done */
break;
}
case TV_STAFF:
*/
value += (value * o_ptr->pval / (k_ptr->pval * 2));
- /* Done */
break;
}
/* Give credit for bonuses */
value += ((o_ptr->to_h + o_ptr->to_d + o_ptr->to_a) * 200L);
- /* Done */
break;
}
/* Give credit for bonuses */
value += (((o_ptr->to_h - k_ptr->to_h) + (o_ptr->to_d - k_ptr->to_d)) * 200L + (o_ptr->to_a) * 100L);
- /* Done */
break;
}
value += (o_ptr->dd - k_ptr->dd) * o_ptr->ds * 250L;
value += (o_ptr->ds - k_ptr->ds) * o_ptr->dd * 250L;
- /* Done */
break;
}
value += (o_ptr->dd - k_ptr->dd) * o_ptr->ds * 5L;
value += (o_ptr->ds - k_ptr->ds) * o_ptr->dd * 5L;
- /* Done */
break;
}
/* Combine the pack */
p_ptr->notice |= (PN_COMBINE);
- /* Window stuff */
p_ptr->window |= (PW_INVEN | PW_EQUIP);
- /* Done */
return FALSE;
}
/* Hack -- blend "feelings" */
if (j_ptr->feeling) o_ptr->feeling = j_ptr->feeling;
- /* Hack -- could average discounts XXX XXX XXX */
- /* Hack -- save largest discount XXX XXX XXX */
+ /* Hack -- could average discounts */
+ /* Hack -- save largest discount */
if (o_ptr->discount < j_ptr->discount) o_ptr->discount = j_ptr->discount;
/* Hack -- if rods are stacking, add the pvals (maximum timeouts) and current timeouts together. -LM- */
}
#if 0
- /* Oops */
msg_format(_("アイテムがない (%d,%d)", "No object (%d,%d)"), tval, sval);
#endif
- /* Oops */
return (0);
}
/* Enforce the maximum value */
if (value > max) return (max);
-
- /* Result */
return (value);
}
static bool make_artifact_special(object_type *o_ptr)
{
IDX i;
- IDX k_idx = 0;
+ KIND_OBJECT_IDX k_idx = 0;
/*! @note 地上ではキャンセルする / No artifacts in the town */
if (!dun_level) return (FALSE);
if (r_ptr->flags1 & RF1_FORCE_DEPTH) return (FALSE);
if (r_ptr->flags7 & RF7_UNIQUE2) return (FALSE);
- /* Okay */
return (TRUE);
}
if (a_ptr->gen_flags & (TRG_RANDOM_CURSE1)) o_ptr->curse_flags |= get_curse(1, o_ptr);
if (a_ptr->gen_flags & (TRG_RANDOM_CURSE2)) o_ptr->curse_flags |= get_curse(2, o_ptr);
- /* Done */
return;
}
o_ptr->pval = 2;
}
- /* Done */
return;
}
/* Generate a special object, or a normal object */
if (!one_in_(prob) || !make_artifact_special(j_ptr))
{
- IDX k_idx;
+ KIND_OBJECT_IDX k_idx;
/* Good objects */
if ((mode & AM_GOOD) && !get_obj_num_hook)
/* Avoid stacking on other objects */
if (c_ptr->o_idx) return;
-
- /* Get local object */
q_ptr = &forge;
-
- /* Wipe the object */
object_wipe(q_ptr);
/* Make an object (if possible) */
if (o_idx)
{
object_type *o_ptr;
-
- /* Acquire object */
o_ptr = &o_list[o_idx];
/* Structure Copy */
object_copy(o_ptr, q_ptr);
- /* Location */
o_ptr->iy = y;
o_ptr->ix = x;
/* Place the object */
c_ptr->o_idx = o_idx;
- /* Notice */
note_spot(y, x);
- /* Redraw */
lite_spot(y, x);
}
else
/* Avoid stacking on other objects */
if (c_ptr->o_idx) return;
-
- /* Get local object */
q_ptr = &forge;
-
- /* Wipe the object */
object_wipe(q_ptr);
/* Make some gold */
if (o_idx)
{
object_type *o_ptr;
-
- /* Acquire object */
o_ptr = &o_list[o_idx];
/* Copy the object */
/* Place the object */
c_ptr->o_idx = o_idx;
- /* Notice */
note_spot(y, x);
- /* Redraw */
lite_spot(y, x);
}
}
/* Handle normal "breakage" */
if (!object_is_artifact(j_ptr) && (randint0(100) < chance))
{
- /* Message */
#ifdef JP
msg_format("%sは消えた。", o_name);
#else
/* Ignore distant grids */
if (d > 10) continue;
- /* Location */
ty = y + dy;
tx = x + dx;
for (this_o_idx = c_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
{
object_type *o_ptr;
-
- /* Acquire object */
o_ptr = &o_list[this_o_idx];
/* Acquire next object */
by = ty;
bx = tx;
- /* Okay */
flag = TRUE;
}
}
/* Handle lack of space */
if (!flag && !object_is_artifact(j_ptr))
{
- /* Message */
#ifdef JP
msg_format("%sは消えた。", o_name);
#else
/* Require floor space */
if (!cave_drop_bold(by, bx)) continue;
- /* Okay */
flag = TRUE;
}
/* No valid place! */
if (!candidates)
{
- /* Message */
#ifdef JP
msg_format("%sは消えた。", o_name);
#else
for (this_o_idx = c_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
{
object_type *o_ptr;
-
- /* Acquire object */
o_ptr = &o_list[this_o_idx];
/* Acquire next object */
/* Success */
done = TRUE;
- /* Done */
break;
}
}
/* Failure */
if (!done && !o_idx)
{
- /* Message */
#ifdef JP
msg_format("%sは消えた。", o_name);
#else
msg_print(_("何かが足下に転がってきた。", "You feel something roll beneath your feet."));
}
- /* XXX XXX XXX */
-
- /* Result */
return (o_idx);
}
/* Acquirement */
while (num--)
{
- /* Get local object */
i_ptr = &object_type_body;
-
- /* Wipe the object */
object_wipe(i_ptr);
/* Make a good (or great) object (if possible) */
while (num)
{
int i;
- IDX k_idx, a_idx = 0;
+ KIND_OBJECT_IDX k_idx;
+ ARTIFACT_IDX a_idx = 0;
int r = randint0(t);
bool insta_art, fixed_art;
r -= amuse_info[i].prob;
if (r <= 0) break;
}
-
- /* Get local object */
i_ptr = &object_type_body;
-
- /* Wipe the object */
object_wipe(i_ptr);
-
- /* Wipe the object */
k_idx = lookup_kind(amuse_info[i].tval, amuse_info[i].sval);
/* Paranoia - reroll if nothing */
/* Multiple charges */
if (o_ptr->pval != 1)
{
- /* Print a message */
msg_format("You have %d charges remaining.", o_ptr->pval);
}
/* Single charge */
else
{
- /* Print a message */
msg_format("You have %d charge remaining.", o_ptr->pval);
}
#endif
object_type *o_ptr = &inventory[item];
char o_name[MAX_NLEN];
- /* Get a description */
object_desc(o_name, o_ptr, 0);
- /* Print a message */
#ifdef JP
/* "no more" の場合はこちらで表示する */
if (o_ptr->number <= 0)
}
/*!
- * @brief ã\82¢ã\82¤ã\83\86ã\83 ã\81®残り所持数メッセージを表示する /
+ * @brief ã\82¢ã\82¤ã\83\86ã\83 ã\82\92å¢\97ã\82\84ã\81\97残り所持数メッセージを表示する /
* Increase the "number" of an item in the inventory
* @param item 所持数を増やしたいプレイヤーのアイテム所持スロット
* @param num 増やしたい量
/* Combine the pack */
p_ptr->notice |= (PN_COMBINE);
- /* Window stuff */
p_ptr->window |= (PW_INVEN | PW_EQUIP);
/* Hack -- Clear temporary elemental brands if player takes off weapons */
/* Erase the "final" slot */
object_wipe(&inventory[i]);
- /* Window stuff */
p_ptr->window |= (PW_INVEN);
}
/* Recalculate mana XXX */
p_ptr->update |= (PU_MANA);
- /* Window stuff */
p_ptr->window |= (PW_EQUIP);
}
- /* Window stuff */
p_ptr->window |= (PW_SPELL);
}
/* Multiple charges */
if (o_ptr->pval != 1)
{
- /* Print a message */
msg_format("There are %d charges remaining.", o_ptr->pval);
}
/* Single charge */
else
{
- /* Print a message */
msg_format("There is %d charge remaining.", o_ptr->pval);
}
#endif
object_type *o_ptr = &o_list[item];
char o_name[MAX_NLEN];
- /* Get a description */
object_desc(o_name, o_ptr, 0);
- /* Print a message */
#ifdef JP
/* "no more" の場合はこちらで表示を分ける */
if (o_ptr->number <= 0)
/* Only optimize empty items */
if (o_ptr->number) return;
- /* Delete the object */
delete_object_idx(item);
}
if (object_similar(j_ptr, o_ptr)) return (TRUE);
}
- /* Nope */
return (FALSE);
}
/* Recalculate bonuses */
p_ptr->update |= (PU_BONUS);
- /* Window stuff */
p_ptr->window |= (PW_INVEN);
/* Success */
/* Combine and Reorder pack */
p_ptr->notice |= (PN_COMBINE | PN_REORDER);
- /* Window stuff */
p_ptr->window |= (PW_INVEN);
/* Return the slot */
/* Verify */
if (amt > o_ptr->number) amt = o_ptr->number;
-
- /* Get local object */
q_ptr = &forge;
/* Obtain a local object */
/* Modify quantity */
q_ptr->number = amt;
- /* Describe the object */
object_desc(o_name, q_ptr, 0);
/* Took off weapon */
/* Carry the object */
slot = inven_carry(q_ptr);
- /* Message */
#ifdef JP
msg_format("%s(%c)%s。", o_name, index_to_label(slot), act);
#else
o_ptr = &inventory[item];
}
-
- /* Get local object */
q_ptr = &forge;
/* Obtain local object */
/* Describe local object */
object_desc(o_name, q_ptr, 0);
- /* Message */
msg_format(_("%s(%c)を落とした。", "You drop %s (%c)."), o_name, index_to_label(item));
/* Drop it near the player */
/* Combine the pack (backwards) */
for (i = INVEN_PACK; i > 0; i--)
{
- /* Get the item */
o_ptr = &inventory[i];
/* Skip empty items */
{
int max_num;
- /* Get the item */
j_ptr = &inventory[j];
/* Skip empty items */
}
}
- /* Window stuff */
p_ptr->window |= (PW_INVEN);
/* Take note */
combined = TRUE;
- /* Done */
break;
}
}
}
while (combined);
- /* Message */
if (flag) msg_print(_("ザックの中のアイテムをまとめ直した。", "You combine some items in your pack."));
}
/* Mega-Hack -- allow "proper" over-flow */
if ((i == INVEN_PACK) && (inven_cnt == INVEN_PACK)) break;
- /* Get the item */
o_ptr = &inventory[i];
/* Skip empty slots */
/* Take note */
flag = TRUE;
-
- /* Get local object */
q_ptr = &forge;
/* Save a copy of the moving item */
/* Insert the moving item */
object_copy(&inventory[j], q_ptr);
- /* Window stuff */
p_ptr->window |= (PW_INVEN);
}
- /* Message */
if (flag) msg_print(_("ザックの中のアイテムを並べ直した。", "You reorder some items in your pack."));
}
* @details
* Include list of usable spells for readible books
*/
-void display_koff(IDX k_idx)
+void display_koff(KIND_OBJECT_IDX k_idx)
{
int y;
/* No info */
if (!k_idx) return;
-
- /* Get local object */
q_ptr = &forge;
/* Prepare the object */
object_prep(q_ptr, k_idx);
-
- /* Describe */
object_desc(o_name, q_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY | OD_STORE));
/* Mention the object name */
* @param yy 危険性を調査するマスのY座標
* @return 警告を無視して進むことを選択するかか問題が無ければTRUE、警告に従ったならFALSEを返す。
*/
-bool process_warning(int xx, int yy)
+bool process_warning(POSITION xx, POSITION yy)
{
- int mx, my;
+ POSITION mx, my;
cave_type *c_ptr;
char o_name[MAX_NLEN];
/* Monster spells (only powerful ones)*/
if (projectable(my, mx, yy, xx))
{
- u32b f4 = r_ptr->flags4;
- u32b f5 = r_ptr->a_ability_flags1;
- u32b f6 = r_ptr->a_ability_flags2;
+ BIT_FLAGS f4 = r_ptr->flags4;
+ BIT_FLAGS f5 = r_ptr->a_ability_flags1;
+ BIT_FLAGS f6 = r_ptr->a_ability_flags2;
if (!(d_info[dungeon_type].flags1 & DF1_NO_MAGIC))
{
- if (f4 & RF4_BA_CHAO) spell_damcalc_by_spellnum(MS_BALL_CHAOS, GF_CHAOS, c_ptr->m_idx, &dam_max0);
- if (f5 & RF5_BA_MANA) spell_damcalc_by_spellnum(MS_BALL_MANA, GF_MANA, c_ptr->m_idx, &dam_max0);
- if (f5 & RF5_BA_DARK) spell_damcalc_by_spellnum(MS_BALL_DARK, GF_DARK, c_ptr->m_idx, &dam_max0);
- if (f5 & RF5_BA_LITE) spell_damcalc_by_spellnum(MS_STARBURST, GF_LITE, c_ptr->m_idx, &dam_max0);
- if (f6 & RF6_HAND_DOOM) spell_damcalc_by_spellnum(MS_HAND_DOOM, GF_HAND_DOOM, c_ptr->m_idx, &dam_max0);
- if (f6 & RF6_PSY_SPEAR) spell_damcalc_by_spellnum(MS_PSY_SPEAR, GF_PSY_SPEAR, c_ptr->m_idx, &dam_max0);
+ if (f4 & RF4_BA_CHAO) spell_damcalc_by_spellnum(MS_BALL_CHAOS, GF_CHAOS, c_ptr->m_idx, &dam_max0);
+ if (f5 & RF5_BA_MANA) spell_damcalc_by_spellnum(MS_BALL_MANA, GF_MANA, c_ptr->m_idx, &dam_max0);
+ if (f5 & RF5_BA_DARK) spell_damcalc_by_spellnum(MS_BALL_DARK, GF_DARK, c_ptr->m_idx, &dam_max0);
+ if (f5 & RF5_BA_LITE) spell_damcalc_by_spellnum(MS_STARBURST, GF_LITE, c_ptr->m_idx, &dam_max0);
+ if (f6 & RF6_HAND_DOOM) spell_damcalc_by_spellnum(MS_HAND_DOOM, GF_HAND_DOOM, c_ptr->m_idx, &dam_max0);
+ if (f6 & RF6_PSY_SPEAR) spell_damcalc_by_spellnum(MS_PSY_SPEAR, GF_PSY_SPEAR, c_ptr->m_idx, &dam_max0);
}
- if (f4 & RF4_ROCKET) spell_damcalc_by_spellnum(MS_ROCKET, GF_ROCKET, c_ptr->m_idx, &dam_max0);
- if (f4 & RF4_BR_ACID) spell_damcalc_by_spellnum(MS_BR_ACID, GF_ACID, c_ptr->m_idx, &dam_max0);
- if (f4 & RF4_BR_ELEC) spell_damcalc_by_spellnum(MS_BR_ELEC, GF_ELEC, c_ptr->m_idx, &dam_max0);
- if (f4 & RF4_BR_FIRE) spell_damcalc_by_spellnum(MS_BR_FIRE, GF_FIRE, c_ptr->m_idx, &dam_max0);
- if (f4 & RF4_BR_COLD) spell_damcalc_by_spellnum(MS_BR_COLD, GF_COLD, c_ptr->m_idx, &dam_max0);
- if (f4 & RF4_BR_POIS) spell_damcalc_by_spellnum(MS_BR_POIS, GF_POIS, c_ptr->m_idx, &dam_max0);
- if (f4 & RF4_BR_NETH) spell_damcalc_by_spellnum(MS_BR_NETHER, GF_NETHER, c_ptr->m_idx, &dam_max0);
- if (f4 & RF4_BR_LITE) spell_damcalc_by_spellnum(MS_BR_LITE, GF_LITE, c_ptr->m_idx, &dam_max0);
- if (f4 & RF4_BR_DARK) spell_damcalc_by_spellnum(MS_BR_DARK, GF_DARK, c_ptr->m_idx, &dam_max0);
- if (f4 & RF4_BR_CONF) spell_damcalc_by_spellnum(MS_BR_CONF, GF_CONFUSION, c_ptr->m_idx, &dam_max0);
- if (f4 & RF4_BR_SOUN) spell_damcalc_by_spellnum(MS_BR_SOUND, GF_SOUND, c_ptr->m_idx, &dam_max0);
- if (f4 & RF4_BR_CHAO) spell_damcalc_by_spellnum(MS_BR_CHAOS, GF_CHAOS, c_ptr->m_idx, &dam_max0);
- if (f4 & RF4_BR_DISE) spell_damcalc_by_spellnum(MS_BR_DISEN, GF_DISENCHANT, c_ptr->m_idx, &dam_max0);
- if (f4 & RF4_BR_NEXU) spell_damcalc_by_spellnum(MS_BR_NEXUS, GF_NEXUS, c_ptr->m_idx, &dam_max0);
- if (f4 & RF4_BR_TIME) spell_damcalc_by_spellnum(MS_BR_TIME, GF_TIME, c_ptr->m_idx, &dam_max0);
- if (f4 & RF4_BR_INER) spell_damcalc_by_spellnum(MS_BR_INERTIA, GF_INERTIAL, c_ptr->m_idx, &dam_max0);
- if (f4 & RF4_BR_GRAV) spell_damcalc_by_spellnum(MS_BR_GRAVITY, GF_GRAVITY, c_ptr->m_idx, &dam_max0);
- if (f4 & RF4_BR_SHAR) spell_damcalc_by_spellnum(MS_BR_SHARDS, GF_SHARDS, c_ptr->m_idx, &dam_max0);
- if (f4 & RF4_BR_PLAS) spell_damcalc_by_spellnum(MS_BR_PLASMA, GF_PLASMA, c_ptr->m_idx, &dam_max0);
- if (f4 & RF4_BR_WALL) spell_damcalc_by_spellnum(MS_BR_FORCE, GF_FORCE, c_ptr->m_idx, &dam_max0);
- if (f4 & RF4_BR_MANA) spell_damcalc_by_spellnum(MS_BR_MANA, GF_MANA, c_ptr->m_idx, &dam_max0);
- if (f4 & RF4_BR_NUKE) spell_damcalc_by_spellnum(MS_BR_NUKE, GF_NUKE, c_ptr->m_idx, &dam_max0);
- if (f4 & RF4_BR_DISI) spell_damcalc_by_spellnum(MS_BR_DISI, GF_DISINTEGRATE, c_ptr->m_idx, &dam_max0);
+ if (f4 & RF4_ROCKET) spell_damcalc_by_spellnum(MS_ROCKET, GF_ROCKET, c_ptr->m_idx, &dam_max0);
+ if (f4 & RF4_BR_ACID) spell_damcalc_by_spellnum(MS_BR_ACID, GF_ACID, c_ptr->m_idx, &dam_max0);
+ if (f4 & RF4_BR_ELEC) spell_damcalc_by_spellnum(MS_BR_ELEC, GF_ELEC, c_ptr->m_idx, &dam_max0);
+ if (f4 & RF4_BR_FIRE) spell_damcalc_by_spellnum(MS_BR_FIRE, GF_FIRE, c_ptr->m_idx, &dam_max0);
+ if (f4 & RF4_BR_COLD) spell_damcalc_by_spellnum(MS_BR_COLD, GF_COLD, c_ptr->m_idx, &dam_max0);
+ if (f4 & RF4_BR_POIS) spell_damcalc_by_spellnum(MS_BR_POIS, GF_POIS, c_ptr->m_idx, &dam_max0);
+ if (f4 & RF4_BR_NETH) spell_damcalc_by_spellnum(MS_BR_NETHER, GF_NETHER, c_ptr->m_idx, &dam_max0);
+ if (f4 & RF4_BR_LITE) spell_damcalc_by_spellnum(MS_BR_LITE, GF_LITE, c_ptr->m_idx, &dam_max0);
+ if (f4 & RF4_BR_DARK) spell_damcalc_by_spellnum(MS_BR_DARK, GF_DARK, c_ptr->m_idx, &dam_max0);
+ if (f4 & RF4_BR_CONF) spell_damcalc_by_spellnum(MS_BR_CONF, GF_CONFUSION, c_ptr->m_idx, &dam_max0);
+ if (f4 & RF4_BR_SOUN) spell_damcalc_by_spellnum(MS_BR_SOUND, GF_SOUND, c_ptr->m_idx, &dam_max0);
+ if (f4 & RF4_BR_CHAO) spell_damcalc_by_spellnum(MS_BR_CHAOS, GF_CHAOS, c_ptr->m_idx, &dam_max0);
+ if (f4 & RF4_BR_DISE) spell_damcalc_by_spellnum(MS_BR_DISEN, GF_DISENCHANT, c_ptr->m_idx, &dam_max0);
+ if (f4 & RF4_BR_NEXU) spell_damcalc_by_spellnum(MS_BR_NEXUS, GF_NEXUS, c_ptr->m_idx, &dam_max0);
+ if (f4 & RF4_BR_TIME) spell_damcalc_by_spellnum(MS_BR_TIME, GF_TIME, c_ptr->m_idx, &dam_max0);
+ if (f4 & RF4_BR_INER) spell_damcalc_by_spellnum(MS_BR_INERTIA, GF_INERTIAL, c_ptr->m_idx, &dam_max0);
+ if (f4 & RF4_BR_GRAV) spell_damcalc_by_spellnum(MS_BR_GRAVITY, GF_GRAVITY, c_ptr->m_idx, &dam_max0);
+ if (f4 & RF4_BR_SHAR) spell_damcalc_by_spellnum(MS_BR_SHARDS, GF_SHARDS, c_ptr->m_idx, &dam_max0);
+ if (f4 & RF4_BR_PLAS) spell_damcalc_by_spellnum(MS_BR_PLASMA, GF_PLASMA, c_ptr->m_idx, &dam_max0);
+ if (f4 & RF4_BR_WALL) spell_damcalc_by_spellnum(MS_BR_FORCE, GF_FORCE, c_ptr->m_idx, &dam_max0);
+ if (f4 & RF4_BR_MANA) spell_damcalc_by_spellnum(MS_BR_MANA, GF_MANA, c_ptr->m_idx, &dam_max0);
+ if (f4 & RF4_BR_NUKE) spell_damcalc_by_spellnum(MS_BR_NUKE, GF_NUKE, c_ptr->m_idx, &dam_max0);
+ if (f4 & RF4_BR_DISI) spell_damcalc_by_spellnum(MS_BR_DISI, GF_DISINTEGRATE, c_ptr->m_idx, &dam_max0);
}
/* Monster melee attacks */
strcpy(o_name, _("体", "body")); /* Warning ability without item */
msg_format(_("%sが鋭く震えた!", "Your %s pulsates sharply!"), o_name);
- disturb(0, 1);
+ disturb(FALSE, TRUE);
return get_check(_("本当にこのまま進むか?", "Really want to go ahead? "));
}
}
else
strcpy(o_name, _("体", "body")); /* Warning ability without item */
msg_format(_("%sが鋭く震えた!", "Your %s pulsates sharply!"), o_name);
- disturb(0, 1);
+ disturb(FALSE, TRUE);
return get_check(_("本当にこのまま進むか?", "Really want to go ahead? "));
}
item_tester_hook = object_is_weapon_armour_ammo;
item_tester_no_ryoute = TRUE;
- /* Get an item */
q = _("どのアイテムから抽出しますか?", "Extract from which item? ");
s = _("抽出できるアイテムがありません。", "You have nothing you can extract from.");
/* Combine the pack */
p_ptr->notice |= (PN_COMBINE | PN_REORDER);
- /* Window stuff */
p_ptr->window |= (PW_INVEN);
}
#endif
const COMMAND_CODE mode_max = 7;
-#ifdef ALLOW_REPEAT
if (repeat_pull(&mode) && 1 <= mode && mode <= mode_max)
return mode;
mode = 0;
-#endif /* ALLOW_REPEAT */
-
if (use_menu)
{
screen_save();
screen_load();
}
-#ifdef ALLOW_REPEAT
repeat_push(mode);
-#endif /* ALLOW_REPEAT */
return mode;
}
num[max_num++] = i;
}
-#ifdef ALLOW_REPEAT
if (!repeat_pull(&i) || i<0 || i>=max_num)
{
-#endif /* ALLOW_REPEAT */
-
/* Nothing chosen yet */
flag = FALSE;
if (!flag) return;
-#ifdef ALLOW_REPEAT
repeat_push(i);
}
-#endif /* ALLOW_REPEAT */
-
es_ptr = &essence_info[num[i]];
if (es_ptr->add == ESSENCE_SLAY_GLOVE)
item_tester_hook = object_is_weapon_armour_ammo;
item_tester_no_ryoute = TRUE;
- /* Get an item */
q = _("どのアイテムを改良しますか?", "Improve which item? ");
s = _("改良できるアイテムがありません。", "You have nothing to improve.");
/* Combine the pack */
p_ptr->notice |= (PN_COMBINE | PN_REORDER);
- /* Window stuff */
p_ptr->window |= (PW_INVEN);
}
item_tester_hook = object_is_smith;
- /* Get an item */
q = _("どのアイテムのエッセンスを消去しますか?", "Remove from which item? ");
s = _("エッセンスを付加したアイテムがありません。", "You have nothing to remove essence.");
/* Combine the pack */
p_ptr->notice |= (PN_COMBINE | PN_REORDER);
- /* Window stuff */
p_ptr->window |= (PW_INVEN);
}
}
}
-#ifdef ALLOW_REPEAT
if (!(repeat_pull(&mode) && 1 <= mode && mode <= 5))
{
-#endif /* ALLOW_REPEAT */
-
if (only_browse) screen_save();
do {
if (!only_browse) screen_save();
{
while (!mode)
{
+ prt(_(" a) エッセンス一覧", " a) List essences"), 2, 14);
+ prt(_(" b) エッセンス抽出", " b) Extract essence"), 3, 14);
+ prt(_(" c) エッセンス消去", " c) Remove essence"), 4, 14);
+ prt(_(" d) エッセンス付加", " d) Add essence"), 5, 14);
+ prt(_(" e) 武器/防具強化", " e) Enchant weapon/armor"), 6, 14);
#ifdef JP
- prt(" a) エッセンス一覧", 2, 14);
- prt(" b) エッセンス抽出", 3, 14);
- prt(" c) エッセンス消去", 4, 14);
- prt(" d) エッセンス付加", 5, 14);
- prt(" e) 武器/防具強化", 6, 14);
if (!get_com(format("どの能力を%sますか:", only_browse ? "調べ" : "使い"), &choice, TRUE))
#else
- prt(" a) List essences", 2, 14);
- prt(" b) Extract essence", 3, 14);
- prt(" c) Remove essence", 4, 14);
- prt(" d) Add essence", 5, 14);
- prt(" e) Enchant weapon/armor", 6, 14);
if (!get_com("Command :", &choice, TRUE))
#endif
{
}
if (!only_browse) screen_load();
} while (only_browse);
-#ifdef ALLOW_REPEAT
repeat_push(mode);
}
-#endif /* ALLOW_REPEAT */
-
switch(mode)
{
case 1: display_essence();break;
* @param flgs 特別に追加するフラグを返す参照ポインタ
* @return なし
*/
-void torch_flags(object_type *o_ptr, u32b *flgs)
+void torch_flags(object_type *o_ptr, BIT_FLAGS *flgs)
{
if ((o_ptr->tval == TV_LITE) && (o_ptr->sval == SV_LITE_TORCH))
{
* @param ds 特別なダイス面数を返す参照ポインタ
* @return なし
*/
-void torch_dice(object_type *o_ptr, int *dd, int *ds)
+void torch_dice(object_type *o_ptr, DICE_NUMBER *dd, DICE_SID *ds)
{
if ((o_ptr->tval == TV_LITE) && (o_ptr->sval == SV_LITE_TORCH))
{