-#include "angband.h"\r
-#include "cmd-spell.h"\r
-\r
-/*!\r
-* @brief \83J\83I\83X\97Ì\88æ\96\82\96@\82Ì\8ae\8f\88\97\9d\82ð\8ds\82¤\r
-* @param spell \96\82\96@ID\r
-* @param mode \8f\88\97\9d\93à\97e (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)\r
-* @return SPELL_NAME / SPELL_DESC / SPELL_INFO \8e\9e\82É\82Í\95¶\8e\9a\97ñ\83|\83C\83\93\83^\82ð\95Ô\82·\81BSPELL_CAST\8e\9e\82ÍNULL\95¶\8e\9a\97ñ\82ð\95Ô\82·\81B\r
-*/\r
-cptr do_chaos_spell(SPELL_IDX spell, BIT_FLAGS mode)\r
-{\r
- bool name = (mode == SPELL_NAME) ? TRUE : FALSE;\r
- bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;\r
- bool info = (mode == SPELL_INFO) ? TRUE : FALSE;\r
- bool cast = (mode == SPELL_CAST) ? TRUE : FALSE;\r
-\r
- static const char s_dam[] = _("\91¹\8f\9d:", "dam ");\r
- static const char s_random[] = _("\83\89\83\93\83_\83\80", "random");\r
-\r
- int dir;\r
- int plev = p_ptr->lev;\r
-\r
- switch (spell)\r
- {\r
- case 0:\r
- if (name) return _("\83}\83W\83b\83N\81E\83~\83T\83C\83\8b", "Magic Missile");\r
- if (desc) return _("\8eã\82¢\96\82\96@\82Ì\96î\82ð\95ú\82Â\81B", "Fires a weak bolt of magic.");\r
-\r
- {\r
- int dice = 3 + ((plev - 1) / 5);\r
- int sides = 4;\r
-\r
- if (info) return info_damage(dice, sides, 0);\r
-\r
- if (cast)\r
- {\r
- if (!get_aim_dir(&dir)) return NULL;\r
-\r
- fire_bolt_or_beam(beam_chance() - 10, GF_MISSILE, dir, damroll(dice, sides));\r
- }\r
- }\r
- break;\r
-\r
- case 1:\r
- if (name) return _("\83g\83\89\83b\83v/\83h\83A\94j\89ó", "Trap / Door Destruction");\r
- if (desc) return _("\97×\90Ú\82·\82éã©\82Æ\94à\82ð\94j\89ó\82·\82é\81B", "Destroys all traps in adjacent squares.");\r
-\r
- {\r
- int rad = 1;\r
-\r
- if (info) return info_radius(rad);\r
-\r
- if (cast)\r
- {\r
- destroy_doors_touch();\r
- }\r
- }\r
- break;\r
-\r
- case 2:\r
- if (name) return _("\91M\8cõ", "Flash of Light");\r
- if (desc) return _("\8cõ\8c¹\82ª\8fÆ\82ç\82µ\82Ä\82¢\82é\94Í\88Í\82©\95\94\89®\91S\91Ì\82ð\89i\8bv\82É\96¾\82é\82\82·\82é\81B", "Lights up nearby area and the inside of a room permanently.");\r
-\r
- {\r
- int dice = 2;\r
- int sides = plev / 2;\r
- int rad = (plev / 10) + 1;\r
-\r
- if (info) return info_damage(dice, sides, 0);\r
-\r
- if (cast)\r
- {\r
- lite_area(damroll(dice, sides), rad);\r
- }\r
- }\r
- break;\r
-\r
- case 3:\r
- if (name) return _("\8d¬\97\90\82Ì\8eè", "Touch of Confusion");\r
- if (desc) return _("\91\8a\8eè\82ð\8d¬\97\90\82³\82¹\82é\8dU\8c\82\82ð\82Å\82«\82é\82æ\82¤\82É\82·\82é\81B", "Attempts to confuse the next monster that you hit.");\r
-\r
- {\r
- if (cast)\r
- {\r
- if (!(p_ptr->special_attack & ATTACK_CONFUSE))\r
- {\r
- msg_print(_("\82 \82È\82½\82Ì\8eè\82Í\8cõ\82è\8en\82ß\82½\81B", "Your hands start glowing."));\r
- p_ptr->special_attack |= ATTACK_CONFUSE;\r
- p_ptr->redraw |= (PR_STATUS);\r
- }\r
- }\r
- }\r
- break;\r
-\r
- case 4:\r
- if (name) return _("\96\82\97Íày\97ô", "Mana Burst");\r
- if (desc) return _("\96\82\96@\82Ì\8b\85\82ð\95ú\82Â\81B", "Fires a ball of magic.");\r
-\r
- {\r
- int dice = 3;\r
- int sides = 5;\r
- int rad = (plev < 30) ? 2 : 3;\r
- int base;\r
-\r
- if (p_ptr->pclass == CLASS_MAGE ||\r
- p_ptr->pclass == CLASS_HIGH_MAGE ||\r
- p_ptr->pclass == CLASS_SORCERER)\r
- base = plev + plev / 2;\r
- else\r
- base = plev + plev / 4;\r
-\r
-\r
- if (info) return info_damage(dice, sides, base);\r
-\r
- if (cast)\r
- {\r
- if (!get_aim_dir(&dir)) return NULL;\r
-\r
- fire_ball(GF_MISSILE, dir, damroll(dice, sides) + base, rad);\r
-\r
- /*\r
- * Shouldn't actually use GF_MANA, as\r
- * it will destroy all items on the\r
- * floor\r
- */\r
- }\r
- }\r
- break;\r
-\r
- case 5:\r
- if (name) return _("\83t\83@\83C\83A\81E\83{\83\8b\83g", "Fire Bolt");\r
- if (desc) return _("\89\8a\82Ì\83{\83\8b\83g\82à\82µ\82\82Í\83r\81[\83\80\82ð\95ú\82Â\81B", "Fires a bolt or beam of fire.");\r
-\r
- {\r
- int dice = 8 + (plev - 5) / 4;\r
- int sides = 8;\r
-\r
- if (info) return info_damage(dice, sides, 0);\r
-\r
- if (cast)\r
- {\r
- if (!get_aim_dir(&dir)) return NULL;\r
-\r
- fire_bolt_or_beam(beam_chance(), GF_FIRE, dir, damroll(dice, sides));\r
- }\r
- }\r
- break;\r
-\r
- case 6:\r
- if (name) return _("\97Í\82Ì\8c\9d", "Fist of Force");\r
- if (desc) return _("\82²\82\8f¬\82³\82È\95ª\89ð\82Ì\8b\85\82ð\95ú\82Â\81B", "Fires a tiny ball of disintegration.");\r
-\r
- {\r
- int dice = 8 + ((plev - 5) / 4);\r
- int sides = 8;\r
-\r
- if (info) return info_damage(dice, sides, 0);\r
-\r
- if (cast)\r
- {\r
- if (!get_aim_dir(&dir)) return NULL;\r
-\r
- fire_ball(GF_DISINTEGRATE, dir, damroll(dice, sides), 0);\r
- }\r
- }\r
- break;\r
-\r
- case 7:\r
- if (name) return _("\83e\83\8c\83|\81[\83g", "Teleport Self");\r
- if (desc) return _("\89\93\8b\97\97£\82Ì\83e\83\8c\83|\81[\83g\82ð\82·\82é\81B", "Teleport long distance.");\r
-\r
- {\r
- POSITION range = plev * 5;\r
-\r
- if (info) return info_range(range);\r
-\r
- if (cast)\r
- {\r
- teleport_player(range, 0L);\r
- }\r
- }\r
- break;\r
-\r
- case 8:\r
- if (name) return _("\83\8f\83\93\83_\81[", "Wonder");\r
- if (desc) return _("\83\82\83\93\83X\83^\81[\82É\83\89\83\93\83_\83\80\82È\8cø\89Ê\82ð\97^\82¦\82é\81B", "Fires something with random effects.");\r
-\r
- {\r
- if (info) return s_random;\r
-\r
- if (cast)\r
- {\r
-\r
- if (!get_aim_dir(&dir)) return NULL;\r
-\r
- cast_wonder(dir);\r
- }\r
- }\r
- break;\r
-\r
- case 9:\r
- if (name) return _("\83J\83I\83X\81E\83{\83\8b\83g", "Chaos Bolt");\r
- if (desc) return _("\83J\83I\83X\82Ì\83{\83\8b\83g\82à\82µ\82\82Í\83r\81[\83\80\82ð\95ú\82Â\81B", "Fires a bolt or ball of chaos.");\r
-\r
- {\r
- int dice = 10 + (plev - 5) / 4;\r
- int sides = 8;\r
-\r
- if (info) return info_damage(dice, sides, 0);\r
-\r
- if (cast)\r
- {\r
- if (!get_aim_dir(&dir)) return NULL;\r
-\r
- fire_bolt_or_beam(beam_chance(), GF_CHAOS, dir, damroll(dice, sides));\r
- }\r
- }\r
- break;\r
-\r
- case 10:\r
- if (name) return _("\83\\83j\83b\83N\81E\83u\81[\83\80", "Sonic Boom");\r
- if (desc) return _("\8e©\95ª\82ð\92\86\90S\82Æ\82µ\82½\8d\8c\89¹\82Ì\8b\85\82ð\94\90¶\82³\82¹\82é\81B", "Generates a ball of sound centered on you.");\r
-\r
- {\r
- HIT_POINT dam = 60 + plev;\r
- int rad = plev / 10 + 2;\r
-\r
- if (info) return info_damage(0, 0, dam / 2);\r
-\r
- if (cast)\r
- {\r
- msg_print(_("\83h\81[\83\93\81I\95\94\89®\82ª\97h\82ê\82½\81I", "BOOM! Shake the room!"));\r
- project(0, rad, p_ptr->y, p_ptr->x, dam, GF_SOUND, PROJECT_KILL | PROJECT_ITEM, -1);\r
- }\r
- }\r
- break;\r
-\r
- case 11:\r
- if (name) return _("\94j\96Å\82Ì\96î", "Doom Bolt");\r
- if (desc) return _("\8f\83\90\88\82È\96\82\97Í\82Ì\83r\81[\83\80\82ð\95ú\82Â\81B", "Fires a beam of pure mana.");\r
-\r
- {\r
- int dice = 11 + (plev - 5) / 4;\r
- int sides = 8;\r
-\r
- if (info) return info_damage(dice, sides, 0);\r
-\r
- if (cast)\r
- {\r
- if (!get_aim_dir(&dir)) return NULL;\r
-\r
- fire_beam(GF_MANA, dir, damroll(dice, sides));\r
- }\r
- }\r
- break;\r
-\r
- case 12:\r
- if (name) return _("\83t\83@\83C\83A\81E\83{\81[\83\8b", "Fire Ball");\r
- if (desc) return _("\89\8a\82Ì\8b\85\82ð\95ú\82Â\81B", "Fires a ball of fire.");\r
-\r
- {\r
- HIT_POINT dam = plev + 55;\r
- int rad = 2;\r
-\r
- if (info) return info_damage(0, 0, dam);\r
-\r
- if (cast)\r
- {\r
- if (!get_aim_dir(&dir)) return NULL;\r
-\r
- fire_ball(GF_FIRE, dir, dam, rad);\r
- }\r
- }\r
- break;\r
-\r
- case 13:\r
- if (name) return _("\83e\83\8c\83|\81[\83g\81E\83A\83E\83F\83C", "Teleport Other");\r
- if (desc) return _("\83\82\83\93\83X\83^\81[\82ð\83e\83\8c\83|\81[\83g\82³\82¹\82é\83r\81[\83\80\82ð\95ú\82Â\81B\92ï\8dR\82³\82ê\82é\82Æ\96³\8cø\81B", "Teleports all monsters on the line away unless resisted.");\r
-\r
- {\r
- int power = plev;\r
-\r
- if (info) return info_power(power);\r
-\r
- if (cast)\r
- {\r
- if (!get_aim_dir(&dir)) return NULL;\r
-\r
- fire_beam(GF_AWAY_ALL, dir, power);\r
- }\r
- }\r
- break;\r
-\r
- case 14:\r
- if (name) return _("\94j\89ó\82Ì\8c¾\97t", "Word of Destruction");\r
- if (desc) return _("\8eü\95Ó\82Ì\83A\83C\83e\83\80\81A\83\82\83\93\83X\83^\81[\81A\92n\8c`\82ð\94j\89ó\82·\82é\81B", "Destroy everything in nearby area.");\r
-\r
- {\r
- int base = 12;\r
- int sides = 4;\r
-\r
- if (cast)\r
- {\r
- destroy_area(p_ptr->y, p_ptr->x, base + randint1(sides), FALSE);\r
- }\r
- }\r
- break;\r
-\r
- case 15:\r
- if (name) return _("\83\8d\83O\83\8b\83X\94\93®", "Invoke Logrus");\r
- if (desc) return _("\8b\90\91å\82È\83J\83I\83X\82Ì\8b\85\82ð\95ú\82Â\81B", "Fires a huge ball of chaos.");\r
-\r
- {\r
- HIT_POINT dam = plev * 2 + 99;\r
- int rad = plev / 5;\r
-\r
- if (info) return info_damage(0, 0, dam);\r
-\r
- if (cast)\r
- {\r
- if (!get_aim_dir(&dir)) return NULL;\r
-\r
- fire_ball(GF_CHAOS, dir, dam, rad);\r
- }\r
- }\r
- break;\r
-\r
- case 16:\r
- if (name) return _("\91¼\8eÒ\95Ï\97e", "Polymorph Other");\r
- if (desc) return _("\83\82\83\93\83X\83^\81[1\91Ì\82ð\95Ï\90g\82³\82¹\82é\81B\92ï\8dR\82³\82ê\82é\82Æ\96³\8cø\81B", "Attempts to polymorph a monster.");\r
-\r
- {\r
- int power = plev;\r
-\r
- if (info) return info_power(power);\r
-\r
- if (cast)\r
- {\r
- if (!get_aim_dir(&dir)) return NULL;\r
-\r
- poly_monster(dir, plev);\r
- }\r
- }\r
- break;\r
-\r
- case 17:\r
- if (name) return _("\98A\8d½\88î\8dÈ", "Chain Lightning");\r
- if (desc) return _("\91S\95û\8cü\82É\91Î\82µ\82Ä\93d\8c\82\82Ì\83r\81[\83\80\82ð\95ú\82Â\81B", "Fires lightning beams in all directions.");\r
-\r
- {\r
- int dice = 5 + plev / 10;\r
- int sides = 8;\r
-\r
- if (info) return info_damage(dice, sides, 0);\r
-\r
- if (cast)\r
- {\r
- for (dir = 0; dir <= 9; dir++)\r
- fire_beam(GF_ELEC, dir, damroll(dice, sides));\r
- }\r
- }\r
- break;\r
-\r
- case 18:\r
- if (name) return _("\96\82\97Í\95\95\93ü", "Arcane Binding");\r
- if (desc) return _("\8fñ/\96\82\96@\96_\82Ì\8f[\93U\89ñ\90\94\82ð\91\9d\82â\82·\82©\81A\8f[\93U\92\86\82Ì\83\8d\83b\83h\82Ì\8f[\93U\8e\9e\8aÔ\82ð\8c¸\82ç\82·\81B", "Recharges staffs, wands or rods.");\r
-\r
- {\r
- int power = 90;\r
-\r
- if (info) return info_power(power);\r
-\r
- if (cast)\r
- {\r
- if (!recharge(power)) return NULL;\r
- }\r
- }\r
- break;\r
-\r
- case 19:\r
- if (name) return _("\8c´\8eq\95ª\89ð", "Disintegrate");\r
- if (desc) return _("\8b\90\91å\82È\95ª\89ð\82Ì\8b\85\82ð\95ú\82Â\81B", "Fires a huge ball of disintegration.");\r
-\r
- {\r
- HIT_POINT dam = plev + 70;\r
- int rad = 3 + plev / 40;\r
-\r
- if (info) return info_damage(0, 0, dam);\r
-\r
- if (cast)\r
- {\r
- if (!get_aim_dir(&dir)) return NULL;\r
-\r
- fire_ball(GF_DISINTEGRATE, dir, dam, rad);\r
- }\r
- }\r
- break;\r
-\r
- case 20:\r
- if (name) return _("\8c»\8eÀ\95Ï\97e", "Alter Reality");\r
- if (desc) return _("\8c»\8dÝ\82Ì\8aK\82ð\8dÄ\8d\\90¬\82·\82é\81B", "Recreates current dungeon level.");\r
-\r
- {\r
- int base = 15;\r
- int sides = 20;\r
-\r
- if (info) return info_delay(base, sides);\r
-\r
- if (cast)\r
- {\r
- alter_reality();\r
- }\r
- }\r
- break;\r
-\r
- case 21:\r
- if (name) return _("\83}\83W\83b\83N\81E\83\8d\83P\83b\83g", "Magic Rocket");\r
- if (desc) return _("\83\8d\83P\83b\83g\82ð\94\8eË\82·\82é\81B", "Fires a magic rocket.");\r
-\r
- {\r
- HIT_POINT dam = 120 + plev * 2;\r
- int rad = 2;\r
-\r
- if (info) return info_damage(0, 0, dam);\r
-\r
- if (cast)\r
- {\r
- if (!get_aim_dir(&dir)) return NULL;\r
-\r
- msg_print(_("\83\8d\83P\83b\83g\94\8eË\81I", "You launch a rocket!"));\r
- fire_rocket(GF_ROCKET, dir, dam, rad);\r
- }\r
- }\r
- break;\r
-\r
- case 22:\r
- if (name) return _("\8d¬\93×\82Ì\90n", "Chaos Branding");\r
- if (desc) return _("\95\90\8aí\82É\83J\83I\83X\82Ì\91®\90«\82ð\82Â\82¯\82é\81B", "Makes current weapon a Chaotic weapon.");\r
-\r
- {\r
- if (cast)\r
- {\r
- brand_weapon(2);\r
- }\r
- }\r
- break;\r
-\r
- case 23:\r
- if (name) return _("\88«\96\82\8f¢\8a«", "Summon Demon");\r
- if (desc) return _("\88«\96\82\82ð1\91Ì\8f¢\8a«\82·\82é\81B", "Summons a demon.");\r
-\r
- {\r
- if (cast)\r
- {\r
- u32b flg = 0L;\r
- bool pet = !one_in_(3);\r
-\r
- if (pet) flg |= PM_FORCE_PET;\r
- else flg |= PM_NO_PET;\r
- if (!(pet && (plev < 50))) flg |= PM_ALLOW_GROUP;\r
-\r
- if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, (plev * 3) / 2, SUMMON_DEMON, flg))\r
- {\r
- msg_print(_("\97°\89©\82Ì\88«\8fL\82ª\8f[\96\9e\82µ\82½\81B", "The area fills with a stench of sulphur and brimstone."));\r
- if (pet)\r
- {\r
- msg_print(_("\81u\82²\97p\82Å\82²\82´\82¢\82Ü\82·\82©\81A\82²\8eå\90l\97l\81v", "'What is thy bidding... Master?'"));\r
- }\r
- else\r
- {\r
- msg_print(_("\81u\94Ú\82µ\82«\8eÒ\82æ\81A\89ä\82Í\93ð\82Ì\89º\96l\82É\82 \82ç\82¸\81I \82¨\91O\82Ì\8d°\82ð\92¸\82\82¼\81I\81v",\r
- "'NON SERVIAM! Wretch! I shall feast on thy mortal soul!'"));\r
- }\r
- }\r
- }\r
- }\r
- break;\r
-\r
- case 24:\r
- if (name) return _("\8fd\97Í\8cõ\90ü", "Beam of Gravity");\r
- if (desc) return _("\8fd\97Í\82Ì\83r\81[\83\80\82ð\95ú\82Â\81B", "Fires a beam of gravity.");\r
-\r
- {\r
- int dice = 9 + (plev - 5) / 4;\r
- int sides = 8;\r
-\r
- if (info) return info_damage(dice, sides, 0);\r
-\r
- if (cast)\r
- {\r
- if (!get_aim_dir(&dir)) return NULL;\r
-\r
- fire_beam(GF_GRAVITY, dir, damroll(dice, sides));\r
- }\r
- }\r
- break;\r
-\r
- case 25:\r
- if (name) return _("\97¬\90¯\8cQ", "Meteor Swarm");\r
- if (desc) return _("\8e©\95ª\82Ì\8eü\95Ó\82Éè¦\90Î\82ð\97\8e\82Æ\82·\81B", "Makes meteor balls fall down to nearby random locations.");\r
-\r
- {\r
- HIT_POINT dam = plev * 2;\r
- int rad = 2;\r
-\r
- if (info) return info_multi_damage(dam);\r
-\r
- if (cast)\r
- {\r
- cast_meteor(dam, rad);\r
- }\r
- }\r
- break;\r
-\r
- case 26:\r
- if (name) return _("\89\8b\82Ì\88ê\8c\82", "Flame Strike");\r
- if (desc) return _("\8e©\95ª\82ð\92\86\90S\82Æ\82µ\82½\92´\8b\90\91å\82È\89\8a\82Ì\8b\85\82ð\94\90¶\82³\82¹\82é\81B", "Generate a huge ball of fire centered on you.");\r
-\r
- {\r
- HIT_POINT dam = 300 + 3 * plev;\r
- int rad = 8;\r
-\r
- if (info) return info_damage(0, 0, dam / 2);\r
-\r
- if (cast)\r
- {\r
- fire_ball(GF_FIRE, 0, dam, rad);\r
- }\r
- }\r
- break;\r
-\r
- case 27:\r
- if (name) return _("\8d¬\93×\8f¢\97\88", "Call Chaos");\r
- if (desc) return _("\83\89\83\93\83_\83\80\82È\91®\90«\82Ì\8b\85\82â\83r\81[\83\80\82ð\94\90¶\82³\82¹\82é\81B", "Generate random kind of balls or beams.");\r
-\r
- {\r
- if (info) return format("%s150 / 250", s_dam);\r
-\r
- if (cast)\r
- {\r
- call_chaos();\r
- }\r
- }\r
- break;\r
-\r
- case 28:\r
- if (name) return _("\8e©\8cÈ\95Ï\97e", "Polymorph Self");\r
- if (desc) return _("\8e©\95ª\82ð\95Ï\90g\82³\82¹\82æ\82¤\82Æ\82·\82é\81B", "Polymorphs yourself.");\r
-\r
- {\r
- if (cast)\r
- {\r
- if (!get_check(_("\95Ï\90g\82µ\82Ü\82·\81B\82æ\82ë\82µ\82¢\82Å\82·\82©\81H", "You will polymorph yourself. Are you sure? "))) return NULL;\r
- do_poly_self();\r
- }\r
- }\r
- break;\r
-\r
- case 29:\r
- if (name) return _("\96\82\97Í\82Ì\97\92", "Mana Storm");\r
- if (desc) return _("\94ñ\8fí\82É\8b\97Í\82Å\8b\90\91å\82È\8f\83\90\88\82È\96\82\97Í\82Ì\8b\85\82ð\95ú\82Â\81B", "Fires an extremely powerful huge ball of pure mana.");\r
-\r
- {\r
- HIT_POINT dam = 300 + plev * 4;\r
- int rad = 4;\r
-\r
- if (info) return info_damage(0, 0, dam);\r
-\r
- if (cast)\r
- {\r
- if (!get_aim_dir(&dir)) return NULL;\r
-\r
- fire_ball(GF_MANA, dir, dam, rad);\r
- }\r
- }\r
- break;\r
-\r
- case 30:\r
- if (name) return _("\83\8d\83O\83\8b\83X\82Ì\83u\83\8c\83X", "Breathe Logrus");\r
- if (desc) return _("\94ñ\8fí\82É\8b\97Í\82È\83J\83I\83X\82Ì\8b\85\82ð\95ú\82Â\81B", "Fires an extremely powerful ball of chaos.");\r
-\r
- {\r
- HIT_POINT dam = p_ptr->chp;\r
- int rad = 2;\r
-\r
- if (info) return info_damage(0, 0, dam);\r
-\r
- if (cast)\r
- {\r
- if (!get_aim_dir(&dir)) return NULL;\r
-\r
- fire_ball(GF_CHAOS, dir, dam, rad);\r
- }\r
- }\r
- break;\r
-\r
- case 31:\r
- if (name) return _("\8b\95\96³\8f¢\97\88", "Call the Void");\r
- if (desc) return _("\8e©\95ª\82É\8eü\88Í\82É\8cü\82©\82Á\82Ä\81A\83\8d\83P\83b\83g\81A\8f\83\90\88\82È\96\82\97Í\82Ì\8b\85\81A\95ú\8eË\90«\94p\8aü\95¨\82Ì\8b\85\82ð\95ú\82Â\81B\82½\82¾\82µ\81A\95Ç\82É\97×\90Ú\82µ\82Ä\8eg\97p\82·\82é\82Æ\8dL\94Í\88Í\82ð\94j\89ó\82·\82é\81B",\r
- "Fires rockets, mana balls and nuclear waste balls in all directions each unless you are not adjacent to any walls. Otherwise *destroys* huge area.");\r
-\r
- {\r
- if (info) return format("%s3 * 175", s_dam);\r
-\r
- if (cast)\r
- {\r
- call_the_();\r
- }\r
- }\r
- break;\r
- }\r
-\r
- return "";\r
-}
\ No newline at end of file
+#include "angband.h"
+#include "cmd-spell.h"
+#include "spells-summon.h"
+#include "spells-status.h"
+#include "projection.h"
+
+/*!
+* @brief カオス領域魔法の各処理を行う
+* @param spell 魔法ID
+* @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
+* @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
+*/
+concptr do_chaos_spell(SPELL_IDX spell, BIT_FLAGS mode)
+{
+ bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
+ bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
+ bool info = (mode == SPELL_INFO) ? TRUE : FALSE;
+ bool cast = (mode == SPELL_CAST) ? TRUE : FALSE;
+
+ DIRECTION dir;
+ PLAYER_LEVEL plev = p_ptr->lev;
+
+ switch (spell)
+ {
+ case 0:
+ if (name) return _("マジック・ミサイル", "Magic Missile");
+ if (desc) return _("弱い魔法の矢を放つ。", "Fires a weak bolt of magic.");
+
+ {
+ DICE_NUMBER dice = 3 + ((plev - 1) / 5);
+ DICE_SID sides = 4;
+
+ if (info) return info_damage(dice, sides, 0);
+
+ if (cast)
+ {
+ if (!get_aim_dir(&dir)) return NULL;
+
+ fire_bolt_or_beam(beam_chance() - 10, GF_MISSILE, dir, damroll(dice, sides));
+ }
+ }
+ break;
+
+ case 1:
+ if (name) return _("トラップ/ドア破壊", "Trap / Door Destruction");
+ if (desc) return _("隣接する罠と扉を破壊する。", "Destroys all traps in adjacent squares.");
+
+ {
+ POSITION rad = 1;
+
+ if (info) return info_radius(rad);
+
+ if (cast)
+ {
+ destroy_doors_touch();
+ }
+ }
+ break;
+
+ case 2:
+ if (name) return _("閃光", "Flash of Light");
+ if (desc) return _("光源が照らしている範囲か部屋全体を永久に明るくする。", "Lights up nearby area and the inside of a room permanently.");
+
+ {
+ DICE_NUMBER dice = 2;
+ DICE_SID sides = plev / 2;
+ POSITION rad = (plev / 10) + 1;
+
+ if (info) return info_damage(dice, sides, 0);
+
+ if (cast)
+ {
+ lite_area(damroll(dice, sides), rad);
+ }
+ }
+ break;
+
+ case 3:
+ if (name) return _("混乱の手", "Touch of Confusion");
+ if (desc) return _("相手を混乱させる攻撃をできるようにする。", "Attempts to confuse the next monster that you hit.");
+
+ {
+ if (cast)
+ {
+ if (!(p_ptr->special_attack & ATTACK_CONFUSE))
+ {
+ msg_print(_("あなたの手は光り始めた。", "Your hands start glowing."));
+ p_ptr->special_attack |= ATTACK_CONFUSE;
+ p_ptr->redraw |= (PR_STATUS);
+ }
+ }
+ }
+ break;
+
+ case 4:
+ if (name) return _("魔力炸裂", "Mana Burst");
+ if (desc) return _("魔法の球を放つ。", "Fires a ball of magic.");
+
+ {
+ DICE_NUMBER dice = 3;
+ DICE_SID sides = 5;
+ POSITION rad = (plev < 30) ? 2 : 3;
+ int base;
+
+ if (IS_WIZARD_CLASS())
+ base = plev + plev / 2;
+ else
+ base = plev + plev / 4;
+
+
+ if (info) return info_damage(dice, sides, base);
+
+ if (cast)
+ {
+ if (!get_aim_dir(&dir)) return NULL;
+
+ fire_ball(GF_MISSILE, dir, damroll(dice, sides) + base, rad);
+
+ /*
+ * Shouldn't actually use GF_MANA, as
+ * it will destroy all items on the
+ * floor
+ */
+ }
+ }
+ break;
+
+ case 5:
+ if (name) return _("ファイア・ボルト", "Fire Bolt");
+ if (desc) return _("炎のボルトもしくはビームを放つ。", "Fires a bolt or beam of fire.");
+
+ {
+ DICE_NUMBER dice = 8 + (plev - 5) / 4;
+ DICE_SID sides = 8;
+
+ if (info) return info_damage(dice, sides, 0);
+
+ if (cast)
+ {
+ if (!get_aim_dir(&dir)) return NULL;
+
+ fire_bolt_or_beam(beam_chance(), GF_FIRE, dir, damroll(dice, sides));
+ }
+ }
+ break;
+
+ case 6:
+ if (name) return _("力の拳", "Fist of Force");
+ if (desc) return _("ごく小さな分解の球を放つ。", "Fires a tiny ball of disintegration.");
+
+ {
+ DICE_NUMBER dice = 8 + ((plev - 5) / 4);
+ DICE_SID sides = 8;
+
+ if (info) return info_damage(dice, sides, 0);
+
+ if (cast)
+ {
+ if (!get_aim_dir(&dir)) return NULL;
+
+ fire_ball(GF_DISINTEGRATE, dir, damroll(dice, sides), 0);
+ }
+ }
+ break;
+
+ case 7:
+ if (name) return _("テレポート", "Teleport Self");
+ if (desc) return _("遠距離のテレポートをする。", "Teleports you a long distance.");
+
+ {
+ POSITION range = plev * 5;
+
+ if (info) return info_range(range);
+
+ if (cast)
+ {
+ teleport_player(range, 0L);
+ }
+ }
+ break;
+
+ case 8:
+ if (name) return _("ワンダー", "Wonder");
+ if (desc) return _("モンスターにランダムな効果を与える。", "Fires something with random effects.");
+
+ {
+ if (info) return KWD_RANDOM;
+
+ if (cast)
+ {
+
+ if (!get_aim_dir(&dir)) return NULL;
+
+ cast_wonder(dir);
+ }
+ }
+ break;
+
+ case 9:
+ if (name) return _("カオス・ボルト", "Chaos Bolt");
+ if (desc) return _("カオスのボルトもしくはビームを放つ。", "Fires a bolt or ball of chaos.");
+
+ {
+ DICE_NUMBER dice = 10 + (plev - 5) / 4;
+ DICE_SID sides = 8;
+
+ if (info) return info_damage(dice, sides, 0);
+
+ if (cast)
+ {
+ if (!get_aim_dir(&dir)) return NULL;
+
+ fire_bolt_or_beam(beam_chance(), GF_CHAOS, dir, damroll(dice, sides));
+ }
+ }
+ break;
+
+ case 10:
+ if (name) return _("ソニック・ブーム", "Sonic Boom");
+ if (desc) return _("自分を中心とした轟音の球を発生させる。", "Generates a ball of sound centered on you.");
+
+ {
+ HIT_POINT dam = 60 + plev;
+ POSITION rad = plev / 10 + 2;
+
+ if (info) return info_damage(0, 0, dam / 2);
+
+ if (cast)
+ {
+ msg_print(_("ドーン!部屋が揺れた!", "BOOM! Shake the room!"));
+ project(0, rad, p_ptr->y, p_ptr->x, dam, GF_SOUND, PROJECT_KILL | PROJECT_ITEM, -1);
+ }
+ }
+ break;
+
+ case 11:
+ if (name) return _("破滅の矢", "Doom Bolt");
+ if (desc) return _("純粋な魔力のビームを放つ。", "Fires a beam of pure mana.");
+
+ {
+ DICE_NUMBER dice = 11 + (plev - 5) / 4;
+ DICE_SID sides = 8;
+
+ if (info) return info_damage(dice, sides, 0);
+
+ if (cast)
+ {
+ if (!get_aim_dir(&dir)) return NULL;
+
+ fire_beam(GF_MANA, dir, damroll(dice, sides));
+ }
+ }
+ break;
+
+ case 12:
+ if (name) return _("ファイア・ボール", "Fire Ball");
+ if (desc) return _("炎の球を放つ。", "Fires a ball of fire.");
+
+ {
+ HIT_POINT dam = plev + 55;
+ POSITION rad = 2;
+
+ if (info) return info_damage(0, 0, dam);
+
+ if (cast)
+ {
+ if (!get_aim_dir(&dir)) return NULL;
+
+ fire_ball(GF_FIRE, dir, dam, rad);
+ }
+ }
+ break;
+
+ case 13:
+ if (name) return _("テレポート・アウェイ", "Teleport Other");
+ if (desc) return _("モンスターをテレポートさせるビームを放つ。抵抗されると無効。", "Teleports all monsters on the line away unless resisted.");
+
+ {
+ int power = plev;
+
+ if (info) return info_power(power);
+
+ if (cast)
+ {
+ if (!get_aim_dir(&dir)) return NULL;
+
+ fire_beam(GF_AWAY_ALL, dir, power);
+ }
+ }
+ break;
+
+ case 14:
+ if (name) return _("破壊の言葉", "Word of Destruction");
+ if (desc) return _("周辺のアイテム、モンスター、地形を破壊する。", "Destroys everything in nearby area.");
+
+ {
+ int base = 12;
+ DICE_SID sides = 4;
+
+ if (cast)
+ {
+ destroy_area(p_ptr->y, p_ptr->x, base + randint1(sides), FALSE);
+ }
+ }
+ break;
+
+ case 15:
+ if (name) return _("ログルス発動", "Invoke Logrus");
+ if (desc) return _("巨大なカオスの球を放つ。", "Fires a huge ball of chaos.");
+
+ {
+ HIT_POINT dam = plev * 2 + 99;
+ POSITION rad = plev / 5;
+
+ if (info) return info_damage(0, 0, dam);
+
+ if (cast)
+ {
+ if (!get_aim_dir(&dir)) return NULL;
+
+ fire_ball(GF_CHAOS, dir, dam, rad);
+ }
+ }
+ break;
+
+ case 16:
+ if (name) return _("他者変容", "Polymorph Other");
+ if (desc) return _("モンスター1体を変身させる。抵抗されると無効。", "Attempts to polymorph a monster.");
+
+ {
+ int power = plev;
+
+ if (info) return info_power(power);
+
+ if (cast)
+ {
+ if (!get_aim_dir(&dir)) return NULL;
+
+ poly_monster(dir, plev);
+ }
+ }
+ break;
+
+ case 17:
+ if (name) return _("連鎖稲妻", "Chain Lightning");
+ if (desc) return _("全方向に対して電撃のビームを放つ。", "Fires lightning beams in all directions.");
+
+ {
+ DICE_NUMBER dice = 5 + plev / 10;
+ DICE_SID sides = 8;
+
+ if (info) return info_damage(dice, sides, 0);
+
+ if (cast)
+ {
+ for (dir = 0; dir <= 9; dir++)
+ fire_beam(GF_ELEC, dir, damroll(dice, sides));
+ }
+ }
+ break;
+
+ case 18:
+ if (name) return _("魔力封入", "Arcane Binding");
+ if (desc) return _("杖/魔法棒の充填回数を増やすか、充填中のロッドの充填時間を減らす。", "Recharges staffs, wands or rods.");
+
+ {
+ int power = 90;
+
+ if (info) return info_power(power);
+ if (cast)
+ {
+ if (!recharge(power)) return NULL;
+ }
+ }
+ break;
+
+ case 19:
+ if (name) return _("原子分解", "Disintegrate");
+ if (desc) return _("巨大な分解の球を放つ。", "Fires a huge ball of disintegration.");
+
+ {
+ HIT_POINT dam = plev + 70;
+ POSITION rad = 3 + plev / 40;
+
+ if (info) return info_damage(0, 0, dam);
+
+ if (cast)
+ {
+ if (!get_aim_dir(&dir)) return NULL;
+
+ fire_ball(GF_DISINTEGRATE, dir, dam, rad);
+ }
+ }
+ break;
+
+ case 20:
+ if (name) return _("現実変容", "Alter Reality");
+ if (desc) return _("現在の階を再構成する。", "Recreates current dungeon level.");
+
+ {
+ int base = 15;
+ DICE_SID sides = 20;
+
+ if (info) return info_delay(base, sides);
+
+ if (cast)
+ {
+ alter_reality();
+ }
+ }
+ break;
+
+ case 21:
+ if (name) return _("マジック・ロケット", "Magic Rocket");
+ if (desc) return _("ロケットを発射する。", "Fires a magic rocket.");
+
+ {
+ HIT_POINT dam = 120 + plev * 2;
+ POSITION rad = 2;
+
+ if (info) return info_damage(0, 0, dam);
+
+ if (cast)
+ {
+ if (!get_aim_dir(&dir)) return NULL;
+
+ msg_print(_("ロケット発射!", "You launch a rocket!"));
+ fire_rocket(GF_ROCKET, dir, dam, rad);
+ }
+ }
+ break;
+
+ case 22:
+ if (name) return _("混沌の刃", "Chaos Branding");
+ if (desc) return _("武器にカオスの属性をつける。", "Makes current weapon a Chaotic weapon.");
+
+ {
+ if (cast)
+ {
+ brand_weapon(2);
+ }
+ }
+ break;
+
+ case 23:
+ if (name) return _("悪魔召喚", "Summon Demon");
+ if (desc) return _("悪魔を1体召喚する。", "Summons a demon.");
+
+ {
+ if (cast)
+ {
+ cast_summon_demon((plev * 3) / 2);
+ }
+ }
+ break;
+
+ case 24:
+ if (name) return _("重力光線", "Beam of Gravity");
+ if (desc) return _("重力のビームを放つ。", "Fires a beam of gravity.");
+
+ {
+ DICE_NUMBER dice = 9 + (plev - 5) / 4;
+ DICE_SID sides = 8;
+
+ if (info) return info_damage(dice, sides, 0);
+
+ if (cast)
+ {
+ if (!get_aim_dir(&dir)) return NULL;
+ fire_beam(GF_GRAVITY, dir, damroll(dice, sides));
+ }
+ }
+ break;
+
+ case 25:
+ if (name) return _("流星群", "Meteor Swarm");
+ if (desc) return _("自分の周辺に隕石を落とす。", "Causes meteorites to fall down on nearby random locations.");
+
+ {
+ HIT_POINT dam = plev * 2;
+ POSITION rad = 2;
+
+ if (info) return info_multi_damage(dam);
+
+ if (cast)
+ {
+ cast_meteor(dam, rad);
+ }
+ }
+ break;
+
+ case 26:
+ if (name) return _("焔の一撃", "Flame Strike");
+ if (desc) return _("自分を中心とした超巨大な炎の球を発生させる。", "Generates a huge ball of fire centered on you.");
+
+ {
+ HIT_POINT dam = 300 + 3 * plev;
+ POSITION rad = 8;
+
+ if (info) return info_damage(0, 0, dam / 2);
+
+ if (cast)
+ {
+ fire_ball(GF_FIRE, 0, dam, rad);
+ }
+ }
+ break;
+
+ case 27:
+ if (name) return _("混沌召来", "Call Chaos");
+ if (desc) return _("ランダムな属性の球やビームを発生させる。", "Generates random kinds of balls or beams.");
+
+ {
+ if (info) return format("%s150 / 250", KWD_DAM);
+
+ if (cast)
+ {
+ call_chaos();
+ }
+ }
+ break;
+
+ case 28:
+ if (name) return _("自己変容", "Polymorph Self");
+ if (desc) return _("自分を変身させようとする。", "Polymorphs yourself.");
+
+ {
+ if (cast)
+ {
+ if (!get_check(_("変身します。よろしいですか?", "You will polymorph yourself. Are you sure? "))) return NULL;
+ do_poly_self();
+ }
+ }
+ break;
+
+ case 29:
+ if (name) return _("魔力の嵐", "Mana Storm");
+ if (desc) return _("非常に強力で巨大な純粋な魔力の球を放つ。", "Fires an extremely powerful huge ball of pure mana.");
+
+ {
+ HIT_POINT dam = 300 + plev * 4;
+ POSITION rad = 4;
+
+ if (info) return info_damage(0, 0, dam);
+
+ if (cast)
+ {
+ if (!get_aim_dir(&dir)) return NULL;
+ fire_ball(GF_MANA, dir, dam, rad);
+ }
+ }
+ break;
+
+ case 30:
+ if (name) return _("ログルスのブレス", "Breathe Logrus");
+ if (desc) return _("非常に強力なカオスの球を放つ。", "Fires an extremely powerful ball of chaos.");
+
+ {
+ HIT_POINT dam = p_ptr->chp;
+ POSITION rad = 2;
+
+ if (info) return info_damage(0, 0, dam);
+
+ if (cast)
+ {
+ if (!get_aim_dir(&dir)) return NULL;
+
+ fire_ball(GF_CHAOS, dir, dam, rad);
+ }
+ }
+ break;
+
+ case 31:
+ if (name) return _("虚無召来", "Call the Void");
+ if (desc) return _("自分の周囲に向かって、ロケット、純粋な魔力の球、放射性廃棄物の球を放つ。ただし、壁に隣接して使用すると広範囲を破壊する。",
+ "Fires rockets, mana balls and nuclear waste balls in all directions if you are not adjacent to any walls. Otherwise *destroys* huge area.");
+
+ {
+ if (info) return format("%s3 * 175", KWD_DAM);
+
+ if (cast)
+ {
+ call_the_();
+ }
+ }
+ break;
+ }
+
+ return "";
+}