首先先從核心路徑到
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可以自己隨便填數字
以此邏輯魔量也相同作法