-Small fix for Rage Aura debuff

-Update TriggerForce effect to avoid visual bug when Sigel' class use any aura on party, and some bug fixes on this effect.
-Implemented soulshot\spiritshot\blessed spiritshot damage bonus from enchanted weapon
-Implemented soulshot\spiritshot\blessed spiritshot damage bonus from Jewels Ruby\Sapphire
-Implemented Ruby\Sapphire\Topaz\Opal\Obsidian\Diamond\Emerald\Aquamarine\Pearl Jewels and its stats\skills.
-Changed compound jewels rate (in official servers - chances are lower (and from 3-5 lvls - greatly lower)
-Added visual effect to SS\SPS\BSPS if you equip Ruby\Sapphire 3\4\5 lvls (blue\yellow\red glow effects)
-New parameter weaponElementPower - increase weapon attribute power (if fire added in weapon - this parameter increase fire.. also about others)
-Small update skills.xsd to remove some eclipse warnings.

Contributed by NviX.
This commit is contained in:
MobiusDev
2015-07-11 16:22:19 +00:00
parent 5df3726293
commit 2beeb5bfbc
16 changed files with 429 additions and 169 deletions

View File

@ -730,20 +730,21 @@ public class CharStat
public int getAttackElementValue(byte attackAttribute)
{
double additionalPower = _activeChar.getStat().calcStat(Stats.WEAPON_ELEMENT_POWER, 0, null, null);
switch (attackAttribute)
{
case Elementals.FIRE:
return (int) calcStat(Stats.FIRE_POWER, _activeChar.getTemplate().getBaseFire());
return (int) (calcStat(Stats.FIRE_POWER, _activeChar.getTemplate().getBaseFire()) + additionalPower);
case Elementals.WATER:
return (int) calcStat(Stats.WATER_POWER, _activeChar.getTemplate().getBaseWater());
return (int) (calcStat(Stats.WATER_POWER, _activeChar.getTemplate().getBaseWater()) + additionalPower);
case Elementals.WIND:
return (int) calcStat(Stats.WIND_POWER, _activeChar.getTemplate().getBaseWind());
return (int) (calcStat(Stats.WIND_POWER, _activeChar.getTemplate().getBaseWind()) + additionalPower);
case Elementals.EARTH:
return (int) calcStat(Stats.EARTH_POWER, _activeChar.getTemplate().getBaseEarth());
return (int) (calcStat(Stats.EARTH_POWER, _activeChar.getTemplate().getBaseEarth()) + additionalPower);
case Elementals.HOLY:
return (int) calcStat(Stats.HOLY_POWER, _activeChar.getTemplate().getBaseHoly());
return (int) (calcStat(Stats.HOLY_POWER, _activeChar.getTemplate().getBaseHoly()) + additionalPower);
case Elementals.DARK:
return (int) calcStat(Stats.DARK_POWER, _activeChar.getTemplate().getBaseDark());
return (int) (calcStat(Stats.DARK_POWER, _activeChar.getTemplate().getBaseDark()) + additionalPower);
default:
return 0;
}

View File

@ -713,7 +713,33 @@ public final class Formulas
}
// Add soulshot boost.
int ssBoost = ss ? 2 : 1;
double ssBoost;
if (attacker.isPlayer())
{
double rubyBonus = 0;
if ((attacker.getInventory().getItemByItemId(38859) != null) && (attacker.getInventory().getItemByItemId(38859).isEquipped()))
{
rubyBonus = 0.2;
}
else if ((attacker.getInventory().getItemByItemId(38858) != null) && (attacker.getInventory().getItemByItemId(38858).isEquipped()))
{
rubyBonus = 0.125;
}
else if ((attacker.getInventory().getItemByItemId(38857) != null) && (attacker.getInventory().getItemByItemId(38857).isEquipped()))
{
rubyBonus = 0.075;
}
double ssEnchBonus = attacker.getActiveWeaponInstance().getEnchantLevel() * 0.007;
if (ssEnchBonus > 0.21)
{
ssEnchBonus = 0.21;
}
ssBoost = ss ? (2 + rubyBonus + ssEnchBonus) : 1;
}
else
{
ssBoost = ss ? 2 : 1;
}
damage = (skill != null) ? ((damage * ssBoost) + skill.getPower(attacker, target, isPvP, isPvE)) : (damage * ssBoost);
if (crit)
@ -853,7 +879,7 @@ public final class Formulas
}
}
int mAtk = attacker.getMAtk(target, skill);
double mAtk = attacker.getMAtk(target, skill);
final boolean isPvP = attacker.isPlayable() && target.isPlayable();
final boolean isPvE = attacker.isPlayable() && target.isAttackable();
@ -870,8 +896,33 @@ public final class Formulas
}
}
// Bonus Spirit shot
mAtk *= bss ? 4 : sps ? 2 : 1;
// Add spiritshot\blessed spiritshot boost.
if (attacker.isPlayer())
{
double sapphireBonus = 0;
if ((attacker.getInventory().getItemByItemId(38931) != null) && (attacker.getInventory().getItemByItemId(38931).isEquipped()))
{
sapphireBonus = 0.2;
}
else if ((attacker.getInventory().getItemByItemId(38930) != null) && (attacker.getInventory().getItemByItemId(38930).isEquipped()))
{
sapphireBonus = 0.125;
}
else if ((attacker.getInventory().getItemByItemId(38929) != null) && (attacker.getInventory().getItemByItemId(38929).isEquipped()))
{
sapphireBonus = 0.075;
}
double ssEnchBonus = attacker.getActiveWeaponInstance().getEnchantLevel() * 0.007;
if (ssEnchBonus > 0.21)
{
ssEnchBonus = 0.21;
}
mAtk *= bss ? (4 + sapphireBonus + ssEnchBonus) : sps ? (2 + sapphireBonus + ssEnchBonus) : 1;
}
else
{
mAtk *= bss ? 4 : sps ? 2 : 1;
}
// MDAM Formula.
double damage = ((91 * Math.sqrt(mAtk)) / mDef) * skill.getPower(attacker, target, isPvP, isPvE);
@ -1499,9 +1550,33 @@ public final class Formulas
return 1;
}
// Bonus Spiritshot
mAtk *= bss ? 4 : sps ? 2 : 1;
// Add spiritshot\blessed spiritshot boost.
if (attacker.isPlayer())
{
double sapphireBonus = 0;
if ((attacker.getInventory().getItemByItemId(38931) != null) && (attacker.getInventory().getItemByItemId(38931).isEquipped()))
{
sapphireBonus = 0.2;
}
else if ((attacker.getInventory().getItemByItemId(38930) != null) && (attacker.getInventory().getItemByItemId(38930).isEquipped()))
{
sapphireBonus = 0.125;
}
else if ((attacker.getInventory().getItemByItemId(38929) != null) && (attacker.getInventory().getItemByItemId(38929).isEquipped()))
{
sapphireBonus = 0.075;
}
double ssEnchBonus = attacker.getActiveWeaponInstance().getEnchantLevel() * 0.007;
if (ssEnchBonus > 0.21)
{
ssEnchBonus = 0.21;
}
mAtk *= bss ? (4 + sapphireBonus + ssEnchBonus) : sps ? (2 + sapphireBonus + ssEnchBonus) : 1;
}
else
{
mAtk *= bss ? 4 : sps ? 2 : 1;
}
double damage = (Math.sqrt(mAtk) * skill.getPower(attacker, target, isPvP, isPvE) * (mp / 97)) / mDef;
damage *= calcGeneralTraitBonus(attacker, target, skill.getTraitType(), false);

View File

@ -142,6 +142,7 @@ public enum Stats
EARTH_POWER("earthPower"),
HOLY_POWER("holyPower"),
DARK_POWER("darkPower"),
WEAPON_ELEMENT_POWER("weaponElementPower"),
// PROFICIENCY
CANCEL_PROF("cancelProf"),