direct damage handler - fixed double values

This commit is contained in:
2025-03-02 16:00:17 -06:00
parent 28bccdd3d8
commit 7bec57e77d
+5 -5
View File
@@ -464,19 +464,19 @@ public class WpakPowerManager {
else else
focus = skill.getModifiedAmount(); focus = skill.getModifiedAmount();
float min = modEntry.min; float min;
float max = modEntry.max; float max;
float percent = modEntry.percentage; float percent = modEntry.percentage;
float damage; float damage;
if(percent != 0){ if(percent != 0){
//handle percentage damage //handle percentage damage
percent += getModifierValues(modEntry,rank).first; percent = getModifierValues(modEntry,rank).first;
damage = target.healthMax * percent; damage = target.healthMax * percent;
}else{ }else{
//flat damage range //flat damage range
min = getMinDamage(min + getModifierValues(modEntry,rank).first,caster.getStatIntCurrent(),caster.getStatSpiCurrent(),focus); min = getMinDamage(getModifierValues(modEntry,rank).first,caster.getStatIntCurrent(),caster.getStatSpiCurrent(),focus);
max = getMaxDamage(max + getModifierValues(modEntry,rank).second,caster.getStatIntCurrent(),caster.getStatSpiCurrent(),focus); max = getMaxDamage(getModifierValues(modEntry,rank).second,caster.getStatIntCurrent(),caster.getStatSpiCurrent(),focus);
damage = ThreadLocalRandom.current().nextInt((int) min, (int) (max) + 1); damage = ThreadLocalRandom.current().nextInt((int) min, (int) (max) + 1);
} }