From: dis- Date: Tue, 25 Feb 2014 10:31:55 +0000 (+0900) Subject: refactor: share monspell_damage in cast_learned_spell X-Git-Tag: v2.2.0~286 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=316d30d402d899081a1383ff202ba9d5caa73c15;p=hengbandforosx%2Fhengbandosx.git refactor: share monspell_damage in cast_learned_spell --- diff --git a/src/externs.h b/src/externs.h index 5bd8305d7..9d466256d 100644 --- a/src/externs.h +++ b/src/externs.h @@ -1600,6 +1600,7 @@ extern int monspell_to_player(int SPELL_NUM, int y, int x, int m_idx); extern int monspell_to_monster(int SPELL_NUM, int y, int x, int m_idx, int t_idx); extern int monspell_damage(int SPELL_NUM, int m_idx, int TYPE); extern int monspell_race_damage(int SPELL_NUM, int r_idx, int TYPE); +extern int monspell_bluemage_damage(int SPELL_NUM, int plev, int TYPE); /* hissatsu.c */ extern void hissatsu_info(char *p, int power); diff --git a/src/mspells3.c b/src/mspells3.c index 671f6640e..f6497677f 100644 --- a/src/mspells3.c +++ b/src/mspells3.c @@ -724,12 +724,7 @@ static bool cast_learned_spell(int spell, bool success) switch (spell) { case MS_SHRIEK: -#ifdef JP -msg_print("¤«¤ó¹â¤¤¶âÀÚ¤êÀ¼¤ò¤¢¤²¤¿¡£"); -#else - msg_print("You make a high pitched shriek."); -#endif - + msg_print(_("¤«¤ó¹â¤¤¶âÀÚ¤êÀ¼¤ò¤¢¤²¤¿¡£", "You make a high pitched shriek.")); aggravate_monsters(0); break; case MS_XXX1: @@ -748,38 +743,20 @@ msg_print(" } case MS_ROCKET: if (!get_aim_dir(&dir)) return FALSE; - else -#ifdef JP -msg_print("¥í¥±¥Ã¥È¤òȯ¼Í¤·¤¿¡£"); -#else - msg_print("You fire a rocket."); -#endif - damage = hp / 4; - fire_rocket(GF_ROCKET, dir, damage, 2); + + msg_print(_("¥í¥±¥Ã¥È¤òȯ¼Í¤·¤¿¡£", "You fire a rocket.")); + damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_ROCKET), plev, DAM_ROLL); + fire_rocket(GF_ROCKET, dir, damage, 2); break; case MS_SHOOT: { object_type *o_ptr = NULL; if (!get_aim_dir(&dir)) return FALSE; - else - { -#ifdef JP -msg_print("Ìð¤òÊü¤Ã¤¿¡£"); -#else - msg_print("You fire an arrow."); -#endif - if (buki_motteruka(INVEN_RARM)) o_ptr = &inventory[INVEN_RARM]; - else if (buki_motteruka(INVEN_LARM)) o_ptr = &inventory[INVEN_LARM]; - else - damage = 1; - if (o_ptr) - { - damage = damroll(o_ptr->dd, o_ptr->ds)+ o_ptr->to_d; - if (damage < 1) damage = 1; - } - fire_bolt(GF_ARROW, dir, damage); - } + + msg_print(_("Ìð¤òÊü¤Ã¤¿¡£", "You fire an arrow.")); + damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_SHOOT), plev, DAM_ROLL); + fire_bolt(GF_ARROW, dir, damage); break; } case MS_XXX2: @@ -790,487 +767,358 @@ msg_print(" break; case MS_BR_ACID: if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("»À¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£"); -#else - else msg_print("You breathe acid."); -#endif - damage = hp / 3; + + msg_print(_("»À¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", "You breathe acid.")); + damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_ACID), plev, DAM_ROLL); fire_ball(GF_ACID, dir, damage, (plev > 40 ? -3 : -2)); break; case MS_BR_ELEC: if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("°ðºÊ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£"); -#else - else msg_print("You breathe lightning."); -#endif - damage = hp / 3; + + msg_print(_("°ðºÊ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", "You breathe lightning.")); + damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_ELEC), plev, DAM_ROLL); fire_ball(GF_ELEC, dir, damage, (plev > 40 ? -3 : -2)); break; case MS_BR_FIRE: if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("²Ð±ê¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£"); -#else - else msg_print("You breathe fire."); -#endif - damage = hp / 3; + + msg_print(_("²Ð±ê¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", "You breathe fire.")); + damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_FIRE), plev, DAM_ROLL); fire_ball(GF_FIRE, dir, damage, (plev > 40 ? -3 : -2)); break; case MS_BR_COLD: - if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("Î䵤¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£"); -#else - else msg_print("You breathe frost."); -#endif - damage = hp / 3; + if (!get_aim_dir(&dir)) return FALSE; + + msg_print(_("Î䵤¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", "You breathe frost.")); + damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_COLD), plev, DAM_ROLL); fire_ball(GF_COLD, dir, damage, (plev > 40 ? -3 : -2)); break; case MS_BR_POIS: - if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("¥¬¥¹¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£"); -#else - else msg_print("You breathe gas."); -#endif - damage = hp / 3; + if (!get_aim_dir(&dir)) return FALSE; + + msg_print(_("¥¬¥¹¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", "You breathe gas.")); + damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_POIS), plev, DAM_ROLL); fire_ball(GF_POIS, dir, damage, (plev > 40 ? -3 : -2)); break; case MS_BR_NETHER: - if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("ÃϹö¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£"); -#else - else msg_print("You breathe nether."); -#endif - damage = hp / 6; + if (!get_aim_dir(&dir)) return FALSE; + + msg_print(_("ÃϹö¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", "You breathe nether.")); + damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_NETH), plev, DAM_ROLL); fire_ball(GF_NETHER, dir, damage, (plev > 40 ? -3 : -2)); break; case MS_BR_LITE: if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("Á®¸÷¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£"); -#else - else msg_print("You breathe light."); -#endif - damage = hp / 6; + + msg_print(_("Á®¸÷¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", "You breathe light.")); + damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_LITE), plev, DAM_ROLL); fire_ball(GF_LITE, dir, damage, (plev > 40 ? -3 : -2)); break; case MS_BR_DARK: if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("°Å¹õ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£"); -#else - else msg_print("You breathe darkness."); -#endif - damage = hp / 6; + + msg_print(_("°Å¹õ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", "You breathe darkness.")); + damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_DARK), plev, DAM_ROLL); fire_ball(GF_DARK, dir, damage, (plev > 40 ? -3 : -2)); break; case MS_BR_CONF: if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("º®Íð¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£"); -#else - else msg_print("You breathe confusion."); -#endif - damage = hp / 6; + + msg_print(_("º®Íð¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", "You breathe confusion.")); + damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_CONF), plev, DAM_ROLL); fire_ball(GF_CONFUSION, dir, damage, (plev > 40 ? -3 : -2)); break; case MS_BR_SOUND: if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("¹ì²»¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£"); -#else - else msg_print("You breathe sound."); -#endif - damage = hp / 6; + + msg_print(_("¹ì²»¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", "You breathe sound.")); + damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_SOUN), plev, DAM_ROLL); fire_ball(GF_SOUND, dir, damage, (plev > 40 ? -3 : -2)); break; case MS_BR_CHAOS: if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("¥«¥ª¥¹¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£"); -#else - else msg_print("You breathe chaos."); -#endif - damage = hp / 6; + + msg_print(_("¥«¥ª¥¹¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", "You breathe chaos.")); + damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_CHAO), plev, DAM_ROLL); fire_ball(GF_CHAOS, dir, damage, (plev > 40 ? -3 : -2)); break; case MS_BR_DISEN: if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("Îô²½¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£"); -#else - else msg_print("You breathe disenchantment."); -#endif - damage = hp / 6; + + msg_print(_("Îô²½¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", "You breathe disenchantment.")); + damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_DISE), plev, DAM_ROLL); fire_ball(GF_DISENCHANT, dir, damage, (plev > 40 ? -3 : -2)); break; case MS_BR_NEXUS: if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("°ø²Ìº®Íð¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£"); -#else - else msg_print("You breathe nexus."); -#endif - damage = MIN(hp / 3, 250); + + msg_print(_("°ø²Ìº®Íð¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", "You breathe nexus.")); + damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_NEXU), plev, DAM_ROLL); fire_ball(GF_NEXUS, dir, damage, (plev > 40 ? -3 : -2)); break; case MS_BR_TIME: if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("»þ´ÖµÕž¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£"); -#else - else msg_print("You breathe time."); -#endif - damage = MIN(hp / 3, 150); + + msg_print(_("»þ´ÖµÕž¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", "You breathe time.")); + damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_TIME), plev, DAM_ROLL); fire_ball(GF_TIME, dir, damage, (plev > 40 ? -3 : -2)); break; case MS_BR_INERTIA: if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("ÃÙÆߤΥ֥쥹¤òÅǤ¤¤¿¡£"); -#else - else msg_print("You breathe inertia."); -#endif - damage = MIN(hp / 6, 200); + + msg_print(_("ÃÙÆߤΥ֥쥹¤òÅǤ¤¤¿¡£", "You breathe inertia.")); + damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_INER), plev, DAM_ROLL); fire_ball(GF_INERTIA, dir, damage, (plev > 40 ? -3 : -2)); break; case MS_BR_GRAVITY: if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("½ÅÎϤΥ֥쥹¤òÅǤ¤¤¿¡£"); -#else - else msg_print("You breathe gravity."); -#endif - damage = MIN(hp / 3, 200); + + msg_print(_("½ÅÎϤΥ֥쥹¤òÅǤ¤¤¿¡£", "You breathe gravity.")); + damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_GRAV), plev, DAM_ROLL); fire_ball(GF_GRAVITY, dir, damage, (plev > 40 ? -3 : -2)); break; case MS_BR_SHARDS: - if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("ÇËÊҤΥ֥쥹¤òÅǤ¤¤¿¡£"); -#else - else msg_print("You breathe shards."); -#endif - damage = hp / 6; + if (!get_aim_dir(&dir)) return FALSE; + + msg_print(_("ÇËÊҤΥ֥쥹¤òÅǤ¤¤¿¡£", "You breathe shards.")); + damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_SHAR), plev, DAM_ROLL); fire_ball(GF_SHARDS, dir, damage, (plev > 40 ? -3 : -2)); break; case MS_BR_PLASMA: - if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("¥×¥é¥º¥Þ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£"); -#else - else msg_print("You breathe plasma."); -#endif - damage = MIN(hp / 6, 150); + if (!get_aim_dir(&dir)) return FALSE; + + msg_print(_("¥×¥é¥º¥Þ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", "You breathe plasma.")); + damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_PLAS), plev, DAM_ROLL); fire_ball(GF_PLASMA, dir, damage, (plev > 40 ? -3 : -2)); break; case MS_BR_FORCE: - if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("¥Õ¥©¡¼¥¹¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£"); -#else - else msg_print("You breathe force."); -#endif - damage = MIN(hp / 6, 200); + if (!get_aim_dir(&dir)) return FALSE; + + msg_print(_("¥Õ¥©¡¼¥¹¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", "You breathe force.")); + damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_WALL), plev, DAM_ROLL); fire_ball(GF_FORCE, dir, damage, (plev > 40 ? -3 : -2)); break; case MS_BR_MANA: if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("ËâÎϤΥ֥쥹¤òÅǤ¤¤¿¡£"); -#else - else msg_print("You breathe mana."); -#endif - - damage = MIN(hp / 3, 250); + + msg_print(_("ËâÎϤΥ֥쥹¤òÅǤ¤¤¿¡£", "You breathe mana.")); + damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_MANA), plev, DAM_ROLL); fire_ball(GF_MANA, dir, damage, (plev > 40 ? -3 : -2)); break; case MS_BALL_NUKE: if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("Êü¼Íǽµå¤òÊü¤Ã¤¿¡£"); -#else - else msg_print("You cast a ball of radiation."); -#endif - damage = plev * 2 + damroll(10, 6); + + msg_print(_("Êü¼Íǽµå¤òÊü¤Ã¤¿¡£", "You cast a ball of radiation.")); + damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BA_NUKE), plev, DAM_ROLL); fire_ball(GF_NUKE, dir, damage, 2); break; case MS_BR_NUKE: if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("Êü¼ÍÀ­ÇÑ´þʪ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£"); -#else - else msg_print("You breathe toxic waste."); -#endif - damage = hp / 3; + + msg_print(_("Êü¼ÍÀ­ÇÑ´þʪ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", "You breathe toxic waste.")); + damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_NUKE), plev, DAM_ROLL); fire_ball(GF_NUKE, dir, damage, (plev > 40 ? -3 : -2)); break; case MS_BALL_CHAOS: if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("½ã¥í¥°¥ë¥¹¤òÊü¤Ã¤¿¡£"); -#else - else msg_print("You invoke a raw Logrus."); -#endif - damage = plev * 4 + damroll(10, 10); + + msg_print(_("½ã¥í¥°¥ë¥¹¤òÊü¤Ã¤¿¡£", "You invoke a raw Logrus.")); + damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BA_CHAO), plev, DAM_ROLL); fire_ball(GF_CHAOS, dir, damage, 4); break; case MS_BR_DISI: if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("ʬ²ò¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£"); -#else - else msg_print("You breathe disintegration."); -#endif - damage = MIN(hp / 6, 150); + + msg_print(_("ʬ²ò¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", "You breathe disintegration.")); + damage = monspell_bluemage_damage(monspell_num(RF4_SPELL_START, RF4_BR_DISI), plev, DAM_ROLL); fire_ball(GF_DISINTEGRATE, dir, damage, (plev > 40 ? -3 : -2)); break; case MS_BALL_ACID: if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£"); -#else - else msg_print("You cast an acid ball."); -#endif - damage = randint1(plev * 6) + 15; + + msg_print(_("¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£", "You cast an acid ball.")); + damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_BA_ACID), plev, DAM_ROLL); fire_ball(GF_ACID, dir, damage, 2); break; case MS_BALL_ELEC: - if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£"); -#else - else msg_print("You cast a lightning ball."); -#endif - damage = randint1(plev * 3) + 8; + if (!get_aim_dir(&dir)) return FALSE; + + msg_print(_("¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£", "You cast a lightning ball.")); + damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_BA_ELEC), plev, DAM_ROLL); fire_ball(GF_ELEC, dir, damage, 2); break; case MS_BALL_FIRE: if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£"); -#else - else msg_print("You cast a fire ball."); -#endif - damage = randint1(plev * 7) + 10; + + msg_print(_("¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£", "You cast a fire ball.")); + damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_BA_FIRE), plev, DAM_ROLL); fire_ball(GF_FIRE, dir, damage, 2); break; case MS_BALL_COLD: - if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("¥¢¥¤¥¹¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£"); -#else - else msg_print("You cast a frost ball."); -#endif - damage = randint1(plev * 3) + 10; + if (!get_aim_dir(&dir)) return FALSE; + + msg_print(_("¥¢¥¤¥¹¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£", "You cast a frost ball.")); + damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_BA_COLD), plev, DAM_ROLL); fire_ball(GF_COLD, dir, damage, 2); break; case MS_BALL_POIS: if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("°­½­±À¤Î¼öʸ¤ò¾§¤¨¤¿¡£"); -#else - else msg_print("You cast a stinking cloud."); -#endif - damage = damroll(12,2); + + msg_print(_("°­½­±À¤Î¼öʸ¤ò¾§¤¨¤¿¡£", "You cast a stinking cloud.")); + damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_BA_POIS), plev, DAM_ROLL); fire_ball(GF_POIS, dir, damage, 2); break; case MS_BALL_NETHER: - if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("ÃϹöµå¤Î¼öʸ¤ò¾§¤¨¤¿¡£"); -#else - else msg_print("You cast a nether ball."); -#endif - damage = plev * 2 + 50 + damroll(10, 10); + if (!get_aim_dir(&dir)) return FALSE; + + msg_print(_("ÃϹöµå¤Î¼öʸ¤ò¾§¤¨¤¿¡£", "You cast a nether ball.")); + damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_BA_NETH), plev, DAM_ROLL); fire_ball(GF_NETHER, dir, damage, 2); break; case MS_BALL_WATER: if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("ή¤ì¤ë¤è¤¦¤Ê¿È¿¶¤ê¤ò¤·¤¿¡£"); -#else - else msg_print("You gesture fluidly."); -#endif - damage = randint1(plev * 4) + 50; + + msg_print(_("ή¤ì¤ë¤è¤¦¤Ê¿È¿¶¤ê¤ò¤·¤¿¡£", "You gesture fluidly.")); + damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_BA_WATE), plev, DAM_ROLL); fire_ball(GF_WATER, dir, damage, 4); break; case MS_BALL_MANA: - if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("ËâÎϤÎÍò¤Î¼öʸ¤òÇ°¤¸¤¿¡£"); -#else - else msg_print("You invoke a mana storm."); -#endif - damage = plev * 8 + 50 + damroll(10, 10); + if (!get_aim_dir(&dir)) return FALSE; + + msg_print(_("ËâÎϤÎÍò¤Î¼öʸ¤òÇ°¤¸¤¿¡£", "You invoke a mana storm.")); + damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_BA_MANA), plev, DAM_ROLL); fire_ball(GF_MANA, dir, damage, 4); break; case MS_BALL_DARK: if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("°Å¹õ¤ÎÍò¤Î¼öʸ¤òÇ°¤¸¤¿¡£"); -#else - else msg_print("You invoke a darkness storm."); -#endif - damage = plev * 8 + 50 + damroll(10, 10); + + msg_print(_("°Å¹õ¤ÎÍò¤Î¼öʸ¤òÇ°¤¸¤¿¡£", "You invoke a darkness storm.")); + damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_BA_DARK), plev, DAM_ROLL); fire_ball(GF_DARK, dir, damage, 4); break; case MS_DRAIN_MANA: if (!get_aim_dir(&dir)) return FALSE; - fire_ball_hide(GF_DRAIN_MANA, dir, randint1(plev)+plev, 0); + + damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_DRAIN_MANA), plev, DAM_ROLL); + fire_ball_hide(GF_DRAIN_MANA, dir, damage, 0); break; case MS_MIND_BLAST: if (!get_aim_dir(&dir)) return FALSE; - damage = damroll(7, 7); + + damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_MIND_BLAST), plev, DAM_ROLL); fire_ball_hide(GF_MIND_BLAST, dir, damage, 0); break; case MS_BRAIN_SMASH: - if (!get_aim_dir(&dir)) return FALSE; - damage = damroll(12, 12); + if (!get_aim_dir(&dir)) return FALSE; + + damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_BRAIN_SMASH), plev, DAM_ROLL); fire_ball_hide(GF_BRAIN_SMASH, dir, damage, 0); break; case MS_CAUSE_1: if (!get_aim_dir(&dir)) return FALSE; - damage = damroll(3, 8); + + damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_CAUSE_1), plev, DAM_ROLL); fire_ball_hide(GF_CAUSE_1, dir, damage, 0); break; case MS_CAUSE_2: if (!get_aim_dir(&dir)) return FALSE; - damage = damroll(8, 8); + + damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_CAUSE_2), plev, DAM_ROLL); fire_ball_hide(GF_CAUSE_2, dir, damage, 0); break; case MS_CAUSE_3: if (!get_aim_dir(&dir)) return FALSE; - damage = damroll(10, 15); + + damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_CAUSE_3), plev, DAM_ROLL); fire_ball_hide(GF_CAUSE_3, dir, damage, 0); break; case MS_CAUSE_4: if (!get_aim_dir(&dir)) return FALSE; - damage = damroll(15, 15); + + damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_CAUSE_4), plev, DAM_ROLL); fire_ball_hide(GF_CAUSE_4, dir, damage, 0); break; case MS_BOLT_ACID: if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£"); -#else - else msg_print("You cast an acid bolt."); -#endif - damage = damroll(7, 8) + plev * 2 / 3; - fire_bolt(GF_ACID, dir, damage); + + msg_print(_("¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£", "You cast an acid bolt.")); + damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_BO_ACID), plev, DAM_ROLL); + fire_bolt(GF_ACID, dir, damage); break; case MS_BOLT_ELEC: if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£"); -#else - else msg_print("You cast a lightning bolt."); -#endif - damage = damroll(4, 8) + plev * 2 / 3; + + msg_print(_("¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£", "You cast a lightning bolt.")); + damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_BO_ELEC), plev, DAM_ROLL); fire_bolt(GF_ELEC, dir, damage); break; case MS_BOLT_FIRE: if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£"); -#else - else msg_print("You cast a fire bolt."); -#endif - damage = damroll(9, 8) + plev * 2 / 3; + + msg_print(_("¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£", "You cast a fire bolt.")); + damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_BO_FIRE), plev, DAM_ROLL); fire_bolt(GF_FIRE, dir, damage); break; case MS_BOLT_COLD: if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("¥¢¥¤¥¹¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£"); -#else - else msg_print("You cast a frost bolt."); -#endif - damage = damroll(6, 8) + plev * 2 / 3; + + msg_print(_("¥¢¥¤¥¹¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£", "You cast a frost bolt.")); + damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_BO_COLD), plev, DAM_ROLL); fire_bolt(GF_COLD, dir, damage); break; case MS_STARBURST: if (!get_aim_dir(&dir)) return FALSE; - else -#ifdef JP -msg_print("¥¹¥¿¡¼¥Ð¡¼¥¹¥È¤Î¼öʸ¤òÇ°¤¸¤¿¡£"); -#else - msg_print("You invoke a starburst."); -#endif - damage = plev * 8 + 50 + damroll(10, 10); + + msg_print(_("¥¹¥¿¡¼¥Ð¡¼¥¹¥È¤Î¼öʸ¤òÇ°¤¸¤¿¡£", "You invoke a starburst.")); + damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_BA_LITE), plev, DAM_ROLL); fire_ball(GF_LITE, dir, damage, 4); break; case MS_BOLT_NETHER: if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("ÃϹö¤ÎÌð¤Î¼öʸ¤ò¾§¤¨¤¿¡£"); -#else - else msg_print("You cast a nether bolt."); -#endif - damage = 30 + damroll(5, 5) + plev * 8 / 3; + + msg_print(_("ÃϹö¤ÎÌð¤Î¼öʸ¤ò¾§¤¨¤¿¡£", "You cast a nether bolt.")); + damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_BO_NETH), plev, DAM_ROLL); fire_bolt(GF_NETHER, dir, damage); break; case MS_BOLT_WATER: if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("¥¦¥©¡¼¥¿¡¼¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£"); -#else - else msg_print("You cast a water bolt."); -#endif - damage = damroll(10, 10) + plev * 2; + + msg_print(_("¥¦¥©¡¼¥¿¡¼¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£", "You cast a water bolt.")); + damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_BO_WATE), plev, DAM_ROLL); fire_bolt(GF_WATER, dir, damage); break; case MS_BOLT_MANA: if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("ËâÎϤÎÌð¤Î¼öʸ¤ò¾§¤¨¤¿¡£"); -#else - else msg_print("You cast a mana bolt."); -#endif - damage = randint1(plev * 7) + 50; + + msg_print(_("ËâÎϤÎÌð¤Î¼öʸ¤ò¾§¤¨¤¿¡£", "You cast a mana bolt.")); + damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_BO_MANA), plev, DAM_ROLL); fire_bolt(GF_MANA, dir, damage); break; case MS_BOLT_PLASMA: if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("¥×¥é¥º¥Þ¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£"); -#else - else msg_print("You cast a plasma bolt."); -#endif - damage = 10 + damroll(8, 7) + plev * 2; + + msg_print(_("¥×¥é¥º¥Þ¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£", "You cast a plasma bolt.")); + damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_BO_PLAS), plev, DAM_ROLL); fire_bolt(GF_PLASMA, dir, damage); break; case MS_BOLT_ICE: if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("¶Ë´¨¤ÎÌð¤Î¼öʸ¤ò¾§¤¨¤¿¡£"); -#else - else msg_print("You cast a ice bolt."); -#endif - damage = damroll(6, 6) + plev * 2; + + msg_print(_("¶Ë´¨¤ÎÌð¤Î¼öʸ¤ò¾§¤¨¤¿¡£", "You cast a ice bolt.")); + damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_BO_ICEE), plev, DAM_ROLL); fire_bolt(GF_ICE, dir, damage); break; case MS_MAGIC_MISSILE: if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£"); -#else - else msg_print("You cast a magic missile."); -#endif - damage = damroll(2, 6) + plev * 2 / 3; + + msg_print(_("¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£", "You cast a magic missile.")); + damage = monspell_bluemage_damage(monspell_num(RF5_SPELL_START, RF5_MISSILE), plev, DAM_ROLL); fire_bolt(GF_MISSILE, dir, damage); break; case MS_SCARE: if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("¶²¤í¤·¤²¤Ê¸¸³Ð¤òºî¤ê½Ð¤·¤¿¡£"); -#else - else msg_print("You cast a fearful illusion."); -#endif + + msg_print(_("¶²¤í¤·¤²¤Ê¸¸³Ð¤òºî¤ê½Ð¤·¤¿¡£", "You cast a fearful illusion.")); fear_monster(dir, plev+10); break; case MS_BLIND: @@ -1279,11 +1127,8 @@ else msg_print(" break; case MS_CONF: if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("ͶÏÇŪ¤Ê¸¸³Ð¤ò¤Ä¤¯¤ê½Ð¤·¤¿¡£"); -#else - else msg_print("You cast a mesmerizing illusion."); -#endif + + msg_print(_("ͶÏÇŪ¤Ê¸¸³Ð¤ò¤Ä¤¯¤ê½Ð¤·¤¿¡£", "You cast a mesmerizing illusion.")); confuse_monster(dir, plev * 2); break; case MS_SLOW: @@ -1300,31 +1145,19 @@ else msg_print("Ͷ case MS_HAND_DOOM: { if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("<ÇËÌǤμê>¤òÊü¤Ã¤¿¡ª"); -#else - else msg_print("You invoke the Hand of Doom!"); -#endif + msg_print(_("<ÇËÌǤμê>¤òÊü¤Ã¤¿¡ª", "You invoke the Hand of Doom!")); fire_ball_hide(GF_HAND_DOOM, dir, plev * 3, 0); break; } case MS_HEAL: -#ifdef JP -msg_print("¼«Ê¬¤Î½ý¤ËÇ°¤ò½¸Ã椷¤¿¡£"); -#else - msg_print("You concentrate on your wounds!"); -#endif + msg_print(_("¼«Ê¬¤Î½ý¤ËÇ°¤ò½¸Ã椷¤¿¡£", "You concentrate on your wounds!")); (void)hp_player(plev*4); (void)set_stun(0); (void)set_cut(0); break; case MS_INVULNER: -#ifdef JP -msg_print("̵½ý¤Îµå¤Î¼öʸ¤ò¾§¤¨¤¿¡£"); -#else - msg_print("You cast a Globe of Invulnerability."); -#endif + msg_print(_("̵½ý¤Îµå¤Î¼öʸ¤ò¾§¤¨¤¿¡£", "You cast a Globe of Invulnerability.")); (void)set_invuln(randint1(4) + 4, FALSE); break; case MS_BLINK: @@ -1334,12 +1167,8 @@ msg_print("̵ teleport_player(plev * 5, 0L); break; case MS_WORLD: - world_player = TRUE; -#ifdef JP - msg_print("¡Ö»þ¤è¡ª¡×"); -#else - msg_print("'Time!'"); -#endif + world_player = TRUE; + msg_print(_("¡Ö»þ¤è¡ª¡×", "'Time!'")); msg_print(NULL); /* Hack */ @@ -1376,32 +1205,17 @@ msg_print("̵ if ((r_ptr->flags1 & (RF1_UNIQUE)) || (r_ptr->flagsr & RFR_RES_ALL)) { if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= RFR_RES_TELE; -#ifdef JP - msg_format("%s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡ª", m_name); -#else - msg_format("%s is unaffected!", m_name); -#endif - + msg_format(_("%s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡ª", "%s is unaffected!"), m_name); break; } else if (r_ptr->level > randint1(100)) { if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= RFR_RES_TELE; -#ifdef JP - msg_format("%s¤Ë¤ÏÂÑÀ­¤¬¤¢¤ë¡ª", m_name); -#else - msg_format("%s resists!", m_name); -#endif - + msg_format(_("%s¤Ë¤ÏÂÑÀ­¤¬¤¢¤ë¡ª", "%s resists!"), m_name); break; } } -#ifdef JP -msg_format("%s¤ò°ú¤­Ìᤷ¤¿¡£", m_name); -#else - msg_format("You command %s to return.", m_name); -#endif - + msg_format(_("%s¤ò°ú¤­Ìᤷ¤¿¡£", "You command %s to return."), m_name); teleport_monster_to(cave[target_row][target_col].m_idx, py, px, 100, TELEPORT_PASSIVE); break; } @@ -1425,20 +1239,12 @@ msg_format("%s m_ptr = &m_list[target_m_idx]; r_ptr = &r_info[m_ptr->r_idx]; monster_desc(m_name, m_ptr, 0); -#ifdef JP - msg_format("%^s¤Î­¤ò»Ø¤µ¤·¤¿¡£", m_name); -#else - msg_format("You gesture at %^s's feet.", m_name); -#endif + msg_format(_("%^s¤Î­¤ò»Ø¤µ¤·¤¿¡£", "You gesture at %^s's feet."), m_name); if ((r_ptr->flagsr & (RFR_EFF_RES_NEXU_MASK | RFR_RES_TELE)) || (r_ptr->flags1 & RF1_QUESTOR) || (r_ptr->level + randint1(50) > plev + randint1(60))) { -#ifdef JP - msg_print("¤·¤«¤·¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡ª"); -#else - msg_format("%^s is unaffected!", m_name); -#endif + msg_print(_("¤·¤«¤·¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡ª", "%^s is unaffected!"), m_name); } else teleport_level(target_m_idx); break; @@ -1446,64 +1252,38 @@ msg_format("%s case MS_PSY_SPEAR: if (!get_aim_dir(&dir)) return FALSE; -#ifdef JP -else msg_print("¸÷¤Î·õ¤òÊü¤Ã¤¿¡£"); -#else - else msg_print("You throw a psycho-spear."); -#endif - damage = randint1(plev * 3) + 100; + msg_print(_("¸÷¤Î·õ¤òÊü¤Ã¤¿¡£", "You throw a psycho-spear.")); + damage = monspell_bluemage_damage(monspell_num(RF6_SPELL_START, RF6_PSY_SPEAR), plev, DAM_ROLL); (void)fire_beam(GF_PSY_SPEAR, dir, damage); break; case MS_DARKNESS: -#ifdef JP -msg_print("°Å°Ç¤ÎÃæ¤Ç¼ê¤ò¿¶¤Ã¤¿¡£"); -#else - msg_print("You gesture in shadow."); -#endif + + msg_print(_("°Å°Ç¤ÎÃæ¤Ç¼ê¤ò¿¶¤Ã¤¿¡£", "You gesture in shadow.")); (void)unlite_area(10, 3); break; case MS_MAKE_TRAP: if (!target_set(TARGET_KILL)) return FALSE; -#ifdef JP -msg_print("¼öʸ¤ò¾§¤¨¤Æ¼Ù°­¤ËÈù¾Ð¤ó¤À¡£"); -#else - msg_print("You cast a spell and cackle evilly."); -#endif + + msg_print(_("¼öʸ¤ò¾§¤¨¤Æ¼Ù°­¤ËÈù¾Ð¤ó¤À¡£", "You cast a spell and cackle evilly.")); trap_creation(target_row, target_col); break; case MS_FORGET: -#ifdef JP -msg_print("¤·¤«¤·²¿¤âµ¯¤­¤Ê¤«¤Ã¤¿¡£"); -#else - msg_print("Nothing happen."); -#endif + msg_print(_("¤·¤«¤·²¿¤âµ¯¤­¤Ê¤«¤Ã¤¿¡£", "Nothing happen.")); break; - case MS_RAISE_DEAD: -#ifdef JP -msg_print("»à¼ÔÉü³è¤Î¼öʸ¤ò¾§¤¨¤¿¡£"); -#else - msg_print("You cast a animate dead."); -#endif + case MS_RAISE_DEAD: + msg_print(_("»à¼ÔÉü³è¤Î¼öʸ¤ò¾§¤¨¤¿¡£", "You cast a animate dead.")); (void)animate_dead(0, py, px); break; case MS_S_KIN: { int k; -#ifdef JP -msg_print("±ç·³¤ò¾¤´­¤·¤¿¡£"); -#else - msg_print("You summon minions."); -#endif + + msg_print(_("±ç·³¤ò¾¤´­¤·¤¿¡£", "You summon minions.")); for (k = 0;k < 1; k++) { if (summon_kin_player(summon_lev, py, px, (pet ? PM_FORCE_PET : 0L))) { - if (!pet) -#ifdef JP -msg_print("¾¤´­¤µ¤ì¤¿Ãç´Ö¤ÏÅܤäƤ¤¤ë¡ª"); -#else -msg_print("Summoned fellows are angry!"); -#endif + if (!pet) msg_print(_("¾¤´­¤µ¤ì¤¿Ãç´Ö¤ÏÅܤäƤ¤¤ë¡ª", "Summoned fellows are angry!")); } else { @@ -1515,20 +1295,13 @@ msg_print("Summoned fellows are angry!"); case MS_S_CYBER: { int k; -#ifdef JP -msg_print("¥µ¥¤¥Ð¡¼¥Ç¡¼¥â¥ó¤ò¾¤´­¤·¤¿¡ª"); -#else - msg_print("You summon a Cyberdemon!"); -#endif + + msg_print(_("¥µ¥¤¥Ð¡¼¥Ç¡¼¥â¥ó¤ò¾¤´­¤·¤¿¡ª", "You summon a Cyberdemon!")); for (k = 0 ;k < 1 ; k++) if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_CYBER, p_mode)) { - if (!pet) -#ifdef JP -msg_print("¾¤´­¤µ¤ì¤¿¥µ¥¤¥Ð¡¼¥Ç¡¼¥â¥ó¤ÏÅܤäƤ¤¤ë¡ª"); -#else -msg_print("The summoned Cyberdemon are angry!"); -#endif + if (!pet) + msg_print(_("¾¤´­¤µ¤ì¤¿¥µ¥¤¥Ð¡¼¥Ç¡¼¥â¥ó¤ÏÅܤäƤ¤¤ë¡ª", "The summoned Cyberdemon are angry!")); } else { @@ -1539,20 +1312,12 @@ msg_print("The summoned Cyberdemon are angry!"); case MS_S_MONSTER: { int k; -#ifdef JP -msg_print("Ãç´Ö¤ò¾¤´­¤·¤¿¡£"); -#else - msg_print("You summon help."); -#endif + msg_print(_("Ãç´Ö¤ò¾¤´­¤·¤¿¡£", "You summon help.")); for (k = 0;k < 1; k++) if (summon_specific((pet ? -1 : 0), py, px, summon_lev, 0, p_mode)) { - if (!pet) -#ifdef JP -msg_print("¾¤´­¤µ¤ì¤¿¥â¥ó¥¹¥¿¡¼¤ÏÅܤäƤ¤¤ë¡ª"); -#else -msg_print("The summoned monster is angry!"); -#endif + if (!pet) + msg_print(_("¾¤´­¤µ¤ì¤¿¥â¥ó¥¹¥¿¡¼¤ÏÅܤäƤ¤¤ë¡ª", "The summoned monster is angry!")); } else { @@ -1563,20 +1328,12 @@ msg_print("The summoned monster is angry!"); case MS_S_MONSTERS: { int k; -#ifdef JP -msg_print("¥â¥ó¥¹¥¿¡¼¤ò¾¤´­¤·¤¿¡ª"); -#else - msg_print("You summon monsters!"); -#endif + msg_print(_("¥â¥ó¥¹¥¿¡¼¤ò¾¤´­¤·¤¿¡ª", "You summon monsters!")); for (k = 0;k < plev / 15 + 2; k++) if(summon_specific((pet ? -1 : 0), py, px, summon_lev, 0, (p_mode | u_mode))) { - if (!pet) -#ifdef JP -msg_print("¾¤´­¤µ¤ì¤¿¥â¥ó¥¹¥¿¡¼¤ÏÅܤäƤ¤¤ë¡ª"); -#else -msg_print("Summoned monsters are angry!"); -#endif + if (!pet) + msg_print(_("¾¤´­¤µ¤ì¤¿¥â¥ó¥¹¥¿¡¼¤ÏÅܤäƤ¤¤ë¡ª", "The summoned monsters are angry!")); } else { @@ -1587,20 +1344,12 @@ msg_print("Summoned monsters are angry!"); case MS_S_ANT: { int k; -#ifdef JP -msg_print("¥¢¥ê¤ò¾¤´­¤·¤¿¡£"); -#else - msg_print("You summon ants."); -#endif + msg_print(_("¥¢¥ê¤ò¾¤´­¤·¤¿¡£", "You summon ants.")); for (k = 0;k < 1; k++) if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_ANT, (PM_ALLOW_GROUP | p_mode))) { - if (!pet) -#ifdef JP -msg_print("¾¤´­¤µ¤ì¤¿¥¢¥ê¤ÏÅܤäƤ¤¤ë¡ª"); -#else -msg_print("Summoned ants are angry!"); -#endif + if (!pet) + msg_print(_("¾¤´­¤µ¤ì¤¿¥¢¥ê¤ÏÅܤäƤ¤¤ë¡ª", "The summoned ants are angry!")); } else { @@ -1611,20 +1360,12 @@ msg_print("Summoned ants are angry!"); case MS_S_SPIDER: { int k; -#ifdef JP -msg_print("ÃØéá¤ò¾¤´­¤·¤¿¡£"); -#else - msg_print("You summon spiders."); -#endif + msg_print(_("ÃØéá¤ò¾¤´­¤·¤¿¡£", "You summon spiders.")); for (k = 0;k < 1; k++) if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_SPIDER, (PM_ALLOW_GROUP | p_mode))) { - if (!pet) -#ifdef JP -msg_print("¾¤´­¤µ¤ì¤¿ÃØéá¤ÏÅܤäƤ¤¤ë¡ª"); -#else -msg_print("Summoned spiders are angry!"); -#endif + if (!pet) + msg_print(_("¾¤´­¤µ¤ì¤¿ÃØéá¤ÏÅܤäƤ¤¤ë¡ª", "Summoned spiders are angry!")); } else { @@ -1635,20 +1376,12 @@ msg_print("Summoned spiders are angry!"); case MS_S_HOUND: { int k; -#ifdef JP -msg_print("¥Ï¥¦¥ó¥É¤ò¾¤´­¤·¤¿¡£"); -#else - msg_print("You summon hounds."); -#endif + msg_print(_("¥Ï¥¦¥ó¥É¤ò¾¤´­¤·¤¿¡£", "You summon hounds.")); for (k = 0;k < 1; k++) if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_HOUND, (PM_ALLOW_GROUP | p_mode))) { - if (!pet) -#ifdef JP -msg_print("¾¤´­¤µ¤ì¤¿¥Ï¥¦¥ó¥É¤ÏÅܤäƤ¤¤ë¡ª"); -#else -msg_print("Summoned hounds are angry!"); -#endif + if (!pet) + msg_print(_("¾¤´­¤µ¤ì¤¿¥Ï¥¦¥ó¥É¤ÏÅܤäƤ¤¤ë¡ª", "Summoned hounds are angry!")); } else { @@ -1659,20 +1392,12 @@ msg_print("Summoned hounds are angry!"); case MS_S_HYDRA: { int k; -#ifdef JP -msg_print("¥Ò¥É¥é¤ò¾¤´­¤·¤¿¡£"); -#else - msg_print("You summon a hydras."); -#endif + msg_print(_("¥Ò¥É¥é¤ò¾¤´­¤·¤¿¡£", "You summon a hydras.")); for (k = 0;k < 1; k++) if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_HYDRA, (g_mode | p_mode))) { - if (!pet) -#ifdef JP -msg_print("¾¤´­¤µ¤ì¤¿¥Ò¥É¥é¤ÏÅܤäƤ¤¤ë¡ª"); -#else -msg_print("Summoned hydras are angry!"); -#endif + if (!pet) + msg_print(_("¾¤´­¤µ¤ì¤¿¥Ò¥É¥é¤ÏÅܤäƤ¤¤ë¡ª", "Summoned hydras are angry!")); } else { @@ -1683,20 +1408,12 @@ msg_print("Summoned hydras are angry!"); case MS_S_ANGEL: { int k; -#ifdef JP -msg_print("Å·»È¤ò¾¤´­¤·¤¿¡ª"); -#else - msg_print("You summon an angel!"); -#endif + msg_print(_("Å·»È¤ò¾¤´­¤·¤¿¡ª", "You summon an angel!")); for (k = 0;k < 1; k++) if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_ANGEL, (g_mode | p_mode))) { - if (!pet) -#ifdef JP -msg_print("¾¤´­¤µ¤ì¤¿Å·»È¤ÏÅܤäƤ¤¤ë¡ª"); -#else -msg_print("Summoned angels are angry!"); -#endif + if (!pet) + msg_print(_("¾¤´­¤µ¤ì¤¿Å·»È¤ÏÅܤäƤ¤¤ë¡ª", "Summoned angels are angry!")); } else { @@ -1707,20 +1424,12 @@ msg_print("Summoned angels are angry!"); case MS_S_DEMON: { int k; -#ifdef JP -msg_print("º®Æ٤εÜÄ¤é°­Ëâ¤ò¾¤´­¤·¤¿¡ª"); -#else - msg_print("You summon a demon from the Courts of Chaos!"); -#endif + msg_print(_("º®Æ٤εÜÄ¤é°­Ëâ¤ò¾¤´­¤·¤¿¡ª", "You summon a demon from the Courts of Chaos!")); for (k = 0;k < 1; k++) if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_DEMON, (g_mode | p_mode))) { - if (!pet) -#ifdef JP -msg_print("¾¤´­¤µ¤ì¤¿¥Ç¡¼¥â¥ó¤ÏÅܤäƤ¤¤ë¡ª"); -#else -msg_print("Summoned demons are angry!"); -#endif + if (!pet) + msg_print(_("¾¤´­¤µ¤ì¤¿¥Ç¡¼¥â¥ó¤ÏÅܤäƤ¤¤ë¡ª", "Summoned demons are angry!")); } else { @@ -1731,20 +1440,12 @@ msg_print("Summoned demons are angry!"); case MS_S_UNDEAD: { int k; -#ifdef JP -msg_print("¥¢¥ó¥Ç¥Ã¥É¤Î¶¯Å¨¤ò¾¤´­¤·¤¿¡ª"); -#else - msg_print("You summon an undead adversary!"); -#endif + msg_print(_("¥¢¥ó¥Ç¥Ã¥É¤Î¶¯Å¨¤ò¾¤´­¤·¤¿¡ª", "You summon an undead adversary!")); for (k = 0;k < 1; k++) if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_UNDEAD, (g_mode | p_mode))) { - if (!pet) -#ifdef JP -msg_print("¾¤´­¤µ¤ì¤¿¥¢¥ó¥Ç¥Ã¥É¤ÏÅܤäƤ¤¤ë¡ª"); -#else -msg_print("Summoned undeads are angry!"); -#endif + if (!pet) + msg_print(_("¾¤´­¤µ¤ì¤¿¥¢¥ó¥Ç¥Ã¥É¤ÏÅܤäƤ¤¤ë¡ª", "Summoned undeads are angry!")); } else { @@ -1755,20 +1456,12 @@ msg_print("Summoned undeads are angry!"); case MS_S_DRAGON: { int k; -#ifdef JP -msg_print("¥É¥é¥´¥ó¤ò¾¤´­¤·¤¿¡ª"); -#else - msg_print("You summon a dragon!"); -#endif + msg_print(_("¥É¥é¥´¥ó¤ò¾¤´­¤·¤¿¡ª", "You summon a dragon!")); for (k = 0;k < 1; k++) if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_DRAGON, (g_mode | p_mode))) { - if (!pet) -#ifdef JP -msg_print("¾¤´­¤µ¤ì¤¿¥É¥é¥´¥ó¤ÏÅܤäƤ¤¤ë¡ª"); -#else -msg_print("Summoned dragons are angry!"); -#endif + if (!pet) + msg_print(_("¾¤´­¤µ¤ì¤¿¥É¥é¥´¥ó¤ÏÅܤäƤ¤¤ë¡ª", "Summoned dragons are angry!")); } else { @@ -1779,20 +1472,12 @@ msg_print("Summoned dragons are angry!"); case MS_S_HI_UNDEAD: { int k; -#ifdef JP -msg_print("¶¯ÎϤʥ¢¥ó¥Ç¥Ã¥É¤ò¾¤´­¤·¤¿¡ª"); -#else - msg_print("You summon a greater undead!"); -#endif + msg_print(_("¶¯ÎϤʥ¢¥ó¥Ç¥Ã¥É¤ò¾¤´­¤·¤¿¡ª", "You summon a greater undead!")); for (k = 0;k < 1; k++) if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_HI_UNDEAD, (g_mode | p_mode | u_mode))) { - if (!pet) -#ifdef JP -msg_print("¾¤´­¤µ¤ì¤¿¾åµé¥¢¥ó¥Ç¥Ã¥É¤ÏÅܤäƤ¤¤ë¡ª"); -#else -msg_print("Summoned greater undeads are angry!"); -#endif + if (!pet) + msg_print(_("¾¤´­¤µ¤ì¤¿¾åµé¥¢¥ó¥Ç¥Ã¥É¤ÏÅܤäƤ¤¤ë¡ª", "Summoned greater undeads are angry!")); } else { @@ -1803,20 +1488,12 @@ msg_print("Summoned greater undeads are angry!"); case MS_S_HI_DRAGON: { int k; -#ifdef JP -msg_print("¸ÅÂå¥É¥é¥´¥ó¤ò¾¤´­¤·¤¿¡ª"); -#else - msg_print("You summon an ancient dragon!"); -#endif + msg_print(_("¸ÅÂå¥É¥é¥´¥ó¤ò¾¤´­¤·¤¿¡ª", "You summon an ancient dragon!")); for (k = 0;k < 1; k++) if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_HI_DRAGON, (g_mode | p_mode | u_mode))) { - if (!pet) -#ifdef JP -msg_print("¾¤´­¤µ¤ì¤¿¸ÅÂå¥É¥é¥´¥ó¤ÏÅܤäƤ¤¤ë¡ª"); -#else -msg_print("Summoned ancient dragons are angry!"); -#endif + if (!pet) + msg_print(_("¾¤´­¤µ¤ì¤¿¸ÅÂå¥É¥é¥´¥ó¤ÏÅܤäƤ¤¤ë¡ª", "Summoned ancient dragons are angry!")); } else { @@ -1827,20 +1504,12 @@ msg_print("Summoned ancient dragons are angry!"); case MS_S_AMBERITE: { int k; -#ifdef JP -msg_print("¥¢¥ó¥Ð¡¼¤Î²¦Â²¤ò¾¤´­¤·¤¿¡ª"); -#else - msg_print("You summon a Lord of Amber!"); -#endif + msg_print(_("¥¢¥ó¥Ð¡¼¤Î²¦Â²¤ò¾¤´­¤·¤¿¡ª", "You summon a Lord of Amber!")); for (k = 0;k < 1; k++) if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_AMBERITES, (g_mode | p_mode | u_mode))) { - if (!pet) -#ifdef JP -msg_print("¾¤´­¤µ¤ì¤¿¥¢¥ó¥Ð¡¼¤Î²¦Â²¤ÏÅܤäƤ¤¤ë¡ª"); -#else -msg_print("Summoned Lords of Amber are angry!"); -#endif + if (!pet) + msg_print(_("¾¤´­¤µ¤ì¤¿¥¢¥ó¥Ð¡¼¤Î²¦Â²¤ÏÅܤäƤ¤¤ë¡ª", "Summoned Lords of Amber are angry!")); } else { @@ -1851,32 +1520,20 @@ msg_print("Summoned Lords of Amber are angry!"); case MS_S_UNIQUE: { int k, count = 0; -#ifdef JP -msg_print("ÆÃÊ̤ʶ¯Å¨¤ò¾¤´­¤·¤¿¡ª"); -#else - msg_print("You summon a special opponent!"); -#endif + msg_print(_("ÆÃÊ̤ʶ¯Å¨¤ò¾¤´­¤·¤¿¡ª", "You summon a special opponent!")); for (k = 0;k < 1; k++) if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_UNIQUE, (g_mode | p_mode | PM_ALLOW_UNIQUE))) { count++; - if (!pet) -#ifdef JP -msg_print("¾¤´­¤µ¤ì¤¿¥æ¥Ë¡¼¥¯¡¦¥â¥ó¥¹¥¿¡¼¤ÏÅܤäƤ¤¤ë¡ª"); -#else -msg_print("Summoned special opponents are angry!"); -#endif + if (!pet) + msg_print(_("¾¤´­¤µ¤ì¤¿¥æ¥Ë¡¼¥¯¡¦¥â¥ó¥¹¥¿¡¼¤ÏÅܤäƤ¤¤ë¡ª", "Summoned special opponents are angry!")); } for (k = count;k < 1; k++) if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_HI_UNDEAD, (g_mode | p_mode | PM_ALLOW_UNIQUE))) { count++; - if (!pet) -#ifdef JP -msg_print("¾¤´­¤µ¤ì¤¿¾åµé¥¢¥ó¥Ç¥Ã¥É¤ÏÅܤäƤ¤¤ë¡ª"); -#else -msg_print("Summoned greater undeads are angry!"); -#endif + if (!pet) + msg_print(_("¾¤´­¤µ¤ì¤¿¾åµé¥¢¥ó¥Ç¥Ã¥É¤ÏÅܤäƤ¤¤ë¡ª", "Summoned greater undeads are angry!")); } if (!count) { @@ -1888,12 +1545,8 @@ msg_print("Summoned greater undeads are angry!"); msg_print("hoge?"); } if (no_trump) - { -#ifdef JP -msg_print("²¿¤â¸½¤ì¤Ê¤«¤Ã¤¿¡£"); -#else -msg_print("No one have appeared."); -#endif + { + msg_print(_("²¿¤â¸½¤ì¤Ê¤«¤Ã¤¿¡£", "No one have appeared.")); } return TRUE; diff --git a/src/mspells4.c b/src/mspells4.c index c7beefb2d..9bf2efa34 100644 --- a/src/mspells4.c +++ b/src/mspells4.c @@ -3682,11 +3682,12 @@ int monspell_to_monster(int SPELL_NUM, int y, int x, int m_idx, int t_idx) * @param hp ¼öʸ¤ò¾§¤¨¤ë¥â¥ó¥¹¥¿¡¼¤ÎÂÎÎÏ * @param rlev ¼öʸ¤ò¾§¤¨¤ë¥â¥ó¥¹¥¿¡¼¤Î¥ì¥Ù¥ë * @param powerful ¼öʸ¤ò¾§¤¨¤ë¥â¥ó¥¹¥¿¡¼¤Îpowerful¥Õ¥é¥° -* @param r_ptr ¼öʸ¤ò¾§¤¨¤ë¥â¥ó¥¹¥¿¡¼¤Î¼ï²¥Ý¥¤¥ó¥¿ +* @param shoot_dd ¼Í·â¤Î¥À¥¤¥¹¿ô +* @param shoot_ds ¼Í·â¤Î¥À¥¤¥¹ÌÌ * @param TYPE DAM_MAX¤ÇºÇÂçÃͤòÊÖ¤·¡¢DAM_MIN¤ÇºÇ¾®ÃͤòÊÖ¤¹¡£DAM_ROLL¤Ï¥À¥¤¥¹¤ò¿¶¤Ã¤ÆÃͤò·èÄꤹ¤ë¡£ * @return ¹¶·â¼öʸ¤Î¥À¥á¡¼¥¸¤òÊÖ¤¹¡£¹¶·â¼öʸ°Ê³°¤Ï-1¤òÊÖ¤¹¡£ */ -int monspell_damage_base(int SPELL_NUM, int hp, int rlev, bool powerful, monster_race* r_ptr, int TYPE) +int monspell_damage_base(int SPELL_NUM, int hp, int rlev, bool powerful, int shoot_dd, int shoot_ds, int shoot_base, int TYPE) { int dam = 0, dice_num = 0, dice_side = 0, mult = 1, div = 1; @@ -3703,8 +3704,9 @@ int monspell_damage_base(int SPELL_NUM, int hp, int rlev, bool powerful, monster /* RF4_SHOOT */ case RF4_SPELL_START + 4: - dice_num = r_ptr->blow[0].d_dice; - dice_side = r_ptr->blow[0].d_side; + dice_num = shoot_dd; + dice_side = shoot_ds; + dam = shoot_base; break; case RF4_SPELL_START + 5: return -1; /* RF4_XXX2 */ case RF4_SPELL_START + 6: return -1; /* RF4_XXX3 */ @@ -4097,7 +4099,7 @@ int monspell_damage_base(int SPELL_NUM, int hp, int rlev, bool powerful, monster case DAM_MIN: dam += dice_num * 1 * mult / div; break; case DAM_ROLL: dam += damroll(dice_num, dice_side) * mult / div; break; } - + if (dam < 1) dam = 1; return dam; } @@ -4115,6 +4117,8 @@ int monspell_damage(int SPELL_NUM, int m_idx, int TYPE) monster_race *r_ptr = &r_info[m_ptr->r_idx]; int hp; int rlev = monster_level_idx(m_idx); + int shoot_dd = r_ptr->blow[0].d_dice; + int shoot_ds = r_ptr->blow[0].d_side; if (TYPE == DAM_MAX) { @@ -4124,7 +4128,7 @@ int monspell_damage(int SPELL_NUM, int m_idx, int TYPE) { hp = m_ptr->hp; } - return monspell_damage_base(SPELL_NUM, hp, rlev, monster_is_powerful(m_idx), r_ptr, TYPE); + return monspell_damage_base(SPELL_NUM, hp, rlev, monster_is_powerful(m_idx), shoot_dd, shoot_ds, 0, TYPE); } /*! @@ -4140,6 +4144,33 @@ int monspell_race_damage(int SPELL_NUM, int r_idx, int TYPE) int rlev = ((r_ptr->level >= 1) ? r_ptr->level : 1); bool powerful = r_ptr->flags2 & RF2_POWERFUL; u32b hp = r_ptr->hdice * (ironman_nightmare ? 2 : 1) * r_ptr->hside; + int shoot_dd = r_ptr->blow[0].d_dice; + int shoot_ds = r_ptr->blow[0].d_side; + + return monspell_damage_base(SPELL_NUM, MIN(30000, hp), rlev, powerful, shoot_dd, shoot_ds, 0, TYPE); +} - return monspell_damage_base(SPELL_NUM, MIN(30000, hp), rlev, powerful, r_ptr, TYPE); +/*! +* @brief ÀÄËâƳ»Õ¤Î»È¤¦¼öʸ¤Î°ÒÎϤòÊÖ¤¹ / +* @param SPELL_NUM ¼öʸÈÖ¹æ +* @param plev »ÈÍѤ¹¤ë¥ì¥Ù¥ë¡£2Çܤ·¤Æ°·¤¦¡£ +* @param TYPE DAM_MAX¤ÇºÇÂçÃͤòÊÖ¤·¡¢DAM_MIN¤ÇºÇ¾®ÃͤòÊÖ¤¹¡£DAM_ROLL¤Ï¥À¥¤¥¹¤ò¿¶¤Ã¤ÆÃͤò·èÄꤹ¤ë¡£ +* @return ¹¶·â¼öʸ¤Î¥À¥á¡¼¥¸¤òÊÖ¤¹¡£¹¶·â¼öʸ°Ê³°¤Ï-1¤òÊÖ¤¹¡£ +*/ +int monspell_bluemage_damage(int SPELL_NUM, int plev, int TYPE) +{ + int hp = p_ptr->chp; + int shoot_dd = 1, shoot_ds = 1, shoot_base = 0; + object_type *o_ptr = NULL; + + if (buki_motteruka(INVEN_RARM)) o_ptr = &inventory[INVEN_RARM]; + else if (buki_motteruka(INVEN_LARM)) o_ptr = &inventory[INVEN_LARM]; + + if (o_ptr) + { + shoot_dd = o_ptr->dd; + shoot_ds = o_ptr->ds; + shoot_base = o_ptr->to_d; + } + return monspell_damage_base(SPELL_NUM, hp, plev * 2, FALSE, shoot_dd, shoot_ds, shoot_base, TYPE); } \ No newline at end of file