• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revision4a37f466abcb98fc7cd14907a27771cd1a8c69f5 (tree)
Time2019-05-02 23:18:12
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #37353 mbe_info_type 構造体と関連変数を melee.h, melee1.c へ移動.

Change Summary

Incremental Difference

--- a/src/externs.h
+++ b/src/externs.h
@@ -88,7 +88,6 @@ extern const kamae kata_shurui[MAX_KATA];
8888
8989
9090 extern const concptr ident_info[];
91-extern const mbe_info_type mbe_info[];
9291 extern const byte feature_action_flags[FF_FLAG_MAX];
9392 extern const dragonbreath_type dragonbreath_info[];
9493
--- a/src/melee.h
+++ b/src/melee.h
@@ -50,6 +50,14 @@ struct martial_arts
5050 int effect; /* Special effects */
5151 };
5252
53+typedef struct mbe_info_type mbe_info_type;
54+
55+struct mbe_info_type
56+{
57+ int power; /* The attack "power" */
58+ int explode_type; /* Explosion effect */
59+};
60+
5361 extern const martial_arts ma_blows[MAX_MA];
5462 extern const int monk_ave_damage[PY_MAX_LEVEL + 1][3];
5563
@@ -61,3 +69,4 @@ extern bool py_attack(POSITION y, POSITION x, COMBAT_OPTION_IDX mode);
6169 extern bool make_attack_normal(MONSTER_IDX m_idx);
6270 extern void mon_take_hit_mon(MONSTER_IDX m_idx, HIT_POINT dam, bool *dead, bool *fear, concptr note, MONSTER_IDX who);
6371
72+extern const mbe_info_type mbe_info[];
--- a/src/melee1.c
+++ b/src/melee1.c
@@ -42,6 +42,48 @@
4242
4343
4444 /*!
45+ * @brief モンスターの打撃効力テーブル /
46+ * The table of monsters' blow effects
47+ */
48+const mbe_info_type mbe_info[] =
49+{
50+ { 0, 0, }, /* None */
51+ { 60, GF_MISSILE, }, /* HURT */
52+ { 5, GF_POIS, }, /* POISON */
53+ { 20, GF_DISENCHANT, }, /* UN_BONUS */
54+ { 15, GF_MISSILE, }, /* UN_POWER */ /* ToDo: Apply the correct effects */
55+ { 5, GF_MISSILE, }, /* EAT_GOLD */
56+ { 5, GF_MISSILE, }, /* EAT_ITEM */
57+ { 5, GF_MISSILE, }, /* EAT_FOOD */
58+ { 5, GF_MISSILE, }, /* EAT_LITE */
59+ { 0, GF_ACID, }, /* ACID */
60+ { 10, GF_ELEC, }, /* ELEC */
61+ { 10, GF_FIRE, }, /* FIRE */
62+ { 10, GF_COLD, }, /* COLD */
63+ { 2, GF_MISSILE, }, /* BLIND */
64+ { 10, GF_CONFUSION, }, /* CONFUSE */
65+ { 10, GF_MISSILE, }, /* TERRIFY */
66+ { 2, GF_MISSILE, }, /* PARALYZE */
67+ { 0, GF_MISSILE, }, /* LOSE_STR */
68+ { 0, GF_MISSILE, }, /* LOSE_INT */
69+ { 0, GF_MISSILE, }, /* LOSE_WIS */
70+ { 0, GF_MISSILE, }, /* LOSE_DEX */
71+ { 0, GF_MISSILE, }, /* LOSE_CON */
72+ { 0, GF_MISSILE, }, /* LOSE_CHR */
73+ { 2, GF_MISSILE, }, /* LOSE_ALL */
74+ { 60, GF_ROCKET, }, /* SHATTER */
75+ { 5, GF_MISSILE, }, /* EXP_10 */
76+ { 5, GF_MISSILE, }, /* EXP_20 */
77+ { 5, GF_MISSILE, }, /* EXP_40 */
78+ { 5, GF_MISSILE, }, /* EXP_80 */
79+ { 5, GF_POIS, }, /* DISEASE */
80+ { 5, GF_TIME, }, /* TIME */
81+ { 5, GF_MISSILE, }, /* EXP_VAMP */
82+ { 5, GF_MANA, }, /* DR_MANA */
83+ { 60, GF_MISSILE, }, /* SUPERHURT */
84+};
85+
86+ /*!
4587 * @brief 幻覚時の打撃記述テーブル / Weird melee attack types when hallucinating
4688 */
4789 #ifdef JP
--- a/src/monster1.c
+++ b/src/monster1.c
@@ -29,6 +29,7 @@
2929 #include "spells.h"
3030 #include "dungeon.h"
3131 #include "world.h"
32+#include "melee.h"
3233
3334
3435 /*
--- a/src/tables.c
+++ b/src/tables.c
@@ -2529,48 +2529,6 @@ const concptr ident_info[] =
25292529 NULL
25302530 };
25312531
2532-/*!
2533- * @brief モンスターの打撃効力テーブル /
2534- * The table of monsters' blow effects
2535- */
2536-const mbe_info_type mbe_info[] =
2537-{
2538- { 0, 0, }, /* None */
2539- { 60, GF_MISSILE, }, /* HURT */
2540- { 5, GF_POIS, }, /* POISON */
2541- { 20, GF_DISENCHANT, }, /* UN_BONUS */
2542- { 15, GF_MISSILE, }, /* UN_POWER */ /* ToDo: Apply the correct effects */
2543- { 5, GF_MISSILE, }, /* EAT_GOLD */
2544- { 5, GF_MISSILE, }, /* EAT_ITEM */
2545- { 5, GF_MISSILE, }, /* EAT_FOOD */
2546- { 5, GF_MISSILE, }, /* EAT_LITE */
2547- { 0, GF_ACID, }, /* ACID */
2548- { 10, GF_ELEC, }, /* ELEC */
2549- { 10, GF_FIRE, }, /* FIRE */
2550- { 10, GF_COLD, }, /* COLD */
2551- { 2, GF_MISSILE, }, /* BLIND */
2552- { 10, GF_CONFUSION, }, /* CONFUSE */
2553- { 10, GF_MISSILE, }, /* TERRIFY */
2554- { 2, GF_MISSILE, }, /* PARALYZE */
2555- { 0, GF_MISSILE, }, /* LOSE_STR */
2556- { 0, GF_MISSILE, }, /* LOSE_INT */
2557- { 0, GF_MISSILE, }, /* LOSE_WIS */
2558- { 0, GF_MISSILE, }, /* LOSE_DEX */
2559- { 0, GF_MISSILE, }, /* LOSE_CON */
2560- { 0, GF_MISSILE, }, /* LOSE_CHR */
2561- { 2, GF_MISSILE, }, /* LOSE_ALL */
2562- { 60, GF_ROCKET, }, /* SHATTER */
2563- { 5, GF_MISSILE, }, /* EXP_10 */
2564- { 5, GF_MISSILE, }, /* EXP_20 */
2565- { 5, GF_MISSILE, }, /* EXP_40 */
2566- { 5, GF_MISSILE, }, /* EXP_80 */
2567- { 5, GF_POIS, }, /* DISEASE */
2568- { 5, GF_TIME, }, /* TIME */
2569- { 5, GF_MISSILE, }, /* EXP_VAMP */
2570- { 5, GF_MANA, }, /* DR_MANA */
2571- { 60, GF_MISSILE, }, /* SUPERHURT */
2572-};
2573-
25742532
25752533 /*!
25762534 * @brief 地形状態フラグテーブル /
--- a/src/types.h
+++ b/src/types.h
@@ -52,15 +52,6 @@
5252 //#include "player-skill.h"
5353
5454
55-
56-typedef struct mbe_info_type mbe_info_type;
57-
58-struct mbe_info_type
59-{
60- int power; /* The attack "power" */
61- int explode_type; /* Explosion effect */
62-};
63-
6455 /*
6556 * The "name" of spell 'N' is stored as spell_names[X][N],
6657 * where X is 0 for mage-spells and 1 for priest-spells.
--- a/src/warning.c
+++ b/src/warning.c
@@ -15,6 +15,7 @@
1515 #include "object-flavor.h"
1616 #include "dungeon.h"
1717 #include "player-race.h"
18+#include "melee.h"
1819
1920 /*!
2021 * @brief 警告を放つアイテムを選択する /
Show on old repository browser