Addition of TriggerSkillByDamage hpPercent parameter.
This commit is contained in:
parent
841e36e06b
commit
707f988a47
@ -44,6 +44,7 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
private final int _maxAttackerLevel;
|
private final int _maxAttackerLevel;
|
||||||
private final int _minDamage;
|
private final int _minDamage;
|
||||||
private final int _chance;
|
private final int _chance;
|
||||||
|
private final int _hpPercent;
|
||||||
private final SkillHolder _skill;
|
private final SkillHolder _skill;
|
||||||
private final TargetType _targetType;
|
private final TargetType _targetType;
|
||||||
private final InstanceType _attackerType;
|
private final InstanceType _attackerType;
|
||||||
@ -54,6 +55,7 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
|
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
|
||||||
_minDamage = params.getInt("minDamage", 1);
|
_minDamage = params.getInt("minDamage", 1);
|
||||||
_chance = params.getInt("chance", 100);
|
_chance = params.getInt("chance", 100);
|
||||||
|
_hpPercent = params.getInt("hpPercent", 100);
|
||||||
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
|
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
|
||||||
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
|
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
|
||||||
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
|
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
|
||||||
@ -76,6 +78,11 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (event.getAttacker().getCurrentHpPercent() > _hpPercent)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
|
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -44,6 +44,7 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
private final int _maxAttackerLevel;
|
private final int _maxAttackerLevel;
|
||||||
private final int _minDamage;
|
private final int _minDamage;
|
||||||
private final int _chance;
|
private final int _chance;
|
||||||
|
private final int _hpPercent;
|
||||||
private final SkillHolder _skill;
|
private final SkillHolder _skill;
|
||||||
private final TargetType _targetType;
|
private final TargetType _targetType;
|
||||||
private final InstanceType _attackerType;
|
private final InstanceType _attackerType;
|
||||||
@ -54,6 +55,7 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
|
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
|
||||||
_minDamage = params.getInt("minDamage", 1);
|
_minDamage = params.getInt("minDamage", 1);
|
||||||
_chance = params.getInt("chance", 100);
|
_chance = params.getInt("chance", 100);
|
||||||
|
_hpPercent = params.getInt("hpPercent", 100);
|
||||||
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
|
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
|
||||||
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
|
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
|
||||||
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
|
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
|
||||||
@ -76,6 +78,11 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (event.getAttacker().getCurrentHpPercent() > _hpPercent)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
|
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -44,6 +44,7 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
private final int _maxAttackerLevel;
|
private final int _maxAttackerLevel;
|
||||||
private final int _minDamage;
|
private final int _minDamage;
|
||||||
private final int _chance;
|
private final int _chance;
|
||||||
|
private final int _hpPercent;
|
||||||
private final SkillHolder _skill;
|
private final SkillHolder _skill;
|
||||||
private final TargetType _targetType;
|
private final TargetType _targetType;
|
||||||
private final InstanceType _attackerType;
|
private final InstanceType _attackerType;
|
||||||
@ -54,6 +55,7 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
|
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
|
||||||
_minDamage = params.getInt("minDamage", 1);
|
_minDamage = params.getInt("minDamage", 1);
|
||||||
_chance = params.getInt("chance", 100);
|
_chance = params.getInt("chance", 100);
|
||||||
|
_hpPercent = params.getInt("hpPercent", 100);
|
||||||
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
|
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
|
||||||
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
|
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
|
||||||
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
|
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
|
||||||
@ -76,6 +78,11 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (event.getAttacker().getCurrentHpPercent() > _hpPercent)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
|
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -44,6 +44,7 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
private final int _maxAttackerLevel;
|
private final int _maxAttackerLevel;
|
||||||
private final int _minDamage;
|
private final int _minDamage;
|
||||||
private final int _chance;
|
private final int _chance;
|
||||||
|
private final int _hpPercent;
|
||||||
private final SkillHolder _skill;
|
private final SkillHolder _skill;
|
||||||
private final TargetType _targetType;
|
private final TargetType _targetType;
|
||||||
private final InstanceType _attackerType;
|
private final InstanceType _attackerType;
|
||||||
@ -54,6 +55,7 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
|
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
|
||||||
_minDamage = params.getInt("minDamage", 1);
|
_minDamage = params.getInt("minDamage", 1);
|
||||||
_chance = params.getInt("chance", 100);
|
_chance = params.getInt("chance", 100);
|
||||||
|
_hpPercent = params.getInt("hpPercent", 100);
|
||||||
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
|
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
|
||||||
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
|
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
|
||||||
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
|
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
|
||||||
@ -76,6 +78,11 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (event.getAttacker().getCurrentHpPercent() > _hpPercent)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
|
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -44,6 +44,7 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
private final int _maxAttackerLevel;
|
private final int _maxAttackerLevel;
|
||||||
private final int _minDamage;
|
private final int _minDamage;
|
||||||
private final int _chance;
|
private final int _chance;
|
||||||
|
private final int _hpPercent;
|
||||||
private final SkillHolder _skill;
|
private final SkillHolder _skill;
|
||||||
private final TargetType _targetType;
|
private final TargetType _targetType;
|
||||||
private final InstanceType _attackerType;
|
private final InstanceType _attackerType;
|
||||||
@ -54,6 +55,7 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
|
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
|
||||||
_minDamage = params.getInt("minDamage", 1);
|
_minDamage = params.getInt("minDamage", 1);
|
||||||
_chance = params.getInt("chance", 100);
|
_chance = params.getInt("chance", 100);
|
||||||
|
_hpPercent = params.getInt("hpPercent", 100);
|
||||||
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
|
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
|
||||||
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
|
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
|
||||||
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
|
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
|
||||||
@ -76,6 +78,11 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (event.getAttacker().getCurrentHpPercent() > _hpPercent)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
|
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -44,6 +44,7 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
private final int _maxAttackerLevel;
|
private final int _maxAttackerLevel;
|
||||||
private final int _minDamage;
|
private final int _minDamage;
|
||||||
private final int _chance;
|
private final int _chance;
|
||||||
|
private final int _hpPercent;
|
||||||
private final SkillHolder _skill;
|
private final SkillHolder _skill;
|
||||||
private final TargetType _targetType;
|
private final TargetType _targetType;
|
||||||
private final InstanceType _attackerType;
|
private final InstanceType _attackerType;
|
||||||
@ -54,6 +55,7 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
|
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
|
||||||
_minDamage = params.getInt("minDamage", 1);
|
_minDamage = params.getInt("minDamage", 1);
|
||||||
_chance = params.getInt("chance", 100);
|
_chance = params.getInt("chance", 100);
|
||||||
|
_hpPercent = params.getInt("hpPercent", 100);
|
||||||
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
|
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
|
||||||
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
|
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
|
||||||
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
|
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
|
||||||
@ -76,6 +78,11 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (event.getAttacker().getCurrentHpPercent() > _hpPercent)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
|
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -44,6 +44,7 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
private final int _maxAttackerLevel;
|
private final int _maxAttackerLevel;
|
||||||
private final int _minDamage;
|
private final int _minDamage;
|
||||||
private final int _chance;
|
private final int _chance;
|
||||||
|
private final int _hpPercent;
|
||||||
private final SkillHolder _skill;
|
private final SkillHolder _skill;
|
||||||
private final TargetType _targetType;
|
private final TargetType _targetType;
|
||||||
private final InstanceType _attackerType;
|
private final InstanceType _attackerType;
|
||||||
@ -54,6 +55,7 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
|
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
|
||||||
_minDamage = params.getInt("minDamage", 1);
|
_minDamage = params.getInt("minDamage", 1);
|
||||||
_chance = params.getInt("chance", 100);
|
_chance = params.getInt("chance", 100);
|
||||||
|
_hpPercent = params.getInt("hpPercent", 100);
|
||||||
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
|
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
|
||||||
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
|
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
|
||||||
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
|
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
|
||||||
@ -76,6 +78,11 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (event.getAttacker().getCurrentHpPercent() > _hpPercent)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
|
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -44,6 +44,7 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
private final int _maxAttackerLevel;
|
private final int _maxAttackerLevel;
|
||||||
private final int _minDamage;
|
private final int _minDamage;
|
||||||
private final int _chance;
|
private final int _chance;
|
||||||
|
private final int _hpPercent;
|
||||||
private final SkillHolder _skill;
|
private final SkillHolder _skill;
|
||||||
private final TargetType _targetType;
|
private final TargetType _targetType;
|
||||||
private final InstanceType _attackerType;
|
private final InstanceType _attackerType;
|
||||||
@ -54,6 +55,7 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
|
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
|
||||||
_minDamage = params.getInt("minDamage", 1);
|
_minDamage = params.getInt("minDamage", 1);
|
||||||
_chance = params.getInt("chance", 100);
|
_chance = params.getInt("chance", 100);
|
||||||
|
_hpPercent = params.getInt("hpPercent", 100);
|
||||||
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
|
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
|
||||||
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
|
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
|
||||||
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
|
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
|
||||||
@ -76,6 +78,11 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (event.getAttacker().getCurrentHpPercent() > _hpPercent)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
|
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -44,6 +44,7 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
private final int _maxAttackerLevel;
|
private final int _maxAttackerLevel;
|
||||||
private final int _minDamage;
|
private final int _minDamage;
|
||||||
private final int _chance;
|
private final int _chance;
|
||||||
|
private final int _hpPercent;
|
||||||
private final SkillHolder _skill;
|
private final SkillHolder _skill;
|
||||||
private final TargetType _targetType;
|
private final TargetType _targetType;
|
||||||
private final InstanceType _attackerType;
|
private final InstanceType _attackerType;
|
||||||
@ -54,6 +55,7 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
|
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
|
||||||
_minDamage = params.getInt("minDamage", 1);
|
_minDamage = params.getInt("minDamage", 1);
|
||||||
_chance = params.getInt("chance", 100);
|
_chance = params.getInt("chance", 100);
|
||||||
|
_hpPercent = params.getInt("hpPercent", 100);
|
||||||
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
|
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
|
||||||
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
|
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
|
||||||
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
|
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
|
||||||
@ -76,6 +78,11 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (event.getAttacker().getCurrentHpPercent() > _hpPercent)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
|
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -44,6 +44,7 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
private final int _maxAttackerLevel;
|
private final int _maxAttackerLevel;
|
||||||
private final int _minDamage;
|
private final int _minDamage;
|
||||||
private final int _chance;
|
private final int _chance;
|
||||||
|
private final int _hpPercent;
|
||||||
private final SkillHolder _skill;
|
private final SkillHolder _skill;
|
||||||
private final TargetType _targetType;
|
private final TargetType _targetType;
|
||||||
private final InstanceType _attackerType;
|
private final InstanceType _attackerType;
|
||||||
@ -54,6 +55,7 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
|
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
|
||||||
_minDamage = params.getInt("minDamage", 1);
|
_minDamage = params.getInt("minDamage", 1);
|
||||||
_chance = params.getInt("chance", 100);
|
_chance = params.getInt("chance", 100);
|
||||||
|
_hpPercent = params.getInt("hpPercent", 100);
|
||||||
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
|
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
|
||||||
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
|
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
|
||||||
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
|
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
|
||||||
@ -76,6 +78,11 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (event.getAttacker().getCurrentHpPercent() > _hpPercent)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
|
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -44,6 +44,7 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
private final int _maxAttackerLevel;
|
private final int _maxAttackerLevel;
|
||||||
private final int _minDamage;
|
private final int _minDamage;
|
||||||
private final int _chance;
|
private final int _chance;
|
||||||
|
private final int _hpPercent;
|
||||||
private final SkillHolder _skill;
|
private final SkillHolder _skill;
|
||||||
private final TargetType _targetType;
|
private final TargetType _targetType;
|
||||||
private final InstanceType _attackerType;
|
private final InstanceType _attackerType;
|
||||||
@ -54,6 +55,7 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
|
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
|
||||||
_minDamage = params.getInt("minDamage", 1);
|
_minDamage = params.getInt("minDamage", 1);
|
||||||
_chance = params.getInt("chance", 100);
|
_chance = params.getInt("chance", 100);
|
||||||
|
_hpPercent = params.getInt("hpPercent", 100);
|
||||||
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
|
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
|
||||||
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
|
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
|
||||||
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
|
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
|
||||||
@ -76,6 +78,11 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (event.getAttacker().getCurrentHpPercent() > _hpPercent)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
|
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -44,6 +44,7 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
private final int _maxAttackerLevel;
|
private final int _maxAttackerLevel;
|
||||||
private final int _minDamage;
|
private final int _minDamage;
|
||||||
private final int _chance;
|
private final int _chance;
|
||||||
|
private final int _hpPercent;
|
||||||
private final SkillHolder _skill;
|
private final SkillHolder _skill;
|
||||||
private final TargetType _targetType;
|
private final TargetType _targetType;
|
||||||
private final InstanceType _attackerType;
|
private final InstanceType _attackerType;
|
||||||
@ -54,6 +55,7 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
|
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
|
||||||
_minDamage = params.getInt("minDamage", 1);
|
_minDamage = params.getInt("minDamage", 1);
|
||||||
_chance = params.getInt("chance", 100);
|
_chance = params.getInt("chance", 100);
|
||||||
|
_hpPercent = params.getInt("hpPercent", 100);
|
||||||
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
|
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
|
||||||
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
|
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
|
||||||
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
|
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
|
||||||
@ -76,6 +78,11 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (event.getAttacker().getCurrentHpPercent() > _hpPercent)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
|
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -44,6 +44,7 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
private final int _maxAttackerLevel;
|
private final int _maxAttackerLevel;
|
||||||
private final int _minDamage;
|
private final int _minDamage;
|
||||||
private final int _chance;
|
private final int _chance;
|
||||||
|
private final int _hpPercent;
|
||||||
private final SkillHolder _skill;
|
private final SkillHolder _skill;
|
||||||
private final TargetType _targetType;
|
private final TargetType _targetType;
|
||||||
private final InstanceType _attackerType;
|
private final InstanceType _attackerType;
|
||||||
@ -54,6 +55,7 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
|
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
|
||||||
_minDamage = params.getInt("minDamage", 1);
|
_minDamage = params.getInt("minDamage", 1);
|
||||||
_chance = params.getInt("chance", 100);
|
_chance = params.getInt("chance", 100);
|
||||||
|
_hpPercent = params.getInt("hpPercent", 100);
|
||||||
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
|
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
|
||||||
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
|
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
|
||||||
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
|
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
|
||||||
@ -76,6 +78,11 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (event.getAttacker().getCurrentHpPercent() > _hpPercent)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
|
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -44,6 +44,7 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
private final int _maxAttackerLevel;
|
private final int _maxAttackerLevel;
|
||||||
private final int _minDamage;
|
private final int _minDamage;
|
||||||
private final int _chance;
|
private final int _chance;
|
||||||
|
private final int _hpPercent;
|
||||||
private final SkillHolder _skill;
|
private final SkillHolder _skill;
|
||||||
private final TargetType _targetType;
|
private final TargetType _targetType;
|
||||||
private final InstanceType _attackerType;
|
private final InstanceType _attackerType;
|
||||||
@ -54,6 +55,7 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
|
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
|
||||||
_minDamage = params.getInt("minDamage", 1);
|
_minDamage = params.getInt("minDamage", 1);
|
||||||
_chance = params.getInt("chance", 100);
|
_chance = params.getInt("chance", 100);
|
||||||
|
_hpPercent = params.getInt("hpPercent", 100);
|
||||||
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
|
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
|
||||||
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
|
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
|
||||||
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
|
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
|
||||||
@ -76,6 +78,11 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (event.getAttacker().getCurrentHpPercent() > _hpPercent)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
|
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -44,6 +44,7 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
private final int _maxAttackerLevel;
|
private final int _maxAttackerLevel;
|
||||||
private final int _minDamage;
|
private final int _minDamage;
|
||||||
private final int _chance;
|
private final int _chance;
|
||||||
|
private final int _hpPercent;
|
||||||
private final SkillHolder _skill;
|
private final SkillHolder _skill;
|
||||||
private final TargetType _targetType;
|
private final TargetType _targetType;
|
||||||
private final InstanceType _attackerType;
|
private final InstanceType _attackerType;
|
||||||
@ -54,6 +55,7 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
|
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
|
||||||
_minDamage = params.getInt("minDamage", 1);
|
_minDamage = params.getInt("minDamage", 1);
|
||||||
_chance = params.getInt("chance", 100);
|
_chance = params.getInt("chance", 100);
|
||||||
|
_hpPercent = params.getInt("hpPercent", 100);
|
||||||
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
|
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
|
||||||
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
|
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
|
||||||
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
|
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
|
||||||
@ -76,6 +78,11 @@ public class TriggerSkillByDamage extends AbstractEffect
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (event.getAttacker().getCurrentHpPercent() > _hpPercent)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
|
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user