Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: dist/game/data/scripts/handlers/effecthandlers/MarkRetriever.java
- ===================================================================
- --- dist/game/data/scripts/handlers/effecthandlers/MarkRetriever.java (revision 0)
- +++ dist/game/data/scripts/handlers/effecthandlers/MarkRetriever.java (revision 0)
- @@ -0,0 +1,114 @@
- +/*
- + * 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.enums.ShotType;
- +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;
- +import java.util.List;
- +
- +/**
- + * damage for each mark on the target
- + * @author hitnar
- + */
- +public final class MarkRetriever extends AbstractEffect
- +{
- +
- + private final double _mul;
- +
- + public MarkRetriever(Condition attachCond, Condition applyCond, StatsSet set, StatsSet params)
- + {
- + super(attachCond, applyCond, set, params);
- +
- + _mul = params.getDouble("mul", 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 <BuffInfo> effects = effected.getEffectList().getEffects();
- + for (BuffInfo buff : effects){
- + if(buff.getSkill().getId() == 11259 || buff.getSkill().getId() == 11261 || buff.getSkill().getId() == 11262){
- + count++;
- + }
- + }
- +
- + damage = damage * _mul * 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);
- +
- + }
- + }
- +}
- Index: dist/game/data/scripts/handlers/effecthandlers/RegHPandMPofEffector.java
- ===================================================================
- --- dist/game/data/scripts/handlers/effecthandlers/RegHPandMPofEffector.java (revision 0)
- +++ dist/game/data/scripts/handlers/effecthandlers/RegHPandMPofEffector.java (revision 0)
- @@ -0,0 +1,79 @@
- +/*
- + * 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.conditions.Condition;
- +import com.l2jmobius.gameserver.model.effects.AbstractEffect;
- +import com.l2jmobius.gameserver.model.skills.AbnormalType;
- +import com.l2jmobius.gameserver.model.skills.BuffInfo;
- +import com.l2jmobius.gameserver.network.serverpackets.ExRegenMax;
- +
- +/**
- + * Heal HP and MP active char (Not effected).
- + * @author hitnar
- + */
- +public final class RegHPandMPofEffector extends AbstractEffect
- +{
- + private final double _power;
- +
- + public RegHPandMPofEffector(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.getEffector().isDead() || info.getEffector().isDoor())
- + {
- + return false;
- + }
- +
- + double hp = info.getEffector().getCurrentHp();
- + double mp = info.getEffector().getCurrentMp();
- + final double maxhp = info.getEffector().getMaxRecoverableHp();
- + final double maxmp = info.getEffector().getMaxRecoverableMp();
- +
- + // Not needed to set the HP and send update packet if player is already at max HP
- + if (hp >= maxhp && mp >= maxmp)
- + {
- + return false;
- + }
- +
- + hp += _power * getTicksMultiplier();
- + hp = Math.min(hp, maxhp);
- +
- + mp += _power * getTicksMultiplier();
- + mp = Math.min(mp, maxmp);
- +
- + info.getEffector().setCurrentHp(hp);
- + info.getEffector().setCurrentMp(mp);
- + return info.getSkill().isToggle();
- + }
- +
- + @Override
- + public void onStart(BuffInfo info)
- + {
- + if (info.getEffector().isPlayer() && (getTicks() > 0) && (info.getSkill().getAbnormalType() == AbnormalType.HP_RECOVER))
- + {
- + info.getEffector().sendPacket(new ExRegenMax(info.getAbnormalTime(), getTicks(), _power));
- + }
- + }
- +}
- Index: dist/game/data/stats/skills/11200-11299.xml
- ===================================================================
- --- dist/game/data/stats/skills/11200-11299.xml (revision 1328)
- +++ dist/game/data/stats/skills/11200-11299.xml (working copy)
- @@ -352,13 +352,16 @@
- </skill>
- <skill id="11259" levels="11" name="Mark of Weakness">
- <!-- Source: https://l2wiki.com/Mark_of_Weakness_-_Wynn_Spectral_Master -->
- + <table name="#effectPoints"> -318 -323 -328 -333 -338 -343 -348 -343 -348 -353 -358 </table>
- <table name="#magicLvl"> 85 87 89 91 93 95 97 99 101 103 105 </table>
- <table name="#mpConsume"> 54 58 62 66 70 74 78 82 86 90 94 </table>
- + <table name="#Dam"> 85 89 93 97 101 105 109 113 117 121 125 </table>
- <set name="icon" val="icon.skill11259" />
- <set name="magicLvl" val="#magicLvl" />
- <set name="operateType" val="ACTIVE_CONTINUOUS" />
- <set name="mpConsume" val="#mpConsume" />
- <set name="effectRange" val="900" />
- + <set name="effectPoint" val="#effectPoints" />
- <set name="hitTime" val="1200" />
- <set name="coolTime" val="500" />
- <set name="reuseDelay" val="5000" />
- @@ -367,63 +370,96 @@
- <set name="isDebuff" val="true" />
- <set name="targetType" val="ONE" />
- <for>
- - <effect name="Buff">
- - <mul stat="mDef" val="1.3" />
- - <mul stat="pDef" val="1.3" />
- - <mul stat="debuffVuln" val="1.3" />
- + <effect name="Debuff">
- + <mul stat="mDef" val="0.9" />
- + <mul stat="pDef" val="0.9" />
- + </effect>
- + <effect name="DamOverTime" ticks="1">
- + <param power="#Dam" />
- </effect>
- </for>
- </skill>
- <skill id="11260" levels="8" name="Mark of Void">
- <!-- Source: https://l2wiki.com/Mark_of_Void_-_Wynn_Elemental_Master -->
- - <table name="#magicLvl"> 85 88 91 94 97 101 103 105 </table>
- + <table name="#effectPoints"> -333 -338 -343 -348 -343 -348 -353 -358 </table>
- + <table name="#magicLvl"> 91 93 95 97 99 101 103 105 </table>
- <table name="#mpConsume"> 54 60 66 72 78 84 90 96 </table>
- + <table name="#Dam"> 85 91 97 103 109 117 121 125 </table>
- <set name="icon" val="icon.skill11260" />
- <set name="magicLvl" val="#magicLvl" />
- <set name="operateType" val="ACTIVE_CONTINUOUS" />
- <set name="mpConsume" val="#mpConsume" />
- <set name="effectRange" val="900" />
- - <set name="hitTime" val="1490" />
- - <set name="coolTime" val="300" />
- + <set name="effectPoint" val="#effectPoints" />
- + <set name="hitTime" val="1200" />
- + <set name="coolTime" val="500" />
- <set name="reuseDelay" val="5000" />
- <set name="abnormalTime" val="10" />
- <set name="isMagic" val="1" />
- <set name="isDebuff" val="true" />
- <set name="targetType" val="ONE" />
- + <for>
- + <effect name="DamOverTime" ticks="1">
- + <param power="#Dam" />
- + </effect>
- + <effect name="RegHPandMPofEffector" ticks="1">
- + <param power="#Dam" />
- + </effect>
- + </for>
- </skill>
- <skill id="11261" levels="9" name="Mark of Plague">
- <!-- Source: https://l2wiki.com/Mark_of_Plague_-_Wynn_Arcana_Lord -->
- - <table name="#magicLvl"> 85 87 90 93 96 99 101 103 105 </table>
- + <table name="#effectPoints"> -328 -333 -338 -343 -348 -343 -348 -353 -358 </table>
- + <table name="#magicLvl"> 89 91 93 95 97 99 101 103 105 </table>
- <table name="#mpConsume"> 54 58 64 70 76 82 88 94 100 </table>
- + <table name="#Dam"> 85 89 95 101 107 113 117 121 125 </table>
- <set name="icon" val="icon.skill11261" />
- <set name="magicLvl" val="#magicLvl" />
- <set name="operateType" val="ACTIVE_CONTINUOUS" />
- <set name="mpConsume" val="#mpConsume" />
- <set name="effectRange" val="900" />
- - <set name="hitTime" val="1500" />
- + <set name="effectPoint" val="#effectPoints" />
- + <set name="hitTime" val="1200" />
- <set name="coolTime" val="500" />
- <set name="reuseDelay" val="5000" />
- <set name="abnormalTime" val="10" />
- <set name="isMagic" val="1" />
- <set name="isDebuff" val="true" />
- <set name="targetType" val="ONE" />
- + <for>
- + <effect name="Debuff">
- + <mul stat="healEffect" val="0.8" /> <!-- Need Verify -->
- + </effect>
- + <effect name="DamOverTime" ticks="1">
- + <param power="#Dam" />
- + </effect>
- + </for>
- </skill>
- <skill id="11262" levels="9" name="Mark of Trick">
- <!-- Source: https://l2wiki.com/Mark_of_Trick_-_Wynn_Spectral_Master -->
- - <table name="#magicLvl"> 85 86 89 92 95 98 101 103 105 </table>
- + <table name="#effectPoints"> -328 -333 -338 -343 -348 -343 -348 -353 -358 </table>
- + <table name="#magicLvl"> 89 91 93 95 97 99 101 103 105 </table>
- <table name="#mpConsume"> 54 56 62 68 74 80 86 92 98 </table>
- - <set name="icon" val="icon.skill11262" />
- + <table name="#Dam"> 85 89 95 101 107 113 117 121 125 </table>
- + <set name="icon" val="icon.skill11261" />
- <set name="magicLvl" val="#magicLvl" />
- <set name="operateType" val="ACTIVE_CONTINUOUS" />
- <set name="mpConsume" val="#mpConsume" />
- <set name="effectRange" val="900" />
- - <set name="hitTime" val="1500" />
- + <set name="effectPoint" val="#effectPoints" />
- + <set name="hitTime" val="1200" />
- <set name="coolTime" val="500" />
- <set name="reuseDelay" val="5000" />
- <set name="abnormalTime" val="10" />
- <set name="isMagic" val="1" />
- <set name="isDebuff" val="true" />
- <set name="targetType" val="ONE" />
- + <for>
- + <effect name="Mute" />
- + <effect name="DamOverTime" ticks="1">
- + <param power="#Dam" />
- + </effect>
- + </for>
- </skill>
- <skill id="11263" levels="10" name="Invoke">
- <!-- Source: https://l2wiki.com/Invoke_-_Wynn_Elemental_Master -->
- @@ -683,16 +719,26 @@
- <!-- Source: https://l2wiki.com/Mark_Retriever_-_Wynn_Spectral_Master -->
- <table name="#magicLvl"> 85 86 88 90 92 94 96 98 101 103 105 </table>
- <table name="#mpConsume"> 82 84 88 92 96 100 104 108 112 116 120 </table>
- - <set name="icon" val="icon.skill11271" />
- + <table name="#effectPoints"> -318 -323 -328 -333 -338 -343 -348 -343 -348 -353 -358 </table>
- + <table name="#power"> 300 350 400 450 500 550 600 650 700 750 800 </table> <!-- Need Verify -->
- + <set name="icon" val="icon.skill11261" />
- <set name="magicLvl" val="#magicLvl" />
- <set name="operateType" val="ACTIVE_INSTANT" />
- <set name="mpConsume" val="#mpConsume" />
- <set name="effectRange" val="900" />
- - <set name="hitTime" val="1759" />
- - <set name="coolTime" val="300" />
- + <set name="effectPoint" val="#effectPoints" />
- + <set name="power" val="#power" /> <!-- Need Verify -->
- + <set name="hitTime" val="1200" />
- + <set name="coolTime" val="500" />
- <set name="reuseDelay" val="5000" />
- <set name="isMagic" val="1" />
- - <set name="targetType" val="SELF" />
- + <set name="isDebuff" val="true" />
- + <set name="targetType" val="ONE" />
- + <for>
- + <effect name="MarkRetriever" >
- + <param mul="1" /> <!-- For Enchant -->
- + </effect>
- + </for>
- </skill>
- <!-- Level 1 : Switches locations with target servitor. -->
- <!-- Level 101 : Trades places with targeted servitor. Enchant Cost: Decreases MP Consumption. (+ 1 Cost | Decreases MP Consumption.) -->
- @@ -729,19 +775,33 @@
- </skill>
- <skill id="11273" levels="8" name="Exile">
- <!-- Source: https://l2wiki.com/Exile_-_Wynn_Arcana_Lord -->
- + <table name="#effectPoints"> -333 -338 -343 -348 -343 -348 -353 -358 </table>
- <table name="#magicLvl"> 85 88 91 94 97 101 103 105 </table>
- - <table name="#mpConsume"> 78 83 87 92 97 101 103 105 </table>
- + <table name="#mpConsume"> 78 83 87 92 97 102 107 112 </table>
- + <table name="#Dam"> 353 364 374 385 395 409 416 423 </table>
- <set name="icon" val="icon.skill11273" />
- <set name="magicLvl" val="#magicLvl" />
- <set name="operateType" val="ACTIVE_CONTINUOUS" />
- <set name="mpConsume" val="#mpConsume" />
- + <set name="abnormalTime" val="10" /> <!-- Need Verify -->
- + <set name="activateRate" val="90" /> <!-- Need Verify -->
- + <set name="abnormalType" val="MD_DOWN" />
- + <set name="effectPoint" val="#effectPoints" />
- + <set name="effectRange" val="1400" />
- <set name="effectRange" val="600" />
- <set name="hitTime" val="1500" />
- <set name="coolTime" val="500" />
- <set name="reuseDelay" val="60000" />
- <set name="isMagic" val="1" />
- <set name="isDebuff" val="true" />
- - <set name="targetType" val="SELF" />
- + <set name="rideState" val="NONE;STRIDER;WYVERN;WOLF" />
- + <set name="targetType" val="ONE" />
- + <for>
- + <effect name="DamOverTime" ticks="1">
- + <param power="#Dam" />
- + </effect>
- + <effect name="Paralyze" />
- + </for>
- </skill>
- <!-- Level 1 : Becomes invincible with energy from your servitor. Increases HP Recovery Bonus while skill is in effect. Requires a servitor. -->
- <!-- Level 2 : Becomes invincible with energy from your servitor. Increases HP Recovery Bonus while skill is in effect. Requires a servitor. -->
- @@ -856,16 +916,29 @@
- </skill>
- <skill id="11276" levels="6" name="Dimensional Binding">
- <!-- Source: https://l2wiki.com/Dimensional_Binding_-_Wynn_Arcana_Lord -->
- + <table name="#effectPoints"> -343 -348 -343 -348 -353 -358 </table>
- <table name="#magicLvl"> 93 96 99 101 103 105 </table>
- <set name="icon" val="icon.skill11276" />
- <set name="magicLvl" val="#magicLvl" />
- - <set name="operateType" val="ACTIVE_INSTANT" />
- + <set name="operateType" val="ACTIVE_CONTINUOUS" />
- <set name="mpConsume" val="90" />
- <set name="effectRange" val="900" />
- + <set name="abnormalTime" val="10" /> <!-- Need Verify -->
- + <set name="activateRate" val="90" /> <!-- Need Verify -->
- <set name="hitTime" val="10000" />
- <set name="reuseDelay" val="300000" />
- <set name="isDebuff" val="true" />
- - <set name="targetType" val="SELF" />
- + <set name="abnormalType" val="MD_DOWN" />
- + <set name="effectPoint" val="#effectPoints" />
- + <set name="effectRange" val="1400" />
- + <set name="targetType" val="ONE" />
- + <for>
- + <effect name="Debuff">
- + <mul stat="mDef" val="0.7" />
- + <mul stat="pDef" val="0.7" />
- + </effect>
- + <effect name="Root" />
- + </for>
- </skill>
- <skill id="11277" levels="4" name="Sense of Loyalty">
- <!-- AUTO GENERATED SKILL -->
- @@ -1149,19 +1222,32 @@
- </skill>
- <skill id="11296" levels="9" name="Mass Exile">
- <!-- Source: https://l2wiki.com/Mass_Exile_-_Wynn_Elemental_Master -->
- + <table name="#effectPoints"> -333 -338 -343 -348 -343 -348 -353 -358 -363 </table>
- <table name="#magicLvl"> 85 87 90 93 96 99 101 103 105 </table>
- <table name="#mpConsume"> 102 106 112 118 125 132 139 146 153 </table>
- + <table name="#Dam"> 282 288 296 305 313 322 336 343 350</table>
- <set name="icon" val="icon.skill11296" />
- <set name="magicLvl" val="#magicLvl" />
- <set name="operateType" val="ACTIVE_CONTINUOUS" />
- + <set name="abnormalTime" val="10" /> <!-- Need Verify -->
- + <set name="activateRate" val="90" /> <!-- Need Verify -->
- <set name="mpConsume" val="#mpConsume" />
- <set name="effectRange" val="600" />
- + <set name="effectPoint" val="#effectPoints" />
- + <set name="effectRange" val="1400" />
- <set name="hitTime" val="3000" />
- <set name="coolTime" val="500" />
- <set name="reuseDelay" val="300000" />
- <set name="isMagic" val="1" />
- <set name="isDebuff" val="true" />
- - <set name="targetType" val="AREA" />
- + <set name="rideState" val="NONE;STRIDER;WYVERN;WOLF" />
- + <set name="targetType" val="AURA" />
- + <for>
- + <effect name="DamOverTime" ticks="1">
- + <param power="#Dam" />
- + </effect>
- + <effect name="Paralyze" />
- + </for>
- </skill>
- <!-- Level 1 : For 30 minutes, increases the servitor's Max MP by 20%, HP Recovery Bonus by 20%, M. Critical Rate by 20, Critical Damage during a normal attack by 20%, P. Atk. by 10%, P. Def. by 20%, Atk. Spd. by 20%, M. Atk. by 20%, M. Def. by 20%, Casting Spd. by 20%, and Debuff Resistance by 10%. Decreases received Critical Damage by 30% and speed by 15%. -->
- <!-- Level 2 : For 30 minutes, increases the servitor's Max MP by 20%, HP Recovery Bonus by 20%, M. Critical Rate by 20, Critical Damage during a normal attack by 20%, P. Atk. by 10%, P. Def. by 20%, Atk. Spd. by 20%, M. Atk. by 20%, M. Def. by 20%, Casting Spd. by 20%, and Debuff Resistance by 10%. Decreases received Critical Damage by 30% and speed by 10%. -->
- Index: dist/game/data/xsd/skills.xsd
- ===================================================================
- --- dist/game/data/xsd/skills.xsd (revision 1328)
- +++ dist/game/data/xsd/skills.xsd (working copy)
- @@ -643,6 +643,7 @@
- <xs:enumeration value="ManaHealByLevel" />
- <xs:enumeration value="ManaHealOverTime" />
- <xs:enumeration value="ManaHealPercent" />
- + <xs:enumeration value="MarkRetriever" />
- <xs:enumeration value="MaxCp" />
- <xs:enumeration value="MaxHp" />
- <xs:enumeration value="MpConsumePerLevel" />
- @@ -668,6 +669,7 @@
- <xs:enumeration value="Recovery" />
- <xs:enumeration value="Reeling" />
- <xs:enumeration value="RefuelAirship" />
- + <xs:enumeration value="RegHPandMPofEffector" />
- <xs:enumeration value="Relax" />
- <xs:enumeration value="RemoteControl" />
- <xs:enumeration value="RemoveArmor" />
Add Comment
Please, Sign In to add comment