From 7f27ea5291e403b8e7b1914a671739a1488bd70f Mon Sep 17 00:00:00 2001 From: Hourier Date: Thu, 8 Oct 2020 22:11:10 +0900 Subject: [PATCH] =?utf8?q?[Implement]=20#37324=20=E3=82=A8=E3=82=B4/?= =?utf8?q?=E3=82=A2=E3=83=BC=E3=83=86=E3=82=A3=E3=83=95=E3=82=A1=E3=82=AF?= =?utf8?q?=E3=83=88=E3=81=AE=E7=99=BA=E5=8B=95=E3=81=AB=E6=AD=BB=E8=80=85?= =?utf8?q?=E5=BE=A9=E6=B4=BB=E3=82=92=E8=BF=BD=E5=8A=A0=E3=81=97=E3=81=9F?= =?utf8?q?=20/=20Added=20activation=20of=20ego/artifact:=20Animate=20Dead?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- lib/edit/a_info.txt | 12 ++++++------ src/art-definition/random-art-effects.h | 5 +++-- src/object-activation/activation-others.c | 9 +++++++++ src/object-activation/activation-others.h | 1 + src/object-activation/activation-switcher.c | 2 ++ src/object-enchant/activation-info-table.c | 13 +++++++++---- src/object-enchant/activation-info-table.h | 3 ++- src/object-enchant/object-boost.c | 1 + 8 files changed, 33 insertions(+), 13 deletions(-) diff --git a/lib/edit/a_info.txt b/lib/edit/a_info.txt index f4c5ce964..95865e62d 100644 --- a/lib/edit/a_info.txt +++ b/lib/edit/a_info.txt @@ -4205,14 +4205,14 @@ D:その刃は数多くの赤衣の者達に握られ、悪しき者たちを屠 N:253:トゲトゲバット『エスカリボルグ』 E:'Excaliborg, the *thorny* bat' -I:21:16:4 -W:35:40:190:150000 -P:0:7d7:30:30:10 +I:21:16:2 +W:35:40:190:85000 +P:0:7d7:18:18:10 F:STR | DEX | CON | SUST_STR | SUST_DEX | SUST_CON -F:VORPAL | VAMPIRIC | KILL_HUMAN | BLESSED +F:VORPAL | VAMPIRIC | KILL_HUMAN | BLESSED | ACTIVATE F:RES_FIRE | RES_LITE | LEVITATION F:IGNORE_ACID | IGNORE_ELEC | IGNORE_FIRE | IGNORE_COLD F:FULL_NAME U:ANIM_DEAD -D:$This bat is filled with the unremitting love of the user. -D:このバットには使用者のたゆまぬ愛が込められている。 +D:$This glowing black bat is filled with the unremitting love of the user. +D:この黒光りするバットには使用者のたゆまぬ愛が込められている。 diff --git a/src/art-definition/random-art-effects.h b/src/art-definition/random-art-effects.h index ee6bc99be..4101112d5 100644 --- a/src/art-definition/random-art-effects.h +++ b/src/art-definition/random-art-effects.h @@ -1,7 +1,7 @@ #pragma once typedef enum random_art_activation_type { - ACT_SUNLIGHT = 1, + ACT_SUNLIGHT = 1, ACT_BO_MISS_1 = 2, ACT_BA_POIS_1 = 3, ACT_BO_ELEC_1 = 4, @@ -43,7 +43,8 @@ typedef enum random_art_activation_type { ACT_BR_DRAGON = 40, ACT_BA_FIRE_4 = 41, ACT_BA_NUKE_1 = 42, - /* 42 - 50 unused */ + /* 43 - 49 unused */ + ACT_ANIM_DEAD = 50, ACT_CONFUSE = 51, ACT_SLEEP = 52, ACT_QUAKE = 53, diff --git a/src/object-activation/activation-others.c b/src/object-activation/activation-others.c index 986298ff4..577358f2c 100644 --- a/src/object-activation/activation-others.c +++ b/src/object-activation/activation-others.c @@ -346,3 +346,12 @@ bool activate_recall(player_type *user_ptr) msg_print(_("やわらかな白色に輝いている...", "It glows soft white...")); return recall_player(user_ptr, randint0(21) + 15); } + +bool activate_animate_dead(player_type *user_ptr, object_type *o_ptr) +{ + msg_print(_("黄金色の光が溢れ出た...", "It emitted a golden light...")); + if (o_ptr->name1 > 0) + msg_print(_("ぴぴるぴるぴるぴぴるぴ~♪", "Pipiru piru piru pipiru pii")); + + return animate_dead(user_ptr, 0, user_ptr->y, user_ptr->x); +} diff --git a/src/object-activation/activation-others.h b/src/object-activation/activation-others.h index 74e106e0d..84ee2dd52 100644 --- a/src/object-activation/activation-others.h +++ b/src/object-activation/activation-others.h @@ -37,3 +37,4 @@ bool activate_exploding_rune(player_type *user_ptr); bool activate_protection_rune(player_type *user_ptr); bool activate_light(player_type *user_ptr, concptr name); bool activate_recall(player_type *user_ptr); +bool activate_animate_dead(player_type *user_ptr, object_type *o_ptr); diff --git a/src/object-activation/activation-switcher.c b/src/object-activation/activation-switcher.c index b1fd02517..65c5ea8aa 100644 --- a/src/object-activation/activation-switcher.c +++ b/src/object-activation/activation-switcher.c @@ -123,6 +123,8 @@ bool switch_activation(player_type *user_ptr, object_type *o_ptr, const activati return activate_breath_cold(user_ptr, o_ptr); case ACT_BR_DRAGON: return activate_dragon_breath(user_ptr, o_ptr); + case ACT_ANIM_DEAD: + return activate_animate_dead(user_ptr, o_ptr); case ACT_CONFUSE: return activate_confusion(user_ptr); case ACT_SLEEP: diff --git a/src/object-enchant/activation-info-table.c b/src/object-enchant/activation-info-table.c index e8eead6b5..631383c32 100644 --- a/src/object-enchant/activation-info-table.c +++ b/src/object-enchant/activation-info-table.c @@ -5,7 +5,8 @@ * @brief アイテムの発動効果テーブル / * Define flags, levels, values of activations */ -const activation_type activation_info[] = { { "SUNLIGHT", ACT_SUNLIGHT, 10, 250, { 10, 0 }, _("太陽光線", "beam of sunlight") }, +const activation_type activation_info[MAX_ACTIVATION_TYPE] = { + { "SUNLIGHT", ACT_SUNLIGHT, 10, 250, { 10, 0 }, _("太陽光線", "beam of sunlight") }, { "BO_MISS_1", ACT_BO_MISS_1, 10, 250, { 2, 0 }, _("マジック・ミサイル(2d6)", "magic missile (2d6)") }, { "BA_POIS_1", ACT_BA_POIS_1, 10, 300, { 4, 0 }, _("悪臭雲(12)", "stinking cloud (12)") }, { "BO_ELEC_1", ACT_BO_ELEC_1, 20, 250, { 5, 0 }, _("サンダー・ボルト(4d8)", "lightning bolt (4d8)") }, @@ -51,7 +52,8 @@ const activation_type activation_info[] = { { "SUNLIGHT", ACT_SUNLIGHT, 10, 250, { "CONFUSE", ACT_CONFUSE, 10, 500, { 10, 0 }, _("パニック・モンスター", "confuse monster") }, { "SLEEP", ACT_SLEEP, 10, 750, { 15, 0 }, _("周囲のモンスターを眠らせる", "sleep nearby monsters") }, - { "QUAKE", ACT_QUAKE, 30, 600, { 20, 0 }, _("地震", "earthquake") }, { "TERROR", ACT_TERROR, 20, 2500, { -1, 0 }, _("恐慌", "terror") }, + { "QUAKE", ACT_QUAKE, 30, 600, { 20, 0 }, _("地震", "earthquake") }, + { "TERROR", ACT_TERROR, 20, 2500, { -1, 0 }, _("恐慌", "terror") }, { "TELE_AWAY", ACT_TELE_AWAY, 20, 2000, { 15, 0 }, _("テレポート・アウェイ", "teleport away") }, { "BANISH_EVIL", ACT_BANISH_EVIL, 40, 2000, { 250, 0 }, _("邪悪消滅", "banish evil") }, { "GENOCIDE", ACT_GENOCIDE, 50, 10000, { 500, 0 }, _("抹殺", "genocide") }, @@ -111,7 +113,8 @@ const activation_type activation_info[] = { { "SUNLIGHT", ACT_SUNLIGHT, 10, 250, { "SATIATE", ACT_SATIATE, 10, 2000, { 200, 0 }, _("空腹充足", "satisfy hunger") }, { "DEST_DOOR", ACT_DEST_DOOR, 10, 100, { 10, 0 }, _("ドア破壊", "destroy doors") }, { "STONE_MUD", ACT_STONE_MUD, 20, 1000, { 3, 0 }, _("岩石溶解", "stone to mud") }, - { "RECHARGE", ACT_RECHARGE, 30, 1000, { 70, 0 }, _("魔力充填", "recharging") }, { "ALCHEMY", ACT_ALCHEMY, 50, 10000, { 500, 0 }, _("錬金術", "alchemy") }, + { "RECHARGE", ACT_RECHARGE, 30, 1000, { 70, 0 }, _("魔力充填", "recharging") }, + { "ALCHEMY", ACT_ALCHEMY, 50, 10000, { 500, 0 }, _("錬金術", "alchemy") }, { "DIM_DOOR", ACT_DIM_DOOR, 50, 10000, { 100, 0 }, _("次元の扉", "dimension door") }, { "TELEPORT", ACT_TELEPORT, 10, 2000, { 25, 0 }, _("テレポート", "teleport") }, { "RECALL", ACT_RECALL, 30, 7500, { 200, 0 }, _("帰還の詔", "word of recall") }, @@ -138,5 +141,7 @@ const activation_type activation_info[] = { { "SUNLIGHT", ACT_SUNLIGHT, 10, 250, { "STRAIN_HASTE", ACT_STRAIN_HASTE, 10, 1000, { 120, 100 }, _("体力と引き換えに加速", "haste with strain") }, { "GRAND_CROSS", ACT_GRAND_CROSS, 30, 15000, { 250, 200 }, _("グランド・クロス", "grand cross") }, { "TELEPORT_LEVEL", ACT_TELEPORT_LEVEL, 10, 1500, { 100, 200 }, _("テレポート・レベル", "teleort level") }, - { "ARTS_FALLING_STAR", ACT_FALLING_STAR, 20, 5500, { 30, 50 }, _("魔剣・流れ星", "blade arts 'falling star'") }, { NULL, 0, 0, 0, { 0, 0 }, "" } + { "ARTS_FALLING_STAR", ACT_FALLING_STAR, 20, 5500, { 30, 50 }, _("魔剣・流れ星", "blade arts 'falling star'") }, + { "ANIM_DEAD", ACT_ANIM_DEAD, 30, 2000, { 10, 10 }, _("死者復活", "animate dead") }, + { NULL, 0, 0, 0, { 0, 0 }, "" }, }; diff --git a/src/object-enchant/activation-info-table.h b/src/object-enchant/activation-info-table.h index b4ce7975e..0dc28e5f3 100644 --- a/src/object-enchant/activation-info-table.h +++ b/src/object-enchant/activation-info-table.h @@ -14,4 +14,5 @@ typedef struct activation_type { concptr desc; } activation_type; -extern const activation_type activation_info[]; +#define MAX_ACTIVATION_TYPE 130 +extern const activation_type activation_info[MAX_ACTIVATION_TYPE]; diff --git a/src/object-enchant/object-boost.c b/src/object-enchant/object-boost.c index b202bd107..fc54f7ded 100644 --- a/src/object-enchant/object-boost.c +++ b/src/object-enchant/object-boost.c @@ -448,6 +448,7 @@ void one_activation(object_type *o_ptr) chance = 50; break; case ACT_SUMMON_ANIMAL: + case ACT_ANIM_DEAD: chance = 40; break; case ACT_DISP_EVIL: -- 2.11.0