From 7a6dd8075d753ed66a286dcba2842ac134dc15a8 Mon Sep 17 00:00:00 2001 From: Hourier Date: Thu, 27 May 2021 19:36:03 +0900 Subject: [PATCH] =?utf8?q?[Implement]=20#1158=20=E3=80=8E=E3=82=B4?= =?utf8?q?=E3=82=B4=E3=81=AE=E3=83=9A=E3=83=B3=E3=83=80=E3=83=B3=E3=83=88?= =?utf8?q?=E3=80=8F=E3=82=92=E8=A3=85=E5=82=99=E3=81=97=E3=81=A6=E3=81=84?= =?utf8?q?=E3=82=8B=E3=82=82=E3=81=AE=E3=81=BE=E3=81=AD=E5=B8=AB=E3=81=AF?= =?utf8?q?=E3=82=82=E3=81=AE=E3=81=BE=E3=81=AD=E3=81=AE=E5=A4=B1=E7=8E=87?= =?utf8?q?=E3=82=92=E4=B8=8B=E3=81=92=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= =?utf8?q?=E3=81=97=E3=81=9F=20/=20Decreased=20the=20difficulty=20of=20imi?= =?utf8?q?tation=20when=20the=20player=20equips=20the=20Pendant=20of=20Gog?= =?utf8?q?o?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/action/racial-execution.cpp | 12 +++++++++++- src/artifact/fixed-art-types.h | 1 + src/cmd-action/cmd-mane.cpp | 7 +++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/action/racial-execution.cpp b/src/action/racial-execution.cpp index 76a8d296e..97320bcc9 100644 --- a/src/action/racial-execution.cpp +++ b/src/action/racial-execution.cpp @@ -5,11 +5,14 @@ #include "action/racial-execution.h" #include "action/action-limited.h" +#include "artifact/fixed-art-types.h" #include "core/asking-player.h" #include "game-option/disturbance-options.h" +#include "inventory/inventory-slot-types.h" #include "player-status/player-energy.h" #include "racial/racial-switcher.h" #include "racial/racial-util.h" +#include "system/object-type-definition.h" #include "system/player-type-definition.h" #include "term/screen-processor.h" #include "view/display-messages.h" @@ -55,6 +58,13 @@ PERCENTAGE racial_chance(player_type *creature_ptr, rpi_type *rpi_ptr) difficulty -= lev_adj; } + auto special_easy = creature_ptr->pclass == CLASS_IMITATOR; + special_easy &= creature_ptr->inventory_list[INVEN_NECK].name1 == ART_GOGO_PENDANT; + special_easy &= rpi_ptr->racial_name.compare("倍返し") == 0; + if (special_easy) { + difficulty -= 12; + } + if (difficulty < 5) difficulty = 5; @@ -106,7 +116,7 @@ racial_level_check_result check_racial_level(player_type *creature_ptr, rpi_type if (creature_ptr->csp < rpi_ptr->racial_cost) { use_hp = rpi_ptr->racial_cost - creature_ptr->csp; } - + PlayerEnergy energy(creature_ptr); if (creature_ptr->lev < min_level) { msg_format(_("この能力を使用するにはレベル %d に達していなければなりません。", "You need to attain level %d to use this power."), min_level); diff --git a/src/artifact/fixed-art-types.h b/src/artifact/fixed-art-types.h index bcf548448..73f11bcfa 100644 --- a/src/artifact/fixed-art-types.h +++ b/src/artifact/fixed-art-types.h @@ -38,6 +38,7 @@ enum fixed_artifact_type { ART_BLOOD = 199, ART_AEGISFANG = 208, ART_NIGHT = 215, + ART_GOGO_PENDANT = 220, ART_HEAVENLY_MAIDEN = 233, ART_MILIM = 246, ART_ROBINTON = 251, diff --git a/src/cmd-action/cmd-mane.cpp b/src/cmd-action/cmd-mane.cpp index e17da49c7..5e01d909e 100644 --- a/src/cmd-action/cmd-mane.cpp +++ b/src/cmd-action/cmd-mane.cpp @@ -10,6 +10,7 @@ */ #include "action/action-limited.h" +#include "artifact/fixed-art-types.h" #include "cmd-action/cmd-spell.h" #include "core/asking-player.h" #include "core/player-redraw-types.h" @@ -21,6 +22,7 @@ #include "game-option/text-display-options.h" #include "grid/grid.h" #include "hpmp/hp-mp-processor.h" +#include "inventory/inventory-slot-types.h" #include "main/sound-definitions-table.h" #include "main/sound-of-music.h" #include "mind/mind-mage.h" @@ -53,6 +55,7 @@ #include "system/floor-type-definition.h" #include "system/monster-race-definition.h" #include "system/monster-type-definition.h" +#include "system/object-type-definition.h" #include "system/player-type-definition.h" #include "target/projection-path-calculator.h" #include "target/target-checker.h" @@ -196,6 +199,10 @@ static int get_mane_power(player_type *caster_ptr, int *sn, bool baigaesi) chance += caster_ptr->to_m_chance; + if (caster_ptr->inventory_list[INVEN_NECK].name1 == ART_GOGO_PENDANT) { + chance -= 10; + } + /* Extract the minimum failure rate */ minfail = adj_mag_fail[caster_ptr->stat_index[spell.use_stat]]; -- 2.11.0