From 8282681b4e2c7c339b45d33b8554a089b475347e Mon Sep 17 00:00:00 2001 From: Hourier Date: Fri, 22 Jan 2021 22:15:45 +0900 Subject: [PATCH] =?utf8?q?[Refactor=20#41192=20=E9=AD=94=E9=81=93=E5=85=B7?= =?utf8?q?=E5=90=B8=E5=8F=8E=E3=81=AB=E3=82=88=E3=82=8BHP=E3=81=AE?= =?utf8?q?=E5=9B=9E=E5=BE=A9=E9=87=8F=E3=82=92=E8=AA=BF=E6=95=B4=E3=81=97?= =?utf8?q?=E3=81=9F=20/=20Adjusted=20the=20recovery=20of=20monster=20when?= =?utf8?q?=20it=20attacks=20drain=20magic=20item?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/monster-attack/monster-eating.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/monster-attack/monster-eating.c b/src/monster-attack/monster-eating.c index 9f72f705b..fd6d3e47f 100644 --- a/src/monster-attack/monster-eating.c +++ b/src/monster-attack/monster-eating.c @@ -217,13 +217,13 @@ bool process_un_power(player_type *target_ptr, monap_type *monap_ptr) if (monap_ptr->o_ptr->tval == TV_STAFF) drain *= monap_ptr->o_ptr->number; - drain = MIN(drain, (monap_ptr->m_ptr->maxhp - monap_ptr->m_ptr->hp) / drain); msg_print(_("ザックからエネルギーが吸い取られた!", "Energy was drained from your pack!")); if (is_magic_mastery) msg_print(_("しかし、あなたの魔法を操る力がその一部を取り返した!", "However, your skill of magic mastery got back the part of energy!")); monap_ptr->obvious = TRUE; HIT_POINT recovery = drain * kind_ptr->level; + recovery = MIN(recovery, monap_ptr->m_ptr->maxhp - monap_ptr->m_ptr->hp); monap_ptr->m_ptr->hp += recovery; if (target_ptr->health_who == monap_ptr->m_idx) target_ptr->redraw |= PR_HEALTH; -- 2.11.0