Addition of DragonWeaponDefence effect.
This commit is contained in:
@ -750,6 +750,8 @@ public class PlayerInstance extends Playable
|
||||
private int _cursedWeaponEquippedId = 0;
|
||||
private boolean _combatFlagEquippedId = false;
|
||||
|
||||
private boolean _isDragonWeaponEquipped = false;
|
||||
|
||||
private boolean _canRevive = true;
|
||||
private int _reviveRequested = 0;
|
||||
private double _revivePower = 0;
|
||||
@ -11385,6 +11387,16 @@ public class PlayerInstance extends Playable
|
||||
return _cursedWeaponEquippedId;
|
||||
}
|
||||
|
||||
public void setDragonWeaponEquipped(boolean value)
|
||||
{
|
||||
_isDragonWeaponEquipped = value;
|
||||
}
|
||||
|
||||
public boolean isDragonWeaponEquipped()
|
||||
{
|
||||
return _isDragonWeaponEquipped;
|
||||
}
|
||||
|
||||
public boolean isCombatFlagEquipped()
|
||||
{
|
||||
return _combatFlagEquippedId;
|
||||
|
@ -1604,7 +1604,18 @@ public class Formulas
|
||||
pvpDefense = target.getStat().getValue(Stat.PVP_PHYSICAL_ATTACK_DEFENCE, 1) * Config.PVP_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
||||
}
|
||||
|
||||
return Math.max(0.05, 1 + (pvpAttack - pvpDefense)); // Bonus should not be negative.
|
||||
// Dragon weapon defence stat.
|
||||
final double dragonDefense;
|
||||
if (attackerPlayer.isDragonWeaponEquipped())
|
||||
{
|
||||
dragonDefense = target.getStat().getValue(Stat.DRAGON_WEAPON_DEFENCE, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
dragonDefense = 1;
|
||||
}
|
||||
|
||||
return Math.max(0.05, dragonDefense * (1 + (pvpAttack - pvpDefense))); // Bonus should not be negative.
|
||||
}
|
||||
|
||||
// PvE Bonus
|
||||
|
@ -87,6 +87,7 @@ public enum Stat
|
||||
CRITICAL_DAMAGE_ADD("cAtkAdd"), // this is another type for special critical damage mods - vicious stance, critical power and critical damage SA
|
||||
HATE_ATTACK("attackHate"),
|
||||
REAR_DAMAGE_RATE("rearDamage"),
|
||||
DRAGON_WEAPON_DEFENCE("dragonWeaponDefence"),
|
||||
|
||||
// PVP BONUS
|
||||
PVP_PHYSICAL_ATTACK_DAMAGE("pvpPhysDmg"),
|
||||
|
Reference in New Issue
Block a user