Noelle's Gift implementation.
This commit is contained in:
parent
46a97055f9
commit
b8daa0e6d5
@ -150,6 +150,7 @@ public final class EffectMasterHandler
|
||||
ProtectionBlessing.class,
|
||||
RandomizeHate.class,
|
||||
RebalanceHP.class,
|
||||
RecoverVitalityInPeaceZone.class,
|
||||
Recovery.class,
|
||||
Reeling.class,
|
||||
RefuelAirship.class,
|
||||
|
76
trunk/dist/game/data/scripts/handlers/effecthandlers/RecoverVitalityInPeaceZone.java
vendored
Normal file
76
trunk/dist/game/data/scripts/handlers/effecthandlers/RecoverVitalityInPeaceZone.java
vendored
Normal file
@ -0,0 +1,76 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack 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 DataPack 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.model.StatsSet;
|
||||
import com.l2jserver.gameserver.model.actor.stat.PcStat;
|
||||
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.zone.ZoneId;
|
||||
|
||||
/**
|
||||
* Recover Vitality in Peace Zone effect implementation.
|
||||
* @author Mobius
|
||||
*/
|
||||
public final class RecoverVitalityInPeaceZone extends AbstractEffect
|
||||
{
|
||||
private final double _power;
|
||||
|
||||
public RecoverVitalityInPeaceZone(Condition attachCond, Condition applyCond, StatsSet set, StatsSet params)
|
||||
{
|
||||
super(attachCond, applyCond, set, params);
|
||||
|
||||
_power = params.getDouble("power", 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onActionTime(BuffInfo info)
|
||||
{
|
||||
if (!info.getEffected().isPlayer() || info.getEffected().isDead() || !info.getEffected().isInsideZone(ZoneId.PEACE))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
long vitality = info.getEffected().getActingPlayer().getVitalityPoints();
|
||||
vitality += _power;
|
||||
if (vitality >= PcStat.MAX_VITALITY_POINTS)
|
||||
{
|
||||
vitality = PcStat.MAX_VITALITY_POINTS;
|
||||
}
|
||||
info.getEffected().getActingPlayer().setVitalityPoints((int) vitality);
|
||||
|
||||
return info.getSkill().isToggle();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onExit(BuffInfo info)
|
||||
{
|
||||
if (info.getEffected().isPlayer() && !info.isRemoved())
|
||||
{
|
||||
long vitality = info.getEffected().getActingPlayer().getVitalityPoints();
|
||||
vitality += 10000;
|
||||
if (vitality >= PcStat.MAX_VITALITY_POINTS)
|
||||
{
|
||||
vitality = PcStat.MAX_VITALITY_POINTS;
|
||||
}
|
||||
info.getEffected().getActingPlayer().setVitalityPoints((int) vitality);
|
||||
}
|
||||
}
|
||||
}
|
@ -137,7 +137,9 @@
|
||||
<set name="icon" val="icon.etc_whiteday_choco" />
|
||||
<set name="commissionItemType" val="OTHER_ITEM" />
|
||||
<set name="default_action" val="SKILL_REDUCE" />
|
||||
<set name="handler" val="ItemSkills" />
|
||||
<set name="is_stackable" val="true" />
|
||||
<set name="item_skill" val="16423-1" /> <!-- Noelle's Gift -->
|
||||
<set name="material" val="LIQUID" />
|
||||
<set name="time" val="360" />
|
||||
<set name="weight" val="5" />
|
||||
|
@ -262,13 +262,18 @@
|
||||
<set name="targetType" val="SELF" />
|
||||
</skill>
|
||||
<skill id="16423" levels="1" name="Noelle's Gift">
|
||||
<!-- AUTO GENERATED SKILL -->
|
||||
<!-- Recover Vitality for 6 hr. if you're in a peace zone. When the buff expires, you also receive a fixed boost regardless of zone. You must be alive to recover Vitality. -->
|
||||
<set name="icon" val="icon.etc_whiteday_choco" />
|
||||
<set name="abnormalTime" val="21600" />
|
||||
<set name="operateType" val="ACTIVE_CONTINUOUS" />
|
||||
<set name="targetType" val="SELF" />
|
||||
<set name="reuseDelay" val="30000" />
|
||||
<set name="reuseDelay" val="3000" />
|
||||
<set name="isMagic" val="4" />
|
||||
<for>
|
||||
<effect name="RecoverVitalityInPeaceZone" ticks="10">
|
||||
<param power="10" />
|
||||
</effect>
|
||||
</for>
|
||||
</skill>
|
||||
<skill id="16424" levels="1" name="Appearance Stone: Santa Hat">
|
||||
<!-- AUTO GENERATED SKILL -->
|
||||
|
1
trunk/dist/game/data/xsd/skills.xsd
vendored
1
trunk/dist/game/data/xsd/skills.xsd
vendored
@ -662,6 +662,7 @@
|
||||
<xs:enumeration value="ProtectionBlessing" />
|
||||
<xs:enumeration value="RandomizeHate" />
|
||||
<xs:enumeration value="RebalanceHP" />
|
||||
<xs:enumeration value="RecoverVitalityInPeaceZone" />
|
||||
<xs:enumeration value="Recovery" />
|
||||
<xs:enumeration value="Reeling" />
|
||||
<xs:enumeration value="RefuelAirship" />
|
||||
|
Loading…
Reference in New Issue
Block a user