Addition of WeaponBonusMAtk and WeaponBonusPAtk effect handlers.

Thanks to Sero, nassseka and Enryu.
This commit is contained in:
MobiusDevelopment
2022-02-10 09:42:33 +00:00
parent 86f2778ac4
commit a942f6cbdd
56 changed files with 641 additions and 60 deletions

View File

@@ -273,6 +273,11 @@ public class CreatureStat
return (int) getValue(Stat.MAGIC_ATTACK);
}
public int getWeaponBonusMAtk()
{
return (int) getValue(Stat.WEAPON_BONUS_MAGIC_ATTACK);
}
/**
* @return the MAtk Speed (base+modifier) of the Creature in function of the Armour Expertise Penalty.
*/
@@ -382,6 +387,11 @@ public class CreatureStat
return (int) getValue(Stat.PHYSICAL_ATTACK);
}
public int getWeaponBonusPAtk()
{
return (int) getValue(Stat.WEAPON_BONUS_PHYSICAL_ATTACK);
}
/**
* @return the PAtk Speed (base+modifier) of the Creature in function of the Armour Expertise Penalty.
*/

View File

@@ -79,6 +79,8 @@ public enum Stat
MAGICAL_DEFENCE("mDef", new MDefenseFinalizer()),
PHYSICAL_ATTACK("pAtk", new PAttackFinalizer()),
MAGIC_ATTACK("mAtk", new MAttackFinalizer()),
WEAPON_BONUS_PHYSICAL_ATTACK("weaponBonusPAtk"),
WEAPON_BONUS_MAGIC_ATTACK("weaponBonusMAtk"),
PHYSICAL_ATTACK_SPEED("pAtkSpd", new PAttackSpeedFinalizer()),
MAGIC_ATTACK_SPEED("mAtkSpd", new MAttackSpeedFinalizer()), // Magic Skill Casting Time Rate
ATK_REUSE("atkReuse"), // Bows Hits Reuse Rate

View File

@@ -36,6 +36,7 @@ public class MAttackFinalizer implements IStatFunction
throwIfPresent(base);
double baseValue = calcWeaponBaseValue(creature, stat);
baseValue += creature.getStat().getWeaponBonusMAtk();
baseValue += calcEnchantedItemBonus(creature, stat);
if (creature.isPlayer())
{

View File

@@ -36,6 +36,7 @@ public class PAttackFinalizer implements IStatFunction
throwIfPresent(base);
double baseValue = calcWeaponBaseValue(creature, stat);
baseValue += creature.getStat().getWeaponBonusPAtk();
baseValue += calcEnchantedItemBonus(creature, stat);
if (creature.isPlayer())
{