底比斯天堂
瘋天堂私服發佈網站廣告欄位!
害怕天堂私服倒閉嗎?快使用天堂分析師!
天堂私服抽獎扭蛋物品及機率測試器
天堂私服稱號顏色製造器
瘋天堂私服發佈網站教您註冊推文收藏私服!
天堂私服血量魔力計算器
瘋天堂私服發布網站廣告贊助及爆料私服客服
教您如何不用註冊也可以推文天堂私服!
天堂私服270怪物查詢掉落資料庫
天堂私服盟徽製造器

天堂更改升級時的血量的java寫法!

首先先從核心路徑到

l1j.server.server.utils

CalcStat.java

搜尋到以下段落
粗體數字請對應到最下面的解釋

public static short calcStatHp(int charType, int baseMaxHp, byte baseCon, int originalHpup) {
short randomhp = 0;
1 if (baseCon > 15) {
randomhp = (short) (baseCon - 15);
}
2 if (charType == 0) { // プリンス
randomhp += (short) (11 + rnd.nextInt(2)); // 初期値分追加

if (baseMaxHp + randomhp > Config.PRINCE_MAX_HP) {
randomhp = (short) (Config.PRINCE_MAX_HP - baseMaxHp);
}
} else if (charType == 1) { // ナイト
randomhp += (short) (17 + rnd.nextInt(2)); // 初期値分追加

if (baseMaxHp + randomhp > Config.KNIGHT_MAX_HP) {
randomhp = (short) (Config.KNIGHT_MAX_HP - baseMaxHp);
}
} else if (charType == 2) { // エルフ
randomhp += (short) (10 + rnd.nextInt(2)); // 初期値分追加

if (baseMaxHp + randomhp > Config.ELF_MAX_HP) {
randomhp = (short) (Config.ELF_MAX_HP - baseMaxHp);
}
} else if (charType == 3) { // ウィザード
randomhp += (short) (7 + rnd.nextInt(2)); // 初期値分追加

if (baseMaxHp + randomhp > Config.WIZARD_MAX_HP) {
randomhp = (short) (Config.WIZARD_MAX_HP - baseMaxHp);
}
} else if (charType == 4) { // ダークエルフ
randomhp += (short) (10 + rnd.nextInt(2)); // 初期値分追加

if (baseMaxHp + randomhp > Config.DARKELF_MAX_HP) {
randomhp = (short) (Config.DARKELF_MAX_HP - baseMaxHp);
}
} else if (charType == 5) { // ドラゴンナイト
randomhp += (short) (13 + rnd.nextInt(2)); // 初期値分追加

if (baseMaxHp + randomhp > Config.DRAGONKNIGHT_MAX_HP) {
randomhp = (short) (Config.DRAGONKNIGHT_MAX_HP - baseMaxHp);
}
} else if (charType == 6) { // イリュージョニスト
randomhp += (short) (9 + rnd.nextInt(2)); // 初期値分追加

if (baseMaxHp + randomhp > Config.ILLUSIONIST_MAX_HP) {
randomhp = (short) (Config.ILLUSIONIST_MAX_HP - baseMaxHp);
}
}

3 randomhp += originalHpup;

if (randomhp < 0) {
randomhp = 0;
}
return randomhp;
}

升級血量主要是1+2+3

1 是指基本體力(baseCon)大於15時..會等於baseCon-15
小於的話就直接是0

2 是指各職業的加成方面...0~6分別是.王.騎.妖.法.黑.龍.幻
以王為例..第一段 randomhp += (short) (11 + rnd.nextInt(2));
就是指11+體力影響的隨機機率加到1的部份(所以到這裡是1+2)
再下面那段..就只是判定有沒有到達伺服器最大血量而已

3 randomhp += originalHpup...
所謂的 originalHpup 就是指創人物時點的素質影響...創人物時看左邊那表格有寫
所以到這邊就是1+2+3

要更改時方法很多...
更改1...就是以點體量影響為主
更改2...就是以各職業影響為主
更改3...就是以剛開始點的素質為主..還有無影響的直接加成....這邊也可以全部刪除


如果是要更改...我是建議更改1跟2..


更改1....就用else if去寫..隨便舉例...
if (baseCon > 15 && baseCon <= 24) {
randomhp = (short) (baseCon - 15);
} else if(baseCon>=25) {
randomhp = (short) (10);
}


這樣就是指基本體質大於15並在24以下的話...就是基本體質-15

如果基本體質在25以上的話...就是以10做計算(點超過25也不影響升級的血量)

更改2....在randomhp += (short) (11 + rnd.nextInt(2));
中間的11可以作為職業的血量的差異
如果是想跳固定值的話...後面就改成 (short) (11); 中間11可以自己隨便填數字


以此邏輯魔量也相同作法



上一篇文章:天堂tbl的說明!
下一篇文章:天堂寵物競賽的java寫法!
發文者:test0428
發文時間:2016-02-21 17:52
分享到:
分享到微博!
分享到臉書!
分享到噗浪!
分享到維特!
分享到Google+!
分享到LINE!
google+
YouTube
facebook