forked from MagicBane/Server
direct damage handler - fixed double values
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user