*/
#include "angband.h"
+#include "core.h"
+#include "util.h"
+
#include "cmd-pet.h"
+#include "cmd-dump.h"
+#include "floor.h"
#include "trap.h"
+#include "autopick.h"
#include "object-curse.h"
#include "player-damage.h"
+#include "player-effects.h"
+#include "player-race.h"
+#include "player-class.h"
#include "monster.h"
#include "monster-status.h"
#include "monster-spell.h"
+#include "spells.h"
#include "spells-status.h"
#include "spells-diceroll.h"
#include "spells-summon.h"
#include "player-status.h"
#include "player-move.h"
#include "realm-hex.h"
+#include "realm-song.h"
#include "object-hook.h"
#include "object-broken.h"
+#include "object-flavor.h"
+#include "quest.h"
#include "term.h"
#include "grid.h"
#include "feature.h"
+#include "view-mainwindow.h"
+#include "dungeon.h"
static int rakubadam_m; /*!< 振り落とされた際のダメージ量 */
static int rakubadam_p; /*!< 落馬した際のダメージ量 */
+bool sukekaku;
int project_length = 0; /*!< 投射の射程距離 */
+int cap_mon;
+int cap_mspeed;
+HIT_POINT cap_hp;
+HIT_POINT cap_maxhp;
+STR_OFFSET cap_nickname;
+
+/*!
+ * @brief 歌、剣術、呪術領域情報テーブル
+ */
+const magic_type technic_info[NUM_TECHNIC][32] =
+{
+ {
+ /* Music */
+ { 1, 1, 10, 2},
+ { 2, 1, 10, 2},
+ { 3, 2, 20, 3},
+ { 4, 2, 20, 4},
+ { 5, 2, 20, 6},
+ { 7, 4, 30, 8},
+ { 9, 3, 30, 10},
+ { 10, 2, 30, 12},
+
+ { 12, 3, 40, 20},
+ { 15, 16, 42, 35},
+ { 17, 18, 40, 25},
+ { 18, 2, 45, 30},
+ { 23, 8, 50, 38},
+ { 28, 30, 50, 41},
+ { 33, 35, 60, 42},
+ { 38, 35, 70, 46},
+
+ { 10, 4, 20, 13},
+ { 22, 5, 30, 26},
+ { 23, 3, 35, 27},
+ { 26, 28, 37, 29},
+ { 32, 37, 41, 36},
+ { 33, 22, 43, 40},
+ { 37, 35, 46, 42},
+ { 45, 60, 50, 56},
+
+ { 23, 18, 20, 23},
+ { 30, 30, 30, 26},
+ { 33, 65, 41, 30},
+ { 37, 35, 43, 35},
+ { 40, 30, 46, 50},
+ { 42, 75, 50, 68},
+ { 45, 58, 62, 73},
+ { 49, 48, 70, 200}
+ },
+
+ {
+ /* Hissatsu */
+ { 1, 15, 0, 0},
+ { 3, 10, 0, 0},
+ { 6, 15, 0, 0},
+ { 9, 8, 0, 0},
+ { 10, 12, 0, 0},
+ { 12, 25, 0, 0},
+ { 14, 7, 0, 0},
+ { 17, 20, 0, 0},
+
+ { 19, 10, 0, 0},
+ { 22, 20, 0, 0},
+ { 24, 30, 0, 0},
+ { 25, 10, 0, 0},
+ { 27, 15, 0, 0},
+ { 29, 45, 0, 0},
+ { 32, 70, 0, 0},
+ { 35, 50, 0, 0},
+
+ { 18, 40, 0, 0},
+ { 22, 22, 0, 0},
+ { 24, 30, 0, 0},
+ { 26, 35, 0, 0},
+ { 30, 30, 0, 0},
+ { 32, 60, 0, 0},
+ { 36, 40, 0, 0},
+ { 39, 80, 0, 0},
+
+ { 26, 20, 0, 0},
+ { 29, 40, 0, 0},
+ { 31, 35, 0, 0},
+ { 36, 80, 0, 0},
+ { 39, 100, 0, 0},
+ { 42, 110, 0, 0},
+ { 45, 130, 0, 0},
+ { 50, 255, 0, 0}
+ },
+
+ {
+ /* Hex */
+ { 1, 2, 20, 2},
+ { 1, 2, 20, 2},
+ { 3, 2, 30, 3},
+ { 5, 3, 30, 4},
+ { 7, 3, 40, 6},
+ { 8, 10, 60, 8},
+ { 9, 3, 30, 10},
+ { 10, 5, 40, 12},
+
+ { 12, 8, 40, 15},
+ { 12, 9, 35, 15},
+ { 15, 10, 50, 20},
+ { 20, 12, 45, 35},
+ { 25, 15, 50, 50},
+ { 30, 12, 60, 70},
+ { 35, 10, 60, 80},
+ { 40, 16, 70, 100},
+
+ { 15, 8, 20, 20},
+ { 18, 15, 50, 20},
+ { 22, 10, 65, 35},
+ { 25, 28, 70, 50},
+ { 28, 10, 70, 60},
+ { 30, 20, 60, 60},
+ { 36, 22, 70, 80},
+ { 40, 28, 70, 100},
+
+ { 5, 6, 35, 5},
+ { 22, 24, 70, 40},
+ { 25, 2, 65, 50},
+ { 32, 20, 50, 70},
+ { 35, 35, 70, 80},
+ { 38, 32, 70, 90},
+ { 42, 24, 70, 120},
+ { 46, 45, 80, 200}
+ },
+};
+
/*!
case GF_DARK_WEAK:
case GF_DARK:
{
- bool do_dark = !p_ptr->inside_battle && !is_mirror_grid(g_ptr);
+ bool do_dark = !p_ptr->phase_out && !is_mirror_grid(g_ptr);
int j;
/* Turn off the light. */
bool obvious = FALSE;
/* Can the player know about this effect? */
- bool known = ((m_ptr->cdis <= MAX_SIGHT) || p_ptr->inside_battle);
+ bool known = ((m_ptr->cdis <= MAX_SIGHT) || p_ptr->phase_out);
/* Were the effects "irrelevant"? */
bool skipped = FALSE;
switch (randint1(4))
{
case 1:
- set_confused(p_ptr->confused + 3 + randint1(dam));
+ set_confused(p_ptr, p_ptr->confused + 3 + randint1(dam));
break;
case 2:
- set_stun(p_ptr->stun + randint1(dam));
+ set_stun(p_ptr, p_ptr->stun + randint1(dam));
break;
case 3:
{
if (r_ptr->flags3 & RF3_NO_FEAR)
note = _("には効果がなかった。", " is unaffected.");
else
- set_afraid(p_ptr->afraid + 3 + randint1(dam));
+ set_afraid(p_ptr, p_ptr->afraid + 3 + randint1(dam));
break;
}
default:
if (!p_ptr->free_act)
- (void)set_paralyzed(p_ptr->paralyzed + randint1(dam));
+ (void)set_paralyzed(p_ptr, p_ptr->paralyzed + randint1(dam));
break;
}
}
switch (randint1(4))
{
case 1:
- set_stun(p_ptr->stun + dam / 2);
+ set_stun(p_ptr, p_ptr->stun + dam / 2);
break;
case 2:
- set_confused(p_ptr->confused + dam / 2);
+ set_confused(p_ptr, p_ptr->confused + dam / 2);
break;
default:
{
if (r_ptr->flags3 & RF3_NO_FEAR)
note = _("には効果がなかった。", " is unaffected.");
else
- set_afraid(p_ptr->afraid + dam);
+ set_afraid(p_ptr, p_ptr->afraid + dam);
}
}
}
else
{
msg_format(_("%sから精神エネルギーを吸いとった。", "You draw psychic energy from %s."), m_name);
- (void)hp_player(dam);
+ (void)hp_player(p_ptr, dam);
}
}
else
if (p_ptr->riding && (g_ptr->m_idx == p_ptr->riding)) do_poly = FALSE;
/* "Unique" and "quest" monsters can only be "killed" by the player. */
- if (((r_ptr->flags1 & (RF1_UNIQUE | RF1_QUESTOR)) || (r_ptr->flags7 & RF7_NAZGUL)) && !p_ptr->inside_battle)
+ if (((r_ptr->flags1 & (RF1_UNIQUE | RF1_QUESTOR)) || (r_ptr->flags7 & RF7_NAZGUL)) && !p_ptr->phase_out)
{
if (who && (dam > m_ptr->hp)) dam = m_ptr->hp;
}
}
else
{
- mon_fight = TRUE;
+ current_floor_ptr->monster_noise = TRUE;
}
}
}
else
{
- mon_fight = TRUE;
+ current_floor_ptr->monster_noise = TRUE;
}
/* Hack -- handle sleep */
blood_curse_to_enemy(who);
}
- if (p_ptr->inside_battle)
+ if (p_ptr->phase_out)
{
p_ptr->health_who = g_ptr->m_idx;
p_ptr->redraw |= (PR_HEALTH);
/* Analyze the damage */
switch (typ)
{
- /* Standard damage -- hurts inventory too */
+ /* Standard damage -- hurts p_ptr->inventory_list too */
case GF_ACID:
{
if (fuzzy) msg_print(_("酸で攻撃された!", "You are hit by acid!"));
break;
}
- /* Standard damage -- hurts inventory too */
+ /* Standard damage -- hurts p_ptr->inventory_list too */
case GF_FIRE:
{
if (fuzzy) msg_print(_("火炎で攻撃された!", "You are hit by fire!"));
break;
}
- /* Standard damage -- hurts inventory too */
+ /* Standard damage -- hurts p_ptr->inventory_list too */
case GF_COLD:
{
if (fuzzy) msg_print(_("冷気で攻撃された!", "You are hit by cold!"));
break;
}
- /* Standard damage -- hurts inventory too */
+ /* Standard damage -- hurts p_ptr->inventory_list too */
case GF_ELEC:
{
if (fuzzy) msg_print(_("電撃で攻撃された!", "You are hit by lightning!"));
if ((!(double_resist || p_ptr->resist_pois)) && one_in_(HURT_CHANCE) && !CHECK_MULTISHADOW())
{
- do_dec_stat(A_CON);
+ do_dec_stat(p_ptr, A_CON);
}
get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
if (!(double_resist || p_ptr->resist_pois) && !CHECK_MULTISHADOW())
{
- set_poisoned(p_ptr->poisoned + randint0(dam) + 10);
+ set_poisoned(p_ptr, p_ptr->poisoned + randint0(dam) + 10);
}
break;
}
get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
if (!(double_resist || p_ptr->resist_pois) && !CHECK_MULTISHADOW())
{
- set_poisoned(p_ptr->poisoned + randint0(dam) + 10);
+ set_poisoned(p_ptr, p_ptr->poisoned + randint0(dam) + 10);
if (one_in_(5)) /* 6 */
{
{
msg_print(_("何か鋭いもので攻撃された!", "You are hit by something sharp!"));
}
- else if ((inventory[INVEN_RARM].name1 == ART_ZANTETSU) || (inventory[INVEN_LARM].name1 == ART_ZANTETSU))
+ else if ((p_ptr->inventory_list[INVEN_RARM].name1 == ART_ZANTETSU) || (p_ptr->inventory_list[INVEN_LARM].name1 == ART_ZANTETSU))
{
msg_print(_("矢を斬り捨てた!", "You cut down the arrow!"));
break;
if (!p_ptr->resist_sound && !CHECK_MULTISHADOW())
{
int plus_stun = (randint1((dam > 40) ? 35 : (dam * 3 / 4 + 5)));
- (void)set_stun(p_ptr->stun + plus_stun);
+ (void)set_stun(p_ptr, p_ptr->stun + plus_stun);
}
if (!(p_ptr->resist_fire || IS_OPPOSE_FIRE() || p_ptr->immune_fire))
if (fuzzy) msg_print(_("地獄の力で攻撃された!", "You are hit by nether forces!"));
if (p_ptr->resist_neth)
{
- if (!prace_is_(RACE_SPECTRE))
+ if (!PRACE_IS_(p_ptr, RACE_SPECTRE))
{
dam *= 6; dam /= (randint1(4) + 7);
}
}
else if (!CHECK_MULTISHADOW()) drain_exp(200 + (p_ptr->exp / 100), 200 + (p_ptr->exp / 1000), 75);
- if (prace_is_(RACE_SPECTRE) && !CHECK_MULTISHADOW())
+ if (PRACE_IS_(p_ptr, RACE_SPECTRE) && !CHECK_MULTISHADOW())
{
msg_print(_("気分がよくなった。", "You feel invigorated!"));
- hp_player(dam / 4);
+ hp_player(p_ptr, dam / 4);
learn_spell(monspell);
}
else
{
if (!p_ptr->resist_sound && !p_ptr->resist_water)
{
- set_stun(p_ptr->stun + randint1(40));
+ set_stun(p_ptr, p_ptr->stun + randint1(40));
}
if (!p_ptr->resist_conf && !p_ptr->resist_water)
{
- set_confused(p_ptr->confused + randint1(5) + 5);
+ set_confused(p_ptr, p_ptr->confused + randint1(5) + 5);
}
if (one_in_(5) && !p_ptr->resist_water)
{
if (!p_ptr->resist_conf)
{
- (void)set_confused(p_ptr->confused + randint0(20) + 10);
+ (void)set_confused(p_ptr, p_ptr->confused + randint0(20) + 10);
}
if (!p_ptr->resist_chaos)
{
- (void)set_image(p_ptr->image + randint1(10));
+ (void)set_image(p_ptr, p_ptr->image + randint1(10));
if (one_in_(3))
{
msg_print(_("あなたの身体はカオスの力で捻じ曲げられた!", "Your body is twisted by chaos!"));
else if (!CHECK_MULTISHADOW())
{
int plus_stun = (randint1((dam > 90) ? 35 : (dam / 3 + 5)));
- (void)set_stun(p_ptr->stun + plus_stun);
+ (void)set_stun(p_ptr, p_ptr->stun + plus_stun);
}
if (!p_ptr->resist_sound || one_in_(13))
}
else if (!CHECK_MULTISHADOW())
{
- (void)set_confused(p_ptr->confused + randint1(20) + 10);
+ (void)set_confused(p_ptr, p_ptr->confused + randint1(20) + 10);
}
get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
break;
if (fuzzy) msg_print(_("運動エネルギーで攻撃された!", "You are hit by kinetic force!"));
if (!p_ptr->resist_sound && !CHECK_MULTISHADOW())
{
- (void)set_stun(p_ptr->stun + randint1(20));
+ (void)set_stun(p_ptr, p_ptr->stun + randint1(20));
}
get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
break;
if (fuzzy) msg_print(_("爆発があった!", "There is an explosion!"));
if (!p_ptr->resist_sound && !CHECK_MULTISHADOW())
{
- (void)set_stun(p_ptr->stun + randint1(20));
+ (void)set_stun(p_ptr, p_ptr->stun + randint1(20));
}
if (p_ptr->resist_shard)
case GF_INERTIAL:
{
if (fuzzy) msg_print(_("何か遅いもので攻撃された!", "You are hit by something slow!"));
- if (!CHECK_MULTISHADOW()) (void)set_slow(p_ptr->slow + randint0(4) + 4, FALSE);
+ if (!CHECK_MULTISHADOW()) (void)set_slow(p_ptr, p_ptr->slow + randint0(4) + 4, FALSE);
get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
break;
}
}
else if (!blind && !p_ptr->resist_blind && !CHECK_MULTISHADOW())
{
- (void)set_blind(p_ptr->blind + randint1(5) + 2);
+ (void)set_blind(p_ptr, p_ptr->blind + randint1(5) + 2);
}
- if (prace_is_(RACE_VAMPIRE) || (p_ptr->mimic_form == MIMIC_VAMPIRE))
+ if (PRACE_IS_(p_ptr, RACE_VAMPIRE) || (p_ptr->mimic_form == MIMIC_VAMPIRE))
{
if (!CHECK_MULTISHADOW()) msg_print(_("光で肉体が焦がされた!", "The light scorches your flesh!"));
dam *= 2;
}
- else if (prace_is_(RACE_S_FAIRY))
+ else if (PRACE_IS_(p_ptr, RACE_S_FAIRY))
{
dam = dam * 4 / 3;
}
{
dam *= 4; dam /= (randint1(4) + 7);
- if (prace_is_(RACE_VAMPIRE) || (p_ptr->mimic_form == MIMIC_VAMPIRE) || p_ptr->wraith_form) dam = 0;
+ if (PRACE_IS_(p_ptr, RACE_VAMPIRE) || (p_ptr->mimic_form == MIMIC_VAMPIRE) || p_ptr->wraith_form) dam = 0;
}
else if (!blind && !p_ptr->resist_blind && !CHECK_MULTISHADOW())
{
- (void)set_blind(p_ptr->blind + randint1(5) + 2);
+ (void)set_blind(p_ptr, p_ptr->blind + randint1(5) + 2);
}
get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
break;
{
teleport_player(5, TELEPORT_PASSIVE);
if (!p_ptr->levitation)
- (void)set_slow(p_ptr->slow + randint0(4) + 4, FALSE);
+ (void)set_slow(p_ptr, p_ptr->slow + randint0(4) + 4, FALSE);
if (!(p_ptr->resist_sound || p_ptr->levitation))
{
int plus_stun = (randint1((dam > 90) ? 35 : (dam / 3 + 5)));
- (void)set_stun(p_ptr->stun + plus_stun);
+ (void)set_stun(p_ptr, p_ptr->stun + plus_stun);
}
}
if (p_ptr->levitation)
{
if (fuzzy) msg_print(_("何らかの攻撃によって気分がよくなった。", "You are hit by something invigorating!"));
- (void)hp_player(dam);
+ (void)hp_player(p_ptr, dam);
dam = 0;
break;
}
case GF_OLD_SPEED:
{
if (fuzzy) msg_print(_("何かで攻撃された!", "You are hit by something!"));
- (void)set_fast(p_ptr->fast + randint1(5), FALSE);
+ (void)set_fast(p_ptr, p_ptr->fast + randint1(5), FALSE);
dam = 0;
break;
}
case GF_OLD_SLOW:
{
if (fuzzy) msg_print(_("何か遅いもので攻撃された!", "You are hit by something slow!"));
- (void)set_slow(p_ptr->slow + randint0(4) + 4, FALSE);
+ (void)set_slow(p_ptr, p_ptr->slow + randint0(4) + 4, FALSE);
break;
}
sanity_blast(NULL, FALSE);
}
- set_paralyzed(p_ptr->paralyzed + dam);
+ set_paralyzed(p_ptr, p_ptr->paralyzed + dam);
dam = 0;
break;
}
}
if (!p_ptr->resist_sound)
{
- (void)set_stun(p_ptr->stun + randint1(15));
+ (void)set_stun(p_ptr, p_ptr->stun + randint1(15));
}
if ((!(p_ptr->resist_cold || IS_OPPOSE_COLD())) || one_in_(12))
if (!p_ptr->resist_conf)
{
- (void)set_confused(p_ptr->confused + randint0(4) + 4);
+ (void)set_confused(p_ptr, p_ptr->confused + randint0(4) + 4);
}
if (!p_ptr->resist_chaos && one_in_(3))
{
- (void)set_image(p_ptr->image + randint0(250) + 150);
+ (void)set_image(p_ptr, p_ptr->image + randint0(250) + 150);
}
p_ptr->csp -= 50;
{
if (!p_ptr->resist_blind)
{
- (void)set_blind(p_ptr->blind + 8 + randint0(8));
+ (void)set_blind(p_ptr, p_ptr->blind + 8 + randint0(8));
}
if (!p_ptr->resist_conf)
{
- (void)set_confused(p_ptr->confused + randint0(4) + 4);
+ (void)set_confused(p_ptr, p_ptr->confused + randint0(4) + 4);
}
if (!p_ptr->free_act)
{
- (void)set_paralyzed(p_ptr->paralyzed + randint0(4) + 4);
+ (void)set_paralyzed(p_ptr, p_ptr->paralyzed + randint0(4) + 4);
}
- (void)set_slow(p_ptr->slow + randint0(4) + 4, FALSE);
+ (void)set_slow(p_ptr, p_ptr->slow + randint0(4) + 4, FALSE);
while (randint0(100 + rlev / 2) > (MAX(5, p_ptr->skill_sav)))
- (void)do_dec_stat(A_INT);
+ (void)do_dec_stat(p_ptr, A_INT);
while (randint0(100 + rlev / 2) > (MAX(5, p_ptr->skill_sav)))
- (void)do_dec_stat(A_WIS);
+ (void)do_dec_stat(p_ptr, A_WIS);
if (!p_ptr->resist_chaos)
{
- (void)set_image(p_ptr->image + randint0(250) + 150);
+ (void)set_image(p_ptr, p_ptr->image + randint0(250) + 150);
}
}
}
msg_format(_("攻撃が%s自身を傷つけた!", "The attack of %s has wounded %s!"), m_name, m_name_self);
project(0, 0, m_ptr->fy, m_ptr->fx, get_damage, GF_MISSILE, PROJECT_KILL, -1);
- if (p_ptr->tim_eyeeye) set_tim_eyeeye(p_ptr->tim_eyeeye-5, TRUE);
+ if (p_ptr->tim_eyeeye) set_tim_eyeeye(p_ptr, p_ptr->tim_eyeeye-5, TRUE);
}
if (p_ptr->riding && dam > 0)
* @param x 目標X座標 / Target x location (or location to travel "towards")
* @param dam 基本威力 / Base damage roll to apply to affected monsters (or player)
* @param typ 効果属性 / Type of damage to apply to monsters (and objects)
- * @param flg 効果フラグ / Extra bit flags (see PROJECT_xxxx in "defines.h")
+ * @param flg 効果フラグ / Extra bit flags (see PROJECT_xxxx)
* @param monspell 効果元のモンスター魔法ID
* @return 何か一つでも効力があればTRUEを返す / TRUE if any "effects" of the projection were observed, else FALSE
* @details
/* Dump everything with this radius */
for (i = gm[t]; i < gm[t+1]; i++)
{
- /* Extract the location */
y = gy[i];
x = gx[i];
/* Erase the explosion drawn above */
for (i = 0; i < grids; i++)
{
- /* Extract the location */
y = gy[i];
x = gx[i];