• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revision110b184319f0817f312afe221f97438cd20e0165 (tree)
Time2019-01-07 23:21:00
AuthorDeskull <deskull@user...>
CommiterDeskull

Log Message

[Fix] #37359 アーティファクト生成時、殺戮修正以外は極端にベースより性能が落ちないように修正。 / Fix extreme deterioration on create_artifact().

Change Summary

Incremental Difference

--- a/src/artifact.c
+++ b/src/artifact.c
@@ -2380,44 +2380,35 @@ static bool suppression_evil_dam(object_type *o_ptr)
23802380
23812381 static bool weakening_artifact(object_type *o_ptr)
23822382 {
2383- KIND_OBJECT_IDX k_idx = lookup_kind(o_ptr->sval, o_ptr->tval);
2383+ KIND_OBJECT_IDX k_idx = lookup_kind(o_ptr->tval, o_ptr->sval);
23842384 object_kind *k_ptr = &k_info[k_idx];
2385+ BIT_FLAGS flgs[TR_FLAG_SIZE];
2386+ object_flags(o_ptr, flgs);
23852387
2386- if ((k_ptr->dd < o_ptr->dd) || (k_ptr->ds < o_ptr->ds))
2388+ if (have_flag(flgs, TR_KILL_EVIL))
23872389 {
2388- DICE_NUMBER pre_dd = o_ptr->dd;
2389- DICE_SID pre_ds = o_ptr->ds;
2390-
2391- if (o_ptr->dd > o_ptr->ds)
2392- {
2393- o_ptr->dd--;
2394- }
2395- else
2396- {
2397- o_ptr->ds--;
2398- }
2399-
2400- msg_format_wizard(CHEAT_OBJECT,
2401- _("ダイスが抑制されました。%dd%d -> %dd%d", "Dice Supress %dd%d -> %dd%d"),
2402- pre_dd, pre_ds, o_ptr->dd, o_ptr->ds);
2403- return 1;
2390+ remove_flag(o_ptr->art_flags, TR_KILL_EVIL);
2391+ add_flag(o_ptr->art_flags, TR_SLAY_EVIL);
2392+ return TRUE;
24042393 }
2405-
2406- if (o_ptr->to_d > 10)
2394+ else if (k_ptr->dd < o_ptr->dd)
2395+ {
2396+ o_ptr->dd--;
2397+ return TRUE;
2398+ }
2399+ else if (k_ptr->ds < o_ptr->ds)
2400+ {
2401+ o_ptr->ds--;
2402+ return TRUE;
2403+ }
2404+ else if (o_ptr->to_d > 10)
24072405 {
2408- HIT_POINT pre_damage = o_ptr->to_d;
2409-
24102406 o_ptr->to_d = o_ptr->to_d - damroll(1, 6);
24112407 if (o_ptr->to_d < 10)
24122408 {
24132409 o_ptr->to_d = 10;
24142410 }
2415-
2416- msg_format_wizard(CHEAT_OBJECT,
2417- _("ダメージ修正が抑制されました。 %d -> %d", "Plus-Damage Supress %d -> %d"),
2418- pre_damage, o_ptr->to_d);
2419-
2420- return 1;
2411+ return TRUE;
24212412 }
2422- return 0;
2413+ return FALSE;
24232414 }
\ No newline at end of file
--- a/src/spells3.c
+++ b/src/spells3.c
@@ -2221,10 +2221,10 @@ bool enchant_spell(HIT_PROB num_hit, HIT_POINT num_dam, ARMOUR_CLASS num_ac)
22212221 bool artifact_scroll(void)
22222222 {
22232223 OBJECT_IDX item;
2224- bool okay = FALSE;
2225- object_type *o_ptr;
2224+ bool okay = FALSE;
2225+ object_type *o_ptr;
22262226 GAME_TEXT o_name[MAX_NLEN];
2227- cptr q, s;
2227+ cptr q, s;
22282228
22292229 /* Enchant weapon/armour */
22302230 item_tester_hook = item_tester_hook_nameless_weapon_armour;
@@ -2291,21 +2291,20 @@ bool artifact_scroll(void)
22912291 {
22922292 if (o_ptr->number > 1)
22932293 {
2294+ msg_print(_("複数のアイテムに魔法をかけるだけのエネルギーはありません!", "Not enough enough energy to enchant more than one object!"));
22942295 #ifdef JP
2295- msg_print("複数のアイテムに魔法をかけるだけのエネルギーはありません!");
22962296 msg_format("%d 個の%sが壊れた!",(o_ptr->number)-1, o_name);
22972297 #else
2298- msg_print("Not enough enough energy to enchant more than one object!");
22992298 msg_format("%d of your %s %s destroyed!",(o_ptr->number)-1, o_name, (o_ptr->number>2?"were":"was"));
23002299 #endif
23012300
23022301 if (item >= 0)
23032302 {
2304- inven_item_increase(item, 1-(o_ptr->number));
2303+ inven_item_increase(item, 1 - (o_ptr->number));
23052304 }
23062305 else
23072306 {
2308- floor_item_increase(0-item, 1-(o_ptr->number));
2307+ floor_item_increase(0 - item, 1 - (o_ptr->number));
23092308 }
23102309 }
23112310 okay = create_artifact(o_ptr, TRUE);
Show on old repository browser