EffectHandlers related question.
Posted: Sun Jul 19, 2015 3:02 am
Hello there,
As a newbie i am trying to understand various things related to L2J.
For now i am trying to create a simple skill effect that sets a monsters HP to 1 just to practice and move to more complicated stuff in the future.
What have i done so far:
The skill effect:
Added it to EffectMasterHandler like this:
and the XML part:
The effect does not seem to work. The attack fires but the hp of the monster does not being reduced
Thanks for your time and applauses for your outstanding work
As a newbie i am trying to understand various things related to L2J.
For now i am trying to create a simple skill effect that sets a monsters HP to 1 just to practice and move to more complicated stuff in the future.
What have i done so far:
The skill effect:
Code: Select all
public class ReduceHp extends AbstractEffect
{
/**
* @param attachCond
* @param applyCond
* @param set
* @param params
*/
public ReduceHp(Condition attachCond, Condition applyCond, StatsSet set, StatsSet params)
{
super(attachCond, applyCond, set, params);
}
@Override
public void onStart(BuffInfo info)
{
L2Character target = info.getEffected();
if (target.isMonster())
{
target.setCurrentHp(1);
}
}
}
Code: Select all
...,
ReduceHp.class,
...,
Code: Select all
<for>
<effect name="ReduceHp"/>
</for>
Thanks for your time and applauses for your outstanding work
