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