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