• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revision4615224341a021ecb63bf7051eb7a5d404cfe2fa (tree)
Time2019-03-12 13:29:24
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #37353 パトロン周りの整理。 / Refactor about patrons.

Change Summary

Incremental Difference

--- a/src/birth.c
+++ b/src/birth.c
@@ -16,6 +16,7 @@
1616 #include "history.h"
1717 #include "monsterrace-hook.h"
1818 #include "store.h"
19+#include "patron.h"
1920 #include "quest.h"
2021 #include "player-status.h"
2122 #include "spells.h"
--- a/src/defines.h
+++ b/src/defines.h
@@ -148,7 +148,6 @@
148148 #define MAX_SEXES 2 /*!< 性別の定義最大数 / Maximum number of player "sex" types (see "table.c", etc) */
149149 #define MAX_CLASS 28 /*!< 職業の最大定義数 Maximum number of player "class" types (see "table.c", etc) */
150150 #define MAX_SEIKAKU 13 /*!< 性格の最大定義数 */
151-#define MAX_PATRON 16 /*!< カオスパトロンの最大定義数 / The number of "patrons" available (for Chaos Warriors) */
152151
153152 /* ELDRITCH_HORRORによるsanity blast処理に関するメッセージの最大数 / Number of entries in the sanity-blast descriptions */
154153 #define MAX_SAN_HORROR 20 /*!< 恐ろしい対象の形容数(正常時) */
--- a/src/externs.h
+++ b/src/externs.h
@@ -92,9 +92,6 @@ extern const concptr color_names[16];
9292 extern const concptr stat_names[6];
9393 extern const concptr stat_names_reduced[6];
9494 extern const concptr window_flag_desc[32];
95-extern const concptr chaos_patrons[MAX_PATRON];
96-extern const int chaos_stats[MAX_PATRON];
97-extern const int chaos_rewards[MAX_PATRON][20];
9895 extern const martial_arts ma_blows[MAX_MA];
9996 extern const int monk_ave_damage[PY_MAX_LEVEL+1][3];
10097 extern const concptr game_inscriptions[];
--- a/src/files.c
+++ b/src/files.c
@@ -24,6 +24,7 @@
2424 #include "avatar.h"
2525 #include "shoot.h"
2626 #include "player-move.h"
27+#include "patron.h"
2728
2829
2930 /*
--- a/src/load.c
+++ b/src/load.c
@@ -51,6 +51,7 @@
5151 #include "spells-status.h"
5252 #include "object-hook.h"
5353 #include "wild.h"
54+#include "patron.h"
5455
5556
5657 /*
--- a/src/monster1.c
+++ b/src/monster1.c
@@ -17,6 +17,7 @@
1717 #include "projection.h"
1818 #include "monster.h"
1919 #include "spells-summon.h"
20+#include "patron.h"
2021 #include "quest.h"
2122 #include "artifact.h"
2223 #include "avatar.h"
@@ -3123,11 +3124,7 @@ void monster_death(MONSTER_IDX m_idx, bool drop_item)
31233124
31243125 do_cmd_write_nikki(NIKKI_BUNSHOU, 0, _("見事に変愚蛮怒の勝利者となった!", "become *WINNER* of Hengband finely!"));
31253126
3126- if ((p_ptr->pclass == CLASS_CHAOS_WARRIOR) || (p_ptr->muta2 & MUT2_CHAOS_GIFT))
3127- {
3128- msg_format(_("%sからの声が響いた。", "The voice of %s booms out:"), chaos_patrons[p_ptr->chaos_patron]);
3129- msg_print(_("『よくやった、定命の者よ!』", "'Thou art donst well, mortal!'"));
3130- }
3127+ admire_from_patron(p_ptr);
31313128
31323129 /* Congratulations */
31333130 msg_print(_("*** おめでとう ***", "*** CONGRATULATIONS ***"));
--- a/src/patron.c
+++ b/src/patron.c
@@ -1,6 +1,7 @@
1-#include "patron.h"
2-
1+
32 #include "angband.h"
3+
4+#include "patron.h"
45 #include "cmd-pet.h"
56 #include "object-curse.h"
67 #include "monsterrace-hook.h"
@@ -661,3 +662,11 @@ void gain_level_reward(int chosen_reward)
661662 }
662663 }
663664
665+void admire_from_patron(player_type *creature_ptr)
666+{
667+ if ((creature_ptr->pclass == CLASS_CHAOS_WARRIOR) || (creature_ptr->muta2 & MUT2_CHAOS_GIFT))
668+ {
669+ msg_format(_("%sからの声が響いた。", "The voice of %s booms out:"), chaos_patrons[creature_ptr->chaos_patron]);
670+ msg_print(_("『よくやった、定命の者よ!』", "'Thou art donst well, mortal!'"));
671+ }
672+}
--- a/src/patron.h
+++ b/src/patron.h
@@ -1,4 +1,7 @@
1-/* カオスパトロンからの報酬種別定義 / Chaos Warrior: Reward types: */
1+
2+#define MAX_PATRON 16 /*!< カオスパトロンの最大定義数 / The number of "patrons" available (for Chaos Warriors) */
3+
4+/* カオスパトロンからの報酬種別定義 / Chaos Warrior: Reward types: */
25 #define REW_POLY_SLF 1 /*!< カオスパトロンからの報酬: 自己変容 */
36 #define REW_GAIN_EXP 2 /*!< カオスパトロンからの報酬: 経験値増加 */
47 #define REW_LOSE_EXP 3 /*!< カオスパトロンからの報酬: 経験値減少 */
@@ -37,3 +40,6 @@
3740 #define REW_SER_MONS 36 /*!< カオスパトロンからの報酬: モンスターの下僕下賜 */
3841
3942 extern void gain_level_reward(int chosen_reward);
43+extern void admire_from_patron(player_type *creature_ptr);
44+extern const concptr chaos_patrons[MAX_PATRON];
45+
Show on old repository browser