Fixed cancellation not removing dances.
This commit is contained in:
parent
a3b838200b
commit
0c08e144c4
@ -140,6 +140,15 @@ public final class CharEffectList
|
|||||||
return _actives.stream().filter(b -> b.getSkill().getBuffType().isBuff()).collect(Collectors.toList());
|
return _actives.stream().filter(b -> b.getSkill().getBuffType().isBuff()).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets all the active positive effects on this effect list.
|
||||||
|
* @return all the dances songs on this effect list
|
||||||
|
*/
|
||||||
|
public List<BuffInfo> getDances()
|
||||||
|
{
|
||||||
|
return _actives.stream().filter(b -> b.getSkill().getBuffType().isDance()).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets all the active negative effects on this effect list.
|
* Gets all the active negative effects on this effect list.
|
||||||
* @return all the debuffs on this effect list
|
* @return all the debuffs on this effect list
|
||||||
|
@ -1059,8 +1059,25 @@ public final class Formulas
|
|||||||
final int cancelMagicLvl = skill.getMagicLevel();
|
final int cancelMagicLvl = skill.getMagicLevel();
|
||||||
|
|
||||||
// Prevent initialization.
|
// Prevent initialization.
|
||||||
final List<BuffInfo> buffs = target.getEffectList().getBuffs();
|
final List<BuffInfo> dances = target.getEffectList().getDances();
|
||||||
|
for (int i = dances.size() - 1; i >= 0; i--) // reverse order
|
||||||
|
{
|
||||||
|
final BuffInfo info = dances.get(i);
|
||||||
|
if (!info.getSkill().canBeStolen() || ((rate < 100) && !calcCancelSuccess(info, cancelMagicLvl, rate, skill, target)))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
canceled.add(info);
|
||||||
|
if (canceled.size() >= max)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canceled.size() < max)
|
||||||
|
{
|
||||||
|
// Prevent initialization.
|
||||||
|
final List<BuffInfo> buffs = target.getEffectList().getBuffs();
|
||||||
for (int i = buffs.size() - 1; i >= 0; i--) // reverse order
|
for (int i = buffs.size() - 1; i >= 0; i--) // reverse order
|
||||||
{
|
{
|
||||||
final BuffInfo info = buffs.get(i);
|
final BuffInfo info = buffs.get(i);
|
||||||
@ -1074,6 +1091,7 @@ public final class Formulas
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DEBUFF:
|
case DEBUFF:
|
||||||
|
@ -140,6 +140,15 @@ public final class CharEffectList
|
|||||||
return _actives.stream().filter(b -> b.getSkill().getBuffType().isBuff()).collect(Collectors.toList());
|
return _actives.stream().filter(b -> b.getSkill().getBuffType().isBuff()).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets all the active positive effects on this effect list.
|
||||||
|
* @return all the dances songs on this effect list
|
||||||
|
*/
|
||||||
|
public List<BuffInfo> getDances()
|
||||||
|
{
|
||||||
|
return _actives.stream().filter(b -> b.getSkill().getBuffType().isDance()).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets all the active negative effects on this effect list.
|
* Gets all the active negative effects on this effect list.
|
||||||
* @return all the debuffs on this effect list
|
* @return all the debuffs on this effect list
|
||||||
|
@ -1059,8 +1059,25 @@ public final class Formulas
|
|||||||
final int cancelMagicLvl = skill.getMagicLevel();
|
final int cancelMagicLvl = skill.getMagicLevel();
|
||||||
|
|
||||||
// Prevent initialization.
|
// Prevent initialization.
|
||||||
final List<BuffInfo> buffs = target.getEffectList().getBuffs();
|
final List<BuffInfo> dances = target.getEffectList().getDances();
|
||||||
|
for (int i = dances.size() - 1; i >= 0; i--) // reverse order
|
||||||
|
{
|
||||||
|
final BuffInfo info = dances.get(i);
|
||||||
|
if (!info.getSkill().canBeStolen() || ((rate < 100) && !calcCancelSuccess(info, cancelMagicLvl, rate, skill, target)))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
canceled.add(info);
|
||||||
|
if (canceled.size() >= max)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canceled.size() < max)
|
||||||
|
{
|
||||||
|
// Prevent initialization.
|
||||||
|
final List<BuffInfo> buffs = target.getEffectList().getBuffs();
|
||||||
for (int i = buffs.size() - 1; i >= 0; i--) // reverse order
|
for (int i = buffs.size() - 1; i >= 0; i--) // reverse order
|
||||||
{
|
{
|
||||||
final BuffInfo info = buffs.get(i);
|
final BuffInfo info = buffs.get(i);
|
||||||
@ -1074,6 +1091,7 @@ public final class Formulas
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DEBUFF:
|
case DEBUFF:
|
||||||
|
@ -140,6 +140,15 @@ public final class CharEffectList
|
|||||||
return _actives.stream().filter(b -> b.getSkill().getBuffType().isBuff()).collect(Collectors.toList());
|
return _actives.stream().filter(b -> b.getSkill().getBuffType().isBuff()).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets all the active positive effects on this effect list.
|
||||||
|
* @return all the dances songs on this effect list
|
||||||
|
*/
|
||||||
|
public List<BuffInfo> getDances()
|
||||||
|
{
|
||||||
|
return _actives.stream().filter(b -> b.getSkill().getBuffType().isDance()).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets all the active negative effects on this effect list.
|
* Gets all the active negative effects on this effect list.
|
||||||
* @return all the debuffs on this effect list
|
* @return all the debuffs on this effect list
|
||||||
|
@ -1059,8 +1059,25 @@ public final class Formulas
|
|||||||
final int cancelMagicLvl = skill.getMagicLevel();
|
final int cancelMagicLvl = skill.getMagicLevel();
|
||||||
|
|
||||||
// Prevent initialization.
|
// Prevent initialization.
|
||||||
final List<BuffInfo> buffs = target.getEffectList().getBuffs();
|
final List<BuffInfo> dances = target.getEffectList().getDances();
|
||||||
|
for (int i = dances.size() - 1; i >= 0; i--) // reverse order
|
||||||
|
{
|
||||||
|
final BuffInfo info = dances.get(i);
|
||||||
|
if (!info.getSkill().canBeStolen() || ((rate < 100) && !calcCancelSuccess(info, cancelMagicLvl, rate, skill, target)))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
canceled.add(info);
|
||||||
|
if (canceled.size() >= max)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canceled.size() < max)
|
||||||
|
{
|
||||||
|
// Prevent initialization.
|
||||||
|
final List<BuffInfo> buffs = target.getEffectList().getBuffs();
|
||||||
for (int i = buffs.size() - 1; i >= 0; i--) // reverse order
|
for (int i = buffs.size() - 1; i >= 0; i--) // reverse order
|
||||||
{
|
{
|
||||||
final BuffInfo info = buffs.get(i);
|
final BuffInfo info = buffs.get(i);
|
||||||
@ -1074,6 +1091,7 @@ public final class Formulas
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DEBUFF:
|
case DEBUFF:
|
||||||
|
@ -140,6 +140,15 @@ public final class CharEffectList
|
|||||||
return _actives.stream().filter(b -> b.getSkill().getBuffType().isBuff()).collect(Collectors.toList());
|
return _actives.stream().filter(b -> b.getSkill().getBuffType().isBuff()).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets all the active positive effects on this effect list.
|
||||||
|
* @return all the dances songs on this effect list
|
||||||
|
*/
|
||||||
|
public List<BuffInfo> getDances()
|
||||||
|
{
|
||||||
|
return _actives.stream().filter(b -> b.getSkill().getBuffType().isDance()).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets all the active negative effects on this effect list.
|
* Gets all the active negative effects on this effect list.
|
||||||
* @return all the debuffs on this effect list
|
* @return all the debuffs on this effect list
|
||||||
|
@ -1059,8 +1059,25 @@ public final class Formulas
|
|||||||
final int cancelMagicLvl = skill.getMagicLevel();
|
final int cancelMagicLvl = skill.getMagicLevel();
|
||||||
|
|
||||||
// Prevent initialization.
|
// Prevent initialization.
|
||||||
final List<BuffInfo> buffs = target.getEffectList().getBuffs();
|
final List<BuffInfo> dances = target.getEffectList().getDances();
|
||||||
|
for (int i = dances.size() - 1; i >= 0; i--) // reverse order
|
||||||
|
{
|
||||||
|
final BuffInfo info = dances.get(i);
|
||||||
|
if (!info.getSkill().canBeStolen() || ((rate < 100) && !calcCancelSuccess(info, cancelMagicLvl, rate, skill, target)))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
canceled.add(info);
|
||||||
|
if (canceled.size() >= max)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canceled.size() < max)
|
||||||
|
{
|
||||||
|
// Prevent initialization.
|
||||||
|
final List<BuffInfo> buffs = target.getEffectList().getBuffs();
|
||||||
for (int i = buffs.size() - 1; i >= 0; i--) // reverse order
|
for (int i = buffs.size() - 1; i >= 0; i--) // reverse order
|
||||||
{
|
{
|
||||||
final BuffInfo info = buffs.get(i);
|
final BuffInfo info = buffs.get(i);
|
||||||
@ -1074,6 +1091,7 @@ public final class Formulas
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DEBUFF:
|
case DEBUFF:
|
||||||
|
@ -140,6 +140,15 @@ public final class CharEffectList
|
|||||||
return _actives.stream().filter(b -> b.getSkill().getBuffType().isBuff()).collect(Collectors.toList());
|
return _actives.stream().filter(b -> b.getSkill().getBuffType().isBuff()).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets all the active positive effects on this effect list.
|
||||||
|
* @return all the dances songs on this effect list
|
||||||
|
*/
|
||||||
|
public List<BuffInfo> getDances()
|
||||||
|
{
|
||||||
|
return _actives.stream().filter(b -> b.getSkill().getBuffType().isDance()).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets all the active negative effects on this effect list.
|
* Gets all the active negative effects on this effect list.
|
||||||
* @return all the debuffs on this effect list
|
* @return all the debuffs on this effect list
|
||||||
|
@ -1059,8 +1059,25 @@ public final class Formulas
|
|||||||
final int cancelMagicLvl = skill.getMagicLevel();
|
final int cancelMagicLvl = skill.getMagicLevel();
|
||||||
|
|
||||||
// Prevent initialization.
|
// Prevent initialization.
|
||||||
final List<BuffInfo> buffs = target.getEffectList().getBuffs();
|
final List<BuffInfo> dances = target.getEffectList().getDances();
|
||||||
|
for (int i = dances.size() - 1; i >= 0; i--) // reverse order
|
||||||
|
{
|
||||||
|
final BuffInfo info = dances.get(i);
|
||||||
|
if (!info.getSkill().canBeStolen() || ((rate < 100) && !calcCancelSuccess(info, cancelMagicLvl, rate, skill, target)))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
canceled.add(info);
|
||||||
|
if (canceled.size() >= max)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canceled.size() < max)
|
||||||
|
{
|
||||||
|
// Prevent initialization.
|
||||||
|
final List<BuffInfo> buffs = target.getEffectList().getBuffs();
|
||||||
for (int i = buffs.size() - 1; i >= 0; i--) // reverse order
|
for (int i = buffs.size() - 1; i >= 0; i--) // reverse order
|
||||||
{
|
{
|
||||||
final BuffInfo info = buffs.get(i);
|
final BuffInfo info = buffs.get(i);
|
||||||
@ -1074,6 +1091,7 @@ public final class Formulas
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DEBUFF:
|
case DEBUFF:
|
||||||
|
@ -140,6 +140,15 @@ public final class CharEffectList
|
|||||||
return _actives.stream().filter(b -> b.getSkill().getBuffType().isBuff()).collect(Collectors.toList());
|
return _actives.stream().filter(b -> b.getSkill().getBuffType().isBuff()).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets all the active positive effects on this effect list.
|
||||||
|
* @return all the dances songs on this effect list
|
||||||
|
*/
|
||||||
|
public List<BuffInfo> getDances()
|
||||||
|
{
|
||||||
|
return _actives.stream().filter(b -> b.getSkill().getBuffType().isDance()).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets all the active negative effects on this effect list.
|
* Gets all the active negative effects on this effect list.
|
||||||
* @return all the debuffs on this effect list
|
* @return all the debuffs on this effect list
|
||||||
|
@ -1059,8 +1059,25 @@ public final class Formulas
|
|||||||
final int cancelMagicLvl = skill.getMagicLevel();
|
final int cancelMagicLvl = skill.getMagicLevel();
|
||||||
|
|
||||||
// Prevent initialization.
|
// Prevent initialization.
|
||||||
final List<BuffInfo> buffs = target.getEffectList().getBuffs();
|
final List<BuffInfo> dances = target.getEffectList().getDances();
|
||||||
|
for (int i = dances.size() - 1; i >= 0; i--) // reverse order
|
||||||
|
{
|
||||||
|
final BuffInfo info = dances.get(i);
|
||||||
|
if (!info.getSkill().canBeStolen() || ((rate < 100) && !calcCancelSuccess(info, cancelMagicLvl, rate, skill, target)))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
canceled.add(info);
|
||||||
|
if (canceled.size() >= max)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canceled.size() < max)
|
||||||
|
{
|
||||||
|
// Prevent initialization.
|
||||||
|
final List<BuffInfo> buffs = target.getEffectList().getBuffs();
|
||||||
for (int i = buffs.size() - 1; i >= 0; i--) // reverse order
|
for (int i = buffs.size() - 1; i >= 0; i--) // reverse order
|
||||||
{
|
{
|
||||||
final BuffInfo info = buffs.get(i);
|
final BuffInfo info = buffs.get(i);
|
||||||
@ -1074,6 +1091,7 @@ public final class Formulas
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DEBUFF:
|
case DEBUFF:
|
||||||
|
@ -140,6 +140,15 @@ public final class CharEffectList
|
|||||||
return _actives.stream().filter(b -> b.getSkill().getBuffType().isBuff()).collect(Collectors.toList());
|
return _actives.stream().filter(b -> b.getSkill().getBuffType().isBuff()).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets all the active positive effects on this effect list.
|
||||||
|
* @return all the dances songs on this effect list
|
||||||
|
*/
|
||||||
|
public List<BuffInfo> getDances()
|
||||||
|
{
|
||||||
|
return _actives.stream().filter(b -> b.getSkill().getBuffType().isDance()).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets all the active negative effects on this effect list.
|
* Gets all the active negative effects on this effect list.
|
||||||
* @return all the debuffs on this effect list
|
* @return all the debuffs on this effect list
|
||||||
|
@ -1059,8 +1059,25 @@ public final class Formulas
|
|||||||
final int cancelMagicLvl = skill.getMagicLevel();
|
final int cancelMagicLvl = skill.getMagicLevel();
|
||||||
|
|
||||||
// Prevent initialization.
|
// Prevent initialization.
|
||||||
final List<BuffInfo> buffs = target.getEffectList().getBuffs();
|
final List<BuffInfo> dances = target.getEffectList().getDances();
|
||||||
|
for (int i = dances.size() - 1; i >= 0; i--) // reverse order
|
||||||
|
{
|
||||||
|
final BuffInfo info = dances.get(i);
|
||||||
|
if (!info.getSkill().canBeStolen() || ((rate < 100) && !calcCancelSuccess(info, cancelMagicLvl, rate, skill, target)))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
canceled.add(info);
|
||||||
|
if (canceled.size() >= max)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canceled.size() < max)
|
||||||
|
{
|
||||||
|
// Prevent initialization.
|
||||||
|
final List<BuffInfo> buffs = target.getEffectList().getBuffs();
|
||||||
for (int i = buffs.size() - 1; i >= 0; i--) // reverse order
|
for (int i = buffs.size() - 1; i >= 0; i--) // reverse order
|
||||||
{
|
{
|
||||||
final BuffInfo info = buffs.get(i);
|
final BuffInfo info = buffs.get(i);
|
||||||
@ -1074,6 +1091,7 @@ public final class Formulas
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DEBUFF:
|
case DEBUFF:
|
||||||
|
@ -140,6 +140,15 @@ public final class CharEffectList
|
|||||||
return _actives.stream().filter(b -> b.getSkill().getBuffType().isBuff()).collect(Collectors.toList());
|
return _actives.stream().filter(b -> b.getSkill().getBuffType().isBuff()).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets all the active positive effects on this effect list.
|
||||||
|
* @return all the dances songs on this effect list
|
||||||
|
*/
|
||||||
|
public List<BuffInfo> getDances()
|
||||||
|
{
|
||||||
|
return _actives.stream().filter(b -> b.getSkill().getBuffType().isDance()).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets all the active negative effects on this effect list.
|
* Gets all the active negative effects on this effect list.
|
||||||
* @return all the debuffs on this effect list
|
* @return all the debuffs on this effect list
|
||||||
|
@ -1059,8 +1059,25 @@ public final class Formulas
|
|||||||
final int cancelMagicLvl = skill.getMagicLevel();
|
final int cancelMagicLvl = skill.getMagicLevel();
|
||||||
|
|
||||||
// Prevent initialization.
|
// Prevent initialization.
|
||||||
final List<BuffInfo> buffs = target.getEffectList().getBuffs();
|
final List<BuffInfo> dances = target.getEffectList().getDances();
|
||||||
|
for (int i = dances.size() - 1; i >= 0; i--) // reverse order
|
||||||
|
{
|
||||||
|
final BuffInfo info = dances.get(i);
|
||||||
|
if (!info.getSkill().canBeStolen() || ((rate < 100) && !calcCancelSuccess(info, cancelMagicLvl, rate, skill, target)))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
canceled.add(info);
|
||||||
|
if (canceled.size() >= max)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canceled.size() < max)
|
||||||
|
{
|
||||||
|
// Prevent initialization.
|
||||||
|
final List<BuffInfo> buffs = target.getEffectList().getBuffs();
|
||||||
for (int i = buffs.size() - 1; i >= 0; i--) // reverse order
|
for (int i = buffs.size() - 1; i >= 0; i--) // reverse order
|
||||||
{
|
{
|
||||||
final BuffInfo info = buffs.get(i);
|
final BuffInfo info = buffs.get(i);
|
||||||
@ -1074,6 +1091,7 @@ public final class Formulas
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DEBUFF:
|
case DEBUFF:
|
||||||
|
@ -140,6 +140,15 @@ public final class CharEffectList
|
|||||||
return _actives.stream().filter(b -> b.getSkill().getBuffType().isBuff()).collect(Collectors.toList());
|
return _actives.stream().filter(b -> b.getSkill().getBuffType().isBuff()).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets all the active positive effects on this effect list.
|
||||||
|
* @return all the dances songs on this effect list
|
||||||
|
*/
|
||||||
|
public List<BuffInfo> getDances()
|
||||||
|
{
|
||||||
|
return _actives.stream().filter(b -> b.getSkill().getBuffType().isDance()).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets all the active negative effects on this effect list.
|
* Gets all the active negative effects on this effect list.
|
||||||
* @return all the debuffs on this effect list
|
* @return all the debuffs on this effect list
|
||||||
|
@ -1059,8 +1059,25 @@ public final class Formulas
|
|||||||
final int cancelMagicLvl = skill.getMagicLevel();
|
final int cancelMagicLvl = skill.getMagicLevel();
|
||||||
|
|
||||||
// Prevent initialization.
|
// Prevent initialization.
|
||||||
final List<BuffInfo> buffs = target.getEffectList().getBuffs();
|
final List<BuffInfo> dances = target.getEffectList().getDances();
|
||||||
|
for (int i = dances.size() - 1; i >= 0; i--) // reverse order
|
||||||
|
{
|
||||||
|
final BuffInfo info = dances.get(i);
|
||||||
|
if (!info.getSkill().canBeStolen() || ((rate < 100) && !calcCancelSuccess(info, cancelMagicLvl, rate, skill, target)))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
canceled.add(info);
|
||||||
|
if (canceled.size() >= max)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canceled.size() < max)
|
||||||
|
{
|
||||||
|
// Prevent initialization.
|
||||||
|
final List<BuffInfo> buffs = target.getEffectList().getBuffs();
|
||||||
for (int i = buffs.size() - 1; i >= 0; i--) // reverse order
|
for (int i = buffs.size() - 1; i >= 0; i--) // reverse order
|
||||||
{
|
{
|
||||||
final BuffInfo info = buffs.get(i);
|
final BuffInfo info = buffs.get(i);
|
||||||
@ -1074,6 +1091,7 @@ public final class Formulas
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DEBUFF:
|
case DEBUFF:
|
||||||
|
@ -140,6 +140,15 @@ public final class CharEffectList
|
|||||||
return _actives.stream().filter(b -> b.getSkill().getBuffType().isBuff()).collect(Collectors.toList());
|
return _actives.stream().filter(b -> b.getSkill().getBuffType().isBuff()).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets all the active positive effects on this effect list.
|
||||||
|
* @return all the dances songs on this effect list
|
||||||
|
*/
|
||||||
|
public List<BuffInfo> getDances()
|
||||||
|
{
|
||||||
|
return _actives.stream().filter(b -> b.getSkill().getBuffType().isDance()).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets all the active negative effects on this effect list.
|
* Gets all the active negative effects on this effect list.
|
||||||
* @return all the debuffs on this effect list
|
* @return all the debuffs on this effect list
|
||||||
|
@ -1059,8 +1059,25 @@ public final class Formulas
|
|||||||
final int cancelMagicLvl = skill.getMagicLevel();
|
final int cancelMagicLvl = skill.getMagicLevel();
|
||||||
|
|
||||||
// Prevent initialization.
|
// Prevent initialization.
|
||||||
final List<BuffInfo> buffs = target.getEffectList().getBuffs();
|
final List<BuffInfo> dances = target.getEffectList().getDances();
|
||||||
|
for (int i = dances.size() - 1; i >= 0; i--) // reverse order
|
||||||
|
{
|
||||||
|
final BuffInfo info = dances.get(i);
|
||||||
|
if (!info.getSkill().canBeStolen() || ((rate < 100) && !calcCancelSuccess(info, cancelMagicLvl, rate, skill, target)))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
canceled.add(info);
|
||||||
|
if (canceled.size() >= max)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canceled.size() < max)
|
||||||
|
{
|
||||||
|
// Prevent initialization.
|
||||||
|
final List<BuffInfo> buffs = target.getEffectList().getBuffs();
|
||||||
for (int i = buffs.size() - 1; i >= 0; i--) // reverse order
|
for (int i = buffs.size() - 1; i >= 0; i--) // reverse order
|
||||||
{
|
{
|
||||||
final BuffInfo info = buffs.get(i);
|
final BuffInfo info = buffs.get(i);
|
||||||
@ -1074,6 +1091,7 @@ public final class Formulas
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DEBUFF:
|
case DEBUFF:
|
||||||
|
@ -140,6 +140,15 @@ public final class CharEffectList
|
|||||||
return _actives.stream().filter(b -> b.getSkill().getBuffType().isBuff()).collect(Collectors.toList());
|
return _actives.stream().filter(b -> b.getSkill().getBuffType().isBuff()).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets all the active positive effects on this effect list.
|
||||||
|
* @return all the dances songs on this effect list
|
||||||
|
*/
|
||||||
|
public List<BuffInfo> getDances()
|
||||||
|
{
|
||||||
|
return _actives.stream().filter(b -> b.getSkill().getBuffType().isDance()).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets all the active negative effects on this effect list.
|
* Gets all the active negative effects on this effect list.
|
||||||
* @return all the debuffs on this effect list
|
* @return all the debuffs on this effect list
|
||||||
|
@ -1059,8 +1059,25 @@ public final class Formulas
|
|||||||
final int cancelMagicLvl = skill.getMagicLevel();
|
final int cancelMagicLvl = skill.getMagicLevel();
|
||||||
|
|
||||||
// Prevent initialization.
|
// Prevent initialization.
|
||||||
final List<BuffInfo> buffs = target.getEffectList().getBuffs();
|
final List<BuffInfo> dances = target.getEffectList().getDances();
|
||||||
|
for (int i = dances.size() - 1; i >= 0; i--) // reverse order
|
||||||
|
{
|
||||||
|
final BuffInfo info = dances.get(i);
|
||||||
|
if (!info.getSkill().canBeStolen() || ((rate < 100) && !calcCancelSuccess(info, cancelMagicLvl, rate, skill, target)))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
canceled.add(info);
|
||||||
|
if (canceled.size() >= max)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canceled.size() < max)
|
||||||
|
{
|
||||||
|
// Prevent initialization.
|
||||||
|
final List<BuffInfo> buffs = target.getEffectList().getBuffs();
|
||||||
for (int i = buffs.size() - 1; i >= 0; i--) // reverse order
|
for (int i = buffs.size() - 1; i >= 0; i--) // reverse order
|
||||||
{
|
{
|
||||||
final BuffInfo info = buffs.get(i);
|
final BuffInfo info = buffs.get(i);
|
||||||
@ -1074,6 +1091,7 @@ public final class Formulas
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DEBUFF:
|
case DEBUFF:
|
||||||
|
Loading…
Reference in New Issue
Block a user