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