Limit for Aeore, Iss and Sigel skills.

Contributed by Ofelin.
This commit is contained in:
MobiusDev
2018-09-14 16:42:59 +00:00
parent b8eee1a198
commit a31a265459
20 changed files with 812 additions and 102 deletions

View File

@@ -185,6 +185,7 @@ public final class EffectMasterHandler
EffectHandler.getInstance().registerHandler("LimitCp", LimitCp::new);
EffectHandler.getInstance().registerHandler("LimitHp", LimitHp::new);
EffectHandler.getInstance().registerHandler("LimitMp", LimitMp::new);
EffectHandler.getInstance().registerHandler("LimitSkill", LimitSkill::new);
EffectHandler.getInstance().registerHandler("Lucky", Lucky::new);
EffectHandler.getInstance().registerHandler("MagicAccuracy", MagicAccuracy::new);
EffectHandler.getInstance().registerHandler("MagicalAbnormalDispelAttack", MagicalAbnormalDispelAttack::new);
@@ -340,6 +341,7 @@ public final class EffectMasterHandler
EffectHandler.getInstance().registerHandler("TeleportToPlayer", TeleportToPlayer::new);
EffectHandler.getInstance().registerHandler("TeleportToSummon", TeleportToSummon::new);
EffectHandler.getInstance().registerHandler("TeleportToTarget", TeleportToTarget::new);
EffectHandler.getInstance().registerHandler("TrackLimitedSkill", TrackLimitedSkill::new);
EffectHandler.getInstance().registerHandler("FlyAway", FlyAway::new);
EffectHandler.getInstance().registerHandler("TransferDamageToPlayer", TransferDamageToPlayer::new);
EffectHandler.getInstance().registerHandler("TransferDamageToSummon", TransferDamageToSummon::new);

View File

@@ -0,0 +1,132 @@
/*
* This file is part of the L2J Mobius project.
*
* This program 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.
*
* This program 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.l2jmobius.gameserver.model.StatsSet;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.effects.AbstractEffect;
import com.l2jmobius.gameserver.model.skills.BuffInfo;
import com.l2jmobius.gameserver.model.skills.Skill;
/**
* @author Ofelin
*/
public class LimitSkill extends AbstractEffect
{
private final static int LIMIT_OF_AEORE = 11833;
private final static int LIMIT_OF_SIGEL = 19526;
private final static int LIMIT_OF_ISS = 19527;
private final static int BATTLE_RAPSODY = 11544;
private final static int OVERLORDS_DIGNITY = 19439;
private final static int PROTECTION_OF_FATE = 10019;
private final static int NINE_AEGIS = 10024;
private final static int CELESTIAL_PROTECTION = 11758;
private final static int CELESTIAL_PARTY_PROTECTION = 11759;
public LimitSkill(StatsSet params)
{
}
@Override
public void onStart(L2Character effector, L2Character effected, Skill skill)
{
switch (skill.getId())
{
case LIMIT_OF_AEORE: // Limit of Aeore
{
decreaseAeoreBuffDuration(effector, effected, skill);
break;
}
case LIMIT_OF_SIGEL: // Limit of Sigel
{
decreaseSigelBuffDuration(effector, effected, skill);
break;
}
case LIMIT_OF_ISS: // Limit of Iss
{
decreaseIssBuffDuration(effector, effected, skill);
break;
}
}
}
private void decreaseAeoreBuffDuration(L2Character effector, L2Character effected, Skill skill)
{
switch (skill.getLevel())
{
case 1:
case 2:
{
modifyDuration(CELESTIAL_PROTECTION, effected, (int) (10 * 0.50)); // Decrease active effect of Celestial Protection by 50%
modifyDuration(CELESTIAL_PARTY_PROTECTION, effected, (int) (10 * 0.50)); // Decrease active effect of Celestial Party Protection by 50%
break;
}
}
}
private void decreaseSigelBuffDuration(L2Character effector, L2Character effected, Skill skill)
{
switch (skill.getLevel())
{
case 1:
{
modifyDuration(PROTECTION_OF_FATE, effected, (int) (30 * 0.80)); // Decrease active effect of Protection of Fate by 20%
modifyDuration(NINE_AEGIS, effected, (int) (30 * 0.80)); // Decrease active effect of Nine Aegis by 20%
break;
}
case 2:
{
modifyDuration(PROTECTION_OF_FATE, effected, (int) (30 * 0.20)); // Decrease active effect of Protection of Fate by 80%
modifyDuration(NINE_AEGIS, effected, (int) (30 * 0.20)); // Decrease active effect of Nine Aegis by 80%
break;
}
}
}
private void decreaseIssBuffDuration(L2Character effector, L2Character effected, Skill skill)
{
switch (skill.getLevel())
{
case 1:
{
modifyDuration(BATTLE_RAPSODY, effected, (int) (30 * 0.80)); // Decrease active effect of Battle Rhapsody by 20%
modifyDuration(OVERLORDS_DIGNITY, effected, (int) (30 * 0.80)); // Decrease active effect of Overlord's Dignity by 20%
break;
}
case 2:
{
modifyDuration(BATTLE_RAPSODY, effected, (int) (30 * 0.20)); // Decrease active effect of Battle Rhapsody by 80%
modifyDuration(OVERLORDS_DIGNITY, effected, (int) (30 * 0.20)); // Decrease active effect of Overlord's Dignity by 80%
break;
}
}
}
private void modifyDuration(int skillId, L2Character effected, int duration)
{
for (BuffInfo buff : effected.getEffectList().getEffects())
{
if (buff.getSkill().getId() == skillId)
{
if (duration > 0)
{
buff.setAbnormalTime(duration);
}
}
}
}
}

View File

@@ -0,0 +1,170 @@
/*
* This file is part of the L2J Mobius project.
*
* This program 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.
*
* This program 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.l2jmobius.gameserver.model.CharEffectList;
import com.l2jmobius.gameserver.model.StatsSet;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.effects.AbstractEffect;
import com.l2jmobius.gameserver.model.holders.SkillHolder;
import com.l2jmobius.gameserver.model.skills.BuffInfo;
import com.l2jmobius.gameserver.model.skills.Skill;
/**
* @author Ofelin
*/
public class TrackLimitedSkill extends AbstractEffect
{
private final static int LIMIT_OF_AEORE = 11833;
private final static int LIMIT_OF_SIGEL = 19526;
private final static int LIMIT_OF_ISS = 19527;
private final static int BATTLE_RAPSODY = 11544;
private final static int OVERLORDS_DIGNITY = 19439;
private final static int PROTECTION_OF_FATE = 10019;
private final static int NINE_AEGIS = 10024;
private final static int CELESTIAL_PROTECTION = 11758;
private final static int CELESTIAL_PARTY_PROTECTION = 11759;
private int limitAeoreLevel = 0;
private int limitSigelLevel = 0;
private int limitIssLevel = 0;
public TrackLimitedSkill(StatsSet param)
{
}
@Override
public void onStart(L2Character effector, L2Character effected, Skill skill)
{
trackAeoreLimit(effector, effected, skill, LIMIT_OF_AEORE); // Tracking Aeore Limit Debuff
trackSigelLimit(effector, effected, skill, LIMIT_OF_SIGEL); // Tracking Sigel Limit Debuff
trackIssLimit(effector, effected, skill, LIMIT_OF_ISS); // Tracking Iss Limit Debuff
}
@Override
public void onExit(L2Character effector, L2Character effected, Skill skill)
{
if ((skill.getId() == BATTLE_RAPSODY) || (skill.getId() == OVERLORDS_DIGNITY))
{
increaseLimit(effector, effected, skill, limitIssLevel);
}
else if ((skill.getId() == PROTECTION_OF_FATE) || (skill.getId() == NINE_AEGIS))
{
increaseLimit(effector, effected, skill, limitSigelLevel);
}
else if ((skill.getId() == CELESTIAL_PROTECTION) || (skill.getId() == CELESTIAL_PARTY_PROTECTION))
{
increaseLimit(effector, effected, skill, limitAeoreLevel);
}
}
private void trackAeoreLimit(L2Character effector, L2Character effected, Skill skill, int limitSkillId)
{
limitAeoreLevel = 0;
CharEffectList effectList = effected.getEffectList();
for (BuffInfo debuff : effectList.getDebuffs())
{
if (debuff.getSkill().getId() == limitSkillId)
{
limitAeoreLevel = debuff.getSkill().getLevel();
if (limitAeoreLevel == 3)
{
effected.getEffectList().remove(effectList.getBuffInfoBySkillId(CELESTIAL_PROTECTION), false, false, false); // Remove Celestial Protection
effected.getEffectList().remove(effectList.getBuffInfoBySkillId(CELESTIAL_PARTY_PROTECTION), false, false, false); // Remove Celestial Party Protection
}
else
{
new SkillHolder(LIMIT_OF_AEORE, limitAeoreLevel).getSkill().applyEffects(effector, effected);
}
}
}
}
private void trackSigelLimit(L2Character effector, L2Character effected, Skill skill, int limitSkillId)
{
limitSigelLevel = 0;
CharEffectList effectList = effected.getEffectList();
for (BuffInfo debuff : effectList.getDebuffs())
{
if (debuff.getSkill().getId() == limitSkillId)
{
limitSigelLevel = debuff.getSkill().getLevel();
if (limitSigelLevel == 3)
{
effected.getEffectList().remove(effectList.getBuffInfoBySkillId(PROTECTION_OF_FATE), false, false, false); // Remove Protection of Fate
effected.getEffectList().remove(effectList.getBuffInfoBySkillId(NINE_AEGIS), false, false, false); // Remove Nine Aegis
}
else
{
new SkillHolder(LIMIT_OF_SIGEL, limitSigelLevel).getSkill().applyEffects(effector, effected);
}
}
}
}
private void trackIssLimit(L2Character effector, L2Character effected, Skill skill, int limitSkillId)
{
limitIssLevel = 0;
CharEffectList effectList = effected.getEffectList();
for (BuffInfo debuff : effectList.getDebuffs())
{
if (debuff.getSkill().getId() == limitSkillId)
{
limitIssLevel = debuff.getSkill().getLevel();
if (limitIssLevel == 3)
{
effected.getEffectList().remove(effectList.getBuffInfoBySkillId(BATTLE_RAPSODY), false, false, false); // Remove Battle Rhapsody
effected.getEffectList().remove(effectList.getBuffInfoBySkillId(OVERLORDS_DIGNITY), false, false, false); // Remove Overlord's Dignity
}
else
{
new SkillHolder(LIMIT_OF_ISS, limitIssLevel).getSkill().applyEffects(effector, effected);
}
}
}
}
private void increaseLimit(L2Character effector, L2Character effected, Skill skill, int limitLevel)
{
if (limitLevel < 3)
{
switch (skill.getId())
{
case BATTLE_RAPSODY: // Battle Rhapsody
case OVERLORDS_DIGNITY: // Overlord's Dignity
{
// limitIssLevel++;
new SkillHolder(LIMIT_OF_ISS, ++limitIssLevel).getSkill().applyEffects(effector, effected);
break;
}
case PROTECTION_OF_FATE: // Protection of Fate
case NINE_AEGIS: // Nine Aegis
{
new SkillHolder(LIMIT_OF_SIGEL, ++limitSigelLevel).getSkill().applyEffects(effector, effected);
break;
}
case CELESTIAL_PROTECTION: // Celestial Protection
case CELESTIAL_PARTY_PROTECTION: // Celestial Party Protection
{
new SkillHolder(LIMIT_OF_AEORE, ++limitAeoreLevel).getSkill().applyEffects(effector, effected);
break;
}
}
}
}
}

View File

@@ -1558,6 +1558,7 @@
</amount>
<mode>DIFF</mode>
</effect>
<effect name="TrackLimitedSkill" />
</effects>
</skill>
<skill id="10020" toLevel="7" name="Focus Shield">
@@ -1797,9 +1798,7 @@
</effect>
</effects>
</skill>
<skill id="10024" toLevel="1" name="Party Rescue">
<!-- Glory Days confirmed -->
<!-- Drags all party members to oneself, and for 15 seconds receives 90% of the damage inflicted to all party members. Additionally, all damage received is capped at 10. Requires a shield. -->
<skill id="10024" toLevel="1" name="Nine Aegis">
<abnormalLvl>2</abnormalLvl>
<abnormalTime>
<value fromLevel="1" toLevel="1">15</value>
@@ -1844,6 +1843,7 @@
</amount>
<mode>DIFF</mode>
</effect>
<effect name="TrackLimitedSkill" />
</effects>
</skill>
<skill id="10025" toLevel="4" name="Knight Frenzy">

View File

@@ -3148,6 +3148,7 @@
</amount>
<mode>DIFF</mode>
</effect>
<effect name="TrackLimitedSkill" />
</effects>
</skill>
<skill id="11545" toLevel="1" name="Crazy Nocturne">

View File

@@ -784,14 +784,8 @@
<value fromLevel="1" toLevel="1" fromSubLevel="1020" toSubLevel="1020">4504</value>
</power>
</effect>
<effect name="TrackLimitedSkill" />
</effects>
<endEffects>
<effect name="CallSkill">
<!-- Lingering Protection -->
<skillId>11833</skillId>
<skillLevel>1</skillLevel>
</effect>
</endEffects>
</skill>
<skill id="11759" toLevel="1" name="Celestial Party Protection">
<!-- Updated to Ertheia -->
@@ -857,14 +851,8 @@
<value fromLevel="1" toLevel="1" fromSubLevel="1020" toSubLevel="1020">4504</value>
</power>
</effect>
<effect name="TrackLimitedSkill" />
</effects>
<endEffects>
<effect name="CallSkill">
<!-- Lingering Protection -->
<skillId>11834</skillId>
<skillLevel>1</skillLevel>
</effect>
</endEffects>
</skill>
<skill id="11760" toLevel="11" name="Radiant Recharge">
<!-- Glory Days confirmed -->

View File

@@ -1387,42 +1387,21 @@
</effect>
</effects>
</skill>
<skill id="11833" toLevel="1" name="Lingering Protection">
<skill id="11833" toLevel="3" name="Limit of Aeore">
<!-- Updated to Ertheia -->
<!-- Glory Days confirmed -->
<!-- Skill activates once Celestial Protection wears off. -->
<!-- Lingering Celestial Protection. For 1 minute, increases HP/MP recovery bonus and Spd. + 5. Cannot receive the effects of Celestial Protection, Celestial Party Protection, or Celestial Aegis. -->
<icon>icon.skill11758</icon>
<abnormalLvl>9</abnormalLvl>
<abnormalTime>70</abnormalTime> <!-- Tested -->
<abnormalType>INVINCIBILITY_SPECIAL</abnormalType>
<operateType>A2</operateType>
<isMagic>1</isMagic>
<effectPoint>1</effectPoint>
<isDebuff>true</isDebuff>
<basicProperty>NONE</basicProperty>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>5</magicCriticalRate>
<specialLevel>-2</specialLevel>
<hitCancelTime>0</hitCancelTime>
<magicLvl>99</magicLvl>
<irreplacableBuff>true</irreplacableBuff>
<abnormalLvl>1</abnormalLvl>
<abnormalTime>60</abnormalTime>
<canBeDispelled>false</canBeDispelled>
<targetType>SELF</targetType>
<affectScope>SINGLE</affectScope>
<icon>icon.skill11833</icon>
<isDebuff>true</isDebuff>
<operateType>A2</operateType>
<reuseDelay>1</reuseDelay>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<effects>
<effect name="Speed">
<amount>5</amount>
<mode>DIFF</mode>
</effect>
<effect name="HpRegen">
<amount>1</amount>
<mode>DIFF</mode>
</effect>
<effect name="MpRegen">
<amount>1</amount>
<mode>DIFF</mode>
</effect>
<effect name="LimitSkill" />
</effects>
</skill>
<skill id="11834" toLevel="1" name="Lingering Protection">

View File

@@ -983,10 +983,61 @@
<skill id="19439" toLevel="1" name="Overload's Dignity">
<!-- AUTO GENERATED SKILL -->
<!-- For $s1, increases nearby party members' P. Atk., M. Atk., Atk. Spd. and Casting Spd. $s2 times. This effect cannot be stacked, and a limit applies after its duration is over.. -->
<icon>icon.skill0000</icon>
<operateType>A1</operateType>
<icon>icon.skill19439</icon>
<abnormalTime>30</abnormalTime>
<affectRange>1000</affectRange>
<operateType>A2</operateType>
<mpConsume>916</mpConsume>
<hitTime>3000</hitTime>
<reuseDelay>30000</reuseDelay><!-- Salvation -->
<coolTime>500</coolTime>
<effectPoint>687</effectPoint>
<abnormalType>RHAPSODY</abnormalType>
<basicProperty>NONE</basicProperty>
<rideState>NONE</rideState>
<magicCriticalRate>5</magicCriticalRate>
<magicLvl>89</magicLvl>
<abnormalLvl>5</abnormalLvl>
<reuseDelay>600000</reuseDelay>
<targetType>SELF</targetType>
<affectScope>PARTY</affectScope>
<affectObject>FRIEND</affectObject>
<effects>
<effect name="PAtk">
<amount>100</amount>
<mode>PER</mode>
</effect>
<effect name="MAtk">
<amount>100</amount>
<mode>PER</mode>
</effect>
<effect name="PhysicalAttackSpeed">
<amount>100</amount>
<mode>PER</mode>
</effect>
<effect name="MagicalAttackSpeed">
<amount>100</amount>
<mode>PER</mode>
</effect>
<effect name="PhysicalDefence" fromLevel="1" toLevel="1" fromSubLevel="1001" toSubLevel="1020">
<amount>
<value fromLevel="1" toLevel="1" fromSubLevel="1001" toSubLevel="1020">{0.6 + 0.4 * subIndex}</value>
</amount>
<mode>PER</mode>
</effect>
<effect name="MagicalDefence" fromLevel="1" toLevel="1" fromSubLevel="2001" toSubLevel="2020">
<amount>
<value fromLevel="1" toLevel="1" fromSubLevel="2001" toSubLevel="2020">{0.6 + 0.4 * subIndex}</value>
</amount>
<mode>PER</mode>
</effect>
<effect name="MagicalDefence" fromLevel="1" toLevel="1" fromSubLevel="3001" toSubLevel="3020">
<amount>
<value fromLevel="1" toLevel="1" fromSubLevel="3001" toSubLevel="3020">{2 * subIndex}</value>
</amount>
<mode>DIFF</mode>
</effect>
<effect name="TrackLimitedSkill" />
</effects>
</skill>
<skill id="19442" toLevel="3" name="Single Note">
<!-- Dual Note on Level 2 and Triad on Level 3 -->

View File

@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/skills.xsd">
<skill id="19526" toLevel="3" name="Limit of Sigel">
<abnormalLvl>1</abnormalLvl>
<abnormalTime>60</abnormalTime>
<canBeDispelled>false</canBeDispelled>
<icon>icon.skill19526</icon>
<isDebuff>true</isDebuff>
<operateType>A2</operateType>
<reuseDelay>1</reuseDelay>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<effects>
<effect name="LimitSkill">
</effect>
</effects>
</skill>
<skill id="19527" toLevel="3" name="Limit of Iss">
<abnormalLvl>1</abnormalLvl>
<abnormalTime>60</abnormalTime>
<canBeDispelled>false</canBeDispelled>
<icon>icon.skill19527</icon>
<isDebuff>true</isDebuff>
<operateType>A2</operateType>
<reuseDelay>1</reuseDelay>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<effects>
<effect name="LimitSkill" />
</effects>
</skill>
</list>

View File

@@ -154,6 +154,7 @@ Lethal: Upon success sets enemy Player's CP to 1 and enemy NPC's HP to 50%.
LimitCp: Sets maximum recoverable CP through heals.
LimitHp: Sets maximum recoverable HP through heals.
LimitMp: Sets maximum recoverable MP through heals.
LimitSkill: Limits skill duration. (l2jmobius)
Lucky: dummy effect since behavior is hardcoded
MagicAccuracy: M. Accuracy stat.
MagicalAbnormalDispelAttack: Magical attack that does damage only if it manages to dispel the given AbnormalType
@@ -308,6 +309,7 @@ TeleportToNpc: Teleports to a specified Npc Id.
TeleportToPlayer: Teleports to targeted player. (l2jmobius)
TeleportToSummon: Teleports to your summon.
TeleportToTarget: Teleports to your target.
TrackLimitedSkill: Checks limit skill duration, see LimitSkill effect. (l2jmobius)
TransferDamageToPlayer: Transfers portion of incoming damage from target to you.
TransferDamageToSummon: Transfers portion of incoming damage towards your summon.
TransferHate: Transfers Npc's hate from you to your target.

View File

@@ -185,6 +185,7 @@ public final class EffectMasterHandler
EffectHandler.getInstance().registerHandler("LimitCp", LimitCp::new);
EffectHandler.getInstance().registerHandler("LimitHp", LimitHp::new);
EffectHandler.getInstance().registerHandler("LimitMp", LimitMp::new);
EffectHandler.getInstance().registerHandler("LimitSkill", LimitSkill::new);
EffectHandler.getInstance().registerHandler("Lucky", Lucky::new);
EffectHandler.getInstance().registerHandler("MagicAccuracy", MagicAccuracy::new);
EffectHandler.getInstance().registerHandler("MagicalAbnormalDispelAttack", MagicalAbnormalDispelAttack::new);
@@ -340,6 +341,7 @@ public final class EffectMasterHandler
EffectHandler.getInstance().registerHandler("TeleportToPlayer", TeleportToPlayer::new);
EffectHandler.getInstance().registerHandler("TeleportToSummon", TeleportToSummon::new);
EffectHandler.getInstance().registerHandler("TeleportToTarget", TeleportToTarget::new);
EffectHandler.getInstance().registerHandler("TrackLimitedSkill", TrackLimitedSkill::new);
EffectHandler.getInstance().registerHandler("FlyAway", FlyAway::new);
EffectHandler.getInstance().registerHandler("TransferDamageToPlayer", TransferDamageToPlayer::new);
EffectHandler.getInstance().registerHandler("TransferDamageToSummon", TransferDamageToSummon::new);

View File

@@ -0,0 +1,132 @@
/*
* This file is part of the L2J Mobius project.
*
* This program 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.
*
* This program 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.l2jmobius.gameserver.model.StatsSet;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.effects.AbstractEffect;
import com.l2jmobius.gameserver.model.skills.BuffInfo;
import com.l2jmobius.gameserver.model.skills.Skill;
/**
* @author Ofelin
*/
public class LimitSkill extends AbstractEffect
{
private final static int LIMIT_OF_AEORE = 11833;
private final static int LIMIT_OF_SIGEL = 19526;
private final static int LIMIT_OF_ISS = 19527;
private final static int BATTLE_RAPSODY = 11544;
private final static int OVERLORDS_DIGNITY = 19439;
private final static int PROTECTION_OF_FATE = 10019;
private final static int NINE_AEGIS = 10024;
private final static int CELESTIAL_PROTECTION = 11758;
private final static int CELESTIAL_PARTY_PROTECTION = 11759;
public LimitSkill(StatsSet params)
{
}
@Override
public void onStart(L2Character effector, L2Character effected, Skill skill)
{
switch (skill.getId())
{
case LIMIT_OF_AEORE: // Limit of Aeore
{
decreaseAeoreBuffDuration(effector, effected, skill);
break;
}
case LIMIT_OF_SIGEL: // Limit of Sigel
{
decreaseSigelBuffDuration(effector, effected, skill);
break;
}
case LIMIT_OF_ISS: // Limit of Iss
{
decreaseIssBuffDuration(effector, effected, skill);
break;
}
}
}
private void decreaseAeoreBuffDuration(L2Character effector, L2Character effected, Skill skill)
{
switch (skill.getLevel())
{
case 1:
case 2:
{
modifyDuration(CELESTIAL_PROTECTION, effected, (int) (10 * 0.50)); // Decrease active effect of Celestial Protection by 50%
modifyDuration(CELESTIAL_PARTY_PROTECTION, effected, (int) (10 * 0.50)); // Decrease active effect of Celestial Party Protection by 50%
break;
}
}
}
private void decreaseSigelBuffDuration(L2Character effector, L2Character effected, Skill skill)
{
switch (skill.getLevel())
{
case 1:
{
modifyDuration(PROTECTION_OF_FATE, effected, (int) (30 * 0.80)); // Decrease active effect of Protection of Fate by 20%
modifyDuration(NINE_AEGIS, effected, (int) (30 * 0.80)); // Decrease active effect of Nine Aegis by 20%
break;
}
case 2:
{
modifyDuration(PROTECTION_OF_FATE, effected, (int) (30 * 0.20)); // Decrease active effect of Protection of Fate by 80%
modifyDuration(NINE_AEGIS, effected, (int) (30 * 0.20)); // Decrease active effect of Nine Aegis by 80%
break;
}
}
}
private void decreaseIssBuffDuration(L2Character effector, L2Character effected, Skill skill)
{
switch (skill.getLevel())
{
case 1:
{
modifyDuration(BATTLE_RAPSODY, effected, (int) (30 * 0.80)); // Decrease active effect of Battle Rhapsody by 20%
modifyDuration(OVERLORDS_DIGNITY, effected, (int) (30 * 0.80)); // Decrease active effect of Overlord's Dignity by 20%
break;
}
case 2:
{
modifyDuration(BATTLE_RAPSODY, effected, (int) (30 * 0.20)); // Decrease active effect of Battle Rhapsody by 80%
modifyDuration(OVERLORDS_DIGNITY, effected, (int) (30 * 0.20)); // Decrease active effect of Overlord's Dignity by 80%
break;
}
}
}
private void modifyDuration(int skillId, L2Character effected, int duration)
{
for (BuffInfo buff : effected.getEffectList().getEffects())
{
if (buff.getSkill().getId() == skillId)
{
if (duration > 0)
{
buff.setAbnormalTime(duration);
}
}
}
}
}

View File

@@ -0,0 +1,170 @@
/*
* This file is part of the L2J Mobius project.
*
* This program 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.
*
* This program 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.l2jmobius.gameserver.model.CharEffectList;
import com.l2jmobius.gameserver.model.StatsSet;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.effects.AbstractEffect;
import com.l2jmobius.gameserver.model.holders.SkillHolder;
import com.l2jmobius.gameserver.model.skills.BuffInfo;
import com.l2jmobius.gameserver.model.skills.Skill;
/**
* @author Ofelin
*/
public class TrackLimitedSkill extends AbstractEffect
{
private final static int LIMIT_OF_AEORE = 11833;
private final static int LIMIT_OF_SIGEL = 19526;
private final static int LIMIT_OF_ISS = 19527;
private final static int BATTLE_RAPSODY = 11544;
private final static int OVERLORDS_DIGNITY = 19439;
private final static int PROTECTION_OF_FATE = 10019;
private final static int NINE_AEGIS = 10024;
private final static int CELESTIAL_PROTECTION = 11758;
private final static int CELESTIAL_PARTY_PROTECTION = 11759;
private int limitAeoreLevel = 0;
private int limitSigelLevel = 0;
private int limitIssLevel = 0;
public TrackLimitedSkill(StatsSet param)
{
}
@Override
public void onStart(L2Character effector, L2Character effected, Skill skill)
{
trackAeoreLimit(effector, effected, skill, LIMIT_OF_AEORE); // Tracking Aeore Limit Debuff
trackSigelLimit(effector, effected, skill, LIMIT_OF_SIGEL); // Tracking Sigel Limit Debuff
trackIssLimit(effector, effected, skill, LIMIT_OF_ISS); // Tracking Iss Limit Debuff
}
@Override
public void onExit(L2Character effector, L2Character effected, Skill skill)
{
if ((skill.getId() == BATTLE_RAPSODY) || (skill.getId() == OVERLORDS_DIGNITY))
{
increaseLimit(effector, effected, skill, limitIssLevel);
}
else if ((skill.getId() == PROTECTION_OF_FATE) || (skill.getId() == NINE_AEGIS))
{
increaseLimit(effector, effected, skill, limitSigelLevel);
}
else if ((skill.getId() == CELESTIAL_PROTECTION) || (skill.getId() == CELESTIAL_PARTY_PROTECTION))
{
increaseLimit(effector, effected, skill, limitAeoreLevel);
}
}
private void trackAeoreLimit(L2Character effector, L2Character effected, Skill skill, int limitSkillId)
{
limitAeoreLevel = 0;
CharEffectList effectList = effected.getEffectList();
for (BuffInfo debuff : effectList.getDebuffs())
{
if (debuff.getSkill().getId() == limitSkillId)
{
limitAeoreLevel = debuff.getSkill().getLevel();
if (limitAeoreLevel == 3)
{
effected.getEffectList().remove(effectList.getBuffInfoBySkillId(CELESTIAL_PROTECTION), false, false, false); // Remove Celestial Protection
effected.getEffectList().remove(effectList.getBuffInfoBySkillId(CELESTIAL_PARTY_PROTECTION), false, false, false); // Remove Celestial Party Protection
}
else
{
new SkillHolder(LIMIT_OF_AEORE, limitAeoreLevel).getSkill().applyEffects(effector, effected);
}
}
}
}
private void trackSigelLimit(L2Character effector, L2Character effected, Skill skill, int limitSkillId)
{
limitSigelLevel = 0;
CharEffectList effectList = effected.getEffectList();
for (BuffInfo debuff : effectList.getDebuffs())
{
if (debuff.getSkill().getId() == limitSkillId)
{
limitSigelLevel = debuff.getSkill().getLevel();
if (limitSigelLevel == 3)
{
effected.getEffectList().remove(effectList.getBuffInfoBySkillId(PROTECTION_OF_FATE), false, false, false); // Remove Protection of Fate
effected.getEffectList().remove(effectList.getBuffInfoBySkillId(NINE_AEGIS), false, false, false); // Remove Nine Aegis
}
else
{
new SkillHolder(LIMIT_OF_SIGEL, limitSigelLevel).getSkill().applyEffects(effector, effected);
}
}
}
}
private void trackIssLimit(L2Character effector, L2Character effected, Skill skill, int limitSkillId)
{
limitIssLevel = 0;
CharEffectList effectList = effected.getEffectList();
for (BuffInfo debuff : effectList.getDebuffs())
{
if (debuff.getSkill().getId() == limitSkillId)
{
limitIssLevel = debuff.getSkill().getLevel();
if (limitIssLevel == 3)
{
effected.getEffectList().remove(effectList.getBuffInfoBySkillId(BATTLE_RAPSODY), false, false, false); // Remove Battle Rhapsody
effected.getEffectList().remove(effectList.getBuffInfoBySkillId(OVERLORDS_DIGNITY), false, false, false); // Remove Overlord's Dignity
}
else
{
new SkillHolder(LIMIT_OF_ISS, limitIssLevel).getSkill().applyEffects(effector, effected);
}
}
}
}
private void increaseLimit(L2Character effector, L2Character effected, Skill skill, int limitLevel)
{
if (limitLevel < 3)
{
switch (skill.getId())
{
case BATTLE_RAPSODY: // Battle Rhapsody
case OVERLORDS_DIGNITY: // Overlord's Dignity
{
// limitIssLevel++;
new SkillHolder(LIMIT_OF_ISS, ++limitIssLevel).getSkill().applyEffects(effector, effected);
break;
}
case PROTECTION_OF_FATE: // Protection of Fate
case NINE_AEGIS: // Nine Aegis
{
new SkillHolder(LIMIT_OF_SIGEL, ++limitSigelLevel).getSkill().applyEffects(effector, effected);
break;
}
case CELESTIAL_PROTECTION: // Celestial Protection
case CELESTIAL_PARTY_PROTECTION: // Celestial Party Protection
{
new SkillHolder(LIMIT_OF_AEORE, ++limitAeoreLevel).getSkill().applyEffects(effector, effected);
break;
}
}
}
}
}

View File

@@ -1558,6 +1558,7 @@
</amount>
<mode>DIFF</mode>
</effect>
<effect name="TrackLimitedSkill" />
</effects>
</skill>
<skill id="10020" toLevel="7" name="Focus Shield">
@@ -1797,9 +1798,7 @@
</effect>
</effects>
</skill>
<skill id="10024" toLevel="1" name="Party Rescue">
<!-- Glory Days confirmed -->
<!-- Drags all party members to oneself, and for 15 seconds receives 90% of the damage inflicted to all party members. Additionally, all damage received is capped at 10. Requires a shield. -->
<skill id="10024" toLevel="1" name="Nine Aegis">
<abnormalLvl>2</abnormalLvl>
<abnormalTime>
<value fromLevel="1" toLevel="1">15</value>
@@ -1844,6 +1843,7 @@
</amount>
<mode>DIFF</mode>
</effect>
<effect name="TrackLimitedSkill" />
</effects>
</skill>
<skill id="10025" toLevel="4" name="Knight Frenzy">

View File

@@ -3148,6 +3148,7 @@
</amount>
<mode>DIFF</mode>
</effect>
<effect name="TrackLimitedSkill" />
</effects>
</skill>
<skill id="11545" toLevel="1" name="Crazy Nocturne">

View File

@@ -784,14 +784,8 @@
<value fromLevel="1" toLevel="1" fromSubLevel="1020" toSubLevel="1020">4504</value>
</power>
</effect>
<effect name="TrackLimitedSkill" />
</effects>
<endEffects>
<effect name="CallSkill">
<!-- Lingering Protection -->
<skillId>11833</skillId>
<skillLevel>1</skillLevel>
</effect>
</endEffects>
</skill>
<skill id="11759" toLevel="1" name="Celestial Party Protection">
<!-- Updated to Ertheia -->
@@ -857,14 +851,8 @@
<value fromLevel="1" toLevel="1" fromSubLevel="1020" toSubLevel="1020">4504</value>
</power>
</effect>
<effect name="TrackLimitedSkill" />
</effects>
<endEffects>
<effect name="CallSkill">
<!-- Lingering Protection -->
<skillId>11834</skillId>
<skillLevel>1</skillLevel>
</effect>
</endEffects>
</skill>
<skill id="11760" toLevel="11" name="Radiant Recharge">
<!-- Glory Days confirmed -->

View File

@@ -1387,42 +1387,21 @@
</effect>
</effects>
</skill>
<skill id="11833" toLevel="1" name="Lingering Protection">
<skill id="11833" toLevel="3" name="Limit of Aeore">
<!-- Updated to Ertheia -->
<!-- Glory Days confirmed -->
<!-- Skill activates once Celestial Protection wears off. -->
<!-- Lingering Celestial Protection. For 1 minute, increases HP/MP recovery bonus and Spd. + 5. Cannot receive the effects of Celestial Protection, Celestial Party Protection, or Celestial Aegis. -->
<icon>icon.skill11758</icon>
<abnormalLvl>9</abnormalLvl>
<abnormalTime>70</abnormalTime> <!-- Tested -->
<abnormalType>INVINCIBILITY_SPECIAL</abnormalType>
<operateType>A2</operateType>
<isMagic>1</isMagic>
<effectPoint>1</effectPoint>
<isDebuff>true</isDebuff>
<basicProperty>NONE</basicProperty>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<magicCriticalRate>5</magicCriticalRate>
<specialLevel>-2</specialLevel>
<hitCancelTime>0</hitCancelTime>
<magicLvl>99</magicLvl>
<irreplacableBuff>true</irreplacableBuff>
<abnormalLvl>1</abnormalLvl>
<abnormalTime>60</abnormalTime>
<canBeDispelled>false</canBeDispelled>
<targetType>SELF</targetType>
<affectScope>SINGLE</affectScope>
<icon>icon.skill11833</icon>
<isDebuff>true</isDebuff>
<operateType>A2</operateType>
<reuseDelay>1</reuseDelay>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<effects>
<effect name="Speed">
<amount>5</amount>
<mode>DIFF</mode>
</effect>
<effect name="HpRegen">
<amount>1</amount>
<mode>DIFF</mode>
</effect>
<effect name="MpRegen">
<amount>1</amount>
<mode>DIFF</mode>
</effect>
<effect name="LimitSkill" />
</effects>
</skill>
<skill id="11834" toLevel="1" name="Lingering Protection">

View File

@@ -983,10 +983,61 @@
<skill id="19439" toLevel="1" name="Overload's Dignity">
<!-- AUTO GENERATED SKILL -->
<!-- For $s1, increases nearby party members' P. Atk., M. Atk., Atk. Spd. and Casting Spd. $s2 times. This effect cannot be stacked, and a limit applies after its duration is over.. -->
<icon>icon.skill0000</icon>
<operateType>A1</operateType>
<icon>icon.skill19439</icon>
<abnormalTime>30</abnormalTime>
<affectRange>1000</affectRange>
<operateType>A2</operateType>
<mpConsume>916</mpConsume>
<hitTime>3000</hitTime>
<reuseDelay>30000</reuseDelay><!-- Salvation -->
<coolTime>500</coolTime>
<effectPoint>687</effectPoint>
<abnormalType>RHAPSODY</abnormalType>
<basicProperty>NONE</basicProperty>
<rideState>NONE</rideState>
<magicCriticalRate>5</magicCriticalRate>
<magicLvl>89</magicLvl>
<abnormalLvl>5</abnormalLvl>
<reuseDelay>600000</reuseDelay>
<targetType>SELF</targetType>
<affectScope>PARTY</affectScope>
<affectObject>FRIEND</affectObject>
<effects>
<effect name="PAtk">
<amount>100</amount>
<mode>PER</mode>
</effect>
<effect name="MAtk">
<amount>100</amount>
<mode>PER</mode>
</effect>
<effect name="PhysicalAttackSpeed">
<amount>100</amount>
<mode>PER</mode>
</effect>
<effect name="MagicalAttackSpeed">
<amount>100</amount>
<mode>PER</mode>
</effect>
<effect name="PhysicalDefence" fromLevel="1" toLevel="1" fromSubLevel="1001" toSubLevel="1020">
<amount>
<value fromLevel="1" toLevel="1" fromSubLevel="1001" toSubLevel="1020">{0.6 + 0.4 * subIndex}</value>
</amount>
<mode>PER</mode>
</effect>
<effect name="MagicalDefence" fromLevel="1" toLevel="1" fromSubLevel="2001" toSubLevel="2020">
<amount>
<value fromLevel="1" toLevel="1" fromSubLevel="2001" toSubLevel="2020">{0.6 + 0.4 * subIndex}</value>
</amount>
<mode>PER</mode>
</effect>
<effect name="MagicalDefence" fromLevel="1" toLevel="1" fromSubLevel="3001" toSubLevel="3020">
<amount>
<value fromLevel="1" toLevel="1" fromSubLevel="3001" toSubLevel="3020">{2 * subIndex}</value>
</amount>
<mode>DIFF</mode>
</effect>
<effect name="TrackLimitedSkill" />
</effects>
</skill>
<skill id="19442" toLevel="3" name="Single Note">
<!-- Dual Note on Level 2 and Triad on Level 3 -->

View File

@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/skills.xsd">
<skill id="19526" toLevel="3" name="Limit of Sigel">
<abnormalLvl>1</abnormalLvl>
<abnormalTime>60</abnormalTime>
<canBeDispelled>false</canBeDispelled>
<icon>icon.skill19526</icon>
<isDebuff>true</isDebuff>
<operateType>A2</operateType>
<reuseDelay>1</reuseDelay>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<effects>
<effect name="LimitSkill">
</effect>
</effects>
</skill>
<skill id="19527" toLevel="3" name="Limit of Iss">
<abnormalLvl>1</abnormalLvl>
<abnormalTime>60</abnormalTime>
<canBeDispelled>false</canBeDispelled>
<icon>icon.skill19527</icon>
<isDebuff>true</isDebuff>
<operateType>A2</operateType>
<reuseDelay>1</reuseDelay>
<rideState>NONE;STRIDER;WYVERN;WOLF</rideState>
<effects>
<effect name="LimitSkill" />
</effects>
</skill>
</list>

View File

@@ -154,6 +154,7 @@ Lethal: Upon success sets enemy Player's CP to 1 and enemy NPC's HP to 50%.
LimitCp: Sets maximum recoverable CP through heals.
LimitHp: Sets maximum recoverable HP through heals.
LimitMp: Sets maximum recoverable MP through heals.
LimitSkill: Limits skill duration. (l2jmobius)
Lucky: dummy effect since behavior is hardcoded
MagicAccuracy: M. Accuracy stat.
MagicalAbnormalDispelAttack: Magical attack that does damage only if it manages to dispel the given AbnormalType
@@ -308,6 +309,7 @@ TeleportToNpc: Teleports to a specified Npc Id.
TeleportToPlayer: Teleports to targeted player. (l2jmobius)
TeleportToSummon: Teleports to your summon.
TeleportToTarget: Teleports to your target.
TrackLimitedSkill: Checks limit skill duration, see LimitSkill effect. (l2jmobius)
TransferDamageToPlayer: Transfers portion of incoming damage from target to you.
TransferDamageToSummon: Transfers portion of incoming damage towards your summon.
TransferHate: Transfers Npc's hate from you to your target.