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
focus = skill.getModifiedAmount();
float min = modEntry.min;
float max = modEntry.max;
float min;
float max;
float percent = modEntry.percentage;
float damage;
if(percent != 0){
//handle percentage damage
percent += getModifierValues(modEntry,rank).first;
percent = getModifierValues(modEntry,rank).first;
damage = target.healthMax * percent;
}else{
//flat damage range
min = getMinDamage(min + getModifierValues(modEntry,rank).first,caster.getStatIntCurrent(),caster.getStatSpiCurrent(),focus);
max = getMaxDamage(max + getModifierValues(modEntry,rank).second,caster.getStatIntCurrent(),caster.getStatSpiCurrent(),focus);
min = getMinDamage(getModifierValues(modEntry,rank).first,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);
}