X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=src%2Fdo-spell.c;h=15d8800e06cfe628f7b6d25eb3270cc9eaac6aa1;hb=1f6361749d9aba6d3b9b812ceb7be5aa3e3a89e5;hp=72c0e4412bde29e4c5739d96ea670282b3b61862;hpb=8b7c8ce9ae5ca28066ab5055f120006a1d53f57a;p=hengband%2Fhengband.git diff --git a/src/do-spell.c b/src/do-spell.c index 72c0e4412..15d8800e0 100644 --- a/src/do-spell.c +++ b/src/do-spell.c @@ -96,7 +96,7 @@ static cptr info_delay(int base, int sides) * @param dam 固定値 * @return フォーマットに従い整形された文字列 */ -static cptr info_multi_damage(int dam) +static cptr info_multi_damage(HIT_POINT dam) { return format(_("損傷:各%d", "dam %d each"), dam); } @@ -303,12 +303,12 @@ static void cast_wonder(int dir) else if (die < 71) fire_bolt_or_beam(beam_chance(), GF_FIRE, dir, damroll(8 + ((plev - 5) / 4), 8)); - else if (die < 76) drain_life(dir, 75); + else if (die < 76) hypodynamic_bolt(dir, 75); else if (die < 81) fire_ball(GF_ELEC, dir, 30 + plev / 2, 2); else if (die < 86) fire_ball(GF_ACID, dir, 40 + plev, 2); else if (die < 91) fire_ball(GF_ICE, dir, 70 + plev, 3); else if (die < 96) fire_ball(GF_FIRE, dir, 80 + plev, 3); - else if (die < 101) drain_life(dir, 100 + plev); + else if (die < 101) hypodynamic_bolt(dir, 100 + plev); else if (die < 104) { earthquake(p_ptr->y, p_ptr->x, 12); @@ -429,7 +429,7 @@ static void cast_invoke_spirits(int dir) } else if (die < 76) { - drain_life(dir, 75); + hypodynamic_bolt(dir, 75); } else if (die < 81) { @@ -449,7 +449,7 @@ static void cast_invoke_spirits(int dir) } else if (die < 101) { - drain_life(dir, 100 + plev); + hypodynamic_bolt(dir, 100 + plev); } else if (die < 104) { @@ -487,7 +487,7 @@ static void cast_invoke_spirits(int dir) * @param spell 基準となる引数ID * @return なし */ -static void wild_magic(int spell) +static void wild_magic(SPELL_IDX spell) { int counter = 0; int type = SUMMON_MOLD + randint0(6); @@ -740,13 +740,7 @@ static void cast_shuffle(void) { msg_print(_("《審判》だ。", "It's the Judgement.")); do_cmd_rerate(FALSE); - if (p_ptr->muta1 || p_ptr->muta2 || p_ptr->muta3) - { - msg_print(_("全ての突然変異が治った。", "You are cured of all mutations.")); - p_ptr->muta1 = p_ptr->muta2 = p_ptr->muta3 = 0; - p_ptr->update |= PU_BONUS; - handle_stuff(); - } + lose_all_mutations(); } else if (die < 120) { @@ -775,7 +769,7 @@ static void cast_shuffle(void) * @param rad 効力の半径 * @return なし */ -static void cast_meteor(int dam, int rad) +static void cast_meteor(HIT_POINT dam, int rad) { int i; int b = 10 + randint1(10); @@ -820,7 +814,7 @@ static void cast_meteor(int dam, int rad) * @param rad 効力の半径 * @return ターゲットを指定し、実行したならばTRUEを返す。 */ -static bool cast_wrath_of_the_god(int dam, int rad) +static bool cast_wrath_of_the_god(HIT_POINT dam, int rad) { int x, y, tx, ty; int nx, ny; @@ -986,13 +980,13 @@ static bool cast_summon_greater_demon(void) * @param song 魔法効果のID * @return なし */ -static void start_singing(MAGIC_NUM2 spell, MAGIC_NUM1 song) +static void start_singing(SPELL_IDX spell, MAGIC_NUM1 song) { /* Remember the song index */ - p_ptr->magic_num1[0] = song; + SINGING_SONG_EFFECT(p_ptr) = (MAGIC_NUM1)song; /* Remember the index of the spell which activated the song */ - p_ptr->magic_num2[0] = spell; + SINGING_SONG_ID(p_ptr) = (MAGIC_NUM2)spell; /* Now the player is singing */ @@ -1015,24 +1009,24 @@ void stop_singing(void) if (p_ptr->pclass != CLASS_BARD) return; /* Are there interupted song? */ - if (p_ptr->magic_num1[1]) + if (INTERUPTING_SONG_EFFECT(p_ptr)) { /* Forget interupted song */ - p_ptr->magic_num1[1] = 0; + INTERUPTING_SONG_EFFECT(p_ptr) = MUSIC_NONE; return; } /* The player is singing? */ - if (!p_ptr->magic_num1[0]) return; + if (!SINGING_SONG_EFFECT(p_ptr)) return; /* Hack -- if called from set_action(), avoid recursive loop */ if (p_ptr->action == ACTION_SING) set_action(ACTION_NONE); /* Message text of each song or etc. */ - do_spell(REALM_MUSIC, p_ptr->magic_num2[0], SPELL_STOP); + do_spell(REALM_MUSIC, SINGING_SONG_ID(p_ptr), SPELL_STOP); - p_ptr->magic_num1[0] = MUSIC_NONE; - p_ptr->magic_num2[0] = 0; + SINGING_SONG_EFFECT(p_ptr) = MUSIC_NONE; + SINGING_SONG_ID(p_ptr) = 0; /* Recalculate bonuses */ p_ptr->update |= (PU_BONUS); @@ -1048,7 +1042,7 @@ void stop_singing(void) * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST) * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。 */ -static cptr do_life_spell(int spell, int mode) +static cptr do_life_spell(SPELL_IDX spell, BIT_FLAGS mode) { bool name = (mode == SPELL_NAME) ? TRUE : FALSE; bool desc = (mode == SPELL_DESC) ? TRUE : FALSE; @@ -1575,7 +1569,7 @@ static cptr do_life_spell(int spell, int mode) * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST) * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。 */ -static cptr do_sorcery_spell(int spell, int mode) +static cptr do_sorcery_spell(SPELL_IDX spell, BIT_FLAGS mode) { bool name = (mode == SPELL_NAME) ? TRUE : FALSE; bool desc = (mode == SPELL_DESC) ? TRUE : FALSE; @@ -2123,7 +2117,7 @@ static cptr do_sorcery_spell(int spell, int mode) * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST) * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。 */ -static cptr do_nature_spell(int spell, int mode) +static cptr do_nature_spell(SPELL_IDX spell, BIT_FLAGS mode) { bool name = (mode == SPELL_NAME) ? TRUE : FALSE; bool desc = (mode == SPELL_DESC) ? TRUE : FALSE; @@ -2605,7 +2599,7 @@ static cptr do_nature_spell(int spell, int mode) if (desc) return _("巨大な冷気の球を放つ。", "Fires a huge ball of cold."); { - int dam = 70 + plev * 3 / 2; + HIT_POINT dam = 70 + plev * 3 / 2; int rad = plev / 12 + 1; if (info) return info_damage(0, 0, dam); @@ -2624,7 +2618,7 @@ static cptr do_nature_spell(int spell, int mode) if (desc) return _("巨大な電撃の球を放つ。", "Fires a huge electric ball."); { - int dam = 90 + plev * 3 / 2; + HIT_POINT dam = 90 + plev * 3 / 2; int rad = plev / 12 + 1; if (info) return info_damage(0, 0, dam); @@ -2643,7 +2637,7 @@ static cptr do_nature_spell(int spell, int mode) if (desc) return _("巨大な水の球を放つ。", "Fires a huge ball of water."); { - int dam = 100 + plev * 3 / 2; + HIT_POINT dam = 100 + plev * 3 / 2; int rad = plev / 12 + 1; if (info) return info_damage(0, 0, dam); @@ -2662,7 +2656,7 @@ static cptr do_nature_spell(int spell, int mode) "Generates ball of light centered on you. Maps and lights whole dungeon level. Knows all objects location."); { - int dam = 150; + HIT_POINT dam = 150; int rad = 8; if (info) return info_damage(0, 0, dam/2); @@ -2728,7 +2722,7 @@ static cptr do_nature_spell(int spell, int mode) * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST) * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。 */ -static cptr do_chaos_spell(int spell, int mode) +static cptr do_chaos_spell(SPELL_IDX spell, BIT_FLAGS mode) { bool name = (mode == SPELL_NAME) ? TRUE : FALSE; bool desc = (mode == SPELL_DESC) ? TRUE : FALSE; @@ -2944,7 +2938,7 @@ static cptr do_chaos_spell(int spell, int mode) if (desc) return _("自分を中心とした轟音の球を発生させる。", "Generates a ball of sound centered on you."); { - int dam = 60 + plev; + HIT_POINT dam = 60 + plev; int rad = plev / 10 + 2; if (info) return info_damage(0, 0, dam/2); @@ -2981,7 +2975,7 @@ static cptr do_chaos_spell(int spell, int mode) if (desc) return _("炎の球を放つ。", "Fires a ball of fire."); { - int dam = plev + 55; + HIT_POINT dam = plev + 55; int rad = 2; if (info) return info_damage(0, 0, dam); @@ -3033,7 +3027,7 @@ static cptr do_chaos_spell(int spell, int mode) if (desc) return _("巨大なカオスの球を放つ。", "Fires a huge ball of chaos."); { - int dam = plev * 2 + 99; + HIT_POINT dam = plev * 2 + 99; int rad = plev / 5; if (info) return info_damage(0, 0, dam); @@ -3104,7 +3098,7 @@ static cptr do_chaos_spell(int spell, int mode) if (desc) return _("巨大な分解の球を放つ。", "Fires a huge ball of disintegration."); { - int dam = plev + 70; + HIT_POINT dam = plev + 70; int rad = 3 + plev / 40; if (info) return info_damage(0, 0, dam); @@ -3140,7 +3134,7 @@ static cptr do_chaos_spell(int spell, int mode) if (desc) return _("ロケットを発射する。", "Fires a magic rocket."); { - int dam = 120 + plev * 2; + HIT_POINT dam = 120 + plev * 2; int rad = 2; if (info) return info_damage(0, 0, dam); @@ -3222,7 +3216,7 @@ static cptr do_chaos_spell(int spell, int mode) if (desc) return _("自分の周辺に隕石を落とす。", "Makes meteor balls fall down to nearby random locations."); { - int dam = plev * 2; + HIT_POINT dam = plev * 2; int rad = 2; if (info) return info_multi_damage(dam); @@ -3239,7 +3233,7 @@ static cptr do_chaos_spell(int spell, int mode) if (desc) return _("自分を中心とした超巨大な炎の球を発生させる。", "Generate a huge ball of fire centered on you."); { - int dam = 300 + 3 * plev; + HIT_POINT dam = 300 + 3 * plev; int rad = 8; if (info) return info_damage(0, 0, dam/2); @@ -3283,7 +3277,7 @@ static cptr do_chaos_spell(int spell, int mode) if (desc) return _("非常に強力で巨大な純粋な魔力の球を放つ。", "Fires an extremely powerful huge ball of pure mana."); { - int dam = 300 + plev * 4; + HIT_POINT dam = 300 + plev * 4; int rad = 4; if (info) return info_damage(0, 0, dam); @@ -3302,7 +3296,7 @@ static cptr do_chaos_spell(int spell, int mode) if (desc) return _("非常に強力なカオスの球を放つ。", "Fires an extremely powerful ball of chaos."); { - int dam = p_ptr->chp; + HIT_POINT dam = p_ptr->chp; int rad = 2; if (info) return info_damage(0, 0, dam); @@ -3341,7 +3335,7 @@ static cptr do_chaos_spell(int spell, int mode) * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST) * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。 */ -static cptr do_death_spell(int spell, int mode) +static cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode) { bool name = (mode == SPELL_NAME) ? TRUE : FALSE; bool desc = (mode == SPELL_DESC) ? TRUE : FALSE; @@ -3437,7 +3431,7 @@ static cptr do_death_spell(int spell, int mode) if (desc) return _("毒の球を放つ。", "Fires a ball of poison."); { - int dam = 10 + plev / 2; + HIT_POINT dam = 10 + plev / 2; int rad = 2; if (info) return info_damage(0, 0, dam); @@ -3525,8 +3519,8 @@ static cptr do_death_spell(int spell, int mode) case 8: if (name) return _("エントロピーの球", "Orb of Entropy"); - if (desc) return _("生命のある者に効果のある球を放つ。", "Fires a ball which damages living monsters."); - + if (desc) return _("生命のある者のHPと最大HP双方にダメージを与える効果のある球を放つ。", "Fires a ball which damages to both HP and MaxHP of living monsters."); + { int dice = 3; int sides = 6; @@ -3547,7 +3541,7 @@ static cptr do_death_spell(int spell, int mode) { if (!get_aim_dir(&dir)) return NULL; - fire_ball(GF_OLD_DRAIN, dir, damroll(dice, sides) + base, rad); + fire_ball(GF_HYPODYNAMIA, dir, damroll(dice, sides) + base, rad); } } break; @@ -3576,7 +3570,7 @@ static cptr do_death_spell(int spell, int mode) if (desc) return _("自分を中心とした毒の球を発生させる。", "Generate a ball of poison centered on you."); { - int dam = (30 + plev) * 2; + HIT_POINT dam = (30 + plev) * 2; int rad = plev / 10 + 2; if (info) return info_damage(0, 0, dam/2); @@ -3619,9 +3613,9 @@ static cptr do_death_spell(int spell, int mode) break; case 13: - if (name) return _("吸血ドレイン", "Vampiric Drain"); - if (desc) return _("モンスター1体から生命力を吸いとる。吸いとった生命力によって満腹度が上がる。", - "Absorbs some HP from a monster and gives them to you. You will also gain nutritional sustenance from this."); + if (name) return _("吸血の矢", "Vampiric Bolt"); + if (desc) return _("ボルトによりモンスター1体から生命力を吸いとる。吸いとった生命力によって満腹度が上がる。", + "Absorbs some HP from a monster and gives them to you by bolt. You will also gain nutritional sustenance from this."); { int dice = 1; @@ -3632,11 +3626,11 @@ static cptr do_death_spell(int spell, int mode) if (cast) { - int dam = base + damroll(dice, sides); + HIT_POINT dam = base + damroll(dice, sides); if (!get_aim_dir(&dir)) return NULL; - if (drain_life(dir, dam)) + if (hypodynamic_bolt(dir, dam)) { chg_virtue(V_SACRIFICE, -1); chg_virtue(V_VITALITY, -1); @@ -3781,12 +3775,11 @@ static cptr do_death_spell(int spell, int mode) break; case 21: - if (name) return _("真・吸血", "Vampirism True"); - if (desc) return _("モンスター1体から生命力を吸いとる。吸いとった生命力によって体力が回復する。", + if (name) return _("吸血の連矢", "Vampiric Bolts"); + if (desc) return _("3連射のボルトによりモンスター1体から生命力を吸いとる。吸いとった生命力によって体力が回復する。", "Fires 3 bolts. Each of the bolts absorbs some HP from a monster and gives them to you."); - { - int dam = 100; + HIT_POINT dam = 100; if (info) return format("%s3*%d", s_dam, dam); @@ -3801,7 +3794,7 @@ static cptr do_death_spell(int spell, int mode) for (i = 0; i < 3; i++) { - if (drain_life(dir, dam)) + if (hypodynamic_bolt(dir, dam)) hp_player(dam); } } @@ -3829,7 +3822,7 @@ static cptr do_death_spell(int spell, int mode) if (desc) return _("巨大な暗黒の球を放つ。", "Fires a huge ball of darkness."); { - int dam = 100 + plev * 2; + HIT_POINT dam = 100 + plev * 2; int rad = 4; if (info) return info_damage(0, 0, dam); @@ -3971,7 +3964,7 @@ static cptr do_death_spell(int spell, int mode) "Fires a powerful ball of evil power. Hurts good monsters greatly."); { - int dam = 666; + HIT_POINT dam = 666; int rad = 3; if (info) return info_damage(0, 0, dam); @@ -4014,7 +4007,7 @@ static cptr do_death_spell(int spell, int mode) * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST) * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。 */ -static cptr do_trump_spell(int spell, int mode) +static cptr do_trump_spell(SPELL_IDX spell, BIT_FLAGS mode) { bool name = (mode == SPELL_NAME) ? TRUE : FALSE; bool desc = (mode == SPELL_DESC) ? TRUE : FALSE; @@ -4571,7 +4564,7 @@ static cptr do_trump_spell(int spell, int mode) if (desc) return _("自分の周辺に隕石を落とす。", "Makes meteor balls fall down to nearby random locations."); { - int dam = plev * 2; + HIT_POINT dam = plev * 2; int rad = 2; if (info) return info_multi_damage(dam); @@ -4660,7 +4653,7 @@ static cptr do_trump_spell(int spell, int mode) * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST) * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。 */ -static cptr do_arcane_spell(int spell, int mode) +static cptr do_arcane_spell(SPELL_IDX spell, BIT_FLAGS mode) { bool name = (mode == SPELL_NAME) ? TRUE : FALSE; bool desc = (mode == SPELL_DESC) ? TRUE : FALSE; @@ -5126,7 +5119,7 @@ static cptr do_arcane_spell(int spell, int mode) if (desc) return _("炎、電撃、冷気、酸のどれかの球を放つ。", "Fires a ball of some elements."); { - int dam = 75 + plev; + HIT_POINT dam = 75 + plev; int rad = 2; if (info) return info_damage(0, 0, dam); @@ -5221,7 +5214,7 @@ static cptr do_arcane_spell(int spell, int mode) * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST) * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。 */ -static cptr do_craft_spell(int spell, int mode) +static cptr do_craft_spell(SPELL_IDX spell, BIT_FLAGS mode) { bool name = (mode == SPELL_NAME) ? TRUE : FALSE; bool desc = (mode == SPELL_DESC) ? TRUE : FALSE; @@ -5754,7 +5747,7 @@ static cptr do_craft_spell(int spell, int mode) * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST) * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。 */ -static cptr do_daemon_spell(int spell, int mode) +static cptr do_daemon_spell(SPELL_IDX spell, BIT_FLAGS mode) { bool name = (mode == SPELL_NAME) ? TRUE : FALSE; bool desc = (mode == SPELL_DESC) ? TRUE : FALSE; @@ -5992,7 +5985,7 @@ static cptr do_daemon_spell(int spell, int mode) if (desc) return _("炎の球を放つ。", "Fires a ball of fire."); { - int dam = plev + 55; + HIT_POINT dam = plev + 55; int rad = 2; if (info) return info_damage(0, 0, dam); @@ -6023,7 +6016,7 @@ static cptr do_daemon_spell(int spell, int mode) if (desc) return _("大きな地獄の球を放つ。", "Fires a huge ball of nether."); { - int dam = plev * 3 / 2 + 100; + HIT_POINT dam = plev * 3 / 2 + 100; int rad = plev / 20 + 2; if (info) return info_damage(0, 0, dam); @@ -6120,7 +6113,7 @@ static cptr do_daemon_spell(int spell, int mode) "Generates a ball of fire centered on you which transforms floors to magma."); { - int dam = (55 + plev) * 2; + HIT_POINT dam = (55 + plev) * 2; int rad = 3; if (info) return info_damage(0, 0, dam/2); @@ -6138,7 +6131,7 @@ static cptr do_daemon_spell(int spell, int mode) if (desc) return _("プラズマの球を放つ。", "Fires a ball of plasma."); { - int dam = plev * 3 / 2 + 80; + HIT_POINT dam = plev * 3 / 2 + 80; int rad = 2 + plev / 40; if (info) return info_damage(0, 0, dam); @@ -6193,7 +6186,7 @@ static cptr do_daemon_spell(int spell, int mode) if (desc) return _("因果混乱の球を放つ。", "Fires a ball of nexus."); { - int dam = 100 + plev * 2; + HIT_POINT dam = 100 + plev * 2; int rad = 4; if (info) return info_damage(0, 0, dam); @@ -6263,7 +6256,7 @@ static cptr do_daemon_spell(int spell, int mode) "Generate balls of chaos, confusion and charm centered on you."); { - int dam = 50 + plev; + HIT_POINT dam = 50 + plev; int power = 20 + plev; int rad = 3 + plev / 20; @@ -6308,7 +6301,7 @@ static cptr do_daemon_spell(int spell, int mode) if (desc) return _("超巨大な地獄の球を放つ。", "Generate a huge ball of nether."); { - int dam = plev * 15; + HIT_POINT dam = plev * 15; int rad = plev / 5; if (info) return info_damage(0, 0, dam); @@ -6328,7 +6321,7 @@ static cptr do_daemon_spell(int spell, int mode) "Puts blood curse which damages and causes various effects on a monster. You also take damage."); { - int dam = 600; + HIT_POINT dam = 600; int rad = 0; if (info) return info_damage(0, 0, dam); @@ -6370,7 +6363,7 @@ static cptr do_daemon_spell(int spell, int mode) * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST) * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。 */ -static cptr do_crusade_spell(int spell, int mode) +static cptr do_crusade_spell(SPELL_IDX spell, BIT_FLAGS mode) { bool name = (mode == SPELL_NAME) ? TRUE : FALSE; bool desc = (mode == SPELL_DESC) ? TRUE : FALSE; @@ -6631,7 +6624,7 @@ static cptr do_crusade_spell(int spell, int mode) if (desc) return _("強力な電撃のボルトを放つ。", "Fires a powerful bolt of lightning."); { - int dam = plev * 5; + HIT_POINT dam = plev * 5; if (info) return info_damage(0, 0, dam); @@ -6763,7 +6756,7 @@ static cptr do_crusade_spell(int spell, int mode) if (desc) return _("巨大な閃光の球を放つ。", "Fires a huge ball of powerful light."); { - int dam = 100 + plev * 2; + HIT_POINT dam = 100 + plev * 2; int rad = 4; if (info) return info_damage(0, 0, dam); @@ -6896,7 +6889,7 @@ static cptr do_crusade_spell(int spell, int mode) if (desc) return _("ターゲットの周囲に分解の球を多数落とす。", "Drops many balls of disintegration near the target."); { - int dam = plev * 3 + 25; + HIT_POINT dam = plev * 3 + 25; int rad = 2; if (info) return info_multi_damage(dam); @@ -6983,7 +6976,7 @@ static cptr do_crusade_spell(int spell, int mode) * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST / SPELL_FAIL / SPELL_CONT / SPELL_STOP) * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST / SPELL_FAIL / SPELL_CONT / SPELL_STOP 時はNULL文字列を返す。 */ -static cptr do_music_spell(MAGIC_NUM2 spell, int mode) +static cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode) { bool name = (mode == SPELL_NAME) ? TRUE : FALSE; bool desc = (mode == SPELL_DESC) ? TRUE : FALSE; @@ -7215,8 +7208,7 @@ static cptr do_music_spell(MAGIC_NUM2 spell, int mode) { msg_print(_("静かな音楽が感覚を研ぎ澄まさせた...", "Your quiet music sharpens your sense of hearing...")); /* Hack -- Initialize the turn count */ - p_ptr->magic_num1[2] = 0; - + SINGING_COUNT(p_ptr) = 0; start_singing(spell, MUSIC_DETECT); } @@ -7227,14 +7219,14 @@ static cptr do_music_spell(MAGIC_NUM2 spell, int mode) if (cont) { - int count = p_ptr->magic_num1[2]; + int count = SINGING_COUNT(p_ptr); if (count >= 19) wiz_lite(FALSE); if (count >= 11) { map_area(rad); if (plev > 39 && count < 19) - p_ptr->magic_num1[2] = count + 1; + SINGING_COUNT(p_ptr) = count + 1; } if (count >= 6) { @@ -7244,7 +7236,7 @@ static cptr do_music_spell(MAGIC_NUM2 spell, int mode) detect_objects_normal(rad); if (plev > 24 && count < 11) - p_ptr->magic_num1[2] = count + 1; + SINGING_COUNT(p_ptr) = count + 1; } if (count >= 3) { @@ -7252,14 +7244,14 @@ static cptr do_music_spell(MAGIC_NUM2 spell, int mode) detect_monsters_normal(rad); if (plev > 19 && count < 6) - p_ptr->magic_num1[2] = count + 1; + SINGING_COUNT(p_ptr) = count + 1; } detect_traps(rad, TRUE); detect_doors(rad); detect_stairs(rad); if (plev > 14 && count < 3) - p_ptr->magic_num1[2] = count + 1; + SINGING_COUNT(p_ptr) = count + 1; } } @@ -7900,7 +7892,7 @@ static cptr do_music_spell(MAGIC_NUM2 spell, int mode) * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_CAST) * @return SPELL_NAME / SPELL_DESC 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。 */ -static cptr do_hissatsu_spell(int spell, int mode) +static cptr do_hissatsu_spell(SPELL_IDX spell, BIT_FLAGS mode) { bool name = (mode == SPELL_NAME) ? TRUE : FALSE; bool desc = (mode == SPELL_DESC) ? TRUE : FALSE; @@ -8873,7 +8865,7 @@ static bool item_tester_hook_cursed(object_type *o_ptr) * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST / SPELL_CONT / SPELL_STOP) * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST / SPELL_CONT / SPELL_STOP 時はNULL文字列を返す。 */ -static cptr do_hex_spell(int spell, int mode) +static cptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode) { bool name = (mode == SPELL_NAME) ? TRUE : FALSE; bool desc = (mode == SPELL_DESC) ? TRUE : FALSE; @@ -9049,22 +9041,22 @@ static cptr do_hex_spell(int spell, int mode) if (name) return _("我慢", "Patience"); if (desc) return _("数ターン攻撃を耐えた後、受けたダメージを地獄の業火として周囲に放出する。", "Bursts hell fire strongly after patients any damage while few turns."); - power = MIN(200, (p_ptr->magic_num1[2] * 2)); + power = MIN(200, (HEX_REVENGE_POWER(p_ptr) * 2)); if (info) return info_damage(0, 0, power); if (cast) { int a = 3 - (p_ptr->pspeed - 100) / 10; MAGIC_NUM2 r = 3 + randint1(3) + MAX(0, MIN(3, a)); - if (p_ptr->magic_num2[2] > 0) + if (HEX_REVENGE_TURN(p_ptr) > 0) { msg_print(_("すでに我慢をしている。", "You are already patienting.")); return NULL; } - p_ptr->magic_num2[1] = 1; - p_ptr->magic_num2[2] = r; - p_ptr->magic_num1[2] = 0; + HEX_REVENGE_TYPE(p_ptr) = 1; + HEX_REVENGE_TURN(p_ptr) = r; + HEX_REVENGE_POWER(p_ptr) = 0; msg_print(_("じっと耐えることにした。", "You decide to patient all damages.")); add = FALSE; } @@ -9072,9 +9064,9 @@ static cptr do_hex_spell(int spell, int mode) { int rad = 2 + (power / 50); - p_ptr->magic_num2[2]--; + HEX_REVENGE_TURN(p_ptr)--; - if ((p_ptr->magic_num2[2] <= 0) || (power >= 200)) + if ((HEX_REVENGE_TURN(p_ptr) <= 0) || (power >= 200)) { msg_print(_("我慢が解かれた!", "Time for end of patioence!")); if (power) @@ -9088,9 +9080,9 @@ static cptr do_hex_spell(int spell, int mode) } /* Reset */ - p_ptr->magic_num2[1] = 0; - p_ptr->magic_num2[2] = 0; - p_ptr->magic_num1[2] = 0; + HEX_REVENGE_TYPE(p_ptr) = 0; + HEX_REVENGE_TURN(p_ptr) = 0; + HEX_REVENGE_POWER(p_ptr) = 0; } } break; @@ -9129,22 +9121,22 @@ static cptr do_hex_spell(int spell, int mode) if (desc) return _("呪文詠唱を中止することなく、薬の効果を得ることができる。", "Quaffs a potion without canceling of casting a spell."); if (cast) { - p_ptr->magic_num1[0] |= (1L << HEX_INHAIL); + CASTING_HEX_FLAGS(p_ptr) |= (1L << HEX_INHAIL); do_cmd_quaff_potion(); - p_ptr->magic_num1[0] &= ~(1L << HEX_INHAIL); + CASTING_HEX_FLAGS(p_ptr) &= ~(1L << HEX_INHAIL); add = FALSE; } break; case 11: - if (name) return _("吸血霧", "Vampiric mist"); - if (desc) return _("視界内のモンスターに微弱量の生命力吸収のダメージを与える。与えたダメージの分、体力が回復する。", - "Deals few dameges of drain life to all monsters in your sight."); + if (name) return _("衰弱の霧", "Hypodynamic mist"); + if (desc) return _("視界内のモンスターに微弱量の衰弱属性のダメージを与える。", + "Deals few damages of hypodynamia to all monsters in your sight."); power = (plev / 2) + 5; if (info) return info_damage(1, power, 0); if (cast || cont) { - project_hack(GF_OLD_DRAIN, randint1(power)); + project_hack(GF_HYPODYNAMIA, randint1(power)); } break; @@ -9371,9 +9363,9 @@ static cptr do_hex_spell(int spell, int mode) if ((!o_ptr->k_idx) || (!object_is_cursed(o_ptr))) { do_spell(REALM_HEX, spell, SPELL_STOP); - p_ptr->magic_num1[0] &= ~(1L << spell); - p_ptr->magic_num2[0]--; - if (!p_ptr->magic_num2[0]) set_action(ACTION_NONE); + CASTING_HEX_FLAGS(p_ptr) &= ~(1L << spell); + CASTING_HEX_NUM(p_ptr)--; + if (!SINGING_SONG_ID(p_ptr)) set_action(ACTION_NONE); } } if (stop) @@ -9460,9 +9452,9 @@ static cptr do_hex_spell(int spell, int mode) if (!flag) { msg_format(_("%sの呪文の詠唱をやめた。", "Finish casting '%^s'."), do_spell(REALM_HEX, HEX_RESTORE, SPELL_NAME)); - p_ptr->magic_num1[0] &= ~(1L << HEX_RESTORE); - if (cont) p_ptr->magic_num2[0]--; - if (p_ptr->magic_num2) p_ptr->action = ACTION_NONE; + CASTING_HEX_FLAGS(p_ptr) &= ~(1L << HEX_RESTORE); + if (cont) CASTING_HEX_NUM(p_ptr)--; + if (CASTING_HEX_NUM(p_ptr)) p_ptr->action = ACTION_NONE; /* Redraw status */ p_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_SPELLS); @@ -9614,7 +9606,7 @@ static cptr do_hex_spell(int spell, int mode) if (name) return _("復讐の宣告", "Revenge sentence"); if (desc) return _("数ターン後にそれまで受けたダメージに応じた威力の地獄の劫火の弾を放つ。", "Fires a ball of hell fire to try revenging after few turns."); - power = p_ptr->magic_num1[2]; + power = HEX_REVENGE_POWER(p_ptr); if (info) return info_damage(0, 0, power); if (cast) { @@ -9622,22 +9614,22 @@ static cptr do_hex_spell(int spell, int mode) int a = 3 - (p_ptr->pspeed - 100) / 10; r = 1 + randint1(2) + MAX(0, MIN(3, a)); - if (p_ptr->magic_num2[2] > 0) + if (HEX_REVENGE_TURN(p_ptr) > 0) { msg_print(_("すでに復讐は宣告済みだ。", "You already pronounced your revenge.")); return NULL; } - p_ptr->magic_num2[1] = 2; - p_ptr->magic_num2[2] = r; + HEX_REVENGE_TYPE(p_ptr) = 2; + HEX_REVENGE_TURN(p_ptr) = r; msg_format(_("あなたは復讐を宣告した。あと %d ターン。", "You pronounce your revenge. %d turns left."), r); add = FALSE; } if (cont) { - p_ptr->magic_num2[2]--; + HEX_REVENGE_TURN(p_ptr)--; - if (p_ptr->magic_num2[2] <= 0) + if (HEX_REVENGE_TURN(p_ptr) <= 0) { int dir; @@ -9662,7 +9654,7 @@ static cptr do_hex_spell(int spell, int mode) { msg_print(_("復讐する気が失せた。", "You are not a mood to revenge.")); } - p_ptr->magic_num1[2] = 0; + HEX_REVENGE_POWER(p_ptr) = 0; } } break; @@ -9672,8 +9664,8 @@ static cptr do_hex_spell(int spell, int mode) if ((cast) && (add)) { /* add spell */ - p_ptr->magic_num1[0] |= 1L << (spell); - p_ptr->magic_num2[0]++; + CASTING_HEX_FLAGS(p_ptr) |= 1L << (spell); + CASTING_HEX_NUM(p_ptr)++; if (p_ptr->action != ACTION_SPELL) set_action(ACTION_SPELL); } @@ -9696,7 +9688,7 @@ static cptr do_hex_spell(int spell, int mode) * @param mode 求める処理 * @return 各領域魔法に各種テキストを求めた場合は文字列参照ポインタ、そうでない場合はNULLポインタを返す。 */ -cptr do_spell(REALM_IDX realm, SPELL_IDX spell, int mode) +cptr do_spell(REALM_IDX realm, SPELL_IDX spell, BIT_FLAGS mode) { switch (realm) {