• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: コミット

変愚蛮怒のメインリポジトリです


コミットメタ情報

リビジョンf8720d14b8635d82cc53f6d5eb36560442c9b56d (tree)
日時2014-02-19 15:48:27
作者dis- <dis.rogue@gmai...>
コミッターdis-

ログメッセージ

refactor: remove learnable from arguments

変更サマリ

差分

--- a/src/externs.h
+++ b/src/externs.h
@@ -1531,7 +1531,7 @@ extern bool raise_possible(monster_type *m_ptr);
15311531 extern bool dispel_check(int m_idx);
15321532 extern bool spell_is_inate(u16b spell);
15331533 extern bool make_attack_spell(int m_idx);
1534-extern void beam(int m_idx, int typ, int dam_hp, int monspell, bool learnable);
1534+extern void beam(int m_idx, int typ, int dam_hp, int monspell);
15351535
15361536 /* mspells2.c */
15371537 extern void get_project_point(int sy, int sx, int *ty, int *tx, int flg);
@@ -1574,11 +1574,11 @@ extern void do_cmd_mind_browse(void);
15741574
15751575 /* mane.c */
15761576 extern bool do_cmd_mane(bool baigaesi);
1577-extern void bolt(int m_idx, int typ, int dam_hp, int monspell, bool learnable);
1578-extern void breath(int y, int x, int m_idx, int typ, int dam_hp, int rad, bool breath, int monspell, bool learnable);
1577+extern void bolt(int m_idx, int typ, int dam_hp, int monspell);
1578+extern void breath(int y, int x, int m_idx, int typ, int dam_hp, int rad, bool breath, int monspell);
15791579
15801580 /* mspells2.c */
1581-extern void monst_breath_monst(int m_idx, int y, int x, int typ, int dam_hp, int rad, bool breath, int monspell, bool learnable);
1581+extern void monst_breath_monst(int m_idx, int y, int x, int typ, int dam_hp, int rad, bool breath, int monspell);
15821582
15831583 /* mspells3.c */
15841584 extern bool do_cmd_cast_learned(void);
@@ -1586,6 +1586,7 @@ extern void learn_spell(int monspell);
15861586 extern void set_rf_masks(s32b *f4, s32b *f5, s32b *f6, int mode);
15871587
15881588 /* mspells4.c */
1589+extern bool spell_learnable(int m_idx);
15891590
15901591 /* spells monster to player */
15911592 extern void MP_spell_RF4_SHRIEK(int m_idx);
--- a/src/monster2.c
+++ b/src/monster2.c
@@ -3681,7 +3681,7 @@ bool place_monster_aux(int who, int y, int x, int r_idx, u32b mode)
36813681 n = damroll(r_ptr->reinforce_dd[i], r_ptr->reinforce_ds[i]);
36823682 for(j = 0; j < n; j++)
36833683 {
3684- int nx, ny, z, d = 7;
3684+ int nx, ny, d = 7;
36853685 scatter(&ny, &nx, y, x, d, 0);
36863686 (void)place_monster_one(place_monster_m_idx, ny, nx, r_ptr->reinforce_id[i], mode);
36873687 }
--- a/src/mspells1.c
+++ b/src/mspells1.c
@@ -508,9 +508,10 @@ bool clean_shot(int y1, int x1, int y2, int x2, bool is_friend)
508508 * @param learnable ラーニング可能か否か
509509 * @return なし
510510 */
511-void bolt(int m_idx, int typ, int dam_hp, int monspell, bool learnable)
511+void bolt(int m_idx, int typ, int dam_hp, int monspell)
512512 {
513- int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_PLAYER;
513+ int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_PLAYER;
514+ bool learnable = spell_learnable(m_idx);
514515 if (typ != GF_ARROW) flg |= PROJECT_REFLECTABLE;
515516
516517 /* Target the player with a bolt attack */
@@ -523,12 +524,12 @@ void bolt(int m_idx, int typ, int dam_hp, int monspell, bool learnable)
523524 * @param typ 効果属性ID
524525 * @param dam_hp 威力
525526 * @param monspell モンスター魔法のID
526- * @param learnable ラーニング可能か否か
527527 * @return なし
528528 */
529-void beam(int m_idx, int typ, int dam_hp, int monspell, bool learnable)
529+void beam(int m_idx, int typ, int dam_hp, int monspell)
530530 {
531- int flg = PROJECT_BEAM | PROJECT_KILL | PROJECT_THRU | PROJECT_PLAYER;
531+ int flg = PROJECT_BEAM | PROJECT_KILL | PROJECT_THRU | PROJECT_PLAYER;
532+ bool learnable = spell_learnable(m_idx);
532533
533534 /* Target the player with a bolt attack */
534535 (void)project(m_idx, 0, py, px, dam_hp, typ, flg, (learnable ? monspell : -1));
@@ -546,15 +547,15 @@ void beam(int m_idx, int typ, int dam_hp, int monspell, bool learnable)
546547 * @param rad 半径
547548 * @param breath TRUEならばブレス処理、FALSEならばボール処理
548549 * @param monspell モンスター魔法のID
549- * @param learnable ラーニング可能か否か
550550 * @return なし
551551 */
552-void breath(int y, int x, int m_idx, int typ, int dam_hp, int rad, bool breath, int monspell, bool learnable)
552+void breath(int y, int x, int m_idx, int typ, int dam_hp, int rad, bool breath, int monspell)
553553 {
554554 int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_PLAYER;
555555
556556 monster_type *m_ptr = &m_list[m_idx];
557557 monster_race *r_ptr = &r_info[m_ptr->r_idx];
558+ bool learnable = spell_learnable(m_idx);
558559
559560 /* Determine the radius of the blast */
560561 if ((rad < 1) && breath) rad = (r_ptr->flags2 & (RF2_POWERFUL)) ? 3 : 2;
@@ -1439,9 +1440,7 @@ bool make_attack_spell(int m_idx)
14391440
14401441 /* Extract the "see-able-ness" */
14411442 bool seen = (!blind && m_ptr->ml);
1442-
14431443 bool maneable = player_has_los_bold(m_ptr->fy, m_ptr->fx);
1444- bool learnable = (seen && maneable && !world_monster);
14451444
14461445 /* Check "projectable" */
14471446 bool direct;
--- a/src/mspells2.c
+++ b/src/mspells2.c
@@ -25,15 +25,15 @@
2525 * @param rad 半径
2626 * @param breath TRUEならばブレス / FALSEならばボール
2727 * @param monspell 特殊攻撃のID
28- * @param learnable ラーニング可能な前提が揃っているならばTRUE
2928 * @return なし
3029 * @details
3130 * Pass over any monsters that may be in the way
3231 * Affect grids, objects, monsters, and the player
3332 */
34-void monst_breath_monst(int m_idx, int y, int x, int typ, int dam_hp, int rad, bool breath, int monspell, bool learnable)
33+void monst_breath_monst(int m_idx, int y, int x, int typ, int dam_hp, int rad, bool breath, int monspell)
3534 {
3635 int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
36+ bool learnable = spell_learnable(m_idx);
3737
3838 monster_type *m_ptr = &m_list[m_idx];
3939 monster_race *r_ptr = &r_info[m_ptr->r_idx];
@@ -80,9 +80,11 @@ void monst_breath_monst(int m_idx, int y, int x, int typ, int dam_hp, int rad, b
8080 * Stop if we hit a monster
8181 * Affect monsters and the player
8282 */
83-static void monst_bolt_monst(int m_idx, int y, int x, int typ, int dam_hp, int monspell, bool learnable)
83+static void monst_bolt_monst(int m_idx, int y, int x, int typ, int dam_hp, int monspell)
8484 {
8585 int flg = PROJECT_STOP | PROJECT_KILL;
86+ bool learnable = spell_learnable(m_idx);
87+
8688 if (typ != GF_ARROW) flg |= PROJECT_REFLECTABLE;
8789 (void)project(m_idx, 0, y, x, dam_hp, typ, flg, (learnable ? monspell : -1));
8890 }
@@ -100,9 +102,10 @@ static void monst_bolt_monst(int m_idx, int y, int x, int typ, int dam_hp, int m
100102 * @param learnable ラーニング可能な前提が揃っているならばTRUE
101103 * @return なし
102104 */
103-static void monst_beam_monst(int m_idx, int y, int x, int typ, int dam_hp, int monspell, bool learnable)
105+static void monst_beam_monst(int m_idx, int y, int x, int typ, int dam_hp, int monspell)
104106 {
105107 int flg = PROJECT_BEAM | PROJECT_KILL | PROJECT_THRU;
108+ bool learnable = spell_learnable(m_idx);
106109
107110 (void)project(m_idx, 0, y, x, dam_hp, typ, flg, (learnable ? monspell : -1));
108111 }
@@ -385,7 +388,6 @@ bool monst_spell_monst(int m_idx)
385388
386389 bool see_m = is_seen(m_ptr);
387390 bool maneable = player_has_los_bold(m_ptr->fy, m_ptr->fx);
388- bool learnable = (m_ptr->ml && maneable && !world_monster);
389391 bool see_t;
390392 bool see_either;
391393 bool known;
@@ -859,7 +861,7 @@ bool monst_spell_monst(int m_idx)
859861 }
860862
861863 dam = damroll(r_ptr->blow[0].d_dice, r_ptr->blow[0].d_side);
862- monst_bolt_monst(m_idx, y, x, GF_ARROW, dam, MS_SHOOT, learnable);
864+ monst_bolt_monst(m_idx, y, x, GF_ARROW, dam, MS_SHOOT);
863865
864866 break;
865867
@@ -905,7 +907,7 @@ bool monst_spell_monst(int m_idx)
905907
906908 dam = ((m_ptr->hp / 3) > 1600 ? 1600 : (m_ptr->hp / 3));
907909 monst_breath_monst(m_idx, y, x, GF_ACID,
908- dam,0, TRUE, MS_BR_ACID, learnable);
910+ dam,0, TRUE, MS_BR_ACID);
909911
910912 break;
911913
@@ -936,7 +938,7 @@ bool monst_spell_monst(int m_idx)
936938
937939 dam = ((m_ptr->hp / 3) > 1600 ? 1600 : (m_ptr->hp / 3));
938940 monst_breath_monst(m_idx, y, x, GF_ELEC,
939- dam,0, TRUE, MS_BR_ELEC, learnable);
941+ dam,0, TRUE, MS_BR_ELEC);
940942
941943 break;
942944
@@ -967,7 +969,7 @@ bool monst_spell_monst(int m_idx)
967969
968970 dam = ((m_ptr->hp / 3) > 1600 ? 1600 : (m_ptr->hp / 3));
969971 monst_breath_monst(m_idx, y, x, GF_FIRE,
970- dam,0, TRUE, MS_BR_FIRE, learnable);
972+ dam,0, TRUE, MS_BR_FIRE);
971973
972974 break;
973975
@@ -998,7 +1000,7 @@ bool monst_spell_monst(int m_idx)
9981000
9991001 dam = ((m_ptr->hp / 3) > 1600 ? 1600 : (m_ptr->hp / 3));
10001002 monst_breath_monst(m_idx, y, x, GF_COLD,
1001- dam,0, TRUE, MS_BR_COLD, learnable);
1003+ dam,0, TRUE, MS_BR_COLD);
10021004 break;
10031005
10041006 /* RF4_BR_POIS */
@@ -1028,7 +1030,7 @@ bool monst_spell_monst(int m_idx)
10281030
10291031 dam = ((m_ptr->hp / 3) > 800 ? 800 : (m_ptr->hp / 3));
10301032 monst_breath_monst(m_idx, y, x, GF_POIS,
1031- dam,0, TRUE, MS_BR_POIS, learnable);
1033+ dam,0, TRUE, MS_BR_POIS);
10321034
10331035 break;
10341036
@@ -1059,7 +1061,7 @@ bool monst_spell_monst(int m_idx)
10591061
10601062 dam = ((m_ptr->hp / 6) > 550 ? 550 : (m_ptr->hp / 6));
10611063 monst_breath_monst(m_idx, y, x, GF_NETHER,
1062- dam,0, TRUE, MS_BR_NETHER, learnable);
1064+ dam,0, TRUE, MS_BR_NETHER);
10631065
10641066 break;
10651067
@@ -1090,7 +1092,7 @@ bool monst_spell_monst(int m_idx)
10901092
10911093 dam = ((m_ptr->hp / 6) > 400 ? 400 : (m_ptr->hp / 6));
10921094 monst_breath_monst(m_idx, y, x, GF_LITE,
1093- dam,0, TRUE, MS_BR_LITE, learnable);
1095+ dam,0, TRUE, MS_BR_LITE);
10941096
10951097 break;
10961098
@@ -1121,7 +1123,7 @@ bool monst_spell_monst(int m_idx)
11211123
11221124 dam = ((m_ptr->hp / 6) > 400 ? 400 : (m_ptr->hp / 6));
11231125 monst_breath_monst(m_idx, y, x, GF_DARK,
1124- dam,0, TRUE, MS_BR_DARK, learnable);
1126+ dam,0, TRUE, MS_BR_DARK);
11251127
11261128 break;
11271129
@@ -1152,7 +1154,7 @@ bool monst_spell_monst(int m_idx)
11521154
11531155 dam = ((m_ptr->hp / 6) > 450 ? 450 : (m_ptr->hp / 6));
11541156 monst_breath_monst(m_idx, y, x, GF_CONFUSION,
1155- dam,0, TRUE, MS_BR_CONF, learnable);
1157+ dam,0, TRUE, MS_BR_CONF);
11561158
11571159 break;
11581160
@@ -1187,7 +1189,7 @@ bool monst_spell_monst(int m_idx)
11871189
11881190 dam = ((m_ptr->hp / 6) > 450 ? 450 : (m_ptr->hp / 6));
11891191 monst_breath_monst(m_idx, y, x, GF_SOUND,
1190- dam,0, TRUE, MS_BR_SOUND, learnable);
1192+ dam,0, TRUE, MS_BR_SOUND);
11911193
11921194 break;
11931195
@@ -1218,7 +1220,7 @@ bool monst_spell_monst(int m_idx)
12181220
12191221 dam = ((m_ptr->hp / 6) > 600 ? 600 : (m_ptr->hp / 6));
12201222 monst_breath_monst(m_idx, y, x, GF_CHAOS,
1221- dam,0, TRUE, MS_BR_CHAOS, learnable);
1223+ dam,0, TRUE, MS_BR_CHAOS);
12221224
12231225 break;
12241226
@@ -1249,7 +1251,7 @@ bool monst_spell_monst(int m_idx)
12491251
12501252 dam = ((m_ptr->hp / 6) > 500 ? 500 : (m_ptr->hp / 6));
12511253 monst_breath_monst(m_idx, y, x, GF_DISENCHANT,
1252- dam,0, TRUE, MS_BR_DISEN, learnable);
1254+ dam,0, TRUE, MS_BR_DISEN);
12531255
12541256 break;
12551257
@@ -1280,7 +1282,7 @@ bool monst_spell_monst(int m_idx)
12801282
12811283 dam = ((m_ptr->hp / 3) > 250 ? 250 : (m_ptr->hp / 3));
12821284 monst_breath_monst(m_idx, y, x, GF_NEXUS,
1283- dam,0, TRUE, MS_BR_NEXUS, learnable);
1285+ dam,0, TRUE, MS_BR_NEXUS);
12841286
12851287 break;
12861288
@@ -1311,7 +1313,7 @@ bool monst_spell_monst(int m_idx)
13111313
13121314 dam = ((m_ptr->hp / 3) > 150 ? 150 : (m_ptr->hp / 3));
13131315 monst_breath_monst(m_idx, y, x, GF_TIME,
1314- dam,0, TRUE, MS_BR_TIME, learnable);
1316+ dam,0, TRUE, MS_BR_TIME);
13151317
13161318 break;
13171319
@@ -1342,7 +1344,7 @@ bool monst_spell_monst(int m_idx)
13421344
13431345 dam = ((m_ptr->hp / 6) > 200 ? 200 : (m_ptr->hp / 6));
13441346 monst_breath_monst(m_idx, y, x, GF_INERTIA,
1345- dam,0, TRUE, MS_BR_INERTIA, learnable);
1347+ dam,0, TRUE, MS_BR_INERTIA);
13461348
13471349 break;
13481350
@@ -1373,7 +1375,7 @@ bool monst_spell_monst(int m_idx)
13731375
13741376 dam = ((m_ptr->hp / 3) > 200 ? 200 : (m_ptr->hp / 3));
13751377 monst_breath_monst(m_idx, y, x, GF_GRAVITY,
1376- dam,0, TRUE, MS_BR_GRAVITY, learnable);
1378+ dam,0, TRUE, MS_BR_GRAVITY);
13771379
13781380 break;
13791381
@@ -1408,7 +1410,7 @@ bool monst_spell_monst(int m_idx)
14081410
14091411 dam = ((m_ptr->hp / 6) > 500 ? 500 : (m_ptr->hp / 6));
14101412 monst_breath_monst(m_idx, y, x, GF_SHARDS,
1411- dam,0, TRUE, MS_BR_SHARDS, learnable);
1413+ dam,0, TRUE, MS_BR_SHARDS);
14121414
14131415 break;
14141416
@@ -1439,7 +1441,7 @@ bool monst_spell_monst(int m_idx)
14391441
14401442 dam = ((m_ptr->hp / 6) > 150 ? 150 : (m_ptr->hp / 6));
14411443 monst_breath_monst(m_idx, y, x, GF_PLASMA,
1442- dam,0, TRUE, MS_BR_PLASMA, learnable);
1444+ dam,0, TRUE, MS_BR_PLASMA);
14431445
14441446 break;
14451447
@@ -1470,7 +1472,7 @@ bool monst_spell_monst(int m_idx)
14701472
14711473 dam = ((m_ptr->hp / 6) > 200 ? 200 : (m_ptr->hp / 6));
14721474 monst_breath_monst(m_idx, y, x, GF_FORCE,
1473- dam,0, TRUE, MS_BR_FORCE, learnable);
1475+ dam,0, TRUE, MS_BR_FORCE);
14741476 break;
14751477
14761478 /* RF4_BR_MANA */
@@ -1500,7 +1502,7 @@ bool monst_spell_monst(int m_idx)
15001502
15011503 dam = ((m_ptr->hp / 3) > 250 ? 250 : (m_ptr->hp / 3));
15021504 monst_breath_monst(m_idx, y, x, GF_MANA,
1503- dam,0, TRUE, MS_BR_MANA, learnable);
1505+ dam,0, TRUE, MS_BR_MANA);
15041506
15051507 break;
15061508
@@ -1529,7 +1531,7 @@ bool monst_spell_monst(int m_idx)
15291531
15301532 dam = (rlev + damroll(10, 6));
15311533 monst_breath_monst(m_idx, y, x, GF_NUKE,
1532- dam, 2, FALSE, MS_BALL_NUKE, learnable);
1534+ dam, 2, FALSE, MS_BALL_NUKE);
15331535
15341536 break;
15351537
@@ -1560,7 +1562,7 @@ bool monst_spell_monst(int m_idx)
15601562
15611563 dam = ((m_ptr->hp / 3) > 800 ? 800 : (m_ptr->hp / 3));
15621564 monst_breath_monst(m_idx, y, x, GF_NUKE,
1563- dam,0, TRUE, MS_BR_NUKE, learnable);
1565+ dam,0, TRUE, MS_BR_NUKE);
15641566 break;
15651567
15661568 /* RF4_BA_CHAO */
@@ -1588,7 +1590,7 @@ bool monst_spell_monst(int m_idx)
15881590
15891591 dam = (rlev * 2) + damroll(10, 10);
15901592 monst_breath_monst(m_idx, y, x, GF_CHAOS,
1591- dam, 4, FALSE, MS_BALL_CHAOS, learnable);
1593+ dam, 4, FALSE, MS_BALL_CHAOS);
15921594
15931595 break;
15941596
@@ -1619,7 +1621,7 @@ bool monst_spell_monst(int m_idx)
16191621
16201622 dam = ((m_ptr->hp / 6) > 150 ? 150 : (m_ptr->hp / 6));
16211623 monst_breath_monst(m_idx, y, x, GF_DISINTEGRATE,
1622- dam,0, TRUE, MS_BR_DISI, learnable);
1624+ dam,0, TRUE, MS_BR_DISI);
16231625 break;
16241626
16251627 /* RF5_BA_ACID */
@@ -1656,7 +1658,7 @@ bool monst_spell_monst(int m_idx)
16561658 rad = 2;
16571659 dam = (randint1(rlev * 3) + 15);
16581660 }
1659- monst_breath_monst(m_idx, y, x, GF_ACID, dam, rad, FALSE, MS_BALL_ACID, learnable);
1661+ monst_breath_monst(m_idx, y, x, GF_ACID, dam, rad, FALSE, MS_BALL_ACID);
16601662 break;
16611663
16621664 /* RF5_BA_ELEC */
@@ -1692,7 +1694,7 @@ bool monst_spell_monst(int m_idx)
16921694 rad = 2;
16931695 dam = (randint1(rlev * 3 / 2) + 8);
16941696 }
1695- monst_breath_monst(m_idx, y, x, GF_ELEC, dam, rad, FALSE, MS_BALL_ELEC, learnable);
1697+ monst_breath_monst(m_idx, y, x, GF_ELEC, dam, rad, FALSE, MS_BALL_ELEC);
16961698 break;
16971699
16981700 /* RF5_BA_FIRE */
@@ -1739,7 +1741,7 @@ bool monst_spell_monst(int m_idx)
17391741 rad = 2;
17401742 dam = (randint1(rlev * 7 / 2) + 10);
17411743 }
1742- monst_breath_monst(m_idx, y, x, GF_FIRE, dam, rad, FALSE, MS_BALL_FIRE, learnable);
1744+ monst_breath_monst(m_idx, y, x, GF_FIRE, dam, rad, FALSE, MS_BALL_FIRE);
17431745 break;
17441746
17451747 /* RF5_BA_COLD */
@@ -1776,7 +1778,7 @@ bool monst_spell_monst(int m_idx)
17761778 rad = 2;
17771779 dam = (randint1(rlev * 3 / 2) + 10);
17781780 }
1779- monst_breath_monst(m_idx, y, x, GF_COLD, dam, rad, FALSE, MS_BALL_COLD, learnable);
1781+ monst_breath_monst(m_idx, y, x, GF_COLD, dam, rad, FALSE, MS_BALL_COLD);
17801782 break;
17811783
17821784 /* RF5_BA_POIS */
@@ -1804,7 +1806,7 @@ bool monst_spell_monst(int m_idx)
18041806 }
18051807
18061808 dam = damroll(12, 2) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
1807- monst_breath_monst(m_idx, y, x, GF_POIS, dam, 2, FALSE, MS_BALL_POIS, learnable);
1809+ monst_breath_monst(m_idx, y, x, GF_POIS, dam, 2, FALSE, MS_BALL_POIS);
18081810
18091811 break;
18101812
@@ -1832,7 +1834,7 @@ bool monst_spell_monst(int m_idx)
18321834 }
18331835
18341836 dam = 50 + damroll(10, 10) + (rlev * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1));
1835- monst_breath_monst(m_idx, y, x, GF_NETHER, dam, 2, FALSE, MS_BALL_NETHER, learnable);
1837+ monst_breath_monst(m_idx, y, x, GF_NETHER, dam, 2, FALSE, MS_BALL_NETHER);
18361838
18371839 break;
18381840
@@ -1862,7 +1864,7 @@ bool monst_spell_monst(int m_idx)
18621864 }
18631865
18641866 dam = ((r_ptr->flags2 & RF2_POWERFUL) ? randint1(rlev * 3) : randint1(rlev * 2)) + 50;
1865- monst_breath_monst(m_idx, y, x, GF_WATER, dam, 4, FALSE, MS_BALL_WATER, learnable);
1867+ monst_breath_monst(m_idx, y, x, GF_WATER, dam, 4, FALSE, MS_BALL_WATER);
18661868
18671869 break;
18681870
@@ -1890,7 +1892,7 @@ bool monst_spell_monst(int m_idx)
18901892 }
18911893
18921894 dam = (rlev * 4) + 50 + damroll(10, 10);
1893- monst_breath_monst(m_idx, y, x, GF_MANA, dam, 4, FALSE, MS_BALL_MANA, learnable);
1895+ monst_breath_monst(m_idx, y, x, GF_MANA, dam, 4, FALSE, MS_BALL_MANA);
18941896
18951897 break;
18961898
@@ -1918,7 +1920,7 @@ bool monst_spell_monst(int m_idx)
19181920 }
19191921
19201922 dam = (rlev * 4) + 50 + damroll(10, 10);
1921- monst_breath_monst(m_idx, y, x, GF_DARK, dam, 4, FALSE, MS_BALL_DARK, learnable);
1923+ monst_breath_monst(m_idx, y, x, GF_DARK, dam, 4, FALSE, MS_BALL_DARK);
19221924
19231925 break;
19241926
@@ -1931,7 +1933,7 @@ bool monst_spell_monst(int m_idx)
19311933 }
19321934
19331935 dam = ((randint1(rlev) / 2) + 1);
1934- monst_breath_monst(m_idx, y, x, GF_DRAIN_MANA, dam, 0, FALSE, MS_DRAIN_MANA, learnable);
1936+ monst_breath_monst(m_idx, y, x, GF_DRAIN_MANA, dam, 0, FALSE, MS_DRAIN_MANA);
19351937
19361938 break;
19371939
@@ -1943,7 +1945,7 @@ bool monst_spell_monst(int m_idx)
19431945 }
19441946
19451947 dam = damroll(7, 7);
1946- monst_breath_monst(m_idx, y, x, GF_MIND_BLAST, dam, 0, FALSE, MS_MIND_BLAST, learnable);
1948+ monst_breath_monst(m_idx, y, x, GF_MIND_BLAST, dam, 0, FALSE, MS_MIND_BLAST);
19471949
19481950 break;
19491951
@@ -1955,7 +1957,7 @@ bool monst_spell_monst(int m_idx)
19551957 }
19561958
19571959 dam = damroll(12, 12);
1958- monst_breath_monst(m_idx, y, x, GF_BRAIN_SMASH, dam, 0, FALSE, MS_BRAIN_SMASH, learnable);
1960+ monst_breath_monst(m_idx, y, x, GF_BRAIN_SMASH, dam, 0, FALSE, MS_BRAIN_SMASH);
19591961
19601962 break;
19611963
@@ -1974,7 +1976,7 @@ bool monst_spell_monst(int m_idx)
19741976 }
19751977
19761978 dam = damroll(3, 8);
1977- monst_breath_monst(m_idx, y, x, GF_CAUSE_1, dam, 0, FALSE, MS_CAUSE_1, learnable);
1979+ monst_breath_monst(m_idx, y, x, GF_CAUSE_1, dam, 0, FALSE, MS_CAUSE_1);
19781980
19791981 break;
19801982
@@ -1994,7 +1996,7 @@ bool monst_spell_monst(int m_idx)
19941996 }
19951997
19961998 dam = damroll(8, 8);
1997- monst_breath_monst(m_idx, y, x, GF_CAUSE_2, dam, 0, FALSE, MS_CAUSE_2, learnable);
1999+ monst_breath_monst(m_idx, y, x, GF_CAUSE_2, dam, 0, FALSE, MS_CAUSE_2);
19982000
19992001 break;
20002002
@@ -2014,7 +2016,7 @@ bool monst_spell_monst(int m_idx)
20142016 }
20152017
20162018 dam = damroll(10, 15);
2017- monst_breath_monst(m_idx, y, x, GF_CAUSE_3, dam, 0, FALSE, MS_CAUSE_3, learnable);
2019+ monst_breath_monst(m_idx, y, x, GF_CAUSE_3, dam, 0, FALSE, MS_CAUSE_3);
20182020
20192021 break;
20202022
@@ -2034,7 +2036,7 @@ bool monst_spell_monst(int m_idx)
20342036 }
20352037
20362038 dam = damroll(15, 15);
2037- monst_breath_monst(m_idx, y, x, GF_CAUSE_4, dam, 0, FALSE, MS_CAUSE_4, learnable);
2039+ monst_breath_monst(m_idx, y, x, GF_CAUSE_4, dam, 0, FALSE, MS_CAUSE_4);
20382040
20392041 break;
20402042
@@ -2053,8 +2055,7 @@ bool monst_spell_monst(int m_idx)
20532055 }
20542056
20552057 dam = (damroll(7, 8) + (rlev / 3)) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
2056- monst_bolt_monst(m_idx, y, x, GF_ACID,
2057- dam, MS_BOLT_ACID, learnable);
2058+ monst_bolt_monst(m_idx, y, x, GF_ACID, dam, MS_BOLT_ACID);
20582059
20592060 break;
20602061
@@ -2073,8 +2074,7 @@ bool monst_spell_monst(int m_idx)
20732074 }
20742075
20752076 dam = (damroll(4, 8) + (rlev / 3)) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
2076- monst_bolt_monst(m_idx, y, x, GF_ELEC,
2077- dam, MS_BOLT_ELEC, learnable);
2077+ monst_bolt_monst(m_idx, y, x, GF_ELEC, dam, MS_BOLT_ELEC);
20782078
20792079 break;
20802080
@@ -2093,8 +2093,7 @@ bool monst_spell_monst(int m_idx)
20932093 }
20942094
20952095 dam = (damroll(9, 8) + (rlev / 3)) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
2096- monst_bolt_monst(m_idx, y, x, GF_FIRE,
2097- dam, MS_BOLT_FIRE, learnable);
2096+ monst_bolt_monst(m_idx, y, x, GF_FIRE, dam, MS_BOLT_FIRE);
20982097
20992098 break;
21002099
@@ -2113,8 +2112,7 @@ bool monst_spell_monst(int m_idx)
21132112 }
21142113
21152114 dam = (damroll(6, 8) + (rlev / 3)) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
2116- monst_bolt_monst(m_idx, y, x, GF_COLD,
2117- dam, MS_BOLT_COLD, learnable);
2115+ monst_bolt_monst(m_idx, y, x, GF_COLD, dam, MS_BOLT_COLD);
21182116
21192117 break;
21202118
@@ -2143,7 +2141,7 @@ bool monst_spell_monst(int m_idx)
21432141 }
21442142
21452143 dam = (rlev * 4) + 50 + damroll(10, 10);
2146- monst_breath_monst(m_idx, y, x, GF_LITE, dam, 4, FALSE, MS_STARBURST, learnable);
2144+ monst_breath_monst(m_idx, y, x, GF_LITE, dam, 4, FALSE, MS_STARBURST);
21472145
21482146 break;
21492147
@@ -2163,8 +2161,7 @@ bool monst_spell_monst(int m_idx)
21632161 }
21642162
21652163 dam = 30 + damroll(5, 5) + (rlev * 4) / ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 3);
2166- monst_bolt_monst(m_idx, y, x, GF_NETHER,
2167- dam, MS_BOLT_NETHER, learnable);
2164+ monst_bolt_monst(m_idx, y, x, GF_NETHER, dam, MS_BOLT_NETHER);
21682165
21692166 break;
21702167
@@ -2184,8 +2181,7 @@ bool monst_spell_monst(int m_idx)
21842181 }
21852182
21862183 dam = damroll(10, 10) + (rlev * 3 / ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 3));
2187- monst_bolt_monst(m_idx, y, x, GF_WATER,
2188- dam, MS_BOLT_WATER, learnable);
2184+ monst_bolt_monst(m_idx, y, x, GF_WATER, dam, MS_BOLT_WATER);
21892185
21902186 break;
21912187
@@ -2205,8 +2201,7 @@ bool monst_spell_monst(int m_idx)
22052201 }
22062202
22072203 dam = randint1(rlev * 7 / 2) + 50;
2208- monst_bolt_monst(m_idx, y, x, GF_MANA,
2209- dam, MS_BOLT_MANA, learnable);
2204+ monst_bolt_monst(m_idx, y, x, GF_MANA, dam, MS_BOLT_MANA);
22102205
22112206 break;
22122207
@@ -2226,8 +2221,7 @@ bool monst_spell_monst(int m_idx)
22262221 }
22272222
22282223 dam = 10 + damroll(8, 7) + (rlev * 3 / ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 3));
2229- monst_bolt_monst(m_idx, y, x, GF_PLASMA,
2230- dam, MS_BOLT_PLASMA, learnable);
2224+ monst_bolt_monst(m_idx, y, x, GF_PLASMA, dam, MS_BOLT_PLASMA);
22312225
22322226 break;
22332227
@@ -2247,8 +2241,7 @@ bool monst_spell_monst(int m_idx)
22472241 }
22482242
22492243 dam = damroll(6, 6) + (rlev * 3 / ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 3));
2250- monst_bolt_monst(m_idx, y, x, GF_ICE,
2251- dam, MS_BOLT_ICE, learnable);
2244+ monst_bolt_monst(m_idx, y, x, GF_ICE, dam, MS_BOLT_ICE);
22522245
22532246 break;
22542247
@@ -2268,8 +2261,7 @@ bool monst_spell_monst(int m_idx)
22682261 }
22692262
22702263 dam = damroll(2, 6) + (rlev / 3);
2271- monst_bolt_monst(m_idx, y, x, GF_MISSILE,
2272- dam, MS_MAGIC_MISSILE, learnable);
2264+ monst_bolt_monst(m_idx, y, x, GF_MISSILE, dam, MS_MAGIC_MISSILE);
22732265
22742266 break;
22752267
@@ -2492,7 +2484,7 @@ bool monst_spell_monst(int m_idx)
24922484 }
24932485
24942486 dam = 20; /* Dummy power */
2495- monst_breath_monst(m_idx, y, x, GF_HAND_DOOM, dam, 0, FALSE, MS_HAND_DOOM, learnable);
2487+ monst_breath_monst(m_idx, y, x, GF_HAND_DOOM, dam, 0, FALSE, MS_HAND_DOOM);
24962488
24972489 break;
24982490
@@ -2881,8 +2873,7 @@ bool monst_spell_monst(int m_idx)
28812873 }
28822874
28832875 dam = (r_ptr->flags2 & RF2_POWERFUL) ? (randint1(rlev * 2) + 180) : (randint1(rlev * 3 / 2) + 120);
2884- monst_beam_monst(m_idx, y, x, GF_PSY_SPEAR,
2885- dam, MS_PSY_SPEAR, learnable);
2876+ monst_beam_monst(m_idx, y, x, GF_PSY_SPEAR, dam, MS_PSY_SPEAR);
28862877 break;
28872878
28882879 /* RF6_DARKNESS */
--- a/src/mspells4.c
+++ b/src/mspells4.c
@@ -2,7 +2,7 @@
22
33 cptr monster_name(int m_idx)
44 {
5- char m_name[80];
5+ static char m_name[80];
66 monster_type *m_ptr = &m_list[m_idx];
77 monster_desc(m_name, m_ptr, 0x00);
88 return m_name;
@@ -55,12 +55,12 @@ int spell_core(int SPELL_NUM, int hp, int y, int x, int m_idx, int SPELL_TYPE)
5555 dam = (hp / 4) > 800 ? 800 : (hp / 4);
5656 if (SPELL_TYPE == SPELL_MON_TO_PLAYER)
5757 {
58- breath(y, x, m_idx, GF_ROCKET, dam, 2, FALSE, MS_ROCKET, learnable);
58+ breath(y, x, m_idx, GF_ROCKET, dam, 2, FALSE, MS_ROCKET);
5959 update_smart_learn(m_idx, DRS_SHARD);
6060 }
6161 else if (SPELL_TYPE == SPELL_MON_TO_MON)
6262 {
63- monst_breath_monst(m_idx, y, x, GF_ROCKET, dam, 2, FALSE, MS_ROCKET, learnable);
63+ monst_breath_monst(m_idx, y, x, GF_ROCKET, dam, 2, FALSE, MS_ROCKET);
6464 }
6565 break;
6666 }
@@ -197,7 +197,7 @@ int spell_RF4_SHOOT(int m_idx)
197197 msg_format(_("%^sが矢を放った。", "%^s fires an arrow."), m_name);
198198
199199 dam = damroll(r_ptr->blow[0].d_dice, r_ptr->blow[0].d_side);
200- bolt(m_idx, GF_ARROW, dam, MS_SHOOT, learnable);
200+ bolt(m_idx, GF_ARROW, dam, MS_SHOOT);
201201 update_smart_learn(m_idx, DRS_REFLECT);
202202 return dam;
203203 }
@@ -367,7 +367,7 @@ int spell_RF4_BREATH(int GF_TYPE, int y, int x, int m_idx)
367367 msg_format(_("%^sが%^sのブレスを吐いた。", "%^s breathes %^s."), m_name, type_s);
368368 }
369369
370- breath(y, x, m_idx, GF_TYPE, dam, 0, TRUE, ms_type, learnable);
370+ breath(y, x, m_idx, GF_TYPE, dam, 0, TRUE, ms_type);
371371 if (smart_learn) update_smart_learn(m_idx, drs_type);
372372 return dam;
373373 }
@@ -390,7 +390,7 @@ int spell_RF4_BA_CHAO(int y, int x, int m_idx)
390390
391391 dam = ((r_ptr->flags2 & RF2_POWERFUL) ? (rlev * 3) : (rlev * 2)) + damroll(10, 10);
392392
393- breath(y, x, m_idx, GF_CHAOS, dam, 4, FALSE, MS_BALL_CHAOS, learnable);
393+ breath(y, x, m_idx, GF_CHAOS, dam, 4, FALSE, MS_BALL_CHAOS);
394394 update_smart_learn(m_idx, DRS_CHAOS);
395395 return dam;
396396 }
@@ -412,7 +412,7 @@ int spell_RF4_BA_NUKE(int y, int x, int m_idx)
412412
413413 dam = (rlev + damroll(10, 6)) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
414414
415- breath(y, x, m_idx, GF_NUKE, dam, 2, FALSE, MS_BALL_NUKE, learnable);
415+ breath(y, x, m_idx, GF_NUKE, dam, 2, FALSE, MS_BALL_NUKE);
416416 update_smart_learn(m_idx, DRS_POIS);
417417 return dam;
418418 }
@@ -442,7 +442,7 @@ int spell_RF5_BA_ACID(int y, int x, int m_idx)
442442 rad = 2;
443443 dam = (randint1(rlev * 3) + 15);
444444 }
445- breath(y, x, m_idx, GF_ACID, dam, rad, FALSE, MS_BALL_ACID, learnable);
445+ breath(y, x, m_idx, GF_ACID, dam, rad, FALSE, MS_BALL_ACID);
446446 update_smart_learn(m_idx, DRS_ACID);
447447 return dam;
448448 }
@@ -472,7 +472,7 @@ int spell_RF5_BA_ELEC(int y, int x, int m_idx)
472472 rad = 2;
473473 dam = (randint1(rlev * 3 / 2) + 8);
474474 }
475- breath(y, x, m_idx, GF_ELEC, dam, rad, FALSE, MS_BALL_ELEC, learnable);
475+ breath(y, x, m_idx, GF_ELEC, dam, rad, FALSE, MS_BALL_ELEC);
476476 update_smart_learn(m_idx, DRS_ELEC);
477477 return dam;
478478 }
@@ -512,7 +512,7 @@ int spell_RF5_BA_FIRE(int y, int x, int m_idx)
512512 rad = 2;
513513 dam = (randint1(rlev * 7 / 2) + 10);
514514 }
515- breath(y, x, m_idx, GF_FIRE, dam, rad, FALSE, MS_BALL_FIRE, learnable);
515+ breath(y, x, m_idx, GF_FIRE, dam, rad, FALSE, MS_BALL_FIRE);
516516 update_smart_learn(m_idx, DRS_FIRE);
517517 return dam;
518518 }
@@ -542,7 +542,7 @@ int spell_RF5_BA_COLD(int y, int x, int m_idx)
542542 rad = 2;
543543 dam = (randint1(rlev * 3 / 2) + 10);
544544 }
545- breath(y, x, m_idx, GF_COLD, dam, rad, FALSE, MS_BALL_COLD, learnable);
545+ breath(y, x, m_idx, GF_COLD, dam, rad, FALSE, MS_BALL_COLD);
546546 update_smart_learn(m_idx, DRS_COLD);
547547 return dam;
548548 }
@@ -563,7 +563,7 @@ int spell_RF5_BA_POIS(int y, int x, int m_idx)
563563 msg_format(_("%^sが悪臭雲の呪文を唱えた。", "%^s casts a stinking cloud."), m_name);
564564
565565 dam = damroll(12, 2) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
566- breath(y, x, m_idx, GF_POIS, dam, 2, FALSE, MS_BALL_POIS, learnable);
566+ breath(y, x, m_idx, GF_POIS, dam, 2, FALSE, MS_BALL_POIS);
567567 update_smart_learn(m_idx, DRS_POIS);
568568 return dam;
569569 }
@@ -583,7 +583,7 @@ int spell_RF5_BA_NETH(int y, int x, int m_idx)
583583 msg_format(_("%^sが地獄球の呪文を唱えた。", "%^s casts a nether ball."), m_name);
584584
585585 dam = 50 + damroll(10, 10) + (rlev * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1));
586- breath(y, x, m_idx, GF_NETHER, dam, 2, FALSE, MS_BALL_NETHER, learnable);
586+ breath(y, x, m_idx, GF_NETHER, dam, 2, FALSE, MS_BALL_NETHER);
587587 update_smart_learn(m_idx, DRS_NETH);
588588 return dam;
589589 }
@@ -606,13 +606,12 @@ int spell_RF5_BA_WATE(int y, int x, int m_idx)
606606 msg_print(_("あなたは渦巻きに飲み込まれた。", "You are engulfed in a whirlpool."));
607607
608608 dam = ((r_ptr->flags2 & RF2_POWERFUL) ? randint1(rlev * 3) : randint1(rlev * 2)) + 50;
609- breath(y, x, m_idx, GF_WATER, dam, 4, FALSE, MS_BALL_WATER, learnable);
609+ breath(y, x, m_idx, GF_WATER, dam, 4, FALSE, MS_BALL_WATER);
610610 return dam;
611611 }
612612
613613 int spell_RF5_BA_MANA(int y, int x, int m_idx)
614614 {
615- bool learnable = spell_learnable(m_idx);
616615 cptr m_name = monster_name(m_idx);
617616 monster_type *m_ptr = &m_list[m_idx];
618617 monster_race *r_ptr = &r_info[m_ptr->r_idx];
@@ -625,13 +624,12 @@ int spell_RF5_BA_MANA(int y, int x, int m_idx)
625624 msg_format(_("%^sが魔力の嵐の呪文を念じた。", "%^s invokes a mana storm."), m_name);
626625
627626 dam = (rlev * 4) + 50 + damroll(10, 10);
628- breath(y, x, m_idx, GF_MANA, dam, 4, FALSE, MS_BALL_MANA, learnable);
627+ breath(y, x, m_idx, GF_MANA, dam, 4, FALSE, MS_BALL_MANA);
629628 return dam;
630629 }
631630
632631 int spell_RF5_BA_DARK(int y, int x, int m_idx)
633632 {
634- bool learnable = spell_learnable(m_idx);
635633 cptr m_name = monster_name(m_idx);
636634 monster_type *m_ptr = &m_list[m_idx];
637635 monster_race *r_ptr = &r_info[m_ptr->r_idx];
@@ -645,28 +643,26 @@ int spell_RF5_BA_DARK(int y, int x, int m_idx)
645643 msg_format(_("%^sが暗黒の嵐の呪文を念じた。", "%^s invokes a darkness storm."), m_name);
646644
647645 dam = (rlev * 4) + 50 + damroll(10, 10);
648- breath(y, x, m_idx, GF_DARK, dam, 4, FALSE, MS_BALL_DARK, learnable);
646+ breath(y, x, m_idx, GF_DARK, dam, 4, FALSE, MS_BALL_DARK);
649647 update_smart_learn(m_idx, DRS_DARK);
650648 return dam;
651649 }
652650
653651 int spell_RF5_DRAIN_MANA(int y, int x, int m_idx)
654652 {
655- bool learnable = spell_learnable(m_idx);
656653 cptr m_name = monster_name(m_idx);
657654 int rlev = monster_level_idx(m_idx);
658655 int dam;
659656 disturb(1, 1);
660657
661658 dam = (randint1(rlev) / 2) + 1;
662- breath(y, x, m_idx, GF_DRAIN_MANA, dam, 0, FALSE, MS_DRAIN_MANA, learnable);
659+ breath(y, x, m_idx, GF_DRAIN_MANA, dam, 0, FALSE, MS_DRAIN_MANA);
663660 update_smart_learn(m_idx, DRS_MANA);
664661 return dam;
665662 }
666663
667664 int spell_RF5_MIND_BLAST(int y, int x, int m_idx)
668665 {
669- bool learnable = spell_learnable(m_idx);
670666 cptr m_name = monster_name(m_idx);
671667 monster_type *m_ptr = &m_list[m_idx];
672668 bool seen = (!p_ptr->blind && m_ptr->ml);
@@ -679,13 +675,12 @@ int spell_RF5_MIND_BLAST(int y, int x, int m_idx)
679675 msg_format(_("%^sがあなたの瞳をじっとにらんでいる。", "%^s gazes deep into your eyes."), m_name);
680676
681677 dam = damroll(7, 7);
682- breath(y, x, m_idx, GF_MIND_BLAST, dam, 0, FALSE, MS_MIND_BLAST, learnable);
678+ breath(y, x, m_idx, GF_MIND_BLAST, dam, 0, FALSE, MS_MIND_BLAST);
683679 return dam;
684680 }
685681
686682 int spell_RF5_BRAIN_SMASH(int y, int x, int m_idx)
687683 {
688- bool learnable = spell_learnable(m_idx);
689684 cptr m_name = monster_name(m_idx);
690685 monster_type *m_ptr = &m_list[m_idx];
691686 bool seen = (!p_ptr->blind && m_ptr->ml);
@@ -698,13 +693,12 @@ int spell_RF5_BRAIN_SMASH(int y, int x, int m_idx)
698693 msg_format(_("%^sがあなたの瞳をじっと見ている。", "%^s looks deep into your eyes."), m_name);
699694
700695 dam = damroll(12, 12);
701- breath(y, x, m_idx, GF_BRAIN_SMASH, dam, 0, FALSE, MS_BRAIN_SMASH, learnable);
696+ breath(y, x, m_idx, GF_BRAIN_SMASH, dam, 0, FALSE, MS_BRAIN_SMASH);
702697 return dam;
703698 }
704699
705700 int spell_RF5_CAUSE_1(int y, int x, int m_idx)
706701 {
707- bool learnable = spell_learnable(m_idx);
708702 cptr m_name = monster_name(m_idx);
709703 int rlev = monster_level_idx(m_idx);
710704 int dam;
@@ -716,13 +710,12 @@ int spell_RF5_CAUSE_1(int y, int x, int m_idx)
716710 msg_format(_("%^sがあなたを指さして呪った。", "%^s points at you and curses."), m_name);
717711
718712 dam = damroll(3, 8);
719- breath(y, x, m_idx, GF_CAUSE_1, dam, 0, FALSE, MS_CAUSE_1, learnable);
713+ breath(y, x, m_idx, GF_CAUSE_1, dam, 0, FALSE, MS_CAUSE_1);
720714 return dam;
721715 }
722716
723717 int spell_RF5_CAUSE_2(int y, int x, int m_idx)
724718 {
725- bool learnable = spell_learnable(m_idx);
726719 cptr m_name = monster_name(m_idx);
727720 int rlev = monster_level_idx(m_idx);
728721 int dam;
@@ -734,13 +727,12 @@ int spell_RF5_CAUSE_2(int y, int x, int m_idx)
734727 msg_format(_("%^sがあなたを指さして恐ろしげに呪った。", "%^s points at you and curses horribly."), m_name);
735728
736729 dam = damroll(8, 8);
737- breath(y, x, m_idx, GF_CAUSE_2, dam, 0, FALSE, MS_CAUSE_2, learnable);
730+ breath(y, x, m_idx, GF_CAUSE_2, dam, 0, FALSE, MS_CAUSE_2);
738731 return dam;
739732 }
740733
741734 int spell_RF5_CAUSE_3(int y, int x, int m_idx)
742735 {
743- bool learnable = spell_learnable(m_idx);
744736 cptr m_name = monster_name(m_idx);
745737 int rlev = monster_level_idx(m_idx);
746738 int dam;
@@ -752,13 +744,12 @@ int spell_RF5_CAUSE_3(int y, int x, int m_idx)
752744 msg_format(_("%^sがあなたを指さして恐ろしげに呪文を唱えた!", "%^s points at you, incanting terribly!"), m_name);
753745
754746 dam = damroll(10, 15);
755- breath(y, x, m_idx, GF_CAUSE_3, dam, 0, FALSE, MS_CAUSE_3, learnable);
747+ breath(y, x, m_idx, GF_CAUSE_3, dam, 0, FALSE, MS_CAUSE_3);
756748 return dam;
757749 }
758750
759751 int spell_RF5_CAUSE_4(int y, int x, int m_idx)
760752 {
761- bool learnable = spell_learnable(m_idx);
762753 cptr m_name = monster_name(m_idx);
763754 int rlev = monster_level_idx(m_idx);
764755 int dam;
@@ -771,7 +762,7 @@ int spell_RF5_CAUSE_4(int y, int x, int m_idx)
771762 "%^s points at you, screaming the word DIE!"), m_name);
772763
773764 dam = damroll(15, 15);
774- breath(y, x, m_idx, GF_CAUSE_4, dam, 0, FALSE, MS_CAUSE_4, learnable);
765+ breath(y, x, m_idx, GF_CAUSE_4, dam, 0, FALSE, MS_CAUSE_4);
775766 return dam;
776767 }
777768
@@ -791,7 +782,7 @@ int spell_RF5_BO_ACID(int y, int x, int m_idx)
791782 msg_format(_("%^sがアシッド・ボルトの呪文を唱えた。", "%^s casts a acid bolt."), m_name);
792783
793784 dam = (damroll(7, 8) + (rlev / 3)) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
794- bolt(m_idx, GF_ACID, dam, MS_BOLT_ACID, learnable);
785+ bolt(m_idx, GF_ACID, dam, MS_BOLT_ACID);
795786 update_smart_learn(m_idx, DRS_ACID);
796787 update_smart_learn(m_idx, DRS_REFLECT);
797788 return dam;
@@ -813,7 +804,7 @@ int spell_RF5_BO_ELEC(int y, int x, int m_idx)
813804 msg_format(_("%^sがサンダー・ボルトの呪文を唱えた。", "%^s casts a lightning bolt."), m_name);
814805
815806 dam = (damroll(4, 8) + (rlev / 3)) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
816- bolt(m_idx, GF_ELEC, dam, MS_BOLT_ELEC, learnable);
807+ bolt(m_idx, GF_ELEC, dam, MS_BOLT_ELEC);
817808 update_smart_learn(m_idx, DRS_ELEC);
818809 update_smart_learn(m_idx, DRS_REFLECT);
819810 return dam;
@@ -835,7 +826,7 @@ int spell_RF5_BO_FIRE(int y, int x, int m_idx)
835826 msg_format(_("%^sがファイア・ボルトの呪文を唱えた。", "%^s casts a fire bolt."), m_name);
836827
837828 dam = (damroll(9, 8) + (rlev / 3)) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
838- bolt(m_idx, GF_FIRE, dam, MS_BOLT_FIRE, learnable);
829+ bolt(m_idx, GF_FIRE, dam, MS_BOLT_FIRE);
839830 update_smart_learn(m_idx, DRS_FIRE);
840831 update_smart_learn(m_idx, DRS_REFLECT);
841832 return dam;
@@ -857,7 +848,7 @@ int spell_RF5_BO_COLD(int y, int x, int m_idx)
857848 msg_format(_("%^sがアイス・ボルトの呪文を唱えた。", "%^s casts a frost bolt."), m_name);
858849
859850 dam = (damroll(6, 8) + (rlev / 3)) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
860- bolt(m_idx, GF_COLD, dam, MS_BOLT_COLD, learnable);
851+ bolt(m_idx, GF_COLD, dam, MS_BOLT_COLD);
861852 update_smart_learn(m_idx, DRS_COLD);
862853 update_smart_learn(m_idx, DRS_REFLECT);
863854 return dam;
@@ -866,7 +857,6 @@ int spell_RF5_BO_COLD(int y, int x, int m_idx)
866857
867858 int spell_RF5_BA_LITE(int y, int x, int m_idx)
868859 {
869- bool learnable = spell_learnable(m_idx);
870860 cptr m_name = monster_name(m_idx);
871861 int rlev = monster_level_idx(m_idx);
872862 int dam;
@@ -878,7 +868,7 @@ int spell_RF5_BA_LITE(int y, int x, int m_idx)
878868 msg_format(_("%^sがスターバーストの呪文を念じた。", "%^s invokes a starburst."), m_name);
879869
880870 dam = (rlev * 4) + 50 + damroll(10, 10);
881- breath(y, x, m_idx, GF_LITE, dam, 4, FALSE, MS_STARBURST, learnable);
871+ breath(y, x, m_idx, GF_LITE, dam, 4, FALSE, MS_STARBURST);
882872 update_smart_learn(m_idx, DRS_LITE);
883873 return dam;
884874 }
@@ -900,7 +890,7 @@ int spell_RF5_BO_NETH(int y, int x, int m_idx)
900890 msg_format(_("%^sが地獄の矢の呪文を唱えた。", "%^s casts a nether bolt."), m_name);
901891
902892 dam = 30 + damroll(5, 5) + (rlev * 4) / ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 3);
903- bolt(m_idx, GF_NETHER, dam, MS_BOLT_NETHER, learnable);
893+ bolt(m_idx, GF_NETHER, dam, MS_BOLT_NETHER);
904894 update_smart_learn(m_idx, DRS_NETH);
905895 update_smart_learn(m_idx, DRS_REFLECT);
906896 return dam;
@@ -922,7 +912,7 @@ int spell_RF5_BO_WATE(int y, int x, int m_idx)
922912 msg_format(_("%^sがウォーター・ボルトの呪文を唱えた。", "%^s casts a water bolt."), m_name);
923913
924914 dam = damroll(10, 10) + (rlev * 3 / ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 3));
925- bolt(m_idx, GF_WATER, dam, MS_BOLT_WATER, learnable);
915+ bolt(m_idx, GF_WATER, dam, MS_BOLT_WATER);
926916 update_smart_learn(m_idx, DRS_REFLECT);
927917 return dam;
928918 }
@@ -942,7 +932,7 @@ int spell_RF5_BO_MANA(int y, int x, int m_idx)
942932 msg_format(_("%^sが魔力の矢の呪文を唱えた。", "%^s casts a mana bolt."), m_name);
943933
944934 dam = randint1(rlev * 7 / 2) + 50;
945- bolt(m_idx, GF_MANA, dam, MS_BOLT_MANA, learnable);
935+ bolt(m_idx, GF_MANA, dam, MS_BOLT_MANA);
946936 update_smart_learn(m_idx, DRS_REFLECT);
947937 return dam;
948938 }
@@ -963,7 +953,7 @@ int spell_RF5_BO_PLAS(int y, int x, int m_idx)
963953 msg_format(_("%^sがプラズマ・ボルトの呪文を唱えた。", "%^s casts a plasma bolt."), m_name);
964954
965955 dam = 10 + damroll(8, 7) + (rlev * 3 / ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 3));
966- bolt(m_idx, GF_PLASMA, dam, MS_BOLT_PLASMA, learnable);
956+ bolt(m_idx, GF_PLASMA, dam, MS_BOLT_PLASMA);
967957 update_smart_learn(m_idx, DRS_REFLECT);
968958 return dam;
969959 }
@@ -983,7 +973,7 @@ int spell_RF5_BO_ICEE(int y, int x, int m_idx)
983973 msg_format(_("%^sが極寒の矢の呪文を唱えた。", "%^s casts an ice bolt."), m_name);
984974
985975 dam = damroll(6, 6) + (rlev * 3 / ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 3));
986- bolt(m_idx, GF_ICE, dam, MS_BOLT_ICE, learnable);
976+ bolt(m_idx, GF_ICE, dam, MS_BOLT_ICE);
987977 update_smart_learn(m_idx, DRS_COLD);
988978 update_smart_learn(m_idx, DRS_REFLECT);
989979 return dam;
@@ -1003,7 +993,7 @@ int spell_RF5_MISSILE(int y, int x, int m_idx)
1003993 msg_format(_("%^sがマジック・ミサイルの呪文を唱えた。", "%^s casts a magic missile."), m_name);
1004994
1005995 dam = damroll(2, 6) + (rlev / 3);
1006- bolt(m_idx, GF_MISSILE, dam, MS_MAGIC_MISSILE, learnable);
996+ bolt(m_idx, GF_MISSILE, dam, MS_MAGIC_MISSILE);
1007997 update_smart_learn(m_idx, DRS_REFLECT);
1008998 return dam;
1009999 }
@@ -1167,14 +1157,13 @@ void spell_RF6_HASTE(int m_idx)
11671157
11681158 int spell_RF6_HAND_DOOM(int y, int x, int m_idx)
11691159 {
1170- bool learnable = spell_learnable(m_idx);
11711160 cptr m_name = monster_name(m_idx);
11721161 monster_type *m_ptr = &m_list[m_idx];
11731162 int dam;
11741163 disturb(1, 1);
11751164 msg_format(_("%^sが<破滅の手>を放った!", "%^s invokes the Hand of Doom!"), m_name);
11761165 dam = (((s32b)((40 + randint1(20)) * (p_ptr->chp))) / 100);
1177- breath(y, x, m_idx, GF_HAND_DOOM, dam, 0, FALSE, MS_HAND_DOOM, learnable);
1166+ breath(y, x, m_idx, GF_HAND_DOOM, dam, 0, FALSE, MS_HAND_DOOM);
11781167 return dam;
11791168 }
11801169
@@ -1509,7 +1498,7 @@ int spell_RF6_PSY_SPEAR(int m_idx)
15091498 msg_format(_("%^sが光の剣を放った。", "%^s throw a Psycho-Spear."), m_name);
15101499
15111500 dam = (r_ptr->flags2 & RF2_POWERFUL) ? (randint1(rlev * 2) + 150) : (randint1(rlev * 3 / 2) + 100);
1512- beam(m_idx, GF_PSY_SPEAR, dam, MS_PSY_SPEAR, learnable);
1501+ beam(m_idx, GF_PSY_SPEAR, dam, MS_PSY_SPEAR);
15131502 return dam;
15141503 }
15151504
--- a/src/xtra2.c
+++ b/src/xtra2.c
@@ -1785,7 +1785,7 @@ static void get_exp_from_mon(int dam, monster_type *m_ptr)
17851785 }
17861786
17871787 /* Special penalty for rest_and_shoot exp scum */
1788- if ((m_ptr->dealt_damage > m_ptr->max_maxhp) && (m_ptr->hp >= 0))
1788+ if ((m_ptr->dealt_damage > (u32b)m_ptr->max_maxhp) && (m_ptr->hp >= 0))
17891789 {
17901790 int over_damage = m_ptr->dealt_damage / m_ptr->max_maxhp;
17911791 if (over_damage > 32) over_damage = 32;
@@ -1880,7 +1880,7 @@ bool mon_take_hit(int m_idx, int dam, bool *fear, cptr note)
18801880 m_ptr->hp -= dam;
18811881
18821882 m_ptr->dealt_damage += dam;
1883- if(m_ptr->dealt_damage > m_ptr->max_maxhp * 100) m_ptr->dealt_damage = m_ptr->max_maxhp * 100;
1883+ if(m_ptr->dealt_damage > (u32b)m_ptr->max_maxhp * 100) m_ptr->dealt_damage = m_ptr->max_maxhp * 100;
18841884 if (p_ptr->wizard)
18851885 {
18861886 msg_format( _("合計%d/%dのダメージを与えた。","You do %d (out of %d) damage."),
旧リポジトリブラウザで表示