From b3819f3b9c6183499ae88d0150990c77cc7f4357 Mon Sep 17 00:00:00 2001 From: backwardsEric Date: Tue, 10 Sep 2019 00:38:13 -0700 Subject: [PATCH] Using the English version, a combat with a moon beast and an orc shaman nearby caused a crash with the call stack going through monspell_message_base() and spell_RF6_HEAL(). Modified spell_RF6_HEAL() and spell_RF6_HASTE(), which has a similar problem, to mimic the Japanese messages and avoid the crash. Like the Japanese version, in both places the 4th form of the message is not taking the other participant into account. Also, the English version isn't attempting to get the gender of the possessive pronoun right. --- src/mspells4.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mspells4.c b/src/mspells4.c index eecb4aca..f28addc2 100644 --- a/src/mspells4.c +++ b/src/mspells4.c @@ -1733,9 +1733,9 @@ void spell_RF6_HASTE(MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE) monspell_message_base(m_idx, t_idx, _("%^sが何かをつぶやいた。", "%^s mumbles."), - _("%^sが自分の体に念を送った。", "%^s concentrates on %s body."), - _("%^sが自分の体に念を送った。", "%^s concentrates on %s body."), - _("%^sが自分の体に念を送った。", "%^s concentrates on %s body."), + _("%^sが自分の体に念を送った。", "%^s concentrates on his body."), + _("%^sが自分の体に念を送った。", "%^s concentrates on his body."), + _("%^sが自分の体に念を送った。", "%^s concentrates on his body."), p_ptr->blind > 0, TARGET_TYPE); /* Allow quick speed increases to base+10 */ @@ -1796,9 +1796,9 @@ void spell_RF6_HEAL(MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE) monspell_message_base(m_idx, t_idx, _("%^sが何かをつぶやいた。", "%^s mumbles."), - _("%^sは自分の傷に念を集中した。", "%^s concentrates on %s wounds."), - _("%^sが自分の傷に集中した。", "%^s concentrates on %s wounds."), - _("%^sは自分の傷に念を集中した。", "%^s concentrates on %s wounds."), + _("%^sは自分の傷に念を集中した。", "%^s concentrates on his wounds."), + _("%^sが自分の傷に集中した。", "%^s concentrates on my wounds."), + _("%^sは自分の傷に念を集中した。", "%^s concentrates on his wounds."), p_ptr->blind > 0, TARGET_TYPE); /* Heal some */ -- 2.21.0 (Apple Git-122) From cd60467f5cf8d3b7a71e2e1aed24aff5106b82b1 Mon Sep 17 00:00:00 2001 From: backwardsEric Date: Tue, 1 Oct 2019 10:23:34 -0700 Subject: [PATCH] Changed messages from spell_RF6_HEAL() and spell_RF6_HASTE() to substitute the appropriate possessive pronoun for the monster's gender. Only affects the English messages though the possessive pronoun is computed for both the English and Japanese versions. --- src/mspells4.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/mspells4.c b/src/mspells4.c index 25432457..0683acfa 100644 --- a/src/mspells4.c +++ b/src/mspells4.c @@ -1729,13 +1729,16 @@ void spell_RF6_HASTE(MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE) bool see_m = see_monster(m_idx); monster_type *m_ptr = ¤t_floor_ptr->m_list[m_idx]; GAME_TEXT m_name[MAX_NLEN]; + char m_poss[10]; + monster_name(m_idx, m_name); + monster_desc(m_poss, m_ptr, MD_PRON_VISIBLE | MD_POSSESSIVE); monspell_message_base(m_idx, t_idx, _("%^sが何かをつぶやいた。", "%^s mumbles."), - _("%^sが自分の体に念を送った。", "%^s concentrates on his body."), - _("%^sが自分の体に念を送った。", "%^s concentrates on his body."), - _("%^sが自分の体に念を送った。", "%^s concentrates on his body."), + _("%^sが自分の体に念を送った。", format("%%^s concentrates on %s body.", m_poss)), + _("%^sが自分の体に念を送った。", format("%%^s concentrates on %s body.", m_poss)), + _("%^sが自分の体に念を送った。", format("%%^s concentrates on %s body.", m_poss)), p_ptr->blind > 0, TARGET_TYPE); /* Allow quick speed increases to base+10 */ @@ -1790,15 +1793,18 @@ void spell_RF6_HEAL(MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE) DEPTH rlev = monster_level_idx(m_idx); bool seen = (!p_ptr->blind && m_ptr->ml); GAME_TEXT m_name[MAX_NLEN]; + char m_poss[10]; + monster_name(m_idx, m_name); + monster_desc(m_poss, m_ptr, MD_PRON_VISIBLE | MD_POSSESSIVE); disturb(TRUE, TRUE); monspell_message_base(m_idx, t_idx, _("%^sが何かをつぶやいた。", "%^s mumbles."), - _("%^sは自分の傷に念を集中した。", "%^s concentrates on his wounds."), - _("%^sが自分の傷に集中した。", "%^s concentrates on his wounds."), - _("%^sは自分の傷に念を集中した。", "%^s concentrates on his wounds."), + _("%^sは自分の傷に念を集中した。", format("%%^s concentrates on %s wounds.", m_poss)), + _("%^sが自分の傷に集中した。", format("%%^s concentrates on %s wounds.", m_poss)), + _("%^sは自分の傷に念を集中した。", format("%%^s concentrates on %s wounds.", m_poss)), p_ptr->blind > 0, TARGET_TYPE); /* Heal some */ -- 2.21.0 (Apple Git-122)