Creature should have an active weapon to receive weapon bonus.
This commit is contained in:
@@ -36,8 +36,13 @@ public class MAttackFinalizer implements IStatFunction
|
|||||||
throwIfPresent(base);
|
throwIfPresent(base);
|
||||||
|
|
||||||
double baseValue = calcWeaponBaseValue(creature, stat);
|
double baseValue = calcWeaponBaseValue(creature, stat);
|
||||||
baseValue += creature.getStat().getWeaponBonusMAtk();
|
if (creature.getActiveWeaponInstance() != null)
|
||||||
|
{
|
||||||
|
baseValue += creature.getStat().getWeaponBonusMAtk();
|
||||||
|
}
|
||||||
|
|
||||||
baseValue += calcEnchantedItemBonus(creature, stat);
|
baseValue += calcEnchantedItemBonus(creature, stat);
|
||||||
|
|
||||||
if (creature.isPlayer())
|
if (creature.isPlayer())
|
||||||
{
|
{
|
||||||
// Enchanted chest bonus
|
// Enchanted chest bonus
|
||||||
|
@@ -36,8 +36,13 @@ public class PAttackFinalizer implements IStatFunction
|
|||||||
throwIfPresent(base);
|
throwIfPresent(base);
|
||||||
|
|
||||||
double baseValue = calcWeaponBaseValue(creature, stat);
|
double baseValue = calcWeaponBaseValue(creature, stat);
|
||||||
baseValue += creature.getStat().getWeaponBonusPAtk();
|
if (creature.getActiveWeaponInstance() != null)
|
||||||
|
{
|
||||||
|
baseValue += creature.getStat().getWeaponBonusPAtk();
|
||||||
|
}
|
||||||
|
|
||||||
baseValue += calcEnchantedItemBonus(creature, stat);
|
baseValue += calcEnchantedItemBonus(creature, stat);
|
||||||
|
|
||||||
if (creature.isPlayer())
|
if (creature.isPlayer())
|
||||||
{
|
{
|
||||||
// Enchanted chest bonus
|
// Enchanted chest bonus
|
||||||
|
@@ -36,8 +36,13 @@ public class MAttackFinalizer implements IStatFunction
|
|||||||
throwIfPresent(base);
|
throwIfPresent(base);
|
||||||
|
|
||||||
double baseValue = calcWeaponBaseValue(creature, stat);
|
double baseValue = calcWeaponBaseValue(creature, stat);
|
||||||
baseValue += creature.getStat().getWeaponBonusMAtk();
|
if (creature.getActiveWeaponInstance() != null)
|
||||||
|
{
|
||||||
|
baseValue += creature.getStat().getWeaponBonusMAtk();
|
||||||
|
}
|
||||||
|
|
||||||
baseValue += calcEnchantedItemBonus(creature, stat);
|
baseValue += calcEnchantedItemBonus(creature, stat);
|
||||||
|
|
||||||
if (creature.isPlayer())
|
if (creature.isPlayer())
|
||||||
{
|
{
|
||||||
// Enchanted chest bonus
|
// Enchanted chest bonus
|
||||||
|
@@ -36,8 +36,13 @@ public class PAttackFinalizer implements IStatFunction
|
|||||||
throwIfPresent(base);
|
throwIfPresent(base);
|
||||||
|
|
||||||
double baseValue = calcWeaponBaseValue(creature, stat);
|
double baseValue = calcWeaponBaseValue(creature, stat);
|
||||||
baseValue += creature.getStat().getWeaponBonusPAtk();
|
if (creature.getActiveWeaponInstance() != null)
|
||||||
|
{
|
||||||
|
baseValue += creature.getStat().getWeaponBonusPAtk();
|
||||||
|
}
|
||||||
|
|
||||||
baseValue += calcEnchantedItemBonus(creature, stat);
|
baseValue += calcEnchantedItemBonus(creature, stat);
|
||||||
|
|
||||||
if (creature.isPlayer())
|
if (creature.isPlayer())
|
||||||
{
|
{
|
||||||
// Enchanted chest bonus
|
// Enchanted chest bonus
|
||||||
|
@@ -36,8 +36,13 @@ public class MAttackFinalizer implements IStatFunction
|
|||||||
throwIfPresent(base);
|
throwIfPresent(base);
|
||||||
|
|
||||||
double baseValue = calcWeaponBaseValue(creature, stat);
|
double baseValue = calcWeaponBaseValue(creature, stat);
|
||||||
baseValue += creature.getStat().getWeaponBonusMAtk();
|
if (creature.getActiveWeaponInstance() != null)
|
||||||
|
{
|
||||||
|
baseValue += creature.getStat().getWeaponBonusMAtk();
|
||||||
|
}
|
||||||
|
|
||||||
baseValue += calcEnchantedItemBonus(creature, stat);
|
baseValue += calcEnchantedItemBonus(creature, stat);
|
||||||
|
|
||||||
if (creature.isPlayer())
|
if (creature.isPlayer())
|
||||||
{
|
{
|
||||||
// Enchanted chest bonus
|
// Enchanted chest bonus
|
||||||
|
@@ -36,8 +36,13 @@ public class PAttackFinalizer implements IStatFunction
|
|||||||
throwIfPresent(base);
|
throwIfPresent(base);
|
||||||
|
|
||||||
double baseValue = calcWeaponBaseValue(creature, stat);
|
double baseValue = calcWeaponBaseValue(creature, stat);
|
||||||
baseValue += creature.getStat().getWeaponBonusPAtk();
|
if (creature.getActiveWeaponInstance() != null)
|
||||||
|
{
|
||||||
|
baseValue += creature.getStat().getWeaponBonusPAtk();
|
||||||
|
}
|
||||||
|
|
||||||
baseValue += calcEnchantedItemBonus(creature, stat);
|
baseValue += calcEnchantedItemBonus(creature, stat);
|
||||||
|
|
||||||
if (creature.isPlayer())
|
if (creature.isPlayer())
|
||||||
{
|
{
|
||||||
// Enchanted chest bonus
|
// Enchanted chest bonus
|
||||||
|
@@ -36,8 +36,13 @@ public class MAttackFinalizer implements IStatFunction
|
|||||||
throwIfPresent(base);
|
throwIfPresent(base);
|
||||||
|
|
||||||
double baseValue = calcWeaponBaseValue(creature, stat);
|
double baseValue = calcWeaponBaseValue(creature, stat);
|
||||||
baseValue += creature.getStat().getWeaponBonusMAtk();
|
if (creature.getActiveWeaponInstance() != null)
|
||||||
|
{
|
||||||
|
baseValue += creature.getStat().getWeaponBonusMAtk();
|
||||||
|
}
|
||||||
|
|
||||||
baseValue += calcEnchantedItemBonus(creature, stat);
|
baseValue += calcEnchantedItemBonus(creature, stat);
|
||||||
|
|
||||||
if (creature.isPlayer())
|
if (creature.isPlayer())
|
||||||
{
|
{
|
||||||
// Enchanted chest bonus
|
// Enchanted chest bonus
|
||||||
|
@@ -36,8 +36,13 @@ public class PAttackFinalizer implements IStatFunction
|
|||||||
throwIfPresent(base);
|
throwIfPresent(base);
|
||||||
|
|
||||||
double baseValue = calcWeaponBaseValue(creature, stat);
|
double baseValue = calcWeaponBaseValue(creature, stat);
|
||||||
baseValue += creature.getStat().getWeaponBonusPAtk();
|
if (creature.getActiveWeaponInstance() != null)
|
||||||
|
{
|
||||||
|
baseValue += creature.getStat().getWeaponBonusPAtk();
|
||||||
|
}
|
||||||
|
|
||||||
baseValue += calcEnchantedItemBonus(creature, stat);
|
baseValue += calcEnchantedItemBonus(creature, stat);
|
||||||
|
|
||||||
if (creature.isPlayer())
|
if (creature.isPlayer())
|
||||||
{
|
{
|
||||||
// Enchanted chest bonus
|
// Enchanted chest bonus
|
||||||
|
@@ -36,8 +36,13 @@ public class MAttackFinalizer implements IStatFunction
|
|||||||
throwIfPresent(base);
|
throwIfPresent(base);
|
||||||
|
|
||||||
double baseValue = calcWeaponBaseValue(creature, stat);
|
double baseValue = calcWeaponBaseValue(creature, stat);
|
||||||
baseValue += creature.getStat().getWeaponBonusMAtk();
|
if (creature.getActiveWeaponInstance() != null)
|
||||||
|
{
|
||||||
|
baseValue += creature.getStat().getWeaponBonusMAtk();
|
||||||
|
}
|
||||||
|
|
||||||
baseValue += calcEnchantedItemBonus(creature, stat);
|
baseValue += calcEnchantedItemBonus(creature, stat);
|
||||||
|
|
||||||
if (creature.isPlayer())
|
if (creature.isPlayer())
|
||||||
{
|
{
|
||||||
// Enchanted chest bonus
|
// Enchanted chest bonus
|
||||||
|
@@ -36,8 +36,13 @@ public class PAttackFinalizer implements IStatFunction
|
|||||||
throwIfPresent(base);
|
throwIfPresent(base);
|
||||||
|
|
||||||
double baseValue = calcWeaponBaseValue(creature, stat);
|
double baseValue = calcWeaponBaseValue(creature, stat);
|
||||||
baseValue += creature.getStat().getWeaponBonusPAtk();
|
if (creature.getActiveWeaponInstance() != null)
|
||||||
|
{
|
||||||
|
baseValue += creature.getStat().getWeaponBonusPAtk();
|
||||||
|
}
|
||||||
|
|
||||||
baseValue += calcEnchantedItemBonus(creature, stat);
|
baseValue += calcEnchantedItemBonus(creature, stat);
|
||||||
|
|
||||||
if (creature.isPlayer())
|
if (creature.isPlayer())
|
||||||
{
|
{
|
||||||
// Enchanted chest bonus
|
// Enchanted chest bonus
|
||||||
|
@@ -36,8 +36,13 @@ public class MAttackFinalizer implements IStatFunction
|
|||||||
throwIfPresent(base);
|
throwIfPresent(base);
|
||||||
|
|
||||||
double baseValue = calcWeaponBaseValue(creature, stat);
|
double baseValue = calcWeaponBaseValue(creature, stat);
|
||||||
baseValue += creature.getStat().getWeaponBonusMAtk();
|
if (creature.getActiveWeaponInstance() != null)
|
||||||
|
{
|
||||||
|
baseValue += creature.getStat().getWeaponBonusMAtk();
|
||||||
|
}
|
||||||
|
|
||||||
baseValue += calcEnchantedItemBonus(creature, stat);
|
baseValue += calcEnchantedItemBonus(creature, stat);
|
||||||
|
|
||||||
if (creature.isPlayer())
|
if (creature.isPlayer())
|
||||||
{
|
{
|
||||||
// Enchanted chest bonus
|
// Enchanted chest bonus
|
||||||
|
@@ -36,8 +36,13 @@ public class PAttackFinalizer implements IStatFunction
|
|||||||
throwIfPresent(base);
|
throwIfPresent(base);
|
||||||
|
|
||||||
double baseValue = calcWeaponBaseValue(creature, stat);
|
double baseValue = calcWeaponBaseValue(creature, stat);
|
||||||
baseValue += creature.getStat().getWeaponBonusPAtk();
|
if (creature.getActiveWeaponInstance() != null)
|
||||||
|
{
|
||||||
|
baseValue += creature.getStat().getWeaponBonusPAtk();
|
||||||
|
}
|
||||||
|
|
||||||
baseValue += calcEnchantedItemBonus(creature, stat);
|
baseValue += calcEnchantedItemBonus(creature, stat);
|
||||||
|
|
||||||
if (creature.isPlayer())
|
if (creature.isPlayer())
|
||||||
{
|
{
|
||||||
// Enchanted chest bonus
|
// Enchanted chest bonus
|
||||||
|
Reference in New Issue
Block a user