20250304
This commit is contained in:
parent
0e65ada1ca
commit
540c249396
|
|
@ -4892,7 +4892,6 @@ public class 玩家控制台 extends JFrame {
|
||||||
}
|
}
|
||||||
if (Integer.parseInt(this.装备跳跃力.getText()) > 0 && Integer.parseInt(this.装备跳跃力.getText()) < 32768) {
|
if (Integer.parseInt(this.装备跳跃力.getText()) > 0 && Integer.parseInt(this.装备跳跃力.getText()) < 32768) {
|
||||||
item.setJump((short) Integer.parseInt(this.装备跳跃力.getText()));
|
item.setJump((short) Integer.parseInt(this.装备跳跃力.getText()));
|
||||||
item.setdd((int) Integer.parseInt(this.装备跳跃力.getText()));
|
|
||||||
}
|
}
|
||||||
if (Integer.parseInt(this.装备砸卷上限.getText()) >= 0 && Integer.parseInt(this.装备砸卷上限.getText()) < 128) {
|
if (Integer.parseInt(this.装备砸卷上限.getText()) >= 0 && Integer.parseInt(this.装备砸卷上限.getText()) < 128) {
|
||||||
item.setUpgradeSlots((byte) Integer.parseInt(this.装备砸卷上限.getText()));
|
item.setUpgradeSlots((byte) Integer.parseInt(this.装备砸卷上限.getText()));
|
||||||
|
|
|
||||||
|
|
@ -438,7 +438,12 @@ public class DamageParse {
|
||||||
monster.damage(player, newtotDamageToOneMonster, true, attack.skill);
|
monster.damage(player, newtotDamageToOneMonster, true, attack.skill);
|
||||||
if (monster.getHp() > 0) {
|
if (monster.getHp() > 0) {
|
||||||
long hp = monster.getHp();
|
long hp = monster.getHp();
|
||||||
|
|
||||||
long mobMaxHp = monster.getMobMaxHp();
|
long mobMaxHp = monster.getMobMaxHp();
|
||||||
|
if (mobMaxHp >Integer.MAX_VALUE){
|
||||||
|
hp = hp/100;
|
||||||
|
mobMaxHp = mobMaxHp/100;
|
||||||
|
}
|
||||||
|
|
||||||
double percentage = ((double) hp / mobMaxHp) * 100; // 显式转换为浮点数并计算百分比:ml-citation{ref="1,3" data="citationList"}
|
double percentage = ((double) hp / mobMaxHp) * 100; // 显式转换为浮点数并计算百分比:ml-citation{ref="1,3" data="citationList"}
|
||||||
String result = String.format("%.2f%%", percentage);
|
String result = String.format("%.2f%%", percentage);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue