Ensuring target costs at least 1 charge when using dynamic cost.
This commit is contained in:
@ -68,7 +68,7 @@ public abstract class TotemItem extends Item {
|
|||||||
|
|
||||||
private int getTargetCost(TotemData totemData) {
|
private int getTargetCost(TotemData totemData) {
|
||||||
return isChargeCostDynamic()
|
return isChargeCostDynamic()
|
||||||
? (int)(totemData.getTargetDeaths() * getConfig().getChargeCostMultiplier())
|
? Math.max(1, (int)(totemData.getTargetDeaths() * getConfig().getChargeCostMultiplier()))
|
||||||
: getConfig().getChargeCost();
|
: getConfig().getChargeCost();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user