diff --git a/trunk/dist/game/data/scripts/handlers/effecthandlers/MarkRetriever.java b/trunk/dist/game/data/scripts/handlers/effecthandlers/MarkRetriever.java new file mode 100644 index 0000000000..607ca43224 --- /dev/null +++ b/trunk/dist/game/data/scripts/handlers/effecthandlers/MarkRetriever.java @@ -0,0 +1,115 @@ +/* + * 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 . + */ +package handlers.effecthandlers; + +import java.util.List; + +import com.l2jmobius.gameserver.enums.ShotType; +import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; +import com.l2jmobius.gameserver.model.conditions.Condition; +import com.l2jmobius.gameserver.model.effects.AbstractEffect; +import com.l2jmobius.gameserver.model.skills.BuffInfo; +import com.l2jmobius.gameserver.model.stats.Formulas; +import com.l2jmobius.gameserver.model.stats.Stats; +import com.l2jmobius.util.Rnd; + +/** + * damage for each mark on the target + * @author hitnar + */ +public final class MarkRetriever extends AbstractEffect +{ + private final double _power; + + public MarkRetriever(Condition attachCond, Condition applyCond, StatsSet set, StatsSet params) + { + super(attachCond, applyCond, set, params); + + _power = params.getDouble("power", 0); + } + + @Override + public boolean isInstant() + { + return true; + } + + @Override + public void onStart(BuffInfo info) + { + final L2Character effected = info.getEffected(); + final L2Character activeChar = info.getEffector(); + + if (activeChar.isAlikeDead()) + { + return; + } + + final boolean sps = info.getSkill().useSpiritShot() && activeChar.isChargedShot(ShotType.SPIRITSHOTS); + final boolean bss = info.getSkill().useSpiritShot() && activeChar.isChargedShot(ShotType.BLESSED_SPIRITSHOTS); + final boolean mcrit = Formulas.calcMCrit(activeChar.getMCriticalHit(effected, info.getSkill())); + final byte shld = Formulas.calcShldUse(activeChar, effected, info.getSkill()); + double damage = Formulas.calcMagicDam(activeChar, effected, info.getSkill(), shld, sps, bss, mcrit); + int count = 0; + + List effects = effected.getEffectList().getEffects(); + for (BuffInfo buff : effects) + { + if ((buff.getSkill().getId() == 11259) || (buff.getSkill().getId() == 11261) || (buff.getSkill().getId() == 11262)) + { + count++; + } + } + + damage = damage * _power * count; + + if (damage > 0) + { + // reduce damage if target has maxdamage buff + final double maxDamage = (effected.getStat().calcStat(Stats.MAX_SKILL_DAMAGE, 0, null, null)); + if (maxDamage > 0) + { + damage = maxDamage; + } + + // Manage attack or cast break of the target (calculating rate, sending message...) + if (!effected.isRaid() && Formulas.calcAtkBreak(effected, damage)) + { + effected.breakAttack(); + effected.breakCast(); + } + + // Shield Deflect Magic: Reflect all damage on caster. + if (effected.getStat().calcStat(Stats.VENGEANCE_SKILL_MAGIC_DAMAGE, 0, effected, info.getSkill()) > Rnd.get(100)) + { + activeChar.reduceCurrentHp((int) damage, effected, info.getSkill()); + activeChar.notifyDamageReceived((int) damage, effected, info.getSkill(), false, false); + } + else + { + effected.reduceCurrentHp((int) damage, activeChar, info.getSkill()); + effected.notifyDamageReceived((int) damage, activeChar, info.getSkill(), false, false); + activeChar.sendDamageMessage(effected, (int) damage, false, false, false); + } + + effected.getEffectList().stopSkillEffects(true, 11259); + effected.getEffectList().stopSkillEffects(true, 11261); + effected.getEffectList().stopSkillEffects(true, 11262); + } + } +} diff --git a/trunk/dist/game/data/stats/skills/11200-11299.xml b/trunk/dist/game/data/stats/skills/11200-11299.xml index ed7908db17..3b6849a81e 100644 --- a/trunk/dist/game/data/stats/skills/11200-11299.xml +++ b/trunk/dist/game/data/stats/skills/11200-11299.xml @@ -352,13 +352,16 @@ + -318 -323 -328 -333 -338 -343 -348 -343 -348 -353 -358
85 87 89 91 93 95 97 99 101 103 105
54 58 62 66 70 74 78 82 86 90 94
+ 85 89 93 97 101 105 109 113 117 121 125
+ @@ -367,34 +370,46 @@ - - - - + + + + + +
- 85 88 91 94 97 101 103 105
+ -333 -338 -343 -348 -343 -348 -353 -358
+ 91 93 95 97 99 101 103 105
54 60 66 72 78 84 90 96
+ 85 91 97 103 109 117 121 125
- - + + + + + + + +
- 85 87 90 93 96 99 101 103 105
+ -328 -333 -338 -343 -348 -343 -348 -353 -358
+ 89 91 93 95 97 99 101 103 105
54 58 64 70 76 82 88 94 100
+ 85 89 95 101 107 113 117 121 125
@@ -407,23 +422,40 @@ + + + + + + + +
- 85 86 89 92 95 98 101 103 105
+ -328 -333 -338 -343 -348 -343 -348 -353 -358
+ 89 91 93 95 97 99 101 103 105
54 56 62 68 74 80 86 92 98
- + 85 89 95 101 107 113 117 121 125
+ - + + + + + + + +
@@ -683,16 +715,26 @@ 85 86 88 90 92 94 96 98 101 103 105
82 84 88 92 96 100 104 108 112 116 120
- + -318 -323 -328 -333 -338 -343 -348 -343 -348 -353 -358
+ 300 350 400 450 500 550 600 650 700 750 800
+ - - + + + + - + + + + + + +
diff --git a/trunk/dist/game/data/stats/skills/TODO.xlsx b/trunk/dist/game/data/stats/skills/TODO.xlsx index e53bb91606..b9a6c76129 100644 Binary files a/trunk/dist/game/data/stats/skills/TODO.xlsx and b/trunk/dist/game/data/stats/skills/TODO.xlsx differ diff --git a/trunk/dist/game/data/xsd/skills.xsd b/trunk/dist/game/data/xsd/skills.xsd index 4f640f257a..5c9938b7e0 100644 --- a/trunk/dist/game/data/xsd/skills.xsd +++ b/trunk/dist/game/data/xsd/skills.xsd @@ -643,6 +643,7 @@ + diff --git a/trunk/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java b/trunk/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java index 0f6b2799af..700d163e0e 100644 --- a/trunk/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java +++ b/trunk/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java @@ -1,5 +1,4 @@ /* - * 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 @@ -1490,7 +1489,6 @@ public final class L2PcInstance extends L2Playable * Gets all the active quests. * @return a list of active quests */ - public List getAllActiveQuests() { final List quests = new LinkedList<>();