• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revisiond0ed4ef4efd521106a5f8320099541dcd46de30b (tree)
Time2019-06-19 23:42:26
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #37353 create_arfifact() を become_random_artifact() に改名.

Change Summary

Incremental Difference

--- a/src/artifact.c
+++ b/src/artifact.c
@@ -1548,7 +1548,7 @@ static void get_random_name(object_type *o_ptr, char *return_name, bool armour,
15481548 * @param a_scroll アーティファクト生成の巻物上の処理。呪いのアーティファクトが生成対象外となる。
15491549 * @return 常にTRUE(1)を返す
15501550 */
1551-bool create_artifact(object_type *o_ptr, bool a_scroll)
1551+bool become_random_artifact(object_type *o_ptr, bool a_scroll)
15521552 {
15531553 GAME_TEXT new_name[1024];
15541554 PARAMETER_VALUE has_pval = 0;
@@ -1700,7 +1700,7 @@ bool create_artifact(object_type *o_ptr, bool a_scroll)
17001700 random_slay(o_ptr);
17011701 break;
17021702 default:
1703- if (p_ptr->wizard) msg_print("Switch error in create_artifact!");
1703+ if (p_ptr->wizard) msg_print("Switch error in become_random_artifact!");
17041704 powers++;
17051705 }
17061706 };
--- a/src/artifact.h
+++ b/src/artifact.h
@@ -74,7 +74,7 @@ extern char *a_text;
7474 extern ARTIFACT_IDX max_a_idx;
7575
7676 /* artifact.c */
77-extern bool create_artifact(object_type *o_ptr, bool a_scroll);
77+extern bool become_random_artifact(object_type *o_ptr, bool a_scroll);
7878 extern int activation_index(object_type *o_ptr);
7979 extern const activation_type* find_activation_info(object_type *o_ptr);
8080 extern void random_artifact_resistance(object_type * o_ptr, artifact_type *a_ptr);
--- a/src/gamevalue.h
+++ b/src/gamevalue.h
@@ -108,7 +108,7 @@
108108 #define SINDARIN_NAME 10 /*!< ランダムアーティファクトにシンダリン銘をつける確率 */
109109 #define TABLE_NAME 20 /*!< ランダムアーティファクトに漢字銘をつける確率(正確には TABLE_NAME - SINDARIN_NAME %)となる */
110110 #define A_CURSED 13 /*!< 1/nの確率で生成の巻物以外のランダムアーティファクトが呪いつきになる。 */
111-#define WEIRD_LUCK 12 /*!< 1/nの確率でrandom_resistance()の処理中バイアス外の耐性がつき、create_artifactで4を超えるpvalが許可される。*/
111+#define WEIRD_LUCK 12 /*!< 1/nの確率でrandom_resistance()の処理中バイアス外の耐性がつき、become_random_artifactで4を超えるpvalが許可される。*/
112112 #define SWORDFISH_LUCK 6 /*!< 1/nの確率で一定以上のスレイダメージを超える武器のスレイ喪失が回避される。 */
113113 #define BIAS_LUCK 20 /*!< 1/nの確率でrandom_resistance()で付加する元素耐性が免疫になる */
114114 #define IM_LUCK 7 /*!< 1/nの確率でrandom_resistance()で複数免疫の除去処理が免除される */
--- a/src/object2.c
+++ b/src/object2.c
@@ -2080,7 +2080,7 @@ void apply_magic_weapon(object_type *o_ptr, DEPTH level, int power)
20802080 if (power > 1)
20812081 {
20822082 if (one_in_(30) || (power > 2)) /* power > 2 is debug only */
2083- create_artifact(o_ptr, FALSE);
2083+ become_random_artifact(o_ptr, FALSE);
20842084 else
20852085 /* Special Ego-item */
20862086 o_ptr->name2 = EGO_DIGGING;
@@ -2112,7 +2112,7 @@ void apply_magic_weapon(object_type *o_ptr, DEPTH level, int power)
21122112 {
21132113 if (one_in_(40) || (power > 2)) /* power > 2 is debug only */
21142114 {
2115- create_artifact(o_ptr, FALSE);
2115+ become_random_artifact(o_ptr, FALSE);
21162116 break;
21172117 }
21182118 while (1)
@@ -2271,7 +2271,7 @@ void apply_magic_weapon(object_type *o_ptr, DEPTH level, int power)
22712271 {
22722272 if (one_in_(20) || (power > 2)) /* power > 2 is debug only */
22732273 {
2274- create_artifact(o_ptr, FALSE);
2274+ become_random_artifact(o_ptr, FALSE);
22752275 break;
22762276 }
22772277 o_ptr->name2 = get_random_ego(INVEN_BOW, TRUE);
@@ -2290,7 +2290,7 @@ void apply_magic_weapon(object_type *o_ptr, DEPTH level, int power)
22902290 {
22912291 if (power > 2) /* power > 2 is debug only */
22922292 {
2293- create_artifact(o_ptr, FALSE);
2293+ become_random_artifact(o_ptr, FALSE);
22942294 break;
22952295 }
22962296
@@ -2377,7 +2377,7 @@ static void a_m_aux_2(object_type *o_ptr, DEPTH level, int power)
23772377 case TV_DRAG_ARMOR:
23782378 {
23792379 if (one_in_(50) || (power > 2)) /* power > 2 is debug only */
2380- create_artifact(o_ptr, FALSE);
2380+ become_random_artifact(o_ptr, FALSE);
23812381 break;
23822382 }
23832383
@@ -2409,7 +2409,7 @@ static void a_m_aux_2(object_type *o_ptr, DEPTH level, int power)
24092409
24102410 if (one_in_(20) || (power > 2)) /* power > 2 is debug only */
24112411 {
2412- create_artifact(o_ptr, FALSE);
2412+ become_random_artifact(o_ptr, FALSE);
24132413 break;
24142414 }
24152415
@@ -2497,7 +2497,7 @@ static void a_m_aux_2(object_type *o_ptr, DEPTH level, int power)
24972497 {
24982498 if (one_in_(20) || (power > 2)) /* power > 2 is debug only */
24992499 {
2500- create_artifact(o_ptr, FALSE);
2500+ become_random_artifact(o_ptr, FALSE);
25012501 break;
25022502 }
25032503
@@ -2543,7 +2543,7 @@ static void a_m_aux_2(object_type *o_ptr, DEPTH level, int power)
25432543 {
25442544 if (one_in_(20) || (power > 2)) /* power > 2 is debug only */
25452545 {
2546- create_artifact(o_ptr, FALSE);
2546+ become_random_artifact(o_ptr, FALSE);
25472547 break;
25482548 }
25492549 o_ptr->name2 = get_random_ego(INVEN_HANDS, TRUE);
@@ -2570,7 +2570,7 @@ static void a_m_aux_2(object_type *o_ptr, DEPTH level, int power)
25702570 {
25712571 if (one_in_(20) || (power > 2)) /* power > 2 is debug only */
25722572 {
2573- create_artifact(o_ptr, FALSE);
2573+ become_random_artifact(o_ptr, FALSE);
25742574 break;
25752575 }
25762576 o_ptr->name2 = get_random_ego(INVEN_FEET, TRUE);
@@ -2601,7 +2601,7 @@ static void a_m_aux_2(object_type *o_ptr, DEPTH level, int power)
26012601 {
26022602 if (one_in_(20) || (power > 2)) /* power > 2 is debug only */
26032603 {
2604- create_artifact(o_ptr, FALSE);
2604+ become_random_artifact(o_ptr, FALSE);
26052605 break;
26062606 }
26072607 while (1)
@@ -2677,7 +2677,7 @@ static void a_m_aux_2(object_type *o_ptr, DEPTH level, int power)
26772677 {
26782678 if (one_in_(20) || (power > 2)) /* power > 2 is debug only */
26792679 {
2680- create_artifact(o_ptr, FALSE);
2680+ become_random_artifact(o_ptr, FALSE);
26812681 break;
26822682 }
26832683 while (1)
@@ -2755,7 +2755,7 @@ static void a_m_aux_2(object_type *o_ptr, DEPTH level, int power)
27552755 {
27562756 if (one_in_(20) || (power > 2)) /* power > 2 is debug only */
27572757 {
2758- create_artifact(o_ptr, FALSE);
2758+ become_random_artifact(o_ptr, FALSE);
27592759 break;
27602760 }
27612761 o_ptr->name2 = get_random_ego(INVEN_OUTER, TRUE);
@@ -3104,7 +3104,7 @@ static void a_m_aux_3(object_type *o_ptr, DEPTH level, int power)
31043104 {
31053105 o_ptr->pval = MIN(o_ptr->pval, 4);
31063106 /* Randart amulet */
3107- create_artifact(o_ptr, FALSE);
3107+ become_random_artifact(o_ptr, FALSE);
31083108 }
31093109 else if ((power == 2) && one_in_(2))
31103110 {
@@ -3436,7 +3436,7 @@ static void a_m_aux_3(object_type *o_ptr, DEPTH level, int power)
34363436 {
34373437 o_ptr->pval = MIN(o_ptr->pval, 4);
34383438 /* Randart amulet */
3439- create_artifact(o_ptr, FALSE);
3439+ become_random_artifact(o_ptr, FALSE);
34403440 }
34413441 else if ((power == 2) && one_in_(2))
34423442 {
@@ -3639,7 +3639,7 @@ static void a_m_aux_4(object_type *o_ptr, DEPTH level, int power)
36393639
36403640 if (power > 2) /* power > 2 is debug only */
36413641 {
3642- create_artifact(o_ptr, FALSE);
3642+ become_random_artifact(o_ptr, FALSE);
36433643 }
36443644 else if ((power == 2) || ((power == 1) && one_in_(3)))
36453645 {
--- a/src/wizard2.c
+++ b/src/wizard2.c
@@ -858,7 +858,7 @@ static void wiz_reroll_item(object_type *o_ptr)
858858 apply_magic(q_ptr, current_floor_ptr->dun_level, AM_GOOD | AM_GREAT | AM_SPECIAL);
859859
860860 /* Failed to create artifact; make a random one */
861- if (!object_is_artifact(q_ptr)) create_artifact(q_ptr, FALSE);
861+ if (!object_is_artifact(q_ptr)) become_random_artifact(q_ptr, FALSE);
862862 break;
863863 }
864864 }
Show on old repository browser