Addition of DragonWeaponDefence effect.

This commit is contained in:
MobiusDevelopment
2020-12-11 22:44:51 +00:00
parent 8786792170
commit fe3ad537f6
63 changed files with 4617 additions and 9 deletions

View File

@ -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;

View File

@ -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

View File

@ -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"),