Fixed blow rate chances.

This commit is contained in:
MobiusDev
2017-12-09 18:47:45 +00:00
parent 247a5bc9f5
commit 683ae0ef52
137 changed files with 808 additions and 637 deletions

View File

@@ -33,14 +33,14 @@ import com.l2jmobius.gameserver.model.stats.Formulas;
public final class Backstab extends AbstractEffect
{
private final double _power;
private final double _chance;
private final double _chanceBoost;
private final double _criticalChance;
private final boolean _overHit;
public Backstab(StatsSet params)
{
_power = params.getDouble("power", 0);
_chance = params.getDouble("chance", 0);
_power = params.getDouble("power");
_chanceBoost = params.getDouble("chanceBoost");
_criticalChance = params.getDouble("criticalChance", 0);
_overHit = params.getBoolean("overHit", false);
}
@@ -48,7 +48,7 @@ public final class Backstab extends AbstractEffect
@Override
public boolean calcSuccess(L2Character effector, L2Character effected, Skill skill)
{
return !effector.isInFrontOf(effected) && !Formulas.calcPhysicalSkillEvasion(effector, effected, skill) && Formulas.calcBlowSuccess(effector, effected, skill, _chance);
return !effector.isInFrontOf(effected) && !Formulas.calcPhysicalSkillEvasion(effector, effected, skill) && Formulas.calcBlowSuccess(effector, effected, skill, _chanceBoost);
}
@Override

View File

@@ -22,7 +22,6 @@ import java.util.Set;
import com.l2jmobius.gameserver.enums.ShotType;
import com.l2jmobius.gameserver.model.StatsSet;
import com.l2jmobius.gameserver.model.actor.L2Attackable;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.effects.AbstractEffect;
import com.l2jmobius.gameserver.model.effects.L2EffectType;
@@ -38,27 +37,24 @@ import com.l2jmobius.gameserver.model.stats.Formulas;
public final class FatalBlow extends AbstractEffect
{
private final double _power;
private final double _chance;
private final double _chanceBoost;
private final double _criticalChance;
private final boolean _overHit;
private final Set<AbnormalType> _abnormals;
private final double _abnormalPower;
public FatalBlow(StatsSet params)
{
_power = params.getDouble("power", 0);
_chance = params.getDouble("chance", 0);
_power = params.getDouble("power");
_chanceBoost = params.getDouble("chanceBoost");
_criticalChance = params.getDouble("criticalChance", 0);
_overHit = params.getBoolean("overHit", false);
final String abnormals = params.getString("abnormalType", null);
String abnormals = params.getString("abnormalType", null);
if ((abnormals != null) && !abnormals.isEmpty())
{
_abnormals = new HashSet<>();
for (String slot : abnormals.split(";"))
{
_abnormals.add(AbnormalType.getAbnormalType(slot));
_abnormals.add(Enum.valueOf(AbnormalType.class, slot));
}
}
else
@@ -71,7 +67,7 @@ public final class FatalBlow extends AbstractEffect
@Override
public boolean calcSuccess(L2Character effector, L2Character effected, Skill skill)
{
return !Formulas.calcPhysicalSkillEvasion(effector, effected, skill) && Formulas.calcBlowSuccess(effector, effected, skill, _chance);
return !Formulas.calcPhysicalSkillEvasion(effector, effected, skill) && Formulas.calcBlowSuccess(effector, effected, skill, _chanceBoost);
}
@Override
@@ -94,11 +90,6 @@ public final class FatalBlow extends AbstractEffect
return;
}
if (_overHit && effected.isAttackable())
{
((L2Attackable) effected).overhitEnabled(true);
}
double power = _power;
// Check if we apply an abnormal modifier

View File

@@ -33,13 +33,13 @@ import com.l2jmobius.gameserver.model.stats.Formulas;
public final class SoulBlow extends AbstractEffect
{
private final double _power;
private final double _chance;
private final double _chanceBoost;
private final boolean _overHit;
public SoulBlow(StatsSet params)
{
_power = params.getDouble("power", 0);
_chance = params.getDouble("chance", 0);
_power = params.getDouble("power");
_chanceBoost = params.getDouble("chanceBoost");
_overHit = params.getBoolean("overHit", false);
}
@@ -52,7 +52,7 @@ public final class SoulBlow extends AbstractEffect
@Override
public boolean calcSuccess(L2Character effector, L2Character effected, Skill skill)
{
return !Formulas.calcPhysicalSkillEvasion(effector, effected, skill) && Formulas.calcBlowSuccess(effector, effected, skill, _chance);
return !Formulas.calcPhysicalSkillEvasion(effector, effected, skill) && Formulas.calcBlowSuccess(effector, effected, skill, _chanceBoost);
}
@Override

View File

@@ -1784,7 +1784,7 @@
<value level="24">977</value>
</power>
<overHit>true</overHit>
<chance>20</chance>
<chanceBoost>200</chanceBoost>
</effect>
</effects>
</skill>
@@ -3290,7 +3290,7 @@
<value level="36">15</value>
<value level="37">15</value>
</criticalChance>
<chance>40</chance>
<chanceBoost>400</chanceBoost>
<overHit>true</overHit>
</effect>
<effect name="Lethal">

View File

@@ -4526,9 +4526,10 @@
<value level="37">5479</value>
</power>
<overHit>true</overHit>
<chance>30</chance>
<chanceBoost>300</chanceBoost>
</effect>
<effect name="Lethal">
<fullLethal>0</fullLethal>
<halfLethal>10</halfLethal>
</effect>
</effects>

View File

@@ -1079,12 +1079,13 @@
<value level="10">3653</value>
</power>
<overHit>true</overHit>
<chance>25</chance>
<chanceBoost>250</chanceBoost>
</effect>
<effect name="Bluff">
<chance>80</chance>
</effect>
<effect name="Lethal">
<fullLethal>0</fullLethal>
<halfLethal>5</halfLethal>
</effect>
</effects>
@@ -1715,10 +1716,11 @@
<effect name="FatalBlow">
<power>5773</power>
<criticalChance>20</criticalChance>
<chance>30</chance>
<chanceBoost>300</chanceBoost>
<overHit>true</overHit>
</effect>
<effect name="Lethal">
<fullLethal>0</fullLethal>
<halfLethal>15</halfLethal>
</effect>
</effects>

View File

@@ -1204,9 +1204,10 @@
<value level="10">3653</value>
</power>
<overHit>true</overHit>
<chance>25</chance>
<chanceBoost>250</chanceBoost>
</effect>
<effect name="Lethal">
<fullLethal>0</fullLethal>
<halfLethal>5</halfLethal>
</effect>
</effects>

View File

@@ -525,7 +525,7 @@
<value level="28">5479</value>
</power>
<overHit>true</overHit>
<chance>20</chance>
<chanceBoost>200</chanceBoost>
</effect>
</effects>
</skill>
@@ -4198,9 +4198,10 @@
<value level="4">5199</value>
</power>
<overHit>true</overHit>
<chance>20</chance>
<chanceBoost>200</chanceBoost>
</effect>
<effect name="Lethal">
<fullLethal>0</fullLethal>
<halfLethal>10</halfLethal>
</effect>
</effects>

View File

@@ -2634,9 +2634,10 @@
<effect name="FatalBlow">
<power>6969</power>
<overHit>true</overHit>
<chance>20</chance>
<chanceBoost>200</chanceBoost>
</effect>
<effect name="Lethal">
<fullLethal>0</fullLethal>
<halfLethal>10</halfLethal>
</effect>
</effects>

View File

@@ -1604,7 +1604,7 @@
<effect name="FatalBlow">
<power>11234</power>
<criticalChance>30</criticalChance>
<chance>60</chance>
<chanceBoost>600</chanceBoost>
<overHit>true</overHit>
</effect>
<effect name="Lethal">

View File

@@ -3668,7 +3668,7 @@
<effect name="FatalBlow">
<power>11234</power>
<criticalChance>30</criticalChance>
<chance>60</chance>
<chanceBoost>600</chanceBoost>
<overHit>true</overHit>
</effect>
<effect name="Lethal">

View File

@@ -2431,7 +2431,7 @@
<value level="11">7461</value>
<value level="12">7850</value>
</power>
<chance>20</chance>
<chanceBoost>200</chanceBoost>
</effect>
</effects>
</skill>

View File

@@ -3417,7 +3417,7 @@
<value level="11">44350</value>
<value level="12">49193</value>
</power>
<chance>115</chance>
<chanceBoost>1150</chanceBoost>
</effect>
</effects>
</skill>
@@ -4046,7 +4046,7 @@
<value level="11">73917</value>
<value level="12">81989</value>
</power>
<chance>67</chance>
<chanceBoost>670</chanceBoost>
</effect>
</effects>
</skill>

View File

@@ -2542,7 +2542,7 @@
<value level="11">7461</value>
<value level="12">7850</value>
</power>
<chance>20</chance>
<chanceBoost>200</chanceBoost>
</effect>
<effect name="DamOverTime">
<power>

View File

@@ -1082,8 +1082,8 @@
<value level="16">9648</value>
<value level="17">9830</value>
</power>
<criticalChance>30</criticalChance>
<chance>50</chance>
<criticalChance>10</criticalChance>
<chanceBoost>200</chanceBoost>
</effect>
</effects>
</skill>
@@ -2305,7 +2305,7 @@
<value level="11">44350</value>
<value level="12">49193</value>
</power>
<chance>115</chance>
<chanceBoost>1150</chanceBoost>
</effect>
</effects>
</skill>
@@ -2365,7 +2365,7 @@
<value level="11">38806</value>
<value level="12">43290</value>
</power>
<chance>115</chance>
<chanceBoost>1150</chanceBoost>
</effect>
</effects>
</skill>
@@ -2425,7 +2425,7 @@
<value level="11">20667</value>
<value level="12">23023</value>
</power>
<chance>115</chance>
<chanceBoost>1150</chanceBoost>
</effect>
</effects>
</skill>
@@ -2485,7 +2485,7 @@
<value level="11">19381</value>
<value level="12">21645</value>
</power>
<chance>115</chance>
<chanceBoost>1150</chanceBoost>
</effect>
</effects>
</skill>
@@ -2545,7 +2545,7 @@
<value level="11">18140</value>
<value level="12">20268</value>
</power>
<chance>115</chance>
<chanceBoost>1150</chanceBoost>
</effect>
</effects>
</skill>
@@ -3600,7 +3600,7 @@
<value level="11">73917</value>
<value level="12">81989</value>
</power>
<chance>67</chance>
<chanceBoost>670</chanceBoost>
</effect>
</effects>
</skill>
@@ -3660,7 +3660,7 @@
<value level="11">64677</value>
<value level="12">72150</value>
</power>
<chance>67</chance>
<chanceBoost>670</chanceBoost>
</effect>
</effects>
</skill>
@@ -3720,7 +3720,7 @@
<value level="11">34445</value>
<value level="12">38371</value>
</power>
<chance>67</chance>
<chanceBoost>670</chanceBoost>
</effect>
</effects>
</skill>
@@ -3780,7 +3780,7 @@
<value level="11">32302</value>
<value level="12">36075</value>
</power>
<chance>67</chance>
<chanceBoost>670</chanceBoost>
</effect>
</effects>
</skill>
@@ -3840,7 +3840,7 @@
<value level="11">30232</value>
<value level="12">33780</value>
</power>
<chance>67</chance>
<chanceBoost>670</chanceBoost>
</effect>
</effects>
</skill>

View File

@@ -2817,7 +2817,7 @@
<value level="3">7306</value>
<value level="4">8602</value>
</power>
<chance>20</chance>
<chanceBoost>200</chanceBoost>
</effect>
<effect name="PhysicalMute" />
</effects>
@@ -2916,15 +2916,13 @@
<effects>
<effect name="FatalBlow">
<power>6335</power>
<chance>15</chance>
<chanceBoost>150</chanceBoost>
</effect>
<effect name="Speed">
<amount>40</amount>
<mode>DIFF</mode>
</effect>
</effects>
<selfEffects>
</selfEffects>
</skill>
<skill id="5085" toLevel="1" name="Anesthesia">
<!-- Confirmed CT2.5 -->

View File

@@ -1309,7 +1309,7 @@
<effects>
<effect name="FatalBlow">
<power>39544</power>
<chance>115</chance>
<chanceBoost>1150</chanceBoost>
</effect>
</effects>
</skill>

View File

@@ -1861,7 +1861,7 @@
<value level="12">6844</value>
<value level="13">6960</value>
</power>
<chance>20</chance>
<chanceBoost>200</chanceBoost>
</effect>
</effects>
</skill>

View File

@@ -1536,10 +1536,11 @@
<effect name="FatalBlow">
<power>5773</power>
<criticalChance>20</criticalChance>
<chance>30</chance>
<chanceBoost>300</chanceBoost>
<overHit>true</overHit>
</effect>
<effect name="Lethal">
<fullLethal>0</fullLethal>
<halfLethal>15</halfLethal>
</effect>
</effects>

View File

@@ -494,7 +494,7 @@
<value fromLevel="7" toLevel="11" fromSubLevel="1001" toSubLevel="1030">{base + base / 100 * subIndex}</value>
</power>
<criticalChance>30</criticalChance>
<chance>40</chance>
<chanceBoost>400</chanceBoost>
<overHit>true</overHit>
</effect>
</pveEffects>
@@ -516,7 +516,7 @@
<value fromLevel="7" toLevel="11" fromSubLevel="2001" toSubLevel="2030">{base + base / 100 * (5 + subIndex)}</value>
</power>
<criticalChance>30</criticalChance>
<chance>40</chance>
<chanceBoost>400</chanceBoost>
<overHit>true</overHit>
</effect>
</pvpEffects>
@@ -610,7 +610,7 @@
<value fromLevel="7" toLevel="11" fromSubLevel="1001" toSubLevel="1030">{base + base / 100 * subIndex}</value>
</power>
<criticalChance>15</criticalChance>
<chance>36.5</chance>
<chanceBoost>365</chanceBoost>
<overHit>true</overHit>
</effect>
</pveEffects>
@@ -632,7 +632,7 @@
<value fromLevel="7" toLevel="11" fromSubLevel="2001" toSubLevel="2030">{base + base / 100 * (5 + subIndex)}</value>
</power>
<criticalChance>15</criticalChance>
<chance>36.5</chance>
<chanceBoost>365</chanceBoost>
<overHit>true</overHit>
</effect>
</pvpEffects>
@@ -739,7 +739,7 @@
<criticalChance>20</criticalChance>
<abnormalType>BLEEDING</abnormalType>
<abnormalPower>4130</abnormalPower>
<chance>36.5</chance>
<chanceBoost>365</chanceBoost>
<overHit>true</overHit>
</effect>
</pveEffects>
@@ -762,8 +762,8 @@
</power>
<criticalChance>20</criticalChance>
<abnormalType>BLEEDING</abnormalType>
<abnormalPower>4130</abnormalPower>
<chance>36.5</chance>
<abnormalPower>4130</abnormalPower> <!-- TODO: Must have different values per level. -->
<chanceBoost>365</chanceBoost>
<overHit>true</overHit>
</effect>
</pvpEffects>
@@ -838,7 +838,7 @@
<value fromLevel="3" toLevel="7" fromSubLevel="1001" toSubLevel="1030">{base + base / 100 * subIndex}</value>
</power>
<criticalChance>20</criticalChance>
<chance>36.5</chance>
<chanceBoost>365</chanceBoost>
<overHit>true</overHit>
</effect>
</pveEffects>
@@ -856,7 +856,7 @@
<value fromLevel="3" toLevel="7" fromSubLevel="2001" toSubLevel="2030">{base + base / 100 * (5 + subIndex)}</value>
</power>
<criticalChance>20</criticalChance>
<chance>36.5</chance>
<chanceBoost>365</chanceBoost>
<overHit>true</overHit>
</effect>
</pvpEffects>
@@ -2929,7 +2929,7 @@
</effect>
<effect name="FatalBlow">
<power>8875</power>
<chance>30</chance>
<chanceBoost>300</chanceBoost>
</effect>
</effects>
</skill>
@@ -3117,7 +3117,7 @@
<value level="6">27993</value>
<value level="7">29472</value>
</power>
<chance>30</chance>
<chanceBoost>300</chanceBoost>
</effect>
<effect name="Speed">
<amount>-23</amount>

View File

@@ -327,11 +327,12 @@
<allowedSkills>10279;10517;10025;10776;11770;1904;11264;11093;13314;1912</allowedSkills>
</effect>
<effect name="FatalBlow">
<chance>30</chance>
<chanceBoost>300</chanceBoost>
<power>8875</power>
<overHit>true</overHit>
</effect>
<effect name="Lethal">
<fullLethal>0</fullLethal>
<halfLethal>15</halfLethal>
</effect>
</effects>

View File

@@ -3613,7 +3613,7 @@
<effects>
<effect name="FatalBlow">
<!-- Guessed -->
<chance>30</chance>
<chanceBoost>300</chanceBoost>
<power>
<value level="1">45696</value>
<value level="2">47772</value>
@@ -3621,7 +3621,7 @@
</power>
</effect>
<effect name="Lethal">
<!-- Guessed -->
<fullLethal>0</fullLethal>
<halfLethal>10</halfLethal>
</effect>
</effects>
@@ -3647,7 +3647,7 @@
<effects>
<effect name="FatalBlow">
<!-- Guessed -->
<chance>30</chance>
<chanceBoost>300</chanceBoost>
<power>
<value level="1">51411</value>
<value level="2">53747</value>
@@ -3655,7 +3655,7 @@
</power>
</effect>
<effect name="Lethal">
<!-- Guessed -->
<fullLethal>0</fullLethal>
<halfLethal>10</halfLethal>
</effect>
</effects>

View File

@@ -2857,7 +2857,7 @@
<value level="6">5029</value>
<value level="7">5479</value>
</power>
<chance>20</chance>
<chanceBoost>200</chanceBoost>
</effect>
<effect name="DamOverTime">
<power>100</power>

View File

@@ -2872,9 +2872,10 @@
<effects>
<effect name="FatalBlow">
<power>7127</power>
<chance>30</chance>
<chanceBoost>300</chanceBoost>
</effect>
<effect name="Lethal">
<fullLethal>0</fullLethal>
<halfLethal>5</halfLethal>
</effect>
<effect name="DispelBySlot">

View File

@@ -2238,9 +2238,10 @@
<effects>
<effect name="FatalBlow">
<power>1700</power>
<chance>30</chance>
<chanceBoost>300</chanceBoost>
</effect>
<effect name="Lethal">
<fullLethal>0</fullLethal>
<halfLethal>5</halfLethal>
</effect>
</effects>

View File

@@ -1546,7 +1546,7 @@
</effect>
<effect name="FatalBlow">
<power>3000</power>
<chance>20</chance>
<chanceBoost>200</chanceBoost>
</effect>
</effects>
</skill>
@@ -1674,7 +1674,7 @@
</effect>
<effect name="FatalBlow">
<power>3000</power>
<chance>20</chance>
<chanceBoost>200</chanceBoost>
</effect>
</effects>
</skill>

View File

@@ -64,7 +64,7 @@
<effect name="FatalBlow">
<power>3420</power>
<overHit>true</overHit>
<chance>20</chance>
<chanceBoost>200</chanceBoost>
</effect>
</effects>
</skill>

View File

@@ -830,6 +830,7 @@
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="chanceBoost" type="xs:unsignedShort" />
<xs:element name="dispel">
<xs:complexType mixed="true">
<xs:sequence minOccurs="0">
@@ -895,8 +896,8 @@
</xs:complexType>
</xs:element>
<xs:element name="weaponType">
<xs:complexType mixed="true">
<xs:sequence minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="weaponType">
<xs:complexType>
<xs:sequence>
@@ -1158,6 +1159,21 @@
</xs:complexType>
</xs:element>
<xs:element name="side" type="xs:string" />
<xs:element name="fullLethal">
<xs:complexType mixed="true">
<xs:sequence minOccurs="0">
<xs:element maxOccurs="unbounded" name="value">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:unsignedByte">
<xs:attribute name="level" type="xs:unsignedByte" use="required" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="PARALYZE">
<xs:complexType mixed="true">
<xs:sequence minOccurs="0">
@@ -1499,21 +1515,6 @@
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="fullLethal">
<xs:complexType mixed="true">
<xs:sequence minOccurs="0">
<xs:element maxOccurs="unbounded" name="value">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:unsignedByte">
<xs:attribute name="level" type="xs:unsignedByte" use="required" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="itemId">
<xs:complexType mixed="true">
<xs:sequence minOccurs="0">
@@ -1986,6 +1987,7 @@
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="pAtkMod" type="xs:unsignedByte" />
<xs:element name="isSummonSpawn" type="xs:boolean" />
<xs:element name="randomOffset" type="xs:unsignedByte" />
<xs:element name="debuffModifier" type="xs:decimal" />
@@ -2021,7 +2023,6 @@
</xs:element>
<xs:element name="damageModifier" type="xs:decimal" />
<xs:element name="animationSpeed" type="xs:unsignedShort" />
<xs:element name="pAtkMod" type="xs:unsignedByte" />
</xs:choice>
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="required" />
@@ -2347,22 +2348,6 @@
<xs:element name="effect">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="amount">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="value">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:unsignedByte">
<xs:attribute name="level" type="xs:unsignedByte" use="required" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" name="attribute" type="xs:string" />
<xs:element minOccurs="0" name="ON_MAGIC_SKILL" />
<xs:element minOccurs="0" name="ON_CRITICAL_SKILL" />
<xs:element minOccurs="0" name="ON_EQUIP" />
@@ -2490,7 +2475,7 @@
<xs:element minOccurs="0" name="criticalChance" type="xs:unsignedByte" />
<xs:element minOccurs="0" name="abnormalType" type="xs:string" />
<xs:element minOccurs="0" name="abnormalPower" type="xs:unsignedShort" />
<xs:element minOccurs="0" name="chance" type="xs:decimal" />
<xs:element minOccurs="0" name="chanceBoost" type="xs:unsignedShort" />
<xs:element minOccurs="0" name="overHit" type="xs:boolean" />
<xs:element minOccurs="0" name="ticks" type="xs:unsignedByte" />
</xs:sequence>
@@ -2536,7 +2521,7 @@
<xs:element minOccurs="0" name="criticalChance" type="xs:unsignedByte" />
<xs:element minOccurs="0" name="abnormalType" type="xs:string" />
<xs:element minOccurs="0" name="abnormalPower" type="xs:unsignedShort" />
<xs:element minOccurs="0" name="chance" type="xs:decimal" />
<xs:element minOccurs="0" name="chanceBoost" type="xs:unsignedShort" />
<xs:element minOccurs="0" name="overHit" type="xs:boolean" />
<xs:element minOccurs="0" name="ticks" type="xs:unsignedByte" />
</xs:sequence>