Addition of TriggerSkillByDamage hpPercent parameter.

This commit is contained in:
MobiusDevelopment 2020-03-12 09:39:13 +00:00
parent 841e36e06b
commit 707f988a47
15 changed files with 105 additions and 0 deletions

View File

@ -44,6 +44,7 @@ public class TriggerSkillByDamage extends AbstractEffect
private final int _maxAttackerLevel;
private final int _minDamage;
private final int _chance;
private final int _hpPercent;
private final SkillHolder _skill;
private final TargetType _targetType;
private final InstanceType _attackerType;
@ -54,6 +55,7 @@ public class TriggerSkillByDamage extends AbstractEffect
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
_minDamage = params.getInt("minDamage", 1);
_chance = params.getInt("chance", 100);
_hpPercent = params.getInt("hpPercent", 100);
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
@ -76,6 +78,11 @@ public class TriggerSkillByDamage extends AbstractEffect
return;
}
if (event.getAttacker().getCurrentHpPercent() > _hpPercent)
{
return;
}
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
{
return;

View File

@ -44,6 +44,7 @@ public class TriggerSkillByDamage extends AbstractEffect
private final int _maxAttackerLevel;
private final int _minDamage;
private final int _chance;
private final int _hpPercent;
private final SkillHolder _skill;
private final TargetType _targetType;
private final InstanceType _attackerType;
@ -54,6 +55,7 @@ public class TriggerSkillByDamage extends AbstractEffect
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
_minDamage = params.getInt("minDamage", 1);
_chance = params.getInt("chance", 100);
_hpPercent = params.getInt("hpPercent", 100);
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
@ -76,6 +78,11 @@ public class TriggerSkillByDamage extends AbstractEffect
return;
}
if (event.getAttacker().getCurrentHpPercent() > _hpPercent)
{
return;
}
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
{
return;

View File

@ -44,6 +44,7 @@ public class TriggerSkillByDamage extends AbstractEffect
private final int _maxAttackerLevel;
private final int _minDamage;
private final int _chance;
private final int _hpPercent;
private final SkillHolder _skill;
private final TargetType _targetType;
private final InstanceType _attackerType;
@ -54,6 +55,7 @@ public class TriggerSkillByDamage extends AbstractEffect
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
_minDamage = params.getInt("minDamage", 1);
_chance = params.getInt("chance", 100);
_hpPercent = params.getInt("hpPercent", 100);
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
@ -76,6 +78,11 @@ public class TriggerSkillByDamage extends AbstractEffect
return;
}
if (event.getAttacker().getCurrentHpPercent() > _hpPercent)
{
return;
}
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
{
return;

View File

@ -44,6 +44,7 @@ public class TriggerSkillByDamage extends AbstractEffect
private final int _maxAttackerLevel;
private final int _minDamage;
private final int _chance;
private final int _hpPercent;
private final SkillHolder _skill;
private final TargetType _targetType;
private final InstanceType _attackerType;
@ -54,6 +55,7 @@ public class TriggerSkillByDamage extends AbstractEffect
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
_minDamage = params.getInt("minDamage", 1);
_chance = params.getInt("chance", 100);
_hpPercent = params.getInt("hpPercent", 100);
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
@ -76,6 +78,11 @@ public class TriggerSkillByDamage extends AbstractEffect
return;
}
if (event.getAttacker().getCurrentHpPercent() > _hpPercent)
{
return;
}
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
{
return;

View File

@ -44,6 +44,7 @@ public class TriggerSkillByDamage extends AbstractEffect
private final int _maxAttackerLevel;
private final int _minDamage;
private final int _chance;
private final int _hpPercent;
private final SkillHolder _skill;
private final TargetType _targetType;
private final InstanceType _attackerType;
@ -54,6 +55,7 @@ public class TriggerSkillByDamage extends AbstractEffect
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
_minDamage = params.getInt("minDamage", 1);
_chance = params.getInt("chance", 100);
_hpPercent = params.getInt("hpPercent", 100);
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
@ -76,6 +78,11 @@ public class TriggerSkillByDamage extends AbstractEffect
return;
}
if (event.getAttacker().getCurrentHpPercent() > _hpPercent)
{
return;
}
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
{
return;

View File

@ -44,6 +44,7 @@ public class TriggerSkillByDamage extends AbstractEffect
private final int _maxAttackerLevel;
private final int _minDamage;
private final int _chance;
private final int _hpPercent;
private final SkillHolder _skill;
private final TargetType _targetType;
private final InstanceType _attackerType;
@ -54,6 +55,7 @@ public class TriggerSkillByDamage extends AbstractEffect
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
_minDamage = params.getInt("minDamage", 1);
_chance = params.getInt("chance", 100);
_hpPercent = params.getInt("hpPercent", 100);
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
@ -76,6 +78,11 @@ public class TriggerSkillByDamage extends AbstractEffect
return;
}
if (event.getAttacker().getCurrentHpPercent() > _hpPercent)
{
return;
}
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
{
return;

View File

@ -44,6 +44,7 @@ public class TriggerSkillByDamage extends AbstractEffect
private final int _maxAttackerLevel;
private final int _minDamage;
private final int _chance;
private final int _hpPercent;
private final SkillHolder _skill;
private final TargetType _targetType;
private final InstanceType _attackerType;
@ -54,6 +55,7 @@ public class TriggerSkillByDamage extends AbstractEffect
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
_minDamage = params.getInt("minDamage", 1);
_chance = params.getInt("chance", 100);
_hpPercent = params.getInt("hpPercent", 100);
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
@ -76,6 +78,11 @@ public class TriggerSkillByDamage extends AbstractEffect
return;
}
if (event.getAttacker().getCurrentHpPercent() > _hpPercent)
{
return;
}
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
{
return;

View File

@ -44,6 +44,7 @@ public class TriggerSkillByDamage extends AbstractEffect
private final int _maxAttackerLevel;
private final int _minDamage;
private final int _chance;
private final int _hpPercent;
private final SkillHolder _skill;
private final TargetType _targetType;
private final InstanceType _attackerType;
@ -54,6 +55,7 @@ public class TriggerSkillByDamage extends AbstractEffect
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
_minDamage = params.getInt("minDamage", 1);
_chance = params.getInt("chance", 100);
_hpPercent = params.getInt("hpPercent", 100);
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
@ -76,6 +78,11 @@ public class TriggerSkillByDamage extends AbstractEffect
return;
}
if (event.getAttacker().getCurrentHpPercent() > _hpPercent)
{
return;
}
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
{
return;

View File

@ -44,6 +44,7 @@ public class TriggerSkillByDamage extends AbstractEffect
private final int _maxAttackerLevel;
private final int _minDamage;
private final int _chance;
private final int _hpPercent;
private final SkillHolder _skill;
private final TargetType _targetType;
private final InstanceType _attackerType;
@ -54,6 +55,7 @@ public class TriggerSkillByDamage extends AbstractEffect
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
_minDamage = params.getInt("minDamage", 1);
_chance = params.getInt("chance", 100);
_hpPercent = params.getInt("hpPercent", 100);
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
@ -76,6 +78,11 @@ public class TriggerSkillByDamage extends AbstractEffect
return;
}
if (event.getAttacker().getCurrentHpPercent() > _hpPercent)
{
return;
}
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
{
return;

View File

@ -44,6 +44,7 @@ public class TriggerSkillByDamage extends AbstractEffect
private final int _maxAttackerLevel;
private final int _minDamage;
private final int _chance;
private final int _hpPercent;
private final SkillHolder _skill;
private final TargetType _targetType;
private final InstanceType _attackerType;
@ -54,6 +55,7 @@ public class TriggerSkillByDamage extends AbstractEffect
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
_minDamage = params.getInt("minDamage", 1);
_chance = params.getInt("chance", 100);
_hpPercent = params.getInt("hpPercent", 100);
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
@ -76,6 +78,11 @@ public class TriggerSkillByDamage extends AbstractEffect
return;
}
if (event.getAttacker().getCurrentHpPercent() > _hpPercent)
{
return;
}
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
{
return;

View File

@ -44,6 +44,7 @@ public class TriggerSkillByDamage extends AbstractEffect
private final int _maxAttackerLevel;
private final int _minDamage;
private final int _chance;
private final int _hpPercent;
private final SkillHolder _skill;
private final TargetType _targetType;
private final InstanceType _attackerType;
@ -54,6 +55,7 @@ public class TriggerSkillByDamage extends AbstractEffect
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
_minDamage = params.getInt("minDamage", 1);
_chance = params.getInt("chance", 100);
_hpPercent = params.getInt("hpPercent", 100);
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
@ -76,6 +78,11 @@ public class TriggerSkillByDamage extends AbstractEffect
return;
}
if (event.getAttacker().getCurrentHpPercent() > _hpPercent)
{
return;
}
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
{
return;

View File

@ -44,6 +44,7 @@ public class TriggerSkillByDamage extends AbstractEffect
private final int _maxAttackerLevel;
private final int _minDamage;
private final int _chance;
private final int _hpPercent;
private final SkillHolder _skill;
private final TargetType _targetType;
private final InstanceType _attackerType;
@ -54,6 +55,7 @@ public class TriggerSkillByDamage extends AbstractEffect
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
_minDamage = params.getInt("minDamage", 1);
_chance = params.getInt("chance", 100);
_hpPercent = params.getInt("hpPercent", 100);
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
@ -76,6 +78,11 @@ public class TriggerSkillByDamage extends AbstractEffect
return;
}
if (event.getAttacker().getCurrentHpPercent() > _hpPercent)
{
return;
}
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
{
return;

View File

@ -44,6 +44,7 @@ public class TriggerSkillByDamage extends AbstractEffect
private final int _maxAttackerLevel;
private final int _minDamage;
private final int _chance;
private final int _hpPercent;
private final SkillHolder _skill;
private final TargetType _targetType;
private final InstanceType _attackerType;
@ -54,6 +55,7 @@ public class TriggerSkillByDamage extends AbstractEffect
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
_minDamage = params.getInt("minDamage", 1);
_chance = params.getInt("chance", 100);
_hpPercent = params.getInt("hpPercent", 100);
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
@ -76,6 +78,11 @@ public class TriggerSkillByDamage extends AbstractEffect
return;
}
if (event.getAttacker().getCurrentHpPercent() > _hpPercent)
{
return;
}
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
{
return;

View File

@ -44,6 +44,7 @@ public class TriggerSkillByDamage extends AbstractEffect
private final int _maxAttackerLevel;
private final int _minDamage;
private final int _chance;
private final int _hpPercent;
private final SkillHolder _skill;
private final TargetType _targetType;
private final InstanceType _attackerType;
@ -54,6 +55,7 @@ public class TriggerSkillByDamage extends AbstractEffect
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
_minDamage = params.getInt("minDamage", 1);
_chance = params.getInt("chance", 100);
_hpPercent = params.getInt("hpPercent", 100);
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
@ -76,6 +78,11 @@ public class TriggerSkillByDamage extends AbstractEffect
return;
}
if (event.getAttacker().getCurrentHpPercent() > _hpPercent)
{
return;
}
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
{
return;

View File

@ -44,6 +44,7 @@ public class TriggerSkillByDamage extends AbstractEffect
private final int _maxAttackerLevel;
private final int _minDamage;
private final int _chance;
private final int _hpPercent;
private final SkillHolder _skill;
private final TargetType _targetType;
private final InstanceType _attackerType;
@ -54,6 +55,7 @@ public class TriggerSkillByDamage extends AbstractEffect
_maxAttackerLevel = params.getInt("maxAttackerLevel", 127);
_minDamage = params.getInt("minDamage", 1);
_chance = params.getInt("chance", 100);
_hpPercent = params.getInt("hpPercent", 100);
_skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1));
_targetType = params.getEnum("targetType", TargetType.class, TargetType.SELF);
_attackerType = params.getEnum("attackerType", InstanceType.class, InstanceType.Creature);
@ -76,6 +78,11 @@ public class TriggerSkillByDamage extends AbstractEffect
return;
}
if (event.getAttacker().getCurrentHpPercent() > _hpPercent)
{
return;
}
if ((event.getDamage() < _minDamage) || ((_chance < 100) && (Rnd.get(100) > _chance)) || !event.getAttacker().getInstanceType().isType(_attackerType))
{
return;