OSDN Git Service

Merge pull request #3532 from sikabane-works/release/3.0.0.87-alpha
[hengbandforosx/hengbandosx.git] / src / combat / attack-power-table.cpp
1 #include "combat/attack-power-table.h"
2
3 /*!
4  * @brief 修行僧のターンダメージ算出テーブル
5  */
6 const int monk_ave_damage[PY_MAX_LEVEL + 1][3] = {
7     { 0, 0, 0 },
8     { 249, 249, 249 },
9     { 324, 324, 324 },
10     { 382, 438, 382 },
11     { 382, 439, 382 },
12     { 390, 446, 390 },
13     { 394, 473, 394 },
14     { 425, 528, 425 },
15     { 430, 535, 430 },
16     { 505, 560, 435 },
17     { 517, 575, 444 },
18     { 566, 655, 474 },
19     { 585, 713, 486 },
20     { 653, 843, 527 },
21     { 678, 890, 544 },
22     { 703, 973, 558 },
23     { 765, 1096, 596 },
24     { 914, 1146, 614 },
25     { 943, 1240, 629 },
26     { 971, 1276, 643 },
27     { 1018, 1350, 667 },
28     { 1063, 1464, 688 },
29     { 1099, 1515, 705 },
30     { 1128, 1559, 721 },
31     { 1153, 1640, 735 },
32     { 1336, 1720, 757 },
33     { 1387, 1789, 778 },
34     { 1430, 1893, 794 },
35     { 1610, 2199, 863 },
36     { 1666, 2280, 885 },
37     { 1713, 2401, 908 },
38     { 1755, 2465, 925 },
39     { 1909, 2730, 984 },
40     { 2156, 2891, 1009 },
41     { 2218, 2970, 1031 },
42     { 2319, 3107, 1063 },
43     { 2404, 3290, 1098 },
44     { 2477, 3389, 1125 },
45     { 2544, 3483, 1150 },
46     { 2771, 3899, 1228 },
47     { 2844, 3982, 1259 },
48     { 3129, 4064, 1287 },
49     { 3200, 4190, 1313 },
50     { 3554, 4674, 1432 },
51     { 3614, 4738, 1463 },
52     { 3679, 4853, 1485 },
53     { 3741, 4905, 1512 },
54     { 3785, 4943, 1538 },
55     { 4141, 5532, 1652 },
56     { 4442, 5581, 1679 },
57     { 4486, 5636, 1702 },
58 };
59
60 /*!
61  * 腕力による攻撃回数算定値テーブル
62  * Stat Table (STR) -- help index into the "blow" table
63  */
64 const byte adj_str_blow[MAX_ADJ_STR] = {
65     3 /* 3 */,
66     4 /* 4 */,
67     5 /* 5 */,
68     6 /* 6 */,
69     7 /* 7 */,
70     8 /* 8 */,
71     9 /* 9 */,
72     10 /* 10 */,
73     11 /* 11 */,
74     12 /* 12 */,
75     13 /* 13 */,
76     14 /* 14 */,
77     15 /* 15 */,
78     16 /* 16 */,
79     17 /* 17 */,
80     20 /* 18/00-18/09 */,
81     30 /* 18/10-18/19 */,
82     40 /* 18/20-18/29 */,
83     50 /* 18/30-18/39 */,
84     60 /* 18/40-18/49 */,
85     70 /* 18/50-18/59 */,
86     80 /* 18/60-18/69 */,
87     90 /* 18/70-18/79 */,
88     100 /* 18/80-18/89 */,
89     110 /* 18/90-18/99 */,
90     120 /* 18/100-18/109 */,
91     130 /* 18/110-18/119 */,
92     140 /* 18/120-18/129 */,
93     150 /* 18/130-18/139 */,
94     160 /* 18/140-18/149 */,
95     170 /* 18/150-18/159 */,
96     180 /* 18/160-18/169 */,
97     190 /* 18/170-18/179 */,
98     200 /* 18/180-18/189 */,
99     210 /* 18/190-18/199 */,
100     220 /* 18/200-18/209 */,
101     230 /* 18/210-18/219 */,
102     240 /* 18/220+ */
103 };
104
105 /*!
106  * 器用さによる攻撃回数インデックステーブル
107  * Stat Table (DEX) -- index into the "blow" table
108  */
109 const byte adj_dex_blow[MAX_ADJ_DEX] = {
110     0 /* 3 */,
111     0 /* 4 */,
112     0 /* 5 */,
113     0 /* 6 */,
114     0 /* 7 */,
115     0 /* 8 */,
116     0 /* 9 */,
117     1 /* 10 */,
118     1 /* 11 */,
119     1 /* 12 */,
120     1 /* 13 */,
121     1 /* 14 */,
122     2 /* 15 */,
123     2 /* 16 */,
124     2 /* 17 */,
125     2 /* 18/00-18/09 */,
126     3 /* 18/10-18/19 */,
127     3 /* 18/20-18/29 */,
128     3 /* 18/30-18/39 */,
129     4 /* 18/40-18/49 */,
130     4 /* 18/50-18/59 */,
131     5 /* 18/60-18/69 */,
132     5 /* 18/70-18/79 */,
133     6 /* 18/80-18/89 */,
134     6 /* 18/90-18/99 */,
135     7 /* 18/100-18/109 */,
136     7 /* 18/110-18/119 */,
137     8 /* 18/120-18/129 */,
138     8 /* 18/130-18/139 */,
139     9 /* 18/140-18/149 */,
140     9 /* 18/150-18/159 */,
141     10 /* 18/160-18/169 */,
142     10 /* 18/170-18/179 */,
143     11 /* 18/180-18/189 */,
144     11 /* 18/190-18/199 */,
145     12 /* 18/200-18/209 */,
146     12 /* 18/210-18/219 */,
147     13 /* 18/220+ */
148 };
149
150 /*!
151  * @brief
152  * 腕力、器用さに応じた攻撃回数テーブル /
153  * This table is used to help calculate the number of blows the player can
154  * make in a single round of attacks (one player turn) with a normal weapon.
155  * @details
156  * <pre>
157  * This number ranges from a single blow/round for weak players to up to six
158  * blows/round for powerful warriors.
159  *
160  * Note that certain artifacts and ego-items give "bonus" blows/round.
161  *
162  * First, from the player class, we extract some values:
163  *
164  * Warrior       num = 6; mul = 5; div = std::max(70, weapon_weight);
165  * Berserker     num = 6; mul = 7; div = std::max(70, weapon_weight);
166  * Mage          num = 3; mul = 2; div = std::max(100, weapon_weight);
167  * Priest        num = 5; mul = 3; div = std::max(100, weapon_weight);
168  * Mindcrafter   num = 5; mul = 3; div = std::max(100, weapon_weight);
169  * Rogue         num = 5; mul = 3; div = std::max(40, weapon_weight);
170  * Ranger        num = 5; mul = 4; div = std::max(70, weapon_weight);
171  * Paladin       num = 5; mul = 4; div = std::max(70, weapon_weight);
172  * Weaponsmith   num = 5; mul = 5; div = std::max(150, weapon_weight);
173  * Warrior-Mage  num = 5; mul = 3; div = std::max(70, weapon_weight);
174  * Chaos Warrior num = 5; mul = 4; div = std::max(70, weapon_weight);
175  * Monk          num = 5; mul = 3; div = std::max(60, weapon_weight);
176  * Tourist       num = 4; mul = 3; div = std::max(100, weapon_weight);
177  * Imitator      num = 5; mul = 4; div = std::max(70, weapon_weight);
178  * Beastmaster   num = 5; mul = 3; div = std::max(70, weapon_weight);
179  * Cavalry(Ride) num = 5; mul = 4; div = std::max(70, weapon_weight);
180  * Cavalry(Walk) num = 5; mul = 3; div = std::max(100, weapon_weight);
181  * Sorcerer      num = 1; mul = 1; div = std::max(1, weapon_weight);
182  * Archer        num = 4; mul = 2; div = std::max(70, weapon_weight);
183  * Magic eater   num = 4; mul = 2; div = std::max(70, weapon_weight);
184  * ForceTrainer  num = 4; mul = 2; div = std::max(60, weapon_weight);
185  * Mirror Master num = 3; mul = 3; div = std::max(100, weapon_weight);
186  * Ninja         num = 4; mul = 1; div = std::max(20, weapon_weight);
187  *
188  * To get "P", we look up the relevant "adj_str_blow[]" (see above),
189  * multiply it by "mul", and then divide it by "div".
190  * Increase P by 1 if you wield a weapon two-handed.
191  * Decrease P by 1 if you are a Ninja.
192  *
193  * To get "D", we look up the relevant "adj_dex_blow[]" (see above),
194  *
195  * The player gets "blows_table[P][D]" blows/round, as shown below,
196  * up to a maximum of "num" blows/round, plus any "bonus" blows/round.
197  * </pre>
198  */
199 const byte blows_table[12][12] = {
200     /* P/D */
201     /*      0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11+ */
202     /*      3   10   15  /10  /40  /60  /80 /100 /120 /140 /160 /180  */
203     /* 0 */ { 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 4 },
204     /* 1 */ { 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4 },
205     /* 2 */ { 1, 1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5 },
206     /* 3 */ { 1, 1, 2, 3, 3, 4, 4, 4, 5, 5, 5, 5 },
207     /* 4 */ { 1, 1, 2, 3, 3, 4, 4, 5, 5, 5, 5, 5 },
208     /* 5 */ { 1, 1, 2, 3, 4, 4, 4, 5, 5, 5, 5, 6 },
209     /* 6 */ { 1, 1, 2, 3, 4, 4, 4, 5, 5, 5, 5, 6 },
210     /* 7 */ { 1, 2, 2, 3, 4, 4, 4, 5, 5, 5, 5, 6 },
211     /* 8 */ { 1, 2, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6 },
212     /* 9 */ { 1, 2, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6 },
213     /* 10*/ { 2, 2, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6 },
214     /*11+*/ { 2, 2, 3, 4, 4, 4, 5, 5, 6, 6, 6, 6 },
215 };