更新经验等级算法
This commit is contained in:
parent
123e7bf075
commit
22a58ec4ca
1 changed files with 6 additions and 2 deletions
|
@ -211,8 +211,10 @@ public class LivingEventHandler {
|
|||
|
||||
while (exp >= upgradeExpNeeded) {
|
||||
exp -= upgradeExpNeeded;
|
||||
level = tag.getInt("Level") + 1;
|
||||
upgradeExpNeeded = 20 * Math.pow(level, 2) + 160 * level + 20;
|
||||
tag.putDouble("Exp", exp);
|
||||
tag.putInt("Level", tag.getInt("Level") + 1);
|
||||
tag.putInt("Level", level);
|
||||
tag.putDouble("UpgradePoint", tag.getDouble("UpgradePoint") + 0.5);
|
||||
}
|
||||
}
|
||||
|
@ -233,8 +235,10 @@ public class LivingEventHandler {
|
|||
|
||||
while (exp >= upgradeExpNeeded) {
|
||||
exp -= upgradeExpNeeded;
|
||||
level = tag.getInt("Level") + 1;
|
||||
upgradeExpNeeded = 20 * Math.pow(level, 2) + 160 * level + 20;
|
||||
tag.putDouble("Exp", exp);
|
||||
tag.putInt("Level", tag.getInt("Level") + 1);
|
||||
tag.putInt("Level", level);
|
||||
tag.putDouble("UpgradePoint", tag.getDouble("UpgradePoint") + 0.5);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue