/**********Create shots*********/
if (ext == 1)
{
- int x,y, dir;
+ POSITION x, y;
+ DIRECTION dir;
cave_type *c_ptr;
if (!get_rep_dir(&dir, FALSE)) return FALSE;
item_tester_hook = item_tester_hook_convertible;
- /* Get an item */
q = _("どのアイテムから作りますか? ", "Convert which item? ");
s = _("材料を持っていない。", "You have no item to convert.");
if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return FALSE;
item_tester_hook = item_tester_hook_convertible;
- /* Get an item */
q = _("どのアイテムから作りますか? ", "Convert which item? ");
s = _("材料を持っていない。", "You have no item to convert.");
if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return FALSE;
/* Only accept legal items */
item_tester_hook = item_tester_hook_recharge;
- /* Get an item */
q = _("どのアイテムの魔力を取り込みますか? ", "Gain power of which item? ");
s = _("魔力を取り込めるアイテムがない。", "You have nothing to gain power.");
}
object_desc(o_name, o_ptr, 0);
- /* Message */
msg_format(_("%sの魔力を取り込んだ。", "You absorb magic of %s."), o_name);
/* Eliminate the item (from the pack) */
msg_print(_("混乱していて構えられない!", "Too confused."));
return FALSE;
}
-
- /* Save screen */
screen_save();
prt(_(" a) 構えをとく", " a) No form"), 2, 20);
msg_print(_("体が震えて構えられない!", "You are trembling with fear!"));
return FALSE;
}
-
- /* Save screen */
screen_save();
prt(_(" a) 型を崩す", " a) No Form"), 2, 20);
*/
struct power_desc_type
{
- char name[80];
- PLAYER_LEVEL level;
- int cost;
- int stat;
- int fail;
- int number;
+ char name[80]; //!<レイシャル名
+ PLAYER_LEVEL level; //!<体得レベル
+ int cost;
+ int stat;
+ int fail;
+ int number;
};
* @param pd_ptr 発動したいレイシャル・パワー情報の構造体参照ポインタ
* @return 成功率(%)を返す
*/
-static int racial_chance(power_desc_type *pd_ptr)
+static PERCENTAGE racial_chance(power_desc_type *pd_ptr)
{
PLAYER_LEVEL min_level = pd_ptr->level;
- int difficulty = pd_ptr->fail;
+ int difficulty = pd_ptr->fail;
int i;
int val;
*/
static bool cmd_racial_power_aux(s32b command)
{
- s16b plev = p_ptr->lev;
- int dir = 0;
+ PLAYER_LEVEL plev = p_ptr->lev;
+ DIRECTION dir = 0;
if (command <= -3)
{
}
case CLASS_ROGUE:
{
- int x, y;
-
- if (!get_rep_dir(&dir, FALSE)) return FALSE;
- y = p_ptr->y + ddy[dir];
- x = p_ptr->x + ddx[dir];
- if (cave[y][x].m_idx)
- {
- py_attack(y, x, 0);
- if (randint0(p_ptr->skill_dis) < 7)
- msg_print(_("うまく逃げられなかった。", "You are failed to run away."));
- else teleport_player(30, 0L);
- }
- else
- {
- msg_print(_("その方向にはモンスターはいません。", "You don't see any monster in this direction"));
- msg_print(NULL);
- }
+ if(!panic_hit()) return FALSE;
break;
}
case CLASS_RANGER:
}
else if (command == -4)
{
- int x, y;
+ POSITION x, y;
if (!get_rep_dir(&dir, FALSE)) return FALSE;
y = p_ptr->y + ddy[dir];
break;
}
case MIMIC_VAMPIRE:
- if (d_info[dungeon_type].flags1 & DF1_NO_MELEE)
- {
- msg_print(_("なぜか攻撃することができない。", "Something prevent you from attacking."));
- return FALSE;
- }
- else
- {
- int y, x, dummy = 0;
- cave_type *c_ptr;
-
- /* Only works on adjacent monsters */
- if (!get_rep_dir(&dir, FALSE)) return FALSE; /* was get_aim_dir */
- y = p_ptr->y + ddy[dir];
- x = p_ptr->x + ddx[dir];
- c_ptr = &cave[y][x];
-
- stop_mouth();
-
- if (!c_ptr->m_idx)
- {
- msg_print(_("何もない場所に噛みついた!", "You bite into thin air!"));
- break;
- }
-
- msg_print(_("あなたはニヤリとして牙をむいた...", "You grin and bare your fangs..."));
- dummy = plev + randint1(plev) * MAX(1, plev / 10); /* Dmg */
- if (hypodynamic_bolt(dir, dummy))
- {
- if (p_ptr->food < PY_FOOD_FULL)
- /* No heal if we are "full" */
- (void)hp_player(dummy);
- else
- msg_print(_("あなたは空腹ではありません。", "You were not hungry."));
-
- /* Gain nutritional sustenance: 150/hp drained */
- /* A Food ration gives 5000 food points (by contrast) */
- /* Don't ever get more than "Full" this way */
- /* But if we ARE Gorged, it won't cure us */
- dummy = p_ptr->food + MIN(5000, 100 * dummy);
- if (p_ptr->food < PY_FOOD_MAX) /* Not gorged already */
- (void)set_food(dummy >= PY_FOOD_MAX ? PY_FOOD_MAX - 1 : dummy);
- }
- else
- msg_print(_("げぇ。ひどい味だ。", "Yechh. That tastes foul."));
- }
+ vampirism();
break;
}
}
break;
case RACE_VAMPIRE:
- if (d_info[dungeon_type].flags1 & DF1_NO_MELEE)
- {
- msg_print(_("なぜか攻撃することができない。", "Something prevent you from attacking."));
- return FALSE;
- }
- else
- {
- int y, x, dummy = 0;
- cave_type *c_ptr;
-
- /* Only works on adjacent monsters */
- if (!get_rep_dir(&dir,FALSE)) return FALSE; /* was get_aim_dir */
- y = p_ptr->y + ddy[dir];
- x = p_ptr->x + ddx[dir];
- c_ptr = &cave[y][x];
-
- stop_mouth();
-
- if (!c_ptr->m_idx)
- {
- msg_print(_("何もない場所に噛みついた!", "You bite into thin air!"));
- break;
- }
-
- msg_print(_("あなたはニヤリとして牙をむいた...", "You grin and bare your fangs..."));
- dummy = plev + randint1(plev) * MAX(1, plev / 10); /* Dmg */
- if (hypodynamic_bolt(dir, dummy))
- {
- if (p_ptr->food < PY_FOOD_FULL)
- /* No heal if we are "full" */
- (void)hp_player(dummy);
- else
- msg_print(_("あなたは空腹ではありません。", "You were not hungry."));
-
- /* Gain nutritional sustenance: 150/hp drained */
- /* A Food ration gives 5000 food points (by contrast) */
- /* Don't ever get more than "Full" this way */
- /* But if we ARE Gorged, it won't cure us */
- dummy = p_ptr->food + MIN(5000, 100 * dummy);
- if (p_ptr->food < PY_FOOD_MAX) /* Not gorged already */
- (void)set_food(dummy >= PY_FOOD_MAX ? PY_FOOD_MAX - 1 : dummy);
- }
- else
- msg_print(_("げぇ。ひどい味だ。", "Yechh. That tastes foul."));
- }
+ vampirism();
break;
case RACE_SPECTRE:
_("(特殊能力 %c-%c, *'で一覧, ESCで中断) どの特殊能力を使いますか?", "(Powers %c-%c, *=List, ESC=exit) Use which power? "),
I2A(0), (num <= 26) ? I2A(num - 1) : '0' + num - 27);
-#ifdef ALLOW_REPEAT
if (!repeat_pull(&i) || i<0 || i>=num) {
-#endif /* ALLOW_REPEAT */
if (use_menu) screen_save();
/* Get a spell from the user */
int ctr = 0;
char dummy[80];
char letter;
- int x1, y1;
+ TERM_LEN x1, y1;
strcpy(dummy, "");
p_ptr->energy_use = 0;
return;
}
-#ifdef ALLOW_REPEAT
repeat_push(i);
} /*if (!repeat_pull(&i) || ...)*/
-#endif /* ALLOW_REPEAT */
switch (racial_aux(&power_desc[i]))
{
case 1:
/* Redraw mana and hp */
p_ptr->redraw |= (PR_HP | PR_MANA);
- /* Window stuff */
p_ptr->window |= (PW_PLAYER | PW_SPELL);
}
}