• R/O
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubypythongamewindowsbathyscaphephpguic翻訳omegattwitterframeworktestbtronarduinovb.net計画中(planning stage)directxpreviewerゲームエンジンdom

無人機動兵器ダンジョン探索ゲーム JAVAベース


Commit MetaInfo

Revisão45 (tree)
Hora2015-07-28 09:50:19
Autormanjihq

Mensagem de Log

補給アイテムの発生頻度の調整

Mudança Sumário

Diff

--- CarnageHack2/trunk/src/CarnageHack/DungeonFloor.java (revision 44)
+++ CarnageHack2/trunk/src/CarnageHack/DungeonFloor.java (revision 45)
@@ -257,7 +257,7 @@
257257 x = (int) Math.floor(Math.random() * (FLOOR_X - 2)) + 1;
258258 y = (int) Math.floor(Math.random() * (FLOOR_Y - 2)) + 1;
259259 } while (tile[x][y].get_item().size() > 0);
260- plot_parts_one(x, y);
260+ plot_parts_one(x, y, n);
261261 }
262262 }
263263
@@ -266,10 +266,12 @@
266266 *
267267 * @param x X座標
268268 * @param y Y座標
269+ * @param nfloor 階数
269270 */
270- void plot_parts_one(int x, int y) {
271+ void plot_parts_one(int x, int y, int nfloor) {
271272 int nmax;
272273 int i;
274+ int rsupply;
273275 String field[];
274276 if (CarnageHack.dice100() > 70) {
275277 nmax = (int) Math.floor(Math.random() * 5) + 1;
@@ -279,11 +281,16 @@
279281 for (i = 0; i < nmax; i++) {
280282 field = CHutil.split(CarnageHack.generate_parts(), ':', 3);
281283 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- }
286284 }
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+ }
287294 }
288295
289296 /**