Creature should have an active weapon to receive weapon bonus.

This commit is contained in:
MobiusDevelopment 2022-02-10 10:09:10 +00:00
parent 617ca7533a
commit 5d100672c1
12 changed files with 72 additions and 12 deletions

View File

@ -36,8 +36,13 @@ public class MAttackFinalizer implements IStatFunction
throwIfPresent(base);
double baseValue = calcWeaponBaseValue(creature, stat);
baseValue += creature.getStat().getWeaponBonusMAtk();
if (creature.getActiveWeaponInstance() != null)
{
baseValue += creature.getStat().getWeaponBonusMAtk();
}
baseValue += calcEnchantedItemBonus(creature, stat);
if (creature.isPlayer())
{
// Enchanted chest bonus

View File

@ -36,8 +36,13 @@ public class PAttackFinalizer implements IStatFunction
throwIfPresent(base);
double baseValue = calcWeaponBaseValue(creature, stat);
baseValue += creature.getStat().getWeaponBonusPAtk();
if (creature.getActiveWeaponInstance() != null)
{
baseValue += creature.getStat().getWeaponBonusPAtk();
}
baseValue += calcEnchantedItemBonus(creature, stat);
if (creature.isPlayer())
{
// Enchanted chest bonus

View File

@ -36,8 +36,13 @@ public class MAttackFinalizer implements IStatFunction
throwIfPresent(base);
double baseValue = calcWeaponBaseValue(creature, stat);
baseValue += creature.getStat().getWeaponBonusMAtk();
if (creature.getActiveWeaponInstance() != null)
{
baseValue += creature.getStat().getWeaponBonusMAtk();
}
baseValue += calcEnchantedItemBonus(creature, stat);
if (creature.isPlayer())
{
// Enchanted chest bonus

View File

@ -36,8 +36,13 @@ public class PAttackFinalizer implements IStatFunction
throwIfPresent(base);
double baseValue = calcWeaponBaseValue(creature, stat);
baseValue += creature.getStat().getWeaponBonusPAtk();
if (creature.getActiveWeaponInstance() != null)
{
baseValue += creature.getStat().getWeaponBonusPAtk();
}
baseValue += calcEnchantedItemBonus(creature, stat);
if (creature.isPlayer())
{
// Enchanted chest bonus

View File

@ -36,8 +36,13 @@ public class MAttackFinalizer implements IStatFunction
throwIfPresent(base);
double baseValue = calcWeaponBaseValue(creature, stat);
baseValue += creature.getStat().getWeaponBonusMAtk();
if (creature.getActiveWeaponInstance() != null)
{
baseValue += creature.getStat().getWeaponBonusMAtk();
}
baseValue += calcEnchantedItemBonus(creature, stat);
if (creature.isPlayer())
{
// Enchanted chest bonus

View File

@ -36,8 +36,13 @@ public class PAttackFinalizer implements IStatFunction
throwIfPresent(base);
double baseValue = calcWeaponBaseValue(creature, stat);
baseValue += creature.getStat().getWeaponBonusPAtk();
if (creature.getActiveWeaponInstance() != null)
{
baseValue += creature.getStat().getWeaponBonusPAtk();
}
baseValue += calcEnchantedItemBonus(creature, stat);
if (creature.isPlayer())
{
// Enchanted chest bonus

View File

@ -36,8 +36,13 @@ public class MAttackFinalizer implements IStatFunction
throwIfPresent(base);
double baseValue = calcWeaponBaseValue(creature, stat);
baseValue += creature.getStat().getWeaponBonusMAtk();
if (creature.getActiveWeaponInstance() != null)
{
baseValue += creature.getStat().getWeaponBonusMAtk();
}
baseValue += calcEnchantedItemBonus(creature, stat);
if (creature.isPlayer())
{
// Enchanted chest bonus

View File

@ -36,8 +36,13 @@ public class PAttackFinalizer implements IStatFunction
throwIfPresent(base);
double baseValue = calcWeaponBaseValue(creature, stat);
baseValue += creature.getStat().getWeaponBonusPAtk();
if (creature.getActiveWeaponInstance() != null)
{
baseValue += creature.getStat().getWeaponBonusPAtk();
}
baseValue += calcEnchantedItemBonus(creature, stat);
if (creature.isPlayer())
{
// Enchanted chest bonus

View File

@ -36,8 +36,13 @@ public class MAttackFinalizer implements IStatFunction
throwIfPresent(base);
double baseValue = calcWeaponBaseValue(creature, stat);
baseValue += creature.getStat().getWeaponBonusMAtk();
if (creature.getActiveWeaponInstance() != null)
{
baseValue += creature.getStat().getWeaponBonusMAtk();
}
baseValue += calcEnchantedItemBonus(creature, stat);
if (creature.isPlayer())
{
// Enchanted chest bonus

View File

@ -36,8 +36,13 @@ public class PAttackFinalizer implements IStatFunction
throwIfPresent(base);
double baseValue = calcWeaponBaseValue(creature, stat);
baseValue += creature.getStat().getWeaponBonusPAtk();
if (creature.getActiveWeaponInstance() != null)
{
baseValue += creature.getStat().getWeaponBonusPAtk();
}
baseValue += calcEnchantedItemBonus(creature, stat);
if (creature.isPlayer())
{
// Enchanted chest bonus

View File

@ -36,8 +36,13 @@ public class MAttackFinalizer implements IStatFunction
throwIfPresent(base);
double baseValue = calcWeaponBaseValue(creature, stat);
baseValue += creature.getStat().getWeaponBonusMAtk();
if (creature.getActiveWeaponInstance() != null)
{
baseValue += creature.getStat().getWeaponBonusMAtk();
}
baseValue += calcEnchantedItemBonus(creature, stat);
if (creature.isPlayer())
{
// Enchanted chest bonus

View File

@ -36,8 +36,13 @@ public class PAttackFinalizer implements IStatFunction
throwIfPresent(base);
double baseValue = calcWeaponBaseValue(creature, stat);
baseValue += creature.getStat().getWeaponBonusPAtk();
if (creature.getActiveWeaponInstance() != null)
{
baseValue += creature.getStat().getWeaponBonusPAtk();
}
baseValue += calcEnchantedItemBonus(creature, stat);
if (creature.isPlayer())
{
// Enchanted chest bonus