From e061469087a3d4a38ef82a2bb1b13fba8ee015ea Mon Sep 17 00:00:00 2001 From: Slimebreath6078 Date: Tue, 2 Jan 2024 22:30:56 +0900 Subject: [PATCH] =?utf8?q?[Implement]=20=E3=82=A6=E3=82=B5=E3=82=A6?= =?utf8?q?=E3=82=B5=E3=82=B9=E3=83=88=E3=83=A9=E3=82=A4=E3=82=AB=E3=83=BC?= =?utf8?q?=E5=8F=AC=E5=96=9A=E5=87=A6=E7=90=86=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/mspell/mspell-summon.cpp | 8 +++++--- src/mspell/specified-summon.cpp | 18 ++++++++++++++++++ src/mspell/specified-summon.h | 2 ++ src/system/monster-entity.cpp | 5 +++++ src/system/monster-entity.h | 1 + src/system/monster-race-info.cpp | 13 +++++++++++++ src/system/monster-race-info.h | 1 + 7 files changed, 45 insertions(+), 3 deletions(-) diff --git a/src/mspell/mspell-summon.cpp b/src/mspell/mspell-summon.cpp index 5cc3a00f2..0ec5aa4c2 100644 --- a/src/mspell/mspell-summon.cpp +++ b/src/mspell/mspell-summon.cpp @@ -110,12 +110,11 @@ static void decide_summon_kin_caster( msg_format(_("%s^が何かをつぶやいた。", "%s^ mumbles."), m_name); } } else if (mon_to_player || (mon_to_mon && known && see_either)) { - auto *r_ptr = &m_ptr->get_monrace(); #ifdef JP (void)m_poss; #endif - _(msg_format("%sが魔法で%sを召喚した。", m_name, (r_ptr->kind_flags.has(MonsterKindType::UNIQUE) ? "手下" : "仲間")), - msg_format("%s^ magically summons %s %s.", m_name, m_poss, (r_ptr->kind_flags.has(MonsterKindType::UNIQUE) ? "minions" : "kin"))); + _(msg_format("%sが魔法で%sを召喚した。", m_name, m_ptr->get_pronoun_of_summoned_kin().data()), + msg_format("%s^ magically summons %s %s.", m_name, m_poss, m_ptr->get_pronoun_of_summoned_kin().data())); } if (mon_to_mon && known && !see_either) { @@ -204,6 +203,9 @@ MonsterSpellResult spell_RF6_S_KIN(PlayerType *player_ptr, POSITION y, POSITION case MonsterRaceId::OOTSUKI: count += summon_PLASMA(player_ptr, y, x, rlev, m_idx); break; + case MonsterRaceId::LAFFEY_II: + count += summon_LAFFEY_II(player_ptr, Pos2D(y, x), m_idx); + break; default: count += summon_Kin(player_ptr, y, x, rlev, m_idx); break; diff --git a/src/mspell/specified-summon.cpp b/src/mspell/specified-summon.cpp index 53caf56ff..539d7f8f5 100644 --- a/src/mspell/specified-summon.cpp +++ b/src/mspell/specified-summon.cpp @@ -334,3 +334,21 @@ MONSTER_NUMBER summon_PLASMA(PlayerType *player_ptr, POSITION y, POSITION x, int msg_print(_("プーラーズーマーッ!!", "P--la--s--ma--!!")); return count; } + +/*! + * @brief ウサウサストライカー召喚の処理。 / + * @param player_ptr プレイヤーへの参照ポインタ + * @param y 対象の地点のy座標 + * @param x 対象の地点のx座標 + * @param m_idx 呪文を唱えるモンスターID + * @return 召喚したモンスターの数を返す。 + */ +MONSTER_NUMBER summon_LAFFEY_II(PlayerType *player_ptr, const Pos2D &position, MONSTER_IDX m_idx) +{ + auto count = 0; + constexpr auto summon_num = 2; + for (auto k = 0; k < summon_num; k++) { + count += summon_named_creature(player_ptr, m_idx, position.y, position.x, MonsterRaceId::BUNBUN_STRIKERS, PM_NONE); + } + return count; +} diff --git a/src/mspell/specified-summon.h b/src/mspell/specified-summon.h index f1b5752a9..f29a79f83 100644 --- a/src/mspell/specified-summon.h +++ b/src/mspell/specified-summon.h @@ -1,6 +1,7 @@ #pragma once #include "system/angband.h" +#include "util/point-2d.h" class PlayerType; MONSTER_NUMBER summon_EAGLE(PlayerType *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx); @@ -19,3 +20,4 @@ MONSTER_NUMBER summon_VESPOID(PlayerType *player_ptr, POSITION y, POSITION x, in MONSTER_NUMBER summon_YENDER_WIZARD(PlayerType *player_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx); MONSTER_NUMBER summon_THUNDERS(PlayerType *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx); MONSTER_NUMBER summon_PLASMA(PlayerType *player_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx); +MONSTER_NUMBER summon_LAFFEY_II(PlayerType *player_ptr, const Pos2D &position, MONSTER_IDX m_idx); diff --git a/src/system/monster-entity.cpp b/src/system/monster-entity.cpp index e06e4e2d2..50728014e 100644 --- a/src/system/monster-entity.cpp +++ b/src/system/monster-entity.cpp @@ -329,3 +329,8 @@ void MonsterEntity::set_hostile() this->mflag2.reset({ MonsterConstantFlagType::PET, MonsterConstantFlagType::FRIENDLY }); } + +std::string MonsterEntity::get_pronoun_of_summoned_kin() const +{ + return this->get_monrace().get_pronoun_of_summoned_kin(); +} diff --git a/src/system/monster-entity.h b/src/system/monster-entity.h index 24e023b7c..2f9145640 100644 --- a/src/system/monster-entity.h +++ b/src/system/monster-entity.h @@ -91,6 +91,7 @@ public: bool is_explodable() const; std::string get_died_message() const; std::pair get_hp_bar_data() const; + std::string get_pronoun_of_summoned_kin() const; void set_hostile(); }; diff --git a/src/system/monster-race-info.cpp b/src/system/monster-race-info.cpp index 9515079fe..cee13a23b 100644 --- a/src/system/monster-race-info.cpp +++ b/src/system/monster-race-info.cpp @@ -66,6 +66,19 @@ void MonsterRaceInfo::kill_unique() } } +std::string MonsterRaceInfo::get_pronoun_of_summoned_kin() const +{ + if (this->kind_flags.has(MonsterKindType::UNIQUE)) { + return _("手下", "minions"); + } + switch (this->idx) { + case MonsterRaceId::LAFFEY_II: + return _("ウサウサストライカー", "Bunbun Strikers"); + default: + return _("仲間", "kin"); + } +} + const std::map> MonraceList::unified_uniques = { { MonsterRaceId::BANORLUPART, { MonsterRaceId::BANOR, MonsterRaceId::LUPART } }, }; diff --git a/src/system/monster-race-info.h b/src/system/monster-race-info.h index 8cc156de4..8b3ecbdb1 100644 --- a/src/system/monster-race-info.h +++ b/src/system/monster-race-info.h @@ -151,6 +151,7 @@ public: bool is_explodable() const; std::string get_died_message() const; void kill_unique(); + std::string get_pronoun_of_summoned_kin() const; }; class MonraceList { -- 2.11.0