-Implemented some Jewel Boxes.

-Added SummonDebuff effect for Golden Lion & Lumi summons (apply on summoner when summon).
-Added stat hpRestoreOnKill - restoring n% hp when kill a enemy (mob or player) - example: Berserker skill.
-Updated id 10000-10279 range skills.
-Update TriggerForce effect for Rolling Thunder skill.

Contributed by NviX.
This commit is contained in:
MobiusDev
2015-07-12 21:19:09 +00:00
parent 747334ab81
commit 12b76e722e
16 changed files with 1199 additions and 577 deletions

View File

@ -18,14 +18,14 @@
*/
package handlers;
import handlers.effecthandlers.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.l2jserver.gameserver.handler.EffectHandler;
import com.l2jserver.gameserver.model.effects.AbstractEffect;
import handlers.effecthandlers.*;
/**
* Effect Master handler.
* @author BiggBoss, Zoey76
@ -175,6 +175,7 @@ public final class EffectMasterHandler
Summon.class,
SummonAgathion.class,
SummonCubic.class,
SummonDebuff.class,
SummonNpc.class,
SummonPet.class,
SummonTrap.class,

View File

@ -48,7 +48,8 @@ public final class FocusMaxEnergy extends AbstractEffect
{
final Skill sonicMastery = info.getEffected().getSkills().get(992);
final Skill focusMastery = info.getEffected().getSkills().get(993);
int maxCharge = (sonicMastery != null) ? sonicMastery.getLevel() : (focusMastery != null) ? focusMastery.getLevel() : 0;
final Skill maximumForceMastery = info.getEffected().getSkills().get(10301);
int maxCharge = (sonicMastery != null) ? sonicMastery.getLevel() : (focusMastery != null) ? focusMastery.getLevel() : (maximumForceMastery != null) ? 15 : 0;
if (maxCharge != 0)
{
int count = maxCharge - info.getEffected().getActingPlayer().getCharges();

View File

@ -28,6 +28,7 @@ import com.l2jserver.gameserver.model.actor.templates.L2NpcTemplate;
import com.l2jserver.gameserver.model.conditions.Condition;
import com.l2jserver.gameserver.model.effects.AbstractEffect;
import com.l2jserver.gameserver.model.holders.ItemHolder;
import com.l2jserver.gameserver.model.holders.SkillHolder;
import com.l2jserver.gameserver.model.skills.BuffInfo;
/**
@ -42,6 +43,7 @@ public final class Summon extends AbstractEffect
private final int _lifeTime;
private final int _consumeItemInterval;
private final int _summonPoints;
private final SkillHolder _debuff;
public Summon(Condition attachCond, Condition applyCond, StatsSet set, StatsSet params)
{
@ -58,6 +60,7 @@ public final class Summon extends AbstractEffect
_consumeItemInterval = params.getInt("consumeItemInterval", 0);
_lifeTime = params.getInt("lifeTime", 3600) * 1000;
_summonPoints = params.getInt("summonPoints", 0);
_debuff = new SkillHolder(params.getInt("debuffId", 0), 1);
}
@Override
@ -115,5 +118,9 @@ public final class Summon extends AbstractEffect
summon.setShowSummonAnimation(true);
summon.setRunning();
summon.spawnMe();
if (_debuff.getSkillId() != 0)
{
_debuff.getSkill().applyEffects(player, player);
}
}
}

View File

@ -0,0 +1,69 @@
/*
* Copyright (C) 2004-2015 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* L2J Server is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package handlers.effecthandlers;
import com.l2jserver.gameserver.datatables.SkillData;
import com.l2jserver.gameserver.model.StatsSet;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.conditions.Condition;
import com.l2jserver.gameserver.model.effects.AbstractEffect;
import com.l2jserver.gameserver.model.skills.BuffInfo;
import com.l2jserver.gameserver.model.skills.Skill;
/**
* @author NviX
*/
public final class SummonDebuff extends AbstractEffect
{
private static final int PRICE_OF_SUMMONING_LION = 10061;
private static final int PRICE_OF_SUMMONING_LUMI = 11818;
/**
* @param attachCond
* @param applyCond
* @param set
* @param params
*/
public SummonDebuff(Condition attachCond, Condition applyCond, StatsSet set, StatsSet params)
{
super(attachCond, applyCond, set, params);
}
@Override
public boolean onActionTime(BuffInfo info)
{
L2PcInstance player = info.getEffected().getActingPlayer();
if (player.hasSummon())
{
if (player.getEffectList().isAffectedBySkill(PRICE_OF_SUMMONING_LION))
{
Skill skill = SkillData.getInstance().getSkill(PRICE_OF_SUMMONING_LION, 1);
skill.applyEffects(player, player);
return true;
}
else if (player.getEffectList().isAffectedBySkill(PRICE_OF_SUMMONING_LUMI))
{
Skill skill = SkillData.getInstance().getSkill(PRICE_OF_SUMMONING_LUMI, 1);
skill.applyEffects(player, player);
return true;
}
}
return false;
}
}

View File

@ -58,6 +58,7 @@ public final class TriggerForce extends AbstractEffect
private static final int RESISTANCE_AURA = 10035;
private static final int RECOVERY_AURA = 10037;
private static final int SPIRIT_AURA = 10039;
private static final int ROLLING_THUNDER = 10287;
/**
* @param attachCond
@ -100,7 +101,7 @@ public final class TriggerForce extends AbstractEffect
}
else
{
if (_skill.getSkillId() != RAGE_AURA)
if ((_skill.getSkillId() != RAGE_AURA) && (_skill.getSkillId() != ROLLING_THUNDER))
{
_skill.getSkill().applyEffects(effector, effector);
}
@ -117,8 +118,8 @@ public final class TriggerForce extends AbstractEffect
{
return false;
}
// apply Rage Aura to enemies
if (_skill.getSkillId() == RAGE_AURA)
// apply offensive aura to enemies
if ((_skill.getSkillId() == RAGE_AURA) || (_skill.getSkillId() == ROLLING_THUNDER))
{
final boolean srcInArena = (effector.isInsideZone(ZoneId.PVP) && (!effector.isInsideZone(ZoneId.SIEGE)));
for (L2Character obj : effector.getKnownList().getKnownCharactersInRadius(200))
@ -130,7 +131,7 @@ public final class TriggerForce extends AbstractEffect
}
}
}
// remove Rage Aura from enemies who not in affect radius
// remove offensive aura from enemies who not in affect radius
if (!_affectedObjects.isEmpty())
{
for (L2Character obj : _affectedObjects)
@ -141,6 +142,10 @@ public final class TriggerForce extends AbstractEffect
{
obj.getEffectList().remove(true, obj.getEffectList().getBuffInfoBySkillId(RAGE_AURA));
}
if (obj.getEffectList().isAffectedBySkill(ROLLING_THUNDER))
{
obj.getEffectList().remove(true, obj.getEffectList().getBuffInfoBySkillId(ROLLING_THUNDER));
}
_affectedObjToRemove.add(obj);
}
}
@ -167,7 +172,7 @@ public final class TriggerForce extends AbstractEffect
{
_affectedMembers.add(member);
}
if (!member.getEffectList().isAffectedBySkill(_skill.getSkillId()) && (member.calculateDistance(effector, true, false) < 900) && (_skill.getSkillId() != RAGE_AURA))
if (!member.getEffectList().isAffectedBySkill(_skill.getSkillId()) && (member.calculateDistance(effector, true, false) < 900) && (_skill.getSkillId() != RAGE_AURA) && (_skill.getSkillId() != ROLLING_THUNDER))
{
if ((member != effector))
{
@ -299,6 +304,10 @@ public final class TriggerForce extends AbstractEffect
{
obj.getEffectList().remove(true, obj.getEffectList().getBuffInfoBySkillId(RAGE_AURA));
}
if (obj.getEffectList().isAffectedBySkill(ROLLING_THUNDER))
{
obj.getEffectList().remove(true, obj.getEffectList().getBuffInfoBySkillId(ROLLING_THUNDER));
}
}
_affectedObjects.clear();
_affectedObjToRemove.clear();