… | |
… | |
202 | {BUILDER, "item builder", "item builders", 0, 0}, |
202 | {BUILDER, "item builder", "item builders", 0, 0}, |
203 | {MATERIAL, "building material", "building materials", 0, 0}, |
203 | {MATERIAL, "building material", "building materials", 0, 0}, |
204 | {ITEM_TRANSFORMER, "item_transformer", "item_transformers", 0, 0}, |
204 | {ITEM_TRANSFORMER, "item_transformer", "item_transformers", 0, 0}, |
205 | }; |
205 | }; |
206 | |
206 | |
207 | static const int item_types_size = sizeof (item_types) / sizeof (*item_types); |
207 | static const int item_types_size = array_length (item_types); |
208 | |
208 | |
209 | /* This curve may be too steep. But the point is that there should |
209 | /* This curve may be too steep. But the point is that there should |
210 | * be tough choices - there is no real point to this if everyone can |
210 | * be tough choices - there is no real point to this if everyone can |
211 | * wear whatever they want with no worries. Perhaps having the steep |
211 | * wear whatever they want with no worries. Perhaps having the steep |
212 | * curve is good (maybe even steeper), but allowing players to |
212 | * curve is good (maybe even steeper), but allowing players to |
… | |
… | |
215 | * note that this table is only really used for program generated items - |
215 | * note that this table is only really used for program generated items - |
216 | * custom objects can use whatever they want. |
216 | * custom objects can use whatever they want. |
217 | */ |
217 | */ |
218 | static int enc_to_item_power[21] = { |
218 | static int enc_to_item_power[21] = { |
219 | 0, |
219 | 0, |
220 | 0, 1, 2, 3, 4, /* 5 */ |
220 | 0, 1, 2, 3, 4, // 5 |
221 | 5, 7, 9, 11, 13, /* 10 */ |
221 | 5, 7, 9, 11, 13, // 10 |
222 | 15, 18, 21, 24, 27, /* 15 */ |
222 | 15, 18, 21, 24, 27, // 15 |
223 | 30, 35, 40, 45, 50 /* 20 */ |
223 | 30, 35, 40, 45, 50 // 20 |
224 | }; |
224 | }; |
225 | |
225 | |
226 | int |
226 | int |
227 | get_power_from_ench (int ench) |
227 | get_power_from_ench (int ench) |
228 | { |
228 | { |