Added physicalSkillPowerAdd, mCritPowerAdd, reflectDamageRes and receivedDamageModifier stats.

New Talismans.
This commit is contained in:
MobiusDev
2015-05-26 09:09:41 +00:00
parent 8528749ad5
commit 1ac91de53c
12 changed files with 178 additions and 14 deletions

View File

@ -5006,7 +5006,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
{
// Reduce HP of the target and calculate reflection damage to reduce HP of attacker if necessary
double reflectPercent = target.getStat().calcStat(Stats.REFLECT_DAMAGE_PERCENT, 0, null, null);
if (reflectPercent > 0)
{
reflectedDamage = (int) ((reflectPercent / 100.) * damage);
@ -5016,6 +5015,13 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
reflectedDamage = target.getMaxHp();
}
}
// Reflect resistance
double reflectResistance = target.getStat().calcStat(Stats.REFLECT_DAMAGE_RESISTANCE, 0, null, null);
if (reflectResistance > 0)
{
reflectedDamage -= reflectResistance;
}
}
}
@ -6472,13 +6478,16 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
public void reduceCurrentHp(double i, L2Character attacker, boolean awake, boolean isDOT, Skill skill)
{
// Damage modifier
final double damage = getStat().calcStat(Stats.RECEIVED_DAMAGE_MODIFIER, i, null, null);
if (Config.L2JMOD_CHAMPION_ENABLE && isChampion() && (Config.L2JMOD_CHAMPION_HP != 0))
{
getStatus().reduceHp(i / Config.L2JMOD_CHAMPION_HP, attacker, awake, isDOT, false);
getStatus().reduceHp((damage / Config.L2JMOD_CHAMPION_HP), attacker, awake, isDOT, false);
}
else
{
getStatus().reduceHp(i, attacker, awake, isDOT, false);
getStatus().reduceHp(damage, attacker, awake, isDOT, false);
}
}