X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=src%2Fcmd2.c;h=e9aabde24a8593c8fd1d6b265d80eee5d78312e7;hb=6b79d8d2bd1224c91a486561f8f671a29bb9dce4;hp=42adb5a6fe158b5a2af561cdadc61481fc9b7e06;hpb=e60acc778fcffacc3774f976716f75695c600fa0;p=hengband%2Fhengband.git
diff --git a/src/cmd2.c b/src/cmd2.c
index 42adb5a6f..e9aabde24 100644
--- a/src/cmd2.c
+++ b/src/cmd2.c
@@ -11,7 +11,8 @@
*/
#include "angband.h"
-
+#include "chest.h"
+#include "object-hook.h"
/*!
* @brief ããã¢è±åºæã«åºæ»ããä¸å¯è½ã ã£ãå ´åã«è¦åãå ããå¦ç
@@ -31,13 +32,8 @@ bool confirm_leave_level(bool down_stair)
((q_ptr->status != QUEST_STATUS_STAGE_COMPLETED) ||
(down_stair && (quest[QUEST_TOWER1].status != QUEST_STATUS_COMPLETED))))))
{
-#ifdef JP
- msg_print("ãã®éãä¸åº¦å»ãã¨äºåº¦ã¨æ»ã£ã¦æ¥ããã¾ããã");
- if (get_check("æ¬å½ã«ãã®éãå»ãã¾ããï¼")) return TRUE;
-#else
- msg_print("You can't come back here once you leave this floor.");
- if (get_check("Really leave this floor? ")) return TRUE;
-#endif
+ msg_print(_("ãã®éãä¸åº¦å»ãã¨äºåº¦ã¨æ»ã£ã¦æ¥ããã¾ããã", "You can't come back here once you leave this floor."));
+ if (get_check(_("æ¬å½ã«ãã®éãå»ãã¾ããï¼", "Really leave this floor? "))) return TRUE;
}
else
{
@@ -80,14 +76,10 @@ void do_cmd_go_up(void)
/* Success */
-#ifdef JP
if ((p_ptr->pseikaku == SEIKAKU_COMBAT) || (inventory[INVEN_BOW].name1 == ART_CRIMSON))
- msg_print("ãªãã ãã®é段ã¯ï¼");
+ msg_print(_("ãªãã ãã®é段ã¯ï¼", "What's this STAIRWAY!"));
else
- msg_print("ä¸ã®éã«ç»ã£ãã");
-#else
- msg_print("You enter the up staircase.");
-#endif
+ msg_print(_("ä¸ã®éã«ç»ã£ãã", "You enter the up staircase."));
leave_quest_check();
@@ -187,7 +179,7 @@ void do_cmd_go_up(void)
/* Success */
if ((p_ptr->pseikaku == SEIKAKU_COMBAT) || (inventory[INVEN_BOW].name1 == ART_CRIMSON))
- msg_print(_("ãªãã ãã®é段ã¯ï¼", ""));
+ msg_print(_("ãªãã ãã®é段ã¯ï¼", "What's this STAIRWAY!"));
else if (up_num == dun_level)
msg_print(_("å°ä¸ã«æ»ã£ãã", "You go back to the surface."));
else
@@ -237,14 +229,10 @@ void do_cmd_go_down(void)
/* Confirm Leaving */
if(!confirm_leave_level(TRUE)) return;
-#ifdef JP
if ((p_ptr->pseikaku == SEIKAKU_COMBAT) || (inventory[INVEN_BOW].name1 == ART_CRIMSON))
- msg_print("ãªãã ãã®é段ã¯ï¼");
+ msg_print(_("ãªãã ãã®é段ã¯ï¼", "What's this STAIRWAY!"));
else
- msg_print("ä¸ã®éã«éããã");
-#else
- msg_print("You enter the down staircase.");
-#endif
+ msg_print(_("ä¸ã®éã«éããã", "You enter the down staircase."));
leave_quest_check();
leave_tower_check();
@@ -347,7 +335,7 @@ void do_cmd_go_down(void)
else
{
if ((p_ptr->pseikaku == SEIKAKU_COMBAT) || (inventory[INVEN_BOW].name1 == ART_CRIMSON))
- msg_print(_("ãªãã ãã®é段ã¯ï¼", ""));
+ msg_print(_("ãªãã ãã®é段ã¯ï¼", "What's this STAIRWAY!"));
else
msg_print(_("é段ãä¸ãã¦æ°ããªãè¿·å®®ã¸ã¨è¶³ãè¸ã¿å
¥ããã", "You enter a maze of down staircases."));
}
@@ -446,349 +434,6 @@ static s16b chest_check(int y, int x, bool trapped)
return (0);
}
-
-/*!
- * @brief ç®±ããã¢ã¤ãã ãå¼ãåºã /
- * Allocates objects upon opening a chest -BEN-
- * @param scatter TRUEãªãã°ãã©ããã«ããã¢ã¤ãã ã®æ¡æ£å¦ç
- * @param y ç®±ã®åå¨ãããã¹ã®Y座æ¨
- * @param x ç®±ã®åå¨ãããã¹ã®X座æ¨
- * @param o_idx ç®±ã®ãªãã¸ã§ã¯ãID
- * @return ãªã
- * @details
- *
- * Disperse treasures from the given chest, centered at (x,y).
- *
- * Small chests often contain "gold", while Large chests always contain
- * items. Wooden chests contain 2 items, Iron chests contain 4 items,
- * and Steel chests contain 6 items. The "value" of the items in a
- * chest is based on the "power" of the chest, which is in turn based
- * on the level on which the chest is generated.
- *
- */
-static void chest_death(bool scatter, int y, int x, s16b o_idx)
-{
- int number;
-
- bool small;
- u32b mode = AM_GOOD;
-
- object_type forge;
- object_type *q_ptr;
-
- object_type *o_ptr = &o_list[o_idx];
-
-
- /* Small chests often hold "gold" */
- small = (o_ptr->sval < SV_CHEST_MIN_LARGE);
-
- /* Determine how much to drop (see above) */
- number = (o_ptr->sval % SV_CHEST_MIN_LARGE) * 2;
-
- if (o_ptr->sval == SV_CHEST_KANDUME)
- {
- number = 5;
- small = FALSE;
- mode |= AM_GREAT;
- object_level = o_ptr->xtra3;
- }
- else
- {
- /* Determine the "value" of the items */
- object_level = ABS(o_ptr->pval) + 10;
- }
-
- /* Zero pval means empty chest */
- if (!o_ptr->pval) number = 0;
-
- /* Opening a chest */
- opening_chest = TRUE;
-
- /* Drop some objects (non-chests) */
- for (; number > 0; --number)
- {
- /* Get local object */
- q_ptr = &forge;
-
- /* Wipe the object */
- object_wipe(q_ptr);
-
- /* Small chests often drop gold */
- if (small && (randint0(100) < 25))
- {
- /* Make some gold */
- if (!make_gold(q_ptr)) continue;
- }
-
- /* Otherwise drop an item */
- else
- {
- /* Make a good object */
- if (!make_object(q_ptr, mode)) continue;
- }
-
- /* If chest scatters its contents, pick any floor square. */
- if (scatter)
- {
- int i;
- for (i = 0; i < 200; i++)
- {
- /* Pick a totally random spot. */
- y = randint0(MAX_HGT);
- x = randint0(MAX_WID);
-
- /* Must be an empty floor. */
- if (!cave_empty_bold(y, x)) continue;
-
- /* Place the object there. */
- drop_near(q_ptr, -1, y, x);
-
- /* Done. */
- break;
- }
- }
- /* Normally, drop object near the chest. */
- else drop_near(q_ptr, -1, y, x);
- }
-
- /* Reset the object level */
- object_level = base_level;
-
- /* No longer opening a chest */
- opening_chest = FALSE;
-
- /* Empty */
- o_ptr->pval = 0;
-
- /* Known */
- object_known(o_ptr);
-}
-
-
-/*!
- * @brief ç®±ã®ãã©ããå¦ç /
- * Chests have traps too.
- * @param y ç®±ã®åå¨ãããã¹ã®Y座æ¨
- * @param x ç®±ã®åå¨ãããã¹ã®X座æ¨
- * @param o_idx ç®±ã®ãªãã¸ã§ã¯ãID
- * @return ãªã
- * @details
- *
- * Exploding chest destroys contents (and traps).
- * Note that the chest itself is never destroyed.
- *
- */
-static void chest_trap(int y, int x, s16b o_idx)
-{
- int i, trap;
-
- object_type *o_ptr = &o_list[o_idx];
-
- int mon_level = o_ptr->xtra3;
-
- /* Ignore disarmed chests */
- if (o_ptr->pval <= 0) return;
-
- /* Obtain the traps */
- trap = chest_traps[o_ptr->pval];
-
- /* Lose strength */
- if (trap & (CHEST_LOSE_STR))
- {
-#ifdef JP
- msg_print("ä»æãããã¦ããå°ããªéã«åºããã¦ãã¾ã£ãï¼");
- take_hit(DAMAGE_NOESCAPE, damroll(1, 4), "æ¯é", -1);
-#else
- msg_print("A small needle has pricked you!");
- take_hit(DAMAGE_NOESCAPE, damroll(1, 4), "a poison needle", -1);
-#endif
-
- (void)do_dec_stat(A_STR);
- }
-
- /* Lose constitution */
- if (trap & (CHEST_LOSE_CON))
- {
-#ifdef JP
- msg_print("ä»æãããã¦ããå°ããªéã«åºããã¦ãã¾ã£ãï¼");
- take_hit(DAMAGE_NOESCAPE, damroll(1, 4), "æ¯é", -1);
-#else
- msg_print("A small needle has pricked you!");
- take_hit(DAMAGE_NOESCAPE, damroll(1, 4), "a poison needle", -1);
-#endif
-
- (void)do_dec_stat(A_CON);
- }
-
- /* Poison */
- if (trap & (CHEST_POISON))
- {
- msg_print(_("çªå¦å¹ãåºããç·è²ã®ã¬ã¹ã«å
ã¿è¾¼ã¾ããï¼", "A puff of green gas surrounds you!"));
- if (!(p_ptr->resist_pois || IS_OPPOSE_POIS()))
- {
- (void)set_poisoned(p_ptr->poisoned + 10 + randint1(20));
- }
- }
-
- /* Paralyze */
- if (trap & (CHEST_PARALYZE))
- {
- msg_print(_("çªå¦å¹ãåºããé»è²ãã¬ã¹ã«å
ã¿è¾¼ã¾ããï¼", "A puff of yellow gas surrounds you!"));
- if (!p_ptr->free_act)
- {
- (void)set_paralyzed(p_ptr->paralyzed + 10 + randint1(20));
- }
- }
-
- /* Summon monsters */
- if (trap & (CHEST_SUMMON))
- {
- int num = 2 + randint1(3);
- msg_print(_("çªå¦å¹ãåºããç
ã«å
ã¿è¾¼ã¾ããï¼", "You are enveloped in a cloud of smoke!"));
- for (i = 0; i < num; i++)
- {
- if (randint1(100)y, p_ptr->x, FALSE);
- else
- (void)summon_specific(0, y, x, mon_level, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
- }
- }
-
- /* Elemental summon. */
- if (trap & (CHEST_E_SUMMON))
- {
- msg_print(_("å®ãå®ãããã«ã¨ã¬ã¡ã³ã¿ã«ãç¾ããï¼", "Elemental beings appear to protect their treasures!"));
- for (i = 0; i < randint1(3) + 5; i++)
- {
- (void)summon_specific(0, y, x, mon_level, SUMMON_ELEMENTAL, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
- }
- }
-
- /* Force clouds, then summon birds. */
- if (trap & (CHEST_BIRD_STORM))
- {
- msg_print(_("é³¥ã®ç¾¤ããããªããåãå·»ããï¼", "A storm of birds swirls around you!"));
-
- for (i = 0; i < randint1(3) + 3; i++)
- (void)fire_meteor(-1, GF_FORCE, y, x, o_ptr->pval / 5, 7);
-
- for (i = 0; i < randint1(5) + o_ptr->pval / 5; i++)
- {
- (void)summon_specific(0, y, x, mon_level, SUMMON_BIRD, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
- }
- }
-
- /* Various colorful summonings. */
- if (trap & (CHEST_H_SUMMON))
- {
- /* Summon demons. */
- if (one_in_(4))
- {
- msg_print(_("çã¨ç¡«é»ã®é²ã®ä¸ã«æªéã姿ãç¾ããï¼", "Demons materialize in clouds of fire and brimstone!"));
- for (i = 0; i < randint1(3) + 2; i++)
- {
- (void)fire_meteor(-1, GF_FIRE, y, x, 10, 5);
- (void)summon_specific(0, y, x, mon_level, SUMMON_DEMON, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
- }
- }
-
- /* Summon dragons. */
- else if (one_in_(3))
- {
- msg_print(_("æéã«ãã©ã´ã³ã®å½±ãã¼ãããã¨ç¾ããï¼", "Draconic forms loom out of the darkness!"));
- for (i = 0; i < randint1(3) + 2; i++)
- {
- (void)summon_specific(0, y, x, mon_level, SUMMON_DRAGON, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
- }
- }
-
- /* Summon hybrids. */
- else if (one_in_(2))
- {
- msg_print(_("å¥å¦ãªå§¿ã®æªç©ã襲ã£ã¦æ¥ãï¼", "Creatures strange and twisted assault you!"));
- for (i = 0; i < randint1(5) + 3; i++)
- {
- (void)summon_specific(0, y, x, mon_level, SUMMON_HYBRID, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
- }
- }
-
- /* Summon vortices (scattered) */
- else
- {
- msg_print(_("渦巻ãåä½ããç ´è£ããï¼", "Vortices coalesce and wreak destruction!"));
- for (i = 0; i < randint1(3) + 2; i++)
- {
- (void)summon_specific(0, y, x, mon_level, SUMMON_VORTEX, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
- }
- }
- }
-
- /* Dispel player. */
- if ((trap & (CHEST_RUNES_OF_EVIL)) && o_ptr->k_idx)
- {
- /* Determine how many nasty tricks can be played. */
- int nasty_tricks_count = 4 + randint0(3);
-
- /* Message. */
- msg_print(_("æããã声ãé¿ãã: ãæéãæ±ãã¤ã¤ã¾ãï¼ã", "Hideous voices bid: 'Let the darkness have thee!'"));
- /* This is gonna hurt... */
- for (; nasty_tricks_count > 0; nasty_tricks_count--)
- {
- /* ...but a high saving throw does help a little. */
- if (randint1(100+o_ptr->pval*2) > p_ptr->skill_sav)
- {
- if (one_in_(6)) take_hit(DAMAGE_NOESCAPE, damroll(5, 20), _("ç ´æ»
ã®ãã©ããã®å®ç®±", "a chest dispel-player trap"), -1);
- else if (one_in_(5)) (void)set_cut(p_ptr->cut + 200);
- else if (one_in_(4))
- {
- if (!p_ptr->free_act)
- (void)set_paralyzed(p_ptr->paralyzed + 2 +
- randint0(6));
- else
- (void)set_stun(p_ptr->stun + 10 +
- randint0(100));
- }
- else if (one_in_(3)) apply_disenchant(0);
- else if (one_in_(2))
- {
- (void)do_dec_stat(A_STR);
- (void)do_dec_stat(A_DEX);
- (void)do_dec_stat(A_CON);
- (void)do_dec_stat(A_INT);
- (void)do_dec_stat(A_WIS);
- (void)do_dec_stat(A_CHR);
- }
- else (void)fire_meteor(-1, GF_NETHER, y, x, 150, 1);
- }
- }
- }
-
- /* Aggravate monsters. */
- if (trap & (CHEST_ALARM))
- {
- msg_print(_("ãããã¾ããé³ãé³´ãé¿ããï¼", "An alarm sounds!"));
- aggravate_monsters(0);
- }
-
- /* Explode */
- if ((trap & (CHEST_EXPLODE)) && o_ptr->k_idx)
- {
- msg_print(_("çªç¶ãç®±ãççºããï¼", "There is a sudden explosion!"));
- msg_print(_("ç®±ã®ä¸ã®ç©ã¯ãã¹ã¦ç²ã
ã«ç ãæ£ã£ãï¼", "Everything inside the chest is destroyed!"));
- o_ptr->pval = 0;
- sound(SOUND_EXPLODE);
- take_hit(DAMAGE_ATTACK, damroll(5, 8), _("ççºããç®±", "an exploding chest"), -1);
- }
- /* Scatter contents. */
- if ((trap & (CHEST_SCATTER)) && o_ptr->k_idx)
- {
- msg_print(_("å®ç®±ã®ä¸èº«ã¯ãã³ã¸ã§ã³ãã
ãã«æ£ä¹±ããï¼", "The contents of the chest scatter all over the dungeon!"));
- chest_death(TRUE, y, x, o_idx);
- o_ptr->pval = 0;
- }
-}
-
-
/*!
* @brief ç®±ãéããã³ãã³ãã®ã¡ã¤ã³ã«ã¼ãã³ /
* Attempt to open the given chest at the given location
@@ -874,7 +519,7 @@ static bool do_cmd_open_chest(int y, int x, s16b o_idx)
* @param feat å°å½¢ID
* @return éããå°å½¢ã§ããå ´åTRUEãè¿ã / Return TRUE if the given feature is an open door
*/
-static bool is_open(int feat)
+static bool is_open(IDX feat)
{
return have_flag(f_info[feat].flags, FF_CLOSE) && (feat != feat_state(feat, FF_CLOSE));
}
@@ -891,7 +536,7 @@ static bool is_open(int feat)
* @details Return the number of features around (or under) the character.
* Usually look for doors and floor traps.
*/
-static int count_dt(POSITION *y, POSITION *x, bool (*test)(int feat), bool under)
+static int count_dt(POSITION *y, POSITION *x, bool (*test)(IDX feat), bool under)
{
int d, count, xx, yy;
@@ -1985,8 +1630,7 @@ void do_cmd_disarm(void)
/* See if only one target */
if (num_traps || num_chests)
{
- bool too_many = (num_traps && num_chests) || (num_traps > 1) ||
- (num_chests > 1);
+ bool too_many = (num_traps && num_chests) || (num_traps > 1) || (num_chests > 1);
if (!too_many) command_dir = coords_to_dir(y, x);
}
}
@@ -2513,7 +2157,7 @@ void do_cmd_walk(bool pickup)
}
/* Get a "repeated" direction */
- if (get_rep_dir(&dir,FALSE))
+ if (get_rep_dir(&dir, FALSE))
{
/* Take a turn */
p_ptr->energy_use = 100;
@@ -2638,7 +2282,7 @@ void do_cmd_rest(void)
set_action(ACTION_NONE);
- if ((p_ptr->pclass == CLASS_BARD) && (p_ptr->magic_num1[0] || p_ptr->magic_num1[1]))
+ if ((p_ptr->pclass == CLASS_BARD) && (SINGING_SONG_EFFECT(p_ptr) || INTERUPTING_SONG_EFFECT(p_ptr)))
{
stop_singing();
}
@@ -2664,19 +2308,19 @@ void do_cmd_rest(void)
/* Rest until done */
if (out_val[0] == '&')
{
- command_arg = (-2);
+ command_arg = COMMAND_ARG_REST_UNTIL_DONE;
}
/* Rest a lot */
else if (out_val[0] == '*')
{
- command_arg = (-1);
+ command_arg = COMMAND_ARG_REST_FULL_HEALING;
}
/* Rest some */
else
{
- command_arg = atoi(out_val);
+ command_arg = (COMMAND_ARG)atoi(out_val);
if (command_arg <= 0) return;
}
}
@@ -2731,9 +2375,9 @@ void do_cmd_rest(void)
* @details
* Note that artifacts never break, see the "drop_near()" function.
*/
-static int breakage_chance(object_type *o_ptr)
+static PERCENTAGE breakage_chance(object_type *o_ptr)
{
- int archer_bonus = (p_ptr->pclass == CLASS_ARCHER ? (p_ptr->lev-1)/7 + 4: 0);
+ PERCENTAGE archer_bonus = (p_ptr->pclass == CLASS_ARCHER ? (PERCENTAGE)(p_ptr->lev-1)/7 + 4: 0);
/* Examine the snipe type */
if (snipe_type)
@@ -3192,11 +2836,13 @@ static s16b tot_dam_aux_shot(object_type *o_ptr, int tdam, monster_type *m_ptr)
*/
void do_cmd_fire_aux(int item, object_type *j_ptr)
{
- int dir;
- int i, j, y, x, ny, nx, ty, tx, prev_y, prev_x;
+ DIRECTION dir;
+ int i;
+ POSITION y, x, ny, nx, ty, tx, prev_y, prev_x;
int tdam_base, tdis, thits, tmul;
int bonus, chance;
int cur_dis, visible;
+ PERCENTAGE j;
object_type forge;
object_type *q_ptr;
@@ -3488,7 +3134,7 @@ void do_cmd_fire_aux(int item, object_type *j_ptr)
int now_exp = p_ptr->weapon_exp[0][j_ptr->sval];
if (now_exp < s_info[p_ptr->pclass].w_max[0][j_ptr->sval])
{
- int amount = 0;
+ SUB_EXP amount = 0;
if (now_exp < WEAPON_EXP_BEGINNER) amount = 80;
else if (now_exp < WEAPON_EXP_SKILLED) amount = 25;
else if ((now_exp < WEAPON_EXP_EXPERT) && (p_ptr->lev > 19)) amount = 10;
@@ -3648,7 +3294,7 @@ void do_cmd_fire_aux(int item, object_type *j_ptr)
if (snipe_type == SP_RUSH)
{
int n = randint1(5) + 3;
- IDX m_idx = c_mon_ptr->m_idx;
+ MONSTER_IDX m_idx = c_mon_ptr->m_idx;
for ( ; cur_dis <= tdis; )
{
@@ -3711,9 +3357,9 @@ void do_cmd_fire_aux(int item, object_type *j_ptr)
if (stick_to)
{
- int m_idx = cave[y][x].m_idx;
+ MONSTER_IDX m_idx = cave[y][x].m_idx;
monster_type *m_ptr = &m_list[m_idx];
- int o_idx = o_pop();
+ IDX o_idx = o_pop();
if (!o_idx)
{
@@ -3767,7 +3413,7 @@ void do_cmd_fire_aux(int item, object_type *j_ptr)
*/
void do_cmd_fire(void)
{
- int item;
+ OBJECT_IDX item;
object_type *j_ptr;
cptr q, s;
@@ -3834,22 +3480,9 @@ void do_cmd_fire(void)
}
}
-/*!
- * @brief ãªãã¸ã§ã¯ããæå°å¯è½ãªæ¦å¨ãã©ãããè¿ãã
- * @param o_ptr å¤å®ãããªãã¸ã§ã¯ãã®æ§é ä½åç
§ãã¤ã³ã¿
- * @return æå°å¯è½ãªæ¦å¨ãªãã°TRUE
- */
-static bool item_tester_hook_boomerang(object_type *o_ptr)
-{
- if ((o_ptr->tval==TV_DIGGING) || (o_ptr->tval == TV_SWORD) || (o_ptr->tval == TV_POLEARM) || (o_ptr->tval == TV_HAFTED)) return (TRUE);
-
- /* Assume not */
- return (FALSE);
-}
-
/*!
- * @brief æå°å¦çã®ãµãã«ã¼ãã³ /
+ * @brief æå°å¦çã¡ã¤ã³ã«ã¼ãã³ /
* Throw an object from the pack or floor.
* @param mult å¨åã®åç
* @param boomerang ãã¼ã¡ã©ã³å¦çãªãã°TRUE
@@ -3864,14 +3497,17 @@ static bool item_tester_hook_boomerang(object_type *o_ptr)
* the item to be destroyed? Should it do any damage at all?
*
*/
-bool do_cmd_throw_aux(int mult, bool boomerang, int shuriken)
+bool do_cmd_throw(int mult, bool boomerang, OBJECT_IDX shuriken)
{
- int dir, item;
- int i, j, y, x, ty, tx, prev_y, prev_x;
- int ny[19], nx[19];
+ DIRECTION dir;
+ OBJECT_IDX item;
+ int i;
+ POSITION y, x, ty, tx, prev_y, prev_x;
+ POSITION ny[19], nx[19];
int chance, tdam, tdis;
int mul, div, dd, ds;
int cur_dis, visible;
+ PERCENTAGE j;
object_type forge;
object_type *q_ptr;
@@ -3961,6 +3597,7 @@ bool do_cmd_throw_aux(int mult, bool boomerang, int shuriken)
/* Nope */
return FALSE;
}
+
}
/* Get local object */
@@ -4000,8 +3637,8 @@ bool do_cmd_throw_aux(int mult, bool boomerang, int shuriken)
if (shuriken >= 0)
{
- ty = randint0(101)-50+p_ptr->y;
- tx = randint0(101)-50+p_ptr->x;
+ ty = randint0(101) - 50 + p_ptr->y;
+ tx = randint0(101) - 50 + p_ptr->x;
}
else
{
@@ -4133,7 +3770,6 @@ bool do_cmd_throw_aux(int mult, bool boomerang, int shuriken)
if (cave[y][x].m_idx)
{
cave_type *c_ptr = &cave[y][x];
-
monster_type *m_ptr = &m_list[c_ptr->m_idx];
/* Check the visibility */
@@ -4423,17 +4059,6 @@ bool do_cmd_throw_aux(int mult, bool boomerang, int shuriken)
}
-/*!
- * @brief æå°å¦çã®ã¡ã¤ã³ã«ã¼ãã³ /
- * Throw an object from the pack or floor.
- * @return ãªã
- */
-void do_cmd_throw(void)
-{
- do_cmd_throw_aux(1, FALSE, -1);
-}
-
-
#ifdef TRAVEL
/*
* Hack: travel command
@@ -4442,8 +4067,8 @@ void do_cmd_throw(void)
static int flow_head = 0;
static int flow_tail = 0;
-static s16b temp2_x[MAX_SHORT];
-static s16b temp2_y[MAX_SHORT];
+static POSITION temp2_x[MAX_SHORT];
+static POSITION temp2_y[MAX_SHORT];
/*!
* @brief ãã©ãã«å¦çã®è¨æ¶é
åãåæåãã Hack: forget the "flow" information
@@ -4515,7 +4140,7 @@ static int travel_flow_cost(int y, int x)
* @param wall ãã¬ã¤ã¤ã¼ãå£ã®ä¸ã«ãããªãã°TRUE
* @return ãªã
*/
-static void travel_flow_aux(int y, int x, int n, bool wall)
+static void travel_flow_aux(POSITION y, POSITION x, int n, bool wall)
{
cave_type *c_ptr = &cave[y][x];
feature_type *f_ptr = &f_info[c_ptr->feat];