Floor values are set for max health, combat regen, health regen, melee damage, and projectile damage when changing them now.

This commit is contained in:
luisc committed 2021-12-04 12:46:53 -06:00
1 parent cd5b4c0633
commit 3c1bc30e44
6 files changed
+16 -12

No files matched your search

@@ -81,7 +81,7 @@ public class SubGuiNpcProjectiles extends SubGuiInterface implements ITextfieldL
public void unFocused(GuiNpcTextField textfield) {
if(textfield.id == 1){
stats.pDamage = Float.parseFloat(textfield.getText());
stats.pDamage = (float)(Math.floor(Float.parseFloat(textfield.getText())));
}
else if(textfield.id == 2){
stats.pImpact = textfield.getInteger();
@@ -83,17 +83,17 @@ public class GuiNpcStats extends GuiNPCInterface2 implements ITextfieldListener,
@Override
public void unFocused(GuiNpcTextField textfield){
if(textfield.id == 0){
stats.maxHealth = Double.parseDouble(textfield.getText());
stats.maxHealth = Math.floor(Double.parseDouble(textfield.getText()));
npc.heal((float)(stats.maxHealth));
}
else if(textfield.id == 1){
stats.aggroRange = textfield.getInteger();
}
else if(textfield.id == 14){
stats.healthRegen = Float.parseFloat(textfield.getText());
stats.healthRegen = (float)(Math.floor(Float.parseFloat(textfield.getText())));
}
else if(textfield.id == 16){
stats.combatRegen = Float.parseFloat(textfield.getText());
stats.combatRegen = (float)(Math.floor(Float.parseFloat(textfield.getText())));
}
}