Addition of WeaponBonusMAtk and WeaponBonusPAtk effect handlers.
Thanks to Sero, nassseka and Enryu.
This commit is contained in:
@@ -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.
|
||||
*/
|
||||
|
@@ -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
|
||||
|
@@ -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())
|
||||
{
|
||||
|
@@ -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())
|
||||
{
|
||||
|
Reference in New Issue
Block a user