Removed duplicate element AbnornalLvl in favor of AbnormalLevel.
This commit is contained in:
@@ -1034,7 +1034,7 @@ public class AttackableAI extends CreatureAI
|
||||
// Skip if target is already affected by such skill.
|
||||
if (skill.isContinuous())
|
||||
{
|
||||
if (((Creature) target).getEffectList().hasAbnormalType(skill.getAbnormalType(), i -> (i.getSkill().getAbnormalLvl() >= skill.getAbnormalLvl())))
|
||||
if (((Creature) target).getEffectList().hasAbnormalType(skill.getAbnormalType(), i -> (i.getSkill().getAbnormalLevel() >= skill.getAbnormalLevel())))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@@ -966,7 +966,7 @@ public class EffectList
|
||||
}
|
||||
|
||||
// The effect we are adding overrides the existing effect. Delete or disable the existing effect.
|
||||
if (skill.getAbnormalLvl() >= existingSkill.getAbnormalLvl())
|
||||
if (skill.getAbnormalLevel() >= existingSkill.getAbnormalLevel())
|
||||
{
|
||||
// If it is an herb, set as not in use the lesser buff, unless it is the same skill.
|
||||
if ((skill.isAbnormalInstant() || existingSkill.isIrreplacableBuff()) && (skill.getId() != existingSkill.getId()))
|
||||
@@ -1215,7 +1215,7 @@ public class EffectList
|
||||
unhideBuffs.removeIf(b -> b.isAbnormalType(skill.getAbnormalType()));
|
||||
}
|
||||
// If this incoming buff is hidden and its first of its abnormal, or it removes any previous hidden buff with the same or lower abnormal level and add this instead.
|
||||
else if (!abnormalTypeFlags.contains(skill.getAbnormalType()) || unhideBuffs.removeIf(b -> (b.isAbnormalType(skill.getAbnormalType())) && (b.getSkill().getAbnormalLvl() <= skill.getAbnormalLvl())))
|
||||
else if (!abnormalTypeFlags.contains(skill.getAbnormalType()) || unhideBuffs.removeIf(b -> (b.isAbnormalType(skill.getAbnormalType())) && (b.getSkill().getAbnormalLevel() <= skill.getAbnormalLevel())))
|
||||
{
|
||||
unhideBuffs.add(info);
|
||||
}
|
||||
|
@@ -58,6 +58,6 @@ public class ConditionPlayerCheckAbnormal extends Condition
|
||||
{
|
||||
return effector.getEffectList().hasAbnormalType(_type);
|
||||
}
|
||||
return effector.getEffectList().hasAbnormalType(_type, info -> _level >= info.getSkill().getAbnormalLvl());
|
||||
return effector.getEffectList().hasAbnormalType(_type, info -> _level >= info.getSkill().getAbnormalLevel());
|
||||
}
|
||||
}
|
||||
|
@@ -107,7 +107,7 @@ public class Skill implements IIdentifiable
|
||||
/** Abnormal instant, used for herbs mostly. */
|
||||
private final boolean _isAbnormalInstant;
|
||||
/** Abnormal level, global effect level. */
|
||||
private final int _abnormalLvl;
|
||||
private final int _abnormalLevel;
|
||||
/** Abnormal type: global effect "group". */
|
||||
private final AbnormalType _abnormalType;
|
||||
/** Abnormal type: local effect "group". */
|
||||
@@ -233,7 +233,7 @@ public class Skill implements IIdentifiable
|
||||
_clanRepConsume = set.getInt("clanRepConsume", 0);
|
||||
_castRange = set.getInt("castRange", -1);
|
||||
_effectRange = set.getInt("effectRange", -1);
|
||||
_abnormalLvl = set.getInt("abnormalLvl", 0);
|
||||
_abnormalLevel = set.getInt("abnormalLevel", 0);
|
||||
_abnormalType = set.getEnum("abnormalType", AbnormalType.class, AbnormalType.NONE);
|
||||
_subordinationAbnormalType = set.getEnum("subordinationAbnormalType", AbnormalType.class, AbnormalType.NONE);
|
||||
int abnormalTime = set.getInt("abnormalTime", 0);
|
||||
@@ -478,9 +478,9 @@ public class Skill implements IIdentifiable
|
||||
* Gets the skill abnormal level.
|
||||
* @return the skill abnormal level
|
||||
*/
|
||||
public int getAbnormalLvl()
|
||||
public int getAbnormalLevel()
|
||||
{
|
||||
return _abnormalLvl;
|
||||
return _abnormalLevel;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user