無人機動兵器ダンジョン探索ゲーム JAVAベース
補給アイテムの発生頻度の調整
@@ -257,7 +257,7 @@ | ||
257 | 257 | x = (int) Math.floor(Math.random() * (FLOOR_X - 2)) + 1; |
258 | 258 | y = (int) Math.floor(Math.random() * (FLOOR_Y - 2)) + 1; |
259 | 259 | } while (tile[x][y].get_item().size() > 0); |
260 | - plot_parts_one(x, y); | |
260 | + plot_parts_one(x, y, n); | |
261 | 261 | } |
262 | 262 | } |
263 | 263 |
@@ -266,10 +266,12 @@ | ||
266 | 266 | * |
267 | 267 | * @param x X座標 |
268 | 268 | * @param y Y座標 |
269 | + * @param nfloor 階数 | |
269 | 270 | */ |
270 | - void plot_parts_one(int x, int y) { | |
271 | + void plot_parts_one(int x, int y, int nfloor) { | |
271 | 272 | int nmax; |
272 | 273 | int i; |
274 | + int rsupply; | |
273 | 275 | String field[]; |
274 | 276 | if (CarnageHack.dice100() > 70) { |
275 | 277 | nmax = (int) Math.floor(Math.random() * 5) + 1; |
@@ -279,11 +281,16 @@ | ||
279 | 281 | for (i = 0; i < nmax; i++) { |
280 | 282 | field = CHutil.split(CarnageHack.generate_parts(), ':', 3); |
281 | 283 | additem(x, y, field[0], field[1], Integer.parseInt(field[2], 10)); |
282 | - if (CarnageHack.dice100() > 90) { | |
283 | - //add resupply item | |
284 | - additem(x, y, "+", "", 1); | |
285 | - } | |
286 | 284 | } |
285 | + if (nfloor > 10) { | |
286 | + rsupply = 50; | |
287 | + } else { | |
288 | + rsupply = 100 - (nfloor - 1) * 5; | |
289 | + } | |
290 | + if (CarnageHack.dice100() >= rsupply) { | |
291 | + //add resupply item | |
292 | + additem(x, y, "+", "", 1); | |
293 | + } | |
287 | 294 | } |
288 | 295 | |
289 | 296 | /** |