From fe3ad537f66660d1546212de8122f6e0098ca852 Mon Sep 17 00:00:00 2001
From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com>
Date: Fri, 11 Dec 2020 22:44:51 +0000
Subject: [PATCH] Addition of DragonWeaponDefence effect.
---
.../ai/others/DragonWeaponListeners.java | 455 ++++++++++++++++++
.../scripts/handlers/EffectMasterHandler.java | 1 +
.../effecthandlers/DragonWeaponDefence.java | 31 ++
.../game/data/stats/skills/documentation.txt | 1 +
.../model/actor/instance/PlayerInstance.java | 12 +
.../gameserver/model/stats/Formulas.java | 13 +-
.../gameserver/model/stats/Stat.java | 1 +
.../ai/others/DragonWeaponListeners.java | 455 ++++++++++++++++++
.../scripts/handlers/EffectMasterHandler.java | 1 +
.../effecthandlers/DragonWeaponDefence.java | 31 ++
.../game/data/stats/skills/documentation.txt | 1 +
.../model/actor/instance/PlayerInstance.java | 12 +
.../gameserver/model/stats/Formulas.java | 13 +-
.../gameserver/model/stats/Stat.java | 1 +
.../ai/others/DragonWeaponListeners.java | 455 ++++++++++++++++++
.../scripts/handlers/EffectMasterHandler.java | 1 +
.../effecthandlers/DragonWeaponDefence.java | 31 ++
.../game/data/stats/skills/documentation.txt | 1 +
.../model/actor/instance/PlayerInstance.java | 12 +
.../gameserver/model/stats/Formulas.java | 13 +-
.../gameserver/model/stats/Stat.java | 1 +
.../ai/others/DragonWeaponListeners.java | 455 ++++++++++++++++++
.../scripts/handlers/EffectMasterHandler.java | 1 +
.../effecthandlers/DragonWeaponDefence.java | 31 ++
.../game/data/stats/skills/documentation.txt | 1 +
.../model/actor/instance/PlayerInstance.java | 12 +
.../gameserver/model/stats/Formulas.java | 13 +-
.../gameserver/model/stats/Stat.java | 1 +
.../ai/others/DragonWeaponListeners.java | 455 ++++++++++++++++++
.../scripts/handlers/EffectMasterHandler.java | 1 +
.../effecthandlers/DragonWeaponDefence.java | 31 ++
.../game/data/stats/skills/documentation.txt | 1 +
.../model/actor/instance/PlayerInstance.java | 12 +
.../gameserver/model/stats/Formulas.java | 13 +-
.../gameserver/model/stats/Stat.java | 1 +
.../ai/others/DragonWeaponListeners.java | 455 ++++++++++++++++++
.../scripts/handlers/EffectMasterHandler.java | 1 +
.../effecthandlers/DragonWeaponDefence.java | 31 ++
.../game/data/stats/skills/documentation.txt | 1 +
.../model/actor/instance/PlayerInstance.java | 12 +
.../gameserver/model/stats/Formulas.java | 13 +-
.../gameserver/model/stats/Stat.java | 1 +
.../ai/others/DragonWeaponListeners.java | 455 ++++++++++++++++++
.../scripts/handlers/EffectMasterHandler.java | 1 +
.../effecthandlers/DragonWeaponDefence.java | 31 ++
.../game/data/stats/skills/documentation.txt | 1 +
.../model/actor/instance/PlayerInstance.java | 12 +
.../gameserver/model/stats/Formulas.java | 13 +-
.../gameserver/model/stats/Stat.java | 1 +
.../ai/others/DragonWeaponListeners.java | 455 ++++++++++++++++++
.../scripts/handlers/EffectMasterHandler.java | 1 +
.../effecthandlers/DragonWeaponDefence.java | 31 ++
.../game/data/stats/skills/documentation.txt | 1 +
.../model/actor/instance/PlayerInstance.java | 12 +
.../gameserver/model/stats/Formulas.java | 13 +-
.../gameserver/model/stats/Stat.java | 1 +
.../ai/others/DragonWeaponListeners.java | 455 ++++++++++++++++++
.../scripts/handlers/EffectMasterHandler.java | 1 +
.../effecthandlers/DragonWeaponDefence.java | 31 ++
.../game/data/stats/skills/documentation.txt | 1 +
.../model/actor/instance/PlayerInstance.java | 12 +
.../gameserver/model/stats/Formulas.java | 13 +-
.../gameserver/model/stats/Stat.java | 1 +
63 files changed, 4617 insertions(+), 9 deletions(-)
create mode 100644 L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/DragonWeaponListeners.java
create mode 100644 L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/DragonWeaponDefence.java
create mode 100644 L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/DragonWeaponListeners.java
create mode 100644 L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/DragonWeaponDefence.java
create mode 100644 L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/DragonWeaponListeners.java
create mode 100644 L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/DragonWeaponDefence.java
create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/DragonWeaponListeners.java
create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/DragonWeaponDefence.java
create mode 100644 L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/others/DragonWeaponListeners.java
create mode 100644 L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/DragonWeaponDefence.java
create mode 100644 L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/others/DragonWeaponListeners.java
create mode 100644 L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/DragonWeaponDefence.java
create mode 100644 L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/others/DragonWeaponListeners.java
create mode 100644 L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/DragonWeaponDefence.java
create mode 100644 L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/ai/others/DragonWeaponListeners.java
create mode 100644 L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/DragonWeaponDefence.java
create mode 100644 L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/ai/others/DragonWeaponListeners.java
create mode 100644 L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/handlers/effecthandlers/DragonWeaponDefence.java
diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/DragonWeaponListeners.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/DragonWeaponListeners.java
new file mode 100644
index 0000000000..085dcb2ca6
--- /dev/null
+++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/DragonWeaponListeners.java
@@ -0,0 +1,455 @@
+/*
+ * 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 ai.others;
+
+import org.l2jmobius.commons.util.CommonUtil;
+import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import org.l2jmobius.gameserver.model.events.EventType;
+import org.l2jmobius.gameserver.model.events.ListenerRegisterType;
+import org.l2jmobius.gameserver.model.events.annotations.Id;
+import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
+import org.l2jmobius.gameserver.model.events.annotations.RegisterType;
+import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemEquip;
+import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemUnequip;
+import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerLogin;
+import org.l2jmobius.gameserver.model.items.Weapon;
+
+import ai.AbstractNpcAI;
+
+/**
+ * @author Mobius
+ */
+public class DragonWeaponListeners extends AbstractNpcAI
+{
+ private static final int[] WEAPON_IDS =
+ {
+ 36417,
+ 36418,
+ 36419,
+ 36420,
+ 36421,
+ 36422,
+ 36423,
+ 36424,
+ 36425,
+ 36426,
+ 36441,
+ 36442,
+ 36443,
+ 36444,
+ 36445,
+ 36446,
+ 36447,
+ 36448,
+ 36449,
+ 36450,
+ 36465,
+ 36466,
+ 36467,
+ 36468,
+ 36469,
+ 36470,
+ 36471,
+ 36472,
+ 36473,
+ 36474,
+ 36489,
+ 36490,
+ 36491,
+ 36492,
+ 36493,
+ 36494,
+ 36495,
+ 36496,
+ 36497,
+ 36498,
+ 36427,
+ 36428,
+ 36429,
+ 36430,
+ 36431,
+ 36432,
+ 36433,
+ 36451,
+ 36452,
+ 36453,
+ 36454,
+ 36455,
+ 36456,
+ 36457,
+ 36475,
+ 36476,
+ 36477,
+ 36478,
+ 36479,
+ 36480,
+ 36481,
+ 36499,
+ 36500,
+ 36501,
+ 36502,
+ 36503,
+ 36504,
+ 36505,
+ 36434,
+ 36435,
+ 36436,
+ 36437,
+ 36438,
+ 36439,
+ 36440,
+ 36458,
+ 36459,
+ 36460,
+ 36461,
+ 36462,
+ 36463,
+ 36464,
+ 36482,
+ 36483,
+ 36484,
+ 36485,
+ 36486,
+ 36487,
+ 36488,
+ 36506,
+ 36507,
+ 36508,
+ 36509,
+ 36510,
+ 36511,
+ 36512,
+ 80066,
+ 80067,
+ 80068,
+ 80069,
+ 80070,
+ 80071,
+ 80072,
+ 80073,
+ 80074,
+ 80075,
+ 80076,
+ 80077,
+ 80078,
+ 80079,
+ 80080,
+ 80081,
+ 80082,
+ 80083,
+ 80084,
+ 80085,
+ 80086,
+ 80087,
+ 80088,
+ 80089,
+ 80315,
+ 80316,
+ 80317,
+ 80318,
+ };
+
+ @RegisterEvent(EventType.ON_PLAYER_LOGIN)
+ @RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
+ public void onPlayerLogin(OnPlayerLogin event)
+ {
+ final PlayerInstance player = event.getPlayer();
+ if (player != null)
+ {
+ final Weapon weapon = player.getActiveWeaponItem();
+ if ((weapon != null) && CommonUtil.contains(WEAPON_IDS, weapon.getId()))
+ {
+ player.setDragonWeaponEquipped(true);
+ }
+ }
+ }
+
+ @RegisterEvent(EventType.ON_PLAYER_ITEM_EQUIP)
+ @RegisterType(ListenerRegisterType.ITEM)
+ @Id(36417)
+ @Id(36418)
+ @Id(36419)
+ @Id(36420)
+ @Id(36421)
+ @Id(36422)
+ @Id(36423)
+ @Id(36424)
+ @Id(36425)
+ @Id(36426)
+ @Id(36441)
+ @Id(36442)
+ @Id(36443)
+ @Id(36444)
+ @Id(36445)
+ @Id(36446)
+ @Id(36447)
+ @Id(36448)
+ @Id(36449)
+ @Id(36450)
+ @Id(36465)
+ @Id(36466)
+ @Id(36467)
+ @Id(36468)
+ @Id(36469)
+ @Id(36470)
+ @Id(36471)
+ @Id(36472)
+ @Id(36473)
+ @Id(36474)
+ @Id(36489)
+ @Id(36490)
+ @Id(36491)
+ @Id(36492)
+ @Id(36493)
+ @Id(36494)
+ @Id(36495)
+ @Id(36496)
+ @Id(36497)
+ @Id(36498)
+ @Id(36427)
+ @Id(36428)
+ @Id(36429)
+ @Id(36430)
+ @Id(36431)
+ @Id(36432)
+ @Id(36433)
+ @Id(36451)
+ @Id(36452)
+ @Id(36453)
+ @Id(36454)
+ @Id(36455)
+ @Id(36456)
+ @Id(36457)
+ @Id(36475)
+ @Id(36476)
+ @Id(36477)
+ @Id(36478)
+ @Id(36479)
+ @Id(36480)
+ @Id(36481)
+ @Id(36499)
+ @Id(36500)
+ @Id(36501)
+ @Id(36502)
+ @Id(36503)
+ @Id(36504)
+ @Id(36505)
+ @Id(36434)
+ @Id(36435)
+ @Id(36436)
+ @Id(36437)
+ @Id(36438)
+ @Id(36439)
+ @Id(36440)
+ @Id(36458)
+ @Id(36459)
+ @Id(36460)
+ @Id(36461)
+ @Id(36462)
+ @Id(36463)
+ @Id(36464)
+ @Id(36482)
+ @Id(36483)
+ @Id(36484)
+ @Id(36485)
+ @Id(36486)
+ @Id(36487)
+ @Id(36488)
+ @Id(36506)
+ @Id(36507)
+ @Id(36508)
+ @Id(36509)
+ @Id(36510)
+ @Id(36511)
+ @Id(36512)
+ @Id(80066)
+ @Id(80067)
+ @Id(80068)
+ @Id(80069)
+ @Id(80070)
+ @Id(80071)
+ @Id(80072)
+ @Id(80073)
+ @Id(80074)
+ @Id(80075)
+ @Id(80076)
+ @Id(80077)
+ @Id(80078)
+ @Id(80079)
+ @Id(80080)
+ @Id(80081)
+ @Id(80082)
+ @Id(80083)
+ @Id(80084)
+ @Id(80085)
+ @Id(80086)
+ @Id(80087)
+ @Id(80088)
+ @Id(80089)
+ @Id(80315)
+ @Id(80316)
+ @Id(80317)
+ @Id(80318)
+ public void onPlayerItemEquip(OnPlayerItemEquip event)
+ {
+ final PlayerInstance player = event.getPlayer();
+ if (player != null)
+ {
+ player.setDragonWeaponEquipped(true);
+ }
+ }
+
+ @RegisterEvent(EventType.ON_PLAYER_ITEM_UNEQUIP)
+ @RegisterType(ListenerRegisterType.ITEM)
+ @Id(36417)
+ @Id(36418)
+ @Id(36419)
+ @Id(36420)
+ @Id(36421)
+ @Id(36422)
+ @Id(36423)
+ @Id(36424)
+ @Id(36425)
+ @Id(36426)
+ @Id(36441)
+ @Id(36442)
+ @Id(36443)
+ @Id(36444)
+ @Id(36445)
+ @Id(36446)
+ @Id(36447)
+ @Id(36448)
+ @Id(36449)
+ @Id(36450)
+ @Id(36465)
+ @Id(36466)
+ @Id(36467)
+ @Id(36468)
+ @Id(36469)
+ @Id(36470)
+ @Id(36471)
+ @Id(36472)
+ @Id(36473)
+ @Id(36474)
+ @Id(36489)
+ @Id(36490)
+ @Id(36491)
+ @Id(36492)
+ @Id(36493)
+ @Id(36494)
+ @Id(36495)
+ @Id(36496)
+ @Id(36497)
+ @Id(36498)
+ @Id(36427)
+ @Id(36428)
+ @Id(36429)
+ @Id(36430)
+ @Id(36431)
+ @Id(36432)
+ @Id(36433)
+ @Id(36451)
+ @Id(36452)
+ @Id(36453)
+ @Id(36454)
+ @Id(36455)
+ @Id(36456)
+ @Id(36457)
+ @Id(36475)
+ @Id(36476)
+ @Id(36477)
+ @Id(36478)
+ @Id(36479)
+ @Id(36480)
+ @Id(36481)
+ @Id(36499)
+ @Id(36500)
+ @Id(36501)
+ @Id(36502)
+ @Id(36503)
+ @Id(36504)
+ @Id(36505)
+ @Id(36434)
+ @Id(36435)
+ @Id(36436)
+ @Id(36437)
+ @Id(36438)
+ @Id(36439)
+ @Id(36440)
+ @Id(36458)
+ @Id(36459)
+ @Id(36460)
+ @Id(36461)
+ @Id(36462)
+ @Id(36463)
+ @Id(36464)
+ @Id(36482)
+ @Id(36483)
+ @Id(36484)
+ @Id(36485)
+ @Id(36486)
+ @Id(36487)
+ @Id(36488)
+ @Id(36506)
+ @Id(36507)
+ @Id(36508)
+ @Id(36509)
+ @Id(36510)
+ @Id(36511)
+ @Id(36512)
+ @Id(80066)
+ @Id(80067)
+ @Id(80068)
+ @Id(80069)
+ @Id(80070)
+ @Id(80071)
+ @Id(80072)
+ @Id(80073)
+ @Id(80074)
+ @Id(80075)
+ @Id(80076)
+ @Id(80077)
+ @Id(80078)
+ @Id(80079)
+ @Id(80080)
+ @Id(80081)
+ @Id(80082)
+ @Id(80083)
+ @Id(80084)
+ @Id(80085)
+ @Id(80086)
+ @Id(80087)
+ @Id(80088)
+ @Id(80089)
+ @Id(80315)
+ @Id(80316)
+ @Id(80317)
+ @Id(80318)
+ public void onPlayerItemUnequip(OnPlayerItemUnequip event)
+ {
+ final PlayerInstance player = event.getPlayer();
+ if (player != null)
+ {
+ player.setDragonWeaponEquipped(false);
+ }
+ }
+
+ public static void main(String[] args)
+ {
+ new DragonWeaponListeners();
+ }
+}
diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/EffectMasterHandler.java
index f74b919d21..625acb31bd 100644
--- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/EffectMasterHandler.java
+++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/EffectMasterHandler.java
@@ -131,6 +131,7 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("DispelBySlotMyself", DispelBySlotMyself::new);
EffectHandler.getInstance().registerHandler("DispelBySlotProbability", DispelBySlotProbability::new);
EffectHandler.getInstance().registerHandler("DoubleCast", DoubleCast::new);
+ EffectHandler.getInstance().registerHandler("DragonWeaponDefence", DragonWeaponDefence::new);
EffectHandler.getInstance().registerHandler("DuelistFury", DuelistFury::new);
EffectHandler.getInstance().registerHandler("EnableCloak", EnableCloak::new);
EffectHandler.getInstance().registerHandler("EnergyAttack", EnergyAttack::new);
diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/DragonWeaponDefence.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/DragonWeaponDefence.java
new file mode 100644
index 0000000000..476fb537ad
--- /dev/null
+++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/DragonWeaponDefence.java
@@ -0,0 +1,31 @@
+/*
+ * 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 org.l2jmobius.gameserver.model.StatSet;
+import org.l2jmobius.gameserver.model.stats.Stat;
+
+/**
+ * @author Mobius
+ */
+public class DragonWeaponDefence extends AbstractStatPercentEffect
+{
+ public DragonWeaponDefence(StatSet params)
+ {
+ super(params, Stat.DRAGON_WEAPON_DEFENCE);
+ }
+}
diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/documentation.txt
index ce8789186d..8412091b1d 100644
--- a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/documentation.txt
+++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/documentation.txt
@@ -101,6 +101,7 @@ DispelBySlot: Removes given amount of target's effects by specified AbnormalType
DispelBySlotMyself: Removes given amount of effects by specified AbnormalType
DispelBySlotProbability: Removes given amount of effects by specified AbnormalType at a given rate.
DoubleCast: Triggers Fire, Water, Wind, Earth stance and enables the ability to cast two skills at once.
+DragonWeaponDefence: Dragon weapon defence stat. (l2jmobius)
DuelistFury: Synergy effect for Faceoff effect. (l2jmobius)
EnableCloak: See/unsee cloaks.
EnemyCharge: Charges towards the enemy. Rush Impact.
diff --git a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
index ffc9ac7430..ed26f41c12 100644
--- a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
+++ b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
@@ -748,6 +748,8 @@ public class PlayerInstance extends Playable
private int _cursedWeaponEquippedId = 0;
private boolean _combatFlagEquippedId = false;
+ private boolean _isDragonWeaponEquipped = false;
+
private boolean _canRevive = true;
private int _reviveRequested = 0;
private double _revivePower = 0;
@@ -11378,6 +11380,16 @@ public class PlayerInstance extends Playable
return _cursedWeaponEquippedId;
}
+ public void setDragonWeaponEquipped(boolean value)
+ {
+ _isDragonWeaponEquipped = value;
+ }
+
+ public boolean isDragonWeaponEquipped()
+ {
+ return _isDragonWeaponEquipped;
+ }
+
public boolean isCombatFlagEquipped()
{
return _combatFlagEquippedId;
diff --git a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/Formulas.java
index 07500a7bfc..4ba05aa2a2 100644
--- a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/Formulas.java
+++ b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/Formulas.java
@@ -1604,7 +1604,18 @@ public class Formulas
pvpDefense = target.getStat().getValue(Stat.PVP_PHYSICAL_ATTACK_DEFENCE, 1) * Config.PVP_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
}
- return Math.max(0.05, 1 + (pvpAttack - pvpDefense)); // Bonus should not be negative.
+ // Dragon weapon defence stat.
+ final double dragonDefense;
+ if (attackerPlayer.isDragonWeaponEquipped())
+ {
+ dragonDefense = target.getStat().getValue(Stat.DRAGON_WEAPON_DEFENCE, 1);
+ }
+ else
+ {
+ dragonDefense = 1;
+ }
+
+ return Math.max(0.05, dragonDefense * (1 + (pvpAttack - pvpDefense))); // Bonus should not be negative.
}
// PvE Bonus
diff --git a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/Stat.java
index 39806ebbfb..641f7cce81 100644
--- a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/Stat.java
+++ b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/Stat.java
@@ -87,6 +87,7 @@ public enum Stat
CRITICAL_DAMAGE_ADD("cAtkAdd"), // this is another type for special critical damage mods - vicious stance, critical power and critical damage SA
HATE_ATTACK("attackHate"),
REAR_DAMAGE_RATE("rearDamage"),
+ DRAGON_WEAPON_DEFENCE("dragonWeaponDefence"),
// PVP BONUS
PVP_PHYSICAL_ATTACK_DAMAGE("pvpPhysDmg"),
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/DragonWeaponListeners.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/DragonWeaponListeners.java
new file mode 100644
index 0000000000..085dcb2ca6
--- /dev/null
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/DragonWeaponListeners.java
@@ -0,0 +1,455 @@
+/*
+ * 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 ai.others;
+
+import org.l2jmobius.commons.util.CommonUtil;
+import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import org.l2jmobius.gameserver.model.events.EventType;
+import org.l2jmobius.gameserver.model.events.ListenerRegisterType;
+import org.l2jmobius.gameserver.model.events.annotations.Id;
+import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
+import org.l2jmobius.gameserver.model.events.annotations.RegisterType;
+import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemEquip;
+import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemUnequip;
+import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerLogin;
+import org.l2jmobius.gameserver.model.items.Weapon;
+
+import ai.AbstractNpcAI;
+
+/**
+ * @author Mobius
+ */
+public class DragonWeaponListeners extends AbstractNpcAI
+{
+ private static final int[] WEAPON_IDS =
+ {
+ 36417,
+ 36418,
+ 36419,
+ 36420,
+ 36421,
+ 36422,
+ 36423,
+ 36424,
+ 36425,
+ 36426,
+ 36441,
+ 36442,
+ 36443,
+ 36444,
+ 36445,
+ 36446,
+ 36447,
+ 36448,
+ 36449,
+ 36450,
+ 36465,
+ 36466,
+ 36467,
+ 36468,
+ 36469,
+ 36470,
+ 36471,
+ 36472,
+ 36473,
+ 36474,
+ 36489,
+ 36490,
+ 36491,
+ 36492,
+ 36493,
+ 36494,
+ 36495,
+ 36496,
+ 36497,
+ 36498,
+ 36427,
+ 36428,
+ 36429,
+ 36430,
+ 36431,
+ 36432,
+ 36433,
+ 36451,
+ 36452,
+ 36453,
+ 36454,
+ 36455,
+ 36456,
+ 36457,
+ 36475,
+ 36476,
+ 36477,
+ 36478,
+ 36479,
+ 36480,
+ 36481,
+ 36499,
+ 36500,
+ 36501,
+ 36502,
+ 36503,
+ 36504,
+ 36505,
+ 36434,
+ 36435,
+ 36436,
+ 36437,
+ 36438,
+ 36439,
+ 36440,
+ 36458,
+ 36459,
+ 36460,
+ 36461,
+ 36462,
+ 36463,
+ 36464,
+ 36482,
+ 36483,
+ 36484,
+ 36485,
+ 36486,
+ 36487,
+ 36488,
+ 36506,
+ 36507,
+ 36508,
+ 36509,
+ 36510,
+ 36511,
+ 36512,
+ 80066,
+ 80067,
+ 80068,
+ 80069,
+ 80070,
+ 80071,
+ 80072,
+ 80073,
+ 80074,
+ 80075,
+ 80076,
+ 80077,
+ 80078,
+ 80079,
+ 80080,
+ 80081,
+ 80082,
+ 80083,
+ 80084,
+ 80085,
+ 80086,
+ 80087,
+ 80088,
+ 80089,
+ 80315,
+ 80316,
+ 80317,
+ 80318,
+ };
+
+ @RegisterEvent(EventType.ON_PLAYER_LOGIN)
+ @RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
+ public void onPlayerLogin(OnPlayerLogin event)
+ {
+ final PlayerInstance player = event.getPlayer();
+ if (player != null)
+ {
+ final Weapon weapon = player.getActiveWeaponItem();
+ if ((weapon != null) && CommonUtil.contains(WEAPON_IDS, weapon.getId()))
+ {
+ player.setDragonWeaponEquipped(true);
+ }
+ }
+ }
+
+ @RegisterEvent(EventType.ON_PLAYER_ITEM_EQUIP)
+ @RegisterType(ListenerRegisterType.ITEM)
+ @Id(36417)
+ @Id(36418)
+ @Id(36419)
+ @Id(36420)
+ @Id(36421)
+ @Id(36422)
+ @Id(36423)
+ @Id(36424)
+ @Id(36425)
+ @Id(36426)
+ @Id(36441)
+ @Id(36442)
+ @Id(36443)
+ @Id(36444)
+ @Id(36445)
+ @Id(36446)
+ @Id(36447)
+ @Id(36448)
+ @Id(36449)
+ @Id(36450)
+ @Id(36465)
+ @Id(36466)
+ @Id(36467)
+ @Id(36468)
+ @Id(36469)
+ @Id(36470)
+ @Id(36471)
+ @Id(36472)
+ @Id(36473)
+ @Id(36474)
+ @Id(36489)
+ @Id(36490)
+ @Id(36491)
+ @Id(36492)
+ @Id(36493)
+ @Id(36494)
+ @Id(36495)
+ @Id(36496)
+ @Id(36497)
+ @Id(36498)
+ @Id(36427)
+ @Id(36428)
+ @Id(36429)
+ @Id(36430)
+ @Id(36431)
+ @Id(36432)
+ @Id(36433)
+ @Id(36451)
+ @Id(36452)
+ @Id(36453)
+ @Id(36454)
+ @Id(36455)
+ @Id(36456)
+ @Id(36457)
+ @Id(36475)
+ @Id(36476)
+ @Id(36477)
+ @Id(36478)
+ @Id(36479)
+ @Id(36480)
+ @Id(36481)
+ @Id(36499)
+ @Id(36500)
+ @Id(36501)
+ @Id(36502)
+ @Id(36503)
+ @Id(36504)
+ @Id(36505)
+ @Id(36434)
+ @Id(36435)
+ @Id(36436)
+ @Id(36437)
+ @Id(36438)
+ @Id(36439)
+ @Id(36440)
+ @Id(36458)
+ @Id(36459)
+ @Id(36460)
+ @Id(36461)
+ @Id(36462)
+ @Id(36463)
+ @Id(36464)
+ @Id(36482)
+ @Id(36483)
+ @Id(36484)
+ @Id(36485)
+ @Id(36486)
+ @Id(36487)
+ @Id(36488)
+ @Id(36506)
+ @Id(36507)
+ @Id(36508)
+ @Id(36509)
+ @Id(36510)
+ @Id(36511)
+ @Id(36512)
+ @Id(80066)
+ @Id(80067)
+ @Id(80068)
+ @Id(80069)
+ @Id(80070)
+ @Id(80071)
+ @Id(80072)
+ @Id(80073)
+ @Id(80074)
+ @Id(80075)
+ @Id(80076)
+ @Id(80077)
+ @Id(80078)
+ @Id(80079)
+ @Id(80080)
+ @Id(80081)
+ @Id(80082)
+ @Id(80083)
+ @Id(80084)
+ @Id(80085)
+ @Id(80086)
+ @Id(80087)
+ @Id(80088)
+ @Id(80089)
+ @Id(80315)
+ @Id(80316)
+ @Id(80317)
+ @Id(80318)
+ public void onPlayerItemEquip(OnPlayerItemEquip event)
+ {
+ final PlayerInstance player = event.getPlayer();
+ if (player != null)
+ {
+ player.setDragonWeaponEquipped(true);
+ }
+ }
+
+ @RegisterEvent(EventType.ON_PLAYER_ITEM_UNEQUIP)
+ @RegisterType(ListenerRegisterType.ITEM)
+ @Id(36417)
+ @Id(36418)
+ @Id(36419)
+ @Id(36420)
+ @Id(36421)
+ @Id(36422)
+ @Id(36423)
+ @Id(36424)
+ @Id(36425)
+ @Id(36426)
+ @Id(36441)
+ @Id(36442)
+ @Id(36443)
+ @Id(36444)
+ @Id(36445)
+ @Id(36446)
+ @Id(36447)
+ @Id(36448)
+ @Id(36449)
+ @Id(36450)
+ @Id(36465)
+ @Id(36466)
+ @Id(36467)
+ @Id(36468)
+ @Id(36469)
+ @Id(36470)
+ @Id(36471)
+ @Id(36472)
+ @Id(36473)
+ @Id(36474)
+ @Id(36489)
+ @Id(36490)
+ @Id(36491)
+ @Id(36492)
+ @Id(36493)
+ @Id(36494)
+ @Id(36495)
+ @Id(36496)
+ @Id(36497)
+ @Id(36498)
+ @Id(36427)
+ @Id(36428)
+ @Id(36429)
+ @Id(36430)
+ @Id(36431)
+ @Id(36432)
+ @Id(36433)
+ @Id(36451)
+ @Id(36452)
+ @Id(36453)
+ @Id(36454)
+ @Id(36455)
+ @Id(36456)
+ @Id(36457)
+ @Id(36475)
+ @Id(36476)
+ @Id(36477)
+ @Id(36478)
+ @Id(36479)
+ @Id(36480)
+ @Id(36481)
+ @Id(36499)
+ @Id(36500)
+ @Id(36501)
+ @Id(36502)
+ @Id(36503)
+ @Id(36504)
+ @Id(36505)
+ @Id(36434)
+ @Id(36435)
+ @Id(36436)
+ @Id(36437)
+ @Id(36438)
+ @Id(36439)
+ @Id(36440)
+ @Id(36458)
+ @Id(36459)
+ @Id(36460)
+ @Id(36461)
+ @Id(36462)
+ @Id(36463)
+ @Id(36464)
+ @Id(36482)
+ @Id(36483)
+ @Id(36484)
+ @Id(36485)
+ @Id(36486)
+ @Id(36487)
+ @Id(36488)
+ @Id(36506)
+ @Id(36507)
+ @Id(36508)
+ @Id(36509)
+ @Id(36510)
+ @Id(36511)
+ @Id(36512)
+ @Id(80066)
+ @Id(80067)
+ @Id(80068)
+ @Id(80069)
+ @Id(80070)
+ @Id(80071)
+ @Id(80072)
+ @Id(80073)
+ @Id(80074)
+ @Id(80075)
+ @Id(80076)
+ @Id(80077)
+ @Id(80078)
+ @Id(80079)
+ @Id(80080)
+ @Id(80081)
+ @Id(80082)
+ @Id(80083)
+ @Id(80084)
+ @Id(80085)
+ @Id(80086)
+ @Id(80087)
+ @Id(80088)
+ @Id(80089)
+ @Id(80315)
+ @Id(80316)
+ @Id(80317)
+ @Id(80318)
+ public void onPlayerItemUnequip(OnPlayerItemUnequip event)
+ {
+ final PlayerInstance player = event.getPlayer();
+ if (player != null)
+ {
+ player.setDragonWeaponEquipped(false);
+ }
+ }
+
+ public static void main(String[] args)
+ {
+ new DragonWeaponListeners();
+ }
+}
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/EffectMasterHandler.java
index f74b919d21..625acb31bd 100644
--- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/EffectMasterHandler.java
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/EffectMasterHandler.java
@@ -131,6 +131,7 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("DispelBySlotMyself", DispelBySlotMyself::new);
EffectHandler.getInstance().registerHandler("DispelBySlotProbability", DispelBySlotProbability::new);
EffectHandler.getInstance().registerHandler("DoubleCast", DoubleCast::new);
+ EffectHandler.getInstance().registerHandler("DragonWeaponDefence", DragonWeaponDefence::new);
EffectHandler.getInstance().registerHandler("DuelistFury", DuelistFury::new);
EffectHandler.getInstance().registerHandler("EnableCloak", EnableCloak::new);
EffectHandler.getInstance().registerHandler("EnergyAttack", EnergyAttack::new);
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/DragonWeaponDefence.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/DragonWeaponDefence.java
new file mode 100644
index 0000000000..476fb537ad
--- /dev/null
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/DragonWeaponDefence.java
@@ -0,0 +1,31 @@
+/*
+ * 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 org.l2jmobius.gameserver.model.StatSet;
+import org.l2jmobius.gameserver.model.stats.Stat;
+
+/**
+ * @author Mobius
+ */
+public class DragonWeaponDefence extends AbstractStatPercentEffect
+{
+ public DragonWeaponDefence(StatSet params)
+ {
+ super(params, Stat.DRAGON_WEAPON_DEFENCE);
+ }
+}
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_2.5_Underground/dist/game/data/stats/skills/documentation.txt
index ce8789186d..8412091b1d 100644
--- a/L2J_Mobius_2.5_Underground/dist/game/data/stats/skills/documentation.txt
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/stats/skills/documentation.txt
@@ -101,6 +101,7 @@ DispelBySlot: Removes given amount of target's effects by specified AbnormalType
DispelBySlotMyself: Removes given amount of effects by specified AbnormalType
DispelBySlotProbability: Removes given amount of effects by specified AbnormalType at a given rate.
DoubleCast: Triggers Fire, Water, Wind, Earth stance and enables the ability to cast two skills at once.
+DragonWeaponDefence: Dragon weapon defence stat. (l2jmobius)
DuelistFury: Synergy effect for Faceoff effect. (l2jmobius)
EnableCloak: See/unsee cloaks.
EnemyCharge: Charges towards the enemy. Rush Impact.
diff --git a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
index dbe9c5ff54..9969ad0c39 100644
--- a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
+++ b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
@@ -750,6 +750,8 @@ public class PlayerInstance extends Playable
private int _cursedWeaponEquippedId = 0;
private boolean _combatFlagEquippedId = false;
+ private boolean _isDragonWeaponEquipped = false;
+
private boolean _canRevive = true;
private int _reviveRequested = 0;
private double _revivePower = 0;
@@ -11385,6 +11387,16 @@ public class PlayerInstance extends Playable
return _cursedWeaponEquippedId;
}
+ public void setDragonWeaponEquipped(boolean value)
+ {
+ _isDragonWeaponEquipped = value;
+ }
+
+ public boolean isDragonWeaponEquipped()
+ {
+ return _isDragonWeaponEquipped;
+ }
+
public boolean isCombatFlagEquipped()
{
return _combatFlagEquippedId;
diff --git a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/stats/Formulas.java
index 07500a7bfc..4ba05aa2a2 100644
--- a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/stats/Formulas.java
+++ b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/stats/Formulas.java
@@ -1604,7 +1604,18 @@ public class Formulas
pvpDefense = target.getStat().getValue(Stat.PVP_PHYSICAL_ATTACK_DEFENCE, 1) * Config.PVP_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
}
- return Math.max(0.05, 1 + (pvpAttack - pvpDefense)); // Bonus should not be negative.
+ // Dragon weapon defence stat.
+ final double dragonDefense;
+ if (attackerPlayer.isDragonWeaponEquipped())
+ {
+ dragonDefense = target.getStat().getValue(Stat.DRAGON_WEAPON_DEFENCE, 1);
+ }
+ else
+ {
+ dragonDefense = 1;
+ }
+
+ return Math.max(0.05, dragonDefense * (1 + (pvpAttack - pvpDefense))); // Bonus should not be negative.
}
// PvE Bonus
diff --git a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/stats/Stat.java
index 39806ebbfb..641f7cce81 100644
--- a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/stats/Stat.java
+++ b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/stats/Stat.java
@@ -87,6 +87,7 @@ public enum Stat
CRITICAL_DAMAGE_ADD("cAtkAdd"), // this is another type for special critical damage mods - vicious stance, critical power and critical damage SA
HATE_ATTACK("attackHate"),
REAR_DAMAGE_RATE("rearDamage"),
+ DRAGON_WEAPON_DEFENCE("dragonWeaponDefence"),
// PVP BONUS
PVP_PHYSICAL_ATTACK_DAMAGE("pvpPhysDmg"),
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/DragonWeaponListeners.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/DragonWeaponListeners.java
new file mode 100644
index 0000000000..085dcb2ca6
--- /dev/null
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/DragonWeaponListeners.java
@@ -0,0 +1,455 @@
+/*
+ * 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 ai.others;
+
+import org.l2jmobius.commons.util.CommonUtil;
+import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import org.l2jmobius.gameserver.model.events.EventType;
+import org.l2jmobius.gameserver.model.events.ListenerRegisterType;
+import org.l2jmobius.gameserver.model.events.annotations.Id;
+import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
+import org.l2jmobius.gameserver.model.events.annotations.RegisterType;
+import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemEquip;
+import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemUnequip;
+import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerLogin;
+import org.l2jmobius.gameserver.model.items.Weapon;
+
+import ai.AbstractNpcAI;
+
+/**
+ * @author Mobius
+ */
+public class DragonWeaponListeners extends AbstractNpcAI
+{
+ private static final int[] WEAPON_IDS =
+ {
+ 36417,
+ 36418,
+ 36419,
+ 36420,
+ 36421,
+ 36422,
+ 36423,
+ 36424,
+ 36425,
+ 36426,
+ 36441,
+ 36442,
+ 36443,
+ 36444,
+ 36445,
+ 36446,
+ 36447,
+ 36448,
+ 36449,
+ 36450,
+ 36465,
+ 36466,
+ 36467,
+ 36468,
+ 36469,
+ 36470,
+ 36471,
+ 36472,
+ 36473,
+ 36474,
+ 36489,
+ 36490,
+ 36491,
+ 36492,
+ 36493,
+ 36494,
+ 36495,
+ 36496,
+ 36497,
+ 36498,
+ 36427,
+ 36428,
+ 36429,
+ 36430,
+ 36431,
+ 36432,
+ 36433,
+ 36451,
+ 36452,
+ 36453,
+ 36454,
+ 36455,
+ 36456,
+ 36457,
+ 36475,
+ 36476,
+ 36477,
+ 36478,
+ 36479,
+ 36480,
+ 36481,
+ 36499,
+ 36500,
+ 36501,
+ 36502,
+ 36503,
+ 36504,
+ 36505,
+ 36434,
+ 36435,
+ 36436,
+ 36437,
+ 36438,
+ 36439,
+ 36440,
+ 36458,
+ 36459,
+ 36460,
+ 36461,
+ 36462,
+ 36463,
+ 36464,
+ 36482,
+ 36483,
+ 36484,
+ 36485,
+ 36486,
+ 36487,
+ 36488,
+ 36506,
+ 36507,
+ 36508,
+ 36509,
+ 36510,
+ 36511,
+ 36512,
+ 80066,
+ 80067,
+ 80068,
+ 80069,
+ 80070,
+ 80071,
+ 80072,
+ 80073,
+ 80074,
+ 80075,
+ 80076,
+ 80077,
+ 80078,
+ 80079,
+ 80080,
+ 80081,
+ 80082,
+ 80083,
+ 80084,
+ 80085,
+ 80086,
+ 80087,
+ 80088,
+ 80089,
+ 80315,
+ 80316,
+ 80317,
+ 80318,
+ };
+
+ @RegisterEvent(EventType.ON_PLAYER_LOGIN)
+ @RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
+ public void onPlayerLogin(OnPlayerLogin event)
+ {
+ final PlayerInstance player = event.getPlayer();
+ if (player != null)
+ {
+ final Weapon weapon = player.getActiveWeaponItem();
+ if ((weapon != null) && CommonUtil.contains(WEAPON_IDS, weapon.getId()))
+ {
+ player.setDragonWeaponEquipped(true);
+ }
+ }
+ }
+
+ @RegisterEvent(EventType.ON_PLAYER_ITEM_EQUIP)
+ @RegisterType(ListenerRegisterType.ITEM)
+ @Id(36417)
+ @Id(36418)
+ @Id(36419)
+ @Id(36420)
+ @Id(36421)
+ @Id(36422)
+ @Id(36423)
+ @Id(36424)
+ @Id(36425)
+ @Id(36426)
+ @Id(36441)
+ @Id(36442)
+ @Id(36443)
+ @Id(36444)
+ @Id(36445)
+ @Id(36446)
+ @Id(36447)
+ @Id(36448)
+ @Id(36449)
+ @Id(36450)
+ @Id(36465)
+ @Id(36466)
+ @Id(36467)
+ @Id(36468)
+ @Id(36469)
+ @Id(36470)
+ @Id(36471)
+ @Id(36472)
+ @Id(36473)
+ @Id(36474)
+ @Id(36489)
+ @Id(36490)
+ @Id(36491)
+ @Id(36492)
+ @Id(36493)
+ @Id(36494)
+ @Id(36495)
+ @Id(36496)
+ @Id(36497)
+ @Id(36498)
+ @Id(36427)
+ @Id(36428)
+ @Id(36429)
+ @Id(36430)
+ @Id(36431)
+ @Id(36432)
+ @Id(36433)
+ @Id(36451)
+ @Id(36452)
+ @Id(36453)
+ @Id(36454)
+ @Id(36455)
+ @Id(36456)
+ @Id(36457)
+ @Id(36475)
+ @Id(36476)
+ @Id(36477)
+ @Id(36478)
+ @Id(36479)
+ @Id(36480)
+ @Id(36481)
+ @Id(36499)
+ @Id(36500)
+ @Id(36501)
+ @Id(36502)
+ @Id(36503)
+ @Id(36504)
+ @Id(36505)
+ @Id(36434)
+ @Id(36435)
+ @Id(36436)
+ @Id(36437)
+ @Id(36438)
+ @Id(36439)
+ @Id(36440)
+ @Id(36458)
+ @Id(36459)
+ @Id(36460)
+ @Id(36461)
+ @Id(36462)
+ @Id(36463)
+ @Id(36464)
+ @Id(36482)
+ @Id(36483)
+ @Id(36484)
+ @Id(36485)
+ @Id(36486)
+ @Id(36487)
+ @Id(36488)
+ @Id(36506)
+ @Id(36507)
+ @Id(36508)
+ @Id(36509)
+ @Id(36510)
+ @Id(36511)
+ @Id(36512)
+ @Id(80066)
+ @Id(80067)
+ @Id(80068)
+ @Id(80069)
+ @Id(80070)
+ @Id(80071)
+ @Id(80072)
+ @Id(80073)
+ @Id(80074)
+ @Id(80075)
+ @Id(80076)
+ @Id(80077)
+ @Id(80078)
+ @Id(80079)
+ @Id(80080)
+ @Id(80081)
+ @Id(80082)
+ @Id(80083)
+ @Id(80084)
+ @Id(80085)
+ @Id(80086)
+ @Id(80087)
+ @Id(80088)
+ @Id(80089)
+ @Id(80315)
+ @Id(80316)
+ @Id(80317)
+ @Id(80318)
+ public void onPlayerItemEquip(OnPlayerItemEquip event)
+ {
+ final PlayerInstance player = event.getPlayer();
+ if (player != null)
+ {
+ player.setDragonWeaponEquipped(true);
+ }
+ }
+
+ @RegisterEvent(EventType.ON_PLAYER_ITEM_UNEQUIP)
+ @RegisterType(ListenerRegisterType.ITEM)
+ @Id(36417)
+ @Id(36418)
+ @Id(36419)
+ @Id(36420)
+ @Id(36421)
+ @Id(36422)
+ @Id(36423)
+ @Id(36424)
+ @Id(36425)
+ @Id(36426)
+ @Id(36441)
+ @Id(36442)
+ @Id(36443)
+ @Id(36444)
+ @Id(36445)
+ @Id(36446)
+ @Id(36447)
+ @Id(36448)
+ @Id(36449)
+ @Id(36450)
+ @Id(36465)
+ @Id(36466)
+ @Id(36467)
+ @Id(36468)
+ @Id(36469)
+ @Id(36470)
+ @Id(36471)
+ @Id(36472)
+ @Id(36473)
+ @Id(36474)
+ @Id(36489)
+ @Id(36490)
+ @Id(36491)
+ @Id(36492)
+ @Id(36493)
+ @Id(36494)
+ @Id(36495)
+ @Id(36496)
+ @Id(36497)
+ @Id(36498)
+ @Id(36427)
+ @Id(36428)
+ @Id(36429)
+ @Id(36430)
+ @Id(36431)
+ @Id(36432)
+ @Id(36433)
+ @Id(36451)
+ @Id(36452)
+ @Id(36453)
+ @Id(36454)
+ @Id(36455)
+ @Id(36456)
+ @Id(36457)
+ @Id(36475)
+ @Id(36476)
+ @Id(36477)
+ @Id(36478)
+ @Id(36479)
+ @Id(36480)
+ @Id(36481)
+ @Id(36499)
+ @Id(36500)
+ @Id(36501)
+ @Id(36502)
+ @Id(36503)
+ @Id(36504)
+ @Id(36505)
+ @Id(36434)
+ @Id(36435)
+ @Id(36436)
+ @Id(36437)
+ @Id(36438)
+ @Id(36439)
+ @Id(36440)
+ @Id(36458)
+ @Id(36459)
+ @Id(36460)
+ @Id(36461)
+ @Id(36462)
+ @Id(36463)
+ @Id(36464)
+ @Id(36482)
+ @Id(36483)
+ @Id(36484)
+ @Id(36485)
+ @Id(36486)
+ @Id(36487)
+ @Id(36488)
+ @Id(36506)
+ @Id(36507)
+ @Id(36508)
+ @Id(36509)
+ @Id(36510)
+ @Id(36511)
+ @Id(36512)
+ @Id(80066)
+ @Id(80067)
+ @Id(80068)
+ @Id(80069)
+ @Id(80070)
+ @Id(80071)
+ @Id(80072)
+ @Id(80073)
+ @Id(80074)
+ @Id(80075)
+ @Id(80076)
+ @Id(80077)
+ @Id(80078)
+ @Id(80079)
+ @Id(80080)
+ @Id(80081)
+ @Id(80082)
+ @Id(80083)
+ @Id(80084)
+ @Id(80085)
+ @Id(80086)
+ @Id(80087)
+ @Id(80088)
+ @Id(80089)
+ @Id(80315)
+ @Id(80316)
+ @Id(80317)
+ @Id(80318)
+ public void onPlayerItemUnequip(OnPlayerItemUnequip event)
+ {
+ final PlayerInstance player = event.getPlayer();
+ if (player != null)
+ {
+ player.setDragonWeaponEquipped(false);
+ }
+ }
+
+ public static void main(String[] args)
+ {
+ new DragonWeaponListeners();
+ }
+}
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/EffectMasterHandler.java
index f74b919d21..625acb31bd 100644
--- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/EffectMasterHandler.java
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/EffectMasterHandler.java
@@ -131,6 +131,7 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("DispelBySlotMyself", DispelBySlotMyself::new);
EffectHandler.getInstance().registerHandler("DispelBySlotProbability", DispelBySlotProbability::new);
EffectHandler.getInstance().registerHandler("DoubleCast", DoubleCast::new);
+ EffectHandler.getInstance().registerHandler("DragonWeaponDefence", DragonWeaponDefence::new);
EffectHandler.getInstance().registerHandler("DuelistFury", DuelistFury::new);
EffectHandler.getInstance().registerHandler("EnableCloak", EnableCloak::new);
EffectHandler.getInstance().registerHandler("EnergyAttack", EnergyAttack::new);
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/DragonWeaponDefence.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/DragonWeaponDefence.java
new file mode 100644
index 0000000000..476fb537ad
--- /dev/null
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/DragonWeaponDefence.java
@@ -0,0 +1,31 @@
+/*
+ * 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 org.l2jmobius.gameserver.model.StatSet;
+import org.l2jmobius.gameserver.model.stats.Stat;
+
+/**
+ * @author Mobius
+ */
+public class DragonWeaponDefence extends AbstractStatPercentEffect
+{
+ public DragonWeaponDefence(StatSet params)
+ {
+ super(params, Stat.DRAGON_WEAPON_DEFENCE);
+ }
+}
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_3.0_Helios/dist/game/data/stats/skills/documentation.txt
index ce8789186d..8412091b1d 100644
--- a/L2J_Mobius_3.0_Helios/dist/game/data/stats/skills/documentation.txt
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/stats/skills/documentation.txt
@@ -101,6 +101,7 @@ DispelBySlot: Removes given amount of target's effects by specified AbnormalType
DispelBySlotMyself: Removes given amount of effects by specified AbnormalType
DispelBySlotProbability: Removes given amount of effects by specified AbnormalType at a given rate.
DoubleCast: Triggers Fire, Water, Wind, Earth stance and enables the ability to cast two skills at once.
+DragonWeaponDefence: Dragon weapon defence stat. (l2jmobius)
DuelistFury: Synergy effect for Faceoff effect. (l2jmobius)
EnableCloak: See/unsee cloaks.
EnemyCharge: Charges towards the enemy. Rush Impact.
diff --git a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
index ce0325d7aa..73153217a8 100644
--- a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
+++ b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
@@ -752,6 +752,8 @@ public class PlayerInstance extends Playable
private int _cursedWeaponEquippedId = 0;
private boolean _combatFlagEquippedId = false;
+ private boolean _isDragonWeaponEquipped = false;
+
private boolean _canRevive = true;
private int _reviveRequested = 0;
private double _revivePower = 0;
@@ -11387,6 +11389,16 @@ public class PlayerInstance extends Playable
return _cursedWeaponEquippedId;
}
+ public void setDragonWeaponEquipped(boolean value)
+ {
+ _isDragonWeaponEquipped = value;
+ }
+
+ public boolean isDragonWeaponEquipped()
+ {
+ return _isDragonWeaponEquipped;
+ }
+
public boolean isCombatFlagEquipped()
{
return _combatFlagEquippedId;
diff --git a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/stats/Formulas.java
index 07500a7bfc..4ba05aa2a2 100644
--- a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/stats/Formulas.java
+++ b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/stats/Formulas.java
@@ -1604,7 +1604,18 @@ public class Formulas
pvpDefense = target.getStat().getValue(Stat.PVP_PHYSICAL_ATTACK_DEFENCE, 1) * Config.PVP_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
}
- return Math.max(0.05, 1 + (pvpAttack - pvpDefense)); // Bonus should not be negative.
+ // Dragon weapon defence stat.
+ final double dragonDefense;
+ if (attackerPlayer.isDragonWeaponEquipped())
+ {
+ dragonDefense = target.getStat().getValue(Stat.DRAGON_WEAPON_DEFENCE, 1);
+ }
+ else
+ {
+ dragonDefense = 1;
+ }
+
+ return Math.max(0.05, dragonDefense * (1 + (pvpAttack - pvpDefense))); // Bonus should not be negative.
}
// PvE Bonus
diff --git a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/stats/Stat.java
index 39806ebbfb..641f7cce81 100644
--- a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/stats/Stat.java
+++ b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/stats/Stat.java
@@ -87,6 +87,7 @@ public enum Stat
CRITICAL_DAMAGE_ADD("cAtkAdd"), // this is another type for special critical damage mods - vicious stance, critical power and critical damage SA
HATE_ATTACK("attackHate"),
REAR_DAMAGE_RATE("rearDamage"),
+ DRAGON_WEAPON_DEFENCE("dragonWeaponDefence"),
// PVP BONUS
PVP_PHYSICAL_ATTACK_DAMAGE("pvpPhysDmg"),
diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/DragonWeaponListeners.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/DragonWeaponListeners.java
new file mode 100644
index 0000000000..085dcb2ca6
--- /dev/null
+++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/DragonWeaponListeners.java
@@ -0,0 +1,455 @@
+/*
+ * 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 ai.others;
+
+import org.l2jmobius.commons.util.CommonUtil;
+import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import org.l2jmobius.gameserver.model.events.EventType;
+import org.l2jmobius.gameserver.model.events.ListenerRegisterType;
+import org.l2jmobius.gameserver.model.events.annotations.Id;
+import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
+import org.l2jmobius.gameserver.model.events.annotations.RegisterType;
+import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemEquip;
+import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemUnequip;
+import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerLogin;
+import org.l2jmobius.gameserver.model.items.Weapon;
+
+import ai.AbstractNpcAI;
+
+/**
+ * @author Mobius
+ */
+public class DragonWeaponListeners extends AbstractNpcAI
+{
+ private static final int[] WEAPON_IDS =
+ {
+ 36417,
+ 36418,
+ 36419,
+ 36420,
+ 36421,
+ 36422,
+ 36423,
+ 36424,
+ 36425,
+ 36426,
+ 36441,
+ 36442,
+ 36443,
+ 36444,
+ 36445,
+ 36446,
+ 36447,
+ 36448,
+ 36449,
+ 36450,
+ 36465,
+ 36466,
+ 36467,
+ 36468,
+ 36469,
+ 36470,
+ 36471,
+ 36472,
+ 36473,
+ 36474,
+ 36489,
+ 36490,
+ 36491,
+ 36492,
+ 36493,
+ 36494,
+ 36495,
+ 36496,
+ 36497,
+ 36498,
+ 36427,
+ 36428,
+ 36429,
+ 36430,
+ 36431,
+ 36432,
+ 36433,
+ 36451,
+ 36452,
+ 36453,
+ 36454,
+ 36455,
+ 36456,
+ 36457,
+ 36475,
+ 36476,
+ 36477,
+ 36478,
+ 36479,
+ 36480,
+ 36481,
+ 36499,
+ 36500,
+ 36501,
+ 36502,
+ 36503,
+ 36504,
+ 36505,
+ 36434,
+ 36435,
+ 36436,
+ 36437,
+ 36438,
+ 36439,
+ 36440,
+ 36458,
+ 36459,
+ 36460,
+ 36461,
+ 36462,
+ 36463,
+ 36464,
+ 36482,
+ 36483,
+ 36484,
+ 36485,
+ 36486,
+ 36487,
+ 36488,
+ 36506,
+ 36507,
+ 36508,
+ 36509,
+ 36510,
+ 36511,
+ 36512,
+ 80066,
+ 80067,
+ 80068,
+ 80069,
+ 80070,
+ 80071,
+ 80072,
+ 80073,
+ 80074,
+ 80075,
+ 80076,
+ 80077,
+ 80078,
+ 80079,
+ 80080,
+ 80081,
+ 80082,
+ 80083,
+ 80084,
+ 80085,
+ 80086,
+ 80087,
+ 80088,
+ 80089,
+ 80315,
+ 80316,
+ 80317,
+ 80318,
+ };
+
+ @RegisterEvent(EventType.ON_PLAYER_LOGIN)
+ @RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
+ public void onPlayerLogin(OnPlayerLogin event)
+ {
+ final PlayerInstance player = event.getPlayer();
+ if (player != null)
+ {
+ final Weapon weapon = player.getActiveWeaponItem();
+ if ((weapon != null) && CommonUtil.contains(WEAPON_IDS, weapon.getId()))
+ {
+ player.setDragonWeaponEquipped(true);
+ }
+ }
+ }
+
+ @RegisterEvent(EventType.ON_PLAYER_ITEM_EQUIP)
+ @RegisterType(ListenerRegisterType.ITEM)
+ @Id(36417)
+ @Id(36418)
+ @Id(36419)
+ @Id(36420)
+ @Id(36421)
+ @Id(36422)
+ @Id(36423)
+ @Id(36424)
+ @Id(36425)
+ @Id(36426)
+ @Id(36441)
+ @Id(36442)
+ @Id(36443)
+ @Id(36444)
+ @Id(36445)
+ @Id(36446)
+ @Id(36447)
+ @Id(36448)
+ @Id(36449)
+ @Id(36450)
+ @Id(36465)
+ @Id(36466)
+ @Id(36467)
+ @Id(36468)
+ @Id(36469)
+ @Id(36470)
+ @Id(36471)
+ @Id(36472)
+ @Id(36473)
+ @Id(36474)
+ @Id(36489)
+ @Id(36490)
+ @Id(36491)
+ @Id(36492)
+ @Id(36493)
+ @Id(36494)
+ @Id(36495)
+ @Id(36496)
+ @Id(36497)
+ @Id(36498)
+ @Id(36427)
+ @Id(36428)
+ @Id(36429)
+ @Id(36430)
+ @Id(36431)
+ @Id(36432)
+ @Id(36433)
+ @Id(36451)
+ @Id(36452)
+ @Id(36453)
+ @Id(36454)
+ @Id(36455)
+ @Id(36456)
+ @Id(36457)
+ @Id(36475)
+ @Id(36476)
+ @Id(36477)
+ @Id(36478)
+ @Id(36479)
+ @Id(36480)
+ @Id(36481)
+ @Id(36499)
+ @Id(36500)
+ @Id(36501)
+ @Id(36502)
+ @Id(36503)
+ @Id(36504)
+ @Id(36505)
+ @Id(36434)
+ @Id(36435)
+ @Id(36436)
+ @Id(36437)
+ @Id(36438)
+ @Id(36439)
+ @Id(36440)
+ @Id(36458)
+ @Id(36459)
+ @Id(36460)
+ @Id(36461)
+ @Id(36462)
+ @Id(36463)
+ @Id(36464)
+ @Id(36482)
+ @Id(36483)
+ @Id(36484)
+ @Id(36485)
+ @Id(36486)
+ @Id(36487)
+ @Id(36488)
+ @Id(36506)
+ @Id(36507)
+ @Id(36508)
+ @Id(36509)
+ @Id(36510)
+ @Id(36511)
+ @Id(36512)
+ @Id(80066)
+ @Id(80067)
+ @Id(80068)
+ @Id(80069)
+ @Id(80070)
+ @Id(80071)
+ @Id(80072)
+ @Id(80073)
+ @Id(80074)
+ @Id(80075)
+ @Id(80076)
+ @Id(80077)
+ @Id(80078)
+ @Id(80079)
+ @Id(80080)
+ @Id(80081)
+ @Id(80082)
+ @Id(80083)
+ @Id(80084)
+ @Id(80085)
+ @Id(80086)
+ @Id(80087)
+ @Id(80088)
+ @Id(80089)
+ @Id(80315)
+ @Id(80316)
+ @Id(80317)
+ @Id(80318)
+ public void onPlayerItemEquip(OnPlayerItemEquip event)
+ {
+ final PlayerInstance player = event.getPlayer();
+ if (player != null)
+ {
+ player.setDragonWeaponEquipped(true);
+ }
+ }
+
+ @RegisterEvent(EventType.ON_PLAYER_ITEM_UNEQUIP)
+ @RegisterType(ListenerRegisterType.ITEM)
+ @Id(36417)
+ @Id(36418)
+ @Id(36419)
+ @Id(36420)
+ @Id(36421)
+ @Id(36422)
+ @Id(36423)
+ @Id(36424)
+ @Id(36425)
+ @Id(36426)
+ @Id(36441)
+ @Id(36442)
+ @Id(36443)
+ @Id(36444)
+ @Id(36445)
+ @Id(36446)
+ @Id(36447)
+ @Id(36448)
+ @Id(36449)
+ @Id(36450)
+ @Id(36465)
+ @Id(36466)
+ @Id(36467)
+ @Id(36468)
+ @Id(36469)
+ @Id(36470)
+ @Id(36471)
+ @Id(36472)
+ @Id(36473)
+ @Id(36474)
+ @Id(36489)
+ @Id(36490)
+ @Id(36491)
+ @Id(36492)
+ @Id(36493)
+ @Id(36494)
+ @Id(36495)
+ @Id(36496)
+ @Id(36497)
+ @Id(36498)
+ @Id(36427)
+ @Id(36428)
+ @Id(36429)
+ @Id(36430)
+ @Id(36431)
+ @Id(36432)
+ @Id(36433)
+ @Id(36451)
+ @Id(36452)
+ @Id(36453)
+ @Id(36454)
+ @Id(36455)
+ @Id(36456)
+ @Id(36457)
+ @Id(36475)
+ @Id(36476)
+ @Id(36477)
+ @Id(36478)
+ @Id(36479)
+ @Id(36480)
+ @Id(36481)
+ @Id(36499)
+ @Id(36500)
+ @Id(36501)
+ @Id(36502)
+ @Id(36503)
+ @Id(36504)
+ @Id(36505)
+ @Id(36434)
+ @Id(36435)
+ @Id(36436)
+ @Id(36437)
+ @Id(36438)
+ @Id(36439)
+ @Id(36440)
+ @Id(36458)
+ @Id(36459)
+ @Id(36460)
+ @Id(36461)
+ @Id(36462)
+ @Id(36463)
+ @Id(36464)
+ @Id(36482)
+ @Id(36483)
+ @Id(36484)
+ @Id(36485)
+ @Id(36486)
+ @Id(36487)
+ @Id(36488)
+ @Id(36506)
+ @Id(36507)
+ @Id(36508)
+ @Id(36509)
+ @Id(36510)
+ @Id(36511)
+ @Id(36512)
+ @Id(80066)
+ @Id(80067)
+ @Id(80068)
+ @Id(80069)
+ @Id(80070)
+ @Id(80071)
+ @Id(80072)
+ @Id(80073)
+ @Id(80074)
+ @Id(80075)
+ @Id(80076)
+ @Id(80077)
+ @Id(80078)
+ @Id(80079)
+ @Id(80080)
+ @Id(80081)
+ @Id(80082)
+ @Id(80083)
+ @Id(80084)
+ @Id(80085)
+ @Id(80086)
+ @Id(80087)
+ @Id(80088)
+ @Id(80089)
+ @Id(80315)
+ @Id(80316)
+ @Id(80317)
+ @Id(80318)
+ public void onPlayerItemUnequip(OnPlayerItemUnequip event)
+ {
+ final PlayerInstance player = event.getPlayer();
+ if (player != null)
+ {
+ player.setDragonWeaponEquipped(false);
+ }
+ }
+
+ public static void main(String[] args)
+ {
+ new DragonWeaponListeners();
+ }
+}
diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/EffectMasterHandler.java
index 2061d281b9..76a0246550 100644
--- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/EffectMasterHandler.java
+++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/EffectMasterHandler.java
@@ -135,6 +135,7 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("DispelBySlotMyself", DispelBySlotMyself::new);
EffectHandler.getInstance().registerHandler("DispelBySlotProbability", DispelBySlotProbability::new);
EffectHandler.getInstance().registerHandler("DoubleCast", DoubleCast::new);
+ EffectHandler.getInstance().registerHandler("DragonWeaponDefence", DragonWeaponDefence::new);
EffectHandler.getInstance().registerHandler("DuelistFury", DuelistFury::new);
EffectHandler.getInstance().registerHandler("EnableCloak", EnableCloak::new);
EffectHandler.getInstance().registerHandler("EnergyAttack", EnergyAttack::new);
diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/DragonWeaponDefence.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/DragonWeaponDefence.java
new file mode 100644
index 0000000000..476fb537ad
--- /dev/null
+++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/DragonWeaponDefence.java
@@ -0,0 +1,31 @@
+/*
+ * 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 org.l2jmobius.gameserver.model.StatSet;
+import org.l2jmobius.gameserver.model.stats.Stat;
+
+/**
+ * @author Mobius
+ */
+public class DragonWeaponDefence extends AbstractStatPercentEffect
+{
+ public DragonWeaponDefence(StatSet params)
+ {
+ super(params, Stat.DRAGON_WEAPON_DEFENCE);
+ }
+}
diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/stats/skills/documentation.txt
index d309fd61b7..73b152d7eb 100644
--- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/stats/skills/documentation.txt
+++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/stats/skills/documentation.txt
@@ -105,6 +105,7 @@ DispelBySlot: Removes given amount of target's effects by specified AbnormalType
DispelBySlotMyself: Removes given amount of effects by specified AbnormalType
DispelBySlotProbability: Removes given amount of effects by specified AbnormalType at a given rate.
DoubleCast: Triggers Fire, Water, Wind, Earth stance and enables the ability to cast two skills at once.
+DragonWeaponDefence: Dragon weapon defence stat. (l2jmobius)
DuelistFury: Synergy effect for Faceoff effect. (l2jmobius)
EnableCloak: See/unsee cloaks.
EnemyCharge: Charges towards the enemy. Rush Impact.
diff --git a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
index 14009942b3..ada8740456 100644
--- a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
+++ b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
@@ -757,6 +757,8 @@ public class PlayerInstance extends Playable
private int _cursedWeaponEquippedId = 0;
private boolean _combatFlagEquippedId = false;
+ private boolean _isDragonWeaponEquipped = false;
+
private boolean _canRevive = true;
private int _reviveRequested = 0;
private double _revivePower = 0;
@@ -11368,6 +11370,16 @@ public class PlayerInstance extends Playable
return _cursedWeaponEquippedId;
}
+ public void setDragonWeaponEquipped(boolean value)
+ {
+ _isDragonWeaponEquipped = value;
+ }
+
+ public boolean isDragonWeaponEquipped()
+ {
+ return _isDragonWeaponEquipped;
+ }
+
public boolean isCombatFlagEquipped()
{
return _combatFlagEquippedId;
diff --git a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/stats/Formulas.java
index 07500a7bfc..4ba05aa2a2 100644
--- a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/stats/Formulas.java
+++ b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/stats/Formulas.java
@@ -1604,7 +1604,18 @@ public class Formulas
pvpDefense = target.getStat().getValue(Stat.PVP_PHYSICAL_ATTACK_DEFENCE, 1) * Config.PVP_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
}
- return Math.max(0.05, 1 + (pvpAttack - pvpDefense)); // Bonus should not be negative.
+ // Dragon weapon defence stat.
+ final double dragonDefense;
+ if (attackerPlayer.isDragonWeaponEquipped())
+ {
+ dragonDefense = target.getStat().getValue(Stat.DRAGON_WEAPON_DEFENCE, 1);
+ }
+ else
+ {
+ dragonDefense = 1;
+ }
+
+ return Math.max(0.05, dragonDefense * (1 + (pvpAttack - pvpDefense))); // Bonus should not be negative.
}
// PvE Bonus
diff --git a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/stats/Stat.java
index 3dcb90fea8..62b2bb8ad6 100644
--- a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/stats/Stat.java
+++ b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/stats/Stat.java
@@ -87,6 +87,7 @@ public enum Stat
CRITICAL_DAMAGE_ADD("cAtkAdd"), // this is another type for special critical damage mods - vicious stance, critical power and critical damage SA
HATE_ATTACK("attackHate"),
REAR_DAMAGE_RATE("rearDamage"),
+ DRAGON_WEAPON_DEFENCE("dragonWeaponDefence"),
// PVP BONUS
PVP_PHYSICAL_ATTACK_DAMAGE("pvpPhysDmg"),
diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/others/DragonWeaponListeners.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/others/DragonWeaponListeners.java
new file mode 100644
index 0000000000..085dcb2ca6
--- /dev/null
+++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/others/DragonWeaponListeners.java
@@ -0,0 +1,455 @@
+/*
+ * 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 ai.others;
+
+import org.l2jmobius.commons.util.CommonUtil;
+import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import org.l2jmobius.gameserver.model.events.EventType;
+import org.l2jmobius.gameserver.model.events.ListenerRegisterType;
+import org.l2jmobius.gameserver.model.events.annotations.Id;
+import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
+import org.l2jmobius.gameserver.model.events.annotations.RegisterType;
+import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemEquip;
+import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemUnequip;
+import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerLogin;
+import org.l2jmobius.gameserver.model.items.Weapon;
+
+import ai.AbstractNpcAI;
+
+/**
+ * @author Mobius
+ */
+public class DragonWeaponListeners extends AbstractNpcAI
+{
+ private static final int[] WEAPON_IDS =
+ {
+ 36417,
+ 36418,
+ 36419,
+ 36420,
+ 36421,
+ 36422,
+ 36423,
+ 36424,
+ 36425,
+ 36426,
+ 36441,
+ 36442,
+ 36443,
+ 36444,
+ 36445,
+ 36446,
+ 36447,
+ 36448,
+ 36449,
+ 36450,
+ 36465,
+ 36466,
+ 36467,
+ 36468,
+ 36469,
+ 36470,
+ 36471,
+ 36472,
+ 36473,
+ 36474,
+ 36489,
+ 36490,
+ 36491,
+ 36492,
+ 36493,
+ 36494,
+ 36495,
+ 36496,
+ 36497,
+ 36498,
+ 36427,
+ 36428,
+ 36429,
+ 36430,
+ 36431,
+ 36432,
+ 36433,
+ 36451,
+ 36452,
+ 36453,
+ 36454,
+ 36455,
+ 36456,
+ 36457,
+ 36475,
+ 36476,
+ 36477,
+ 36478,
+ 36479,
+ 36480,
+ 36481,
+ 36499,
+ 36500,
+ 36501,
+ 36502,
+ 36503,
+ 36504,
+ 36505,
+ 36434,
+ 36435,
+ 36436,
+ 36437,
+ 36438,
+ 36439,
+ 36440,
+ 36458,
+ 36459,
+ 36460,
+ 36461,
+ 36462,
+ 36463,
+ 36464,
+ 36482,
+ 36483,
+ 36484,
+ 36485,
+ 36486,
+ 36487,
+ 36488,
+ 36506,
+ 36507,
+ 36508,
+ 36509,
+ 36510,
+ 36511,
+ 36512,
+ 80066,
+ 80067,
+ 80068,
+ 80069,
+ 80070,
+ 80071,
+ 80072,
+ 80073,
+ 80074,
+ 80075,
+ 80076,
+ 80077,
+ 80078,
+ 80079,
+ 80080,
+ 80081,
+ 80082,
+ 80083,
+ 80084,
+ 80085,
+ 80086,
+ 80087,
+ 80088,
+ 80089,
+ 80315,
+ 80316,
+ 80317,
+ 80318,
+ };
+
+ @RegisterEvent(EventType.ON_PLAYER_LOGIN)
+ @RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
+ public void onPlayerLogin(OnPlayerLogin event)
+ {
+ final PlayerInstance player = event.getPlayer();
+ if (player != null)
+ {
+ final Weapon weapon = player.getActiveWeaponItem();
+ if ((weapon != null) && CommonUtil.contains(WEAPON_IDS, weapon.getId()))
+ {
+ player.setDragonWeaponEquipped(true);
+ }
+ }
+ }
+
+ @RegisterEvent(EventType.ON_PLAYER_ITEM_EQUIP)
+ @RegisterType(ListenerRegisterType.ITEM)
+ @Id(36417)
+ @Id(36418)
+ @Id(36419)
+ @Id(36420)
+ @Id(36421)
+ @Id(36422)
+ @Id(36423)
+ @Id(36424)
+ @Id(36425)
+ @Id(36426)
+ @Id(36441)
+ @Id(36442)
+ @Id(36443)
+ @Id(36444)
+ @Id(36445)
+ @Id(36446)
+ @Id(36447)
+ @Id(36448)
+ @Id(36449)
+ @Id(36450)
+ @Id(36465)
+ @Id(36466)
+ @Id(36467)
+ @Id(36468)
+ @Id(36469)
+ @Id(36470)
+ @Id(36471)
+ @Id(36472)
+ @Id(36473)
+ @Id(36474)
+ @Id(36489)
+ @Id(36490)
+ @Id(36491)
+ @Id(36492)
+ @Id(36493)
+ @Id(36494)
+ @Id(36495)
+ @Id(36496)
+ @Id(36497)
+ @Id(36498)
+ @Id(36427)
+ @Id(36428)
+ @Id(36429)
+ @Id(36430)
+ @Id(36431)
+ @Id(36432)
+ @Id(36433)
+ @Id(36451)
+ @Id(36452)
+ @Id(36453)
+ @Id(36454)
+ @Id(36455)
+ @Id(36456)
+ @Id(36457)
+ @Id(36475)
+ @Id(36476)
+ @Id(36477)
+ @Id(36478)
+ @Id(36479)
+ @Id(36480)
+ @Id(36481)
+ @Id(36499)
+ @Id(36500)
+ @Id(36501)
+ @Id(36502)
+ @Id(36503)
+ @Id(36504)
+ @Id(36505)
+ @Id(36434)
+ @Id(36435)
+ @Id(36436)
+ @Id(36437)
+ @Id(36438)
+ @Id(36439)
+ @Id(36440)
+ @Id(36458)
+ @Id(36459)
+ @Id(36460)
+ @Id(36461)
+ @Id(36462)
+ @Id(36463)
+ @Id(36464)
+ @Id(36482)
+ @Id(36483)
+ @Id(36484)
+ @Id(36485)
+ @Id(36486)
+ @Id(36487)
+ @Id(36488)
+ @Id(36506)
+ @Id(36507)
+ @Id(36508)
+ @Id(36509)
+ @Id(36510)
+ @Id(36511)
+ @Id(36512)
+ @Id(80066)
+ @Id(80067)
+ @Id(80068)
+ @Id(80069)
+ @Id(80070)
+ @Id(80071)
+ @Id(80072)
+ @Id(80073)
+ @Id(80074)
+ @Id(80075)
+ @Id(80076)
+ @Id(80077)
+ @Id(80078)
+ @Id(80079)
+ @Id(80080)
+ @Id(80081)
+ @Id(80082)
+ @Id(80083)
+ @Id(80084)
+ @Id(80085)
+ @Id(80086)
+ @Id(80087)
+ @Id(80088)
+ @Id(80089)
+ @Id(80315)
+ @Id(80316)
+ @Id(80317)
+ @Id(80318)
+ public void onPlayerItemEquip(OnPlayerItemEquip event)
+ {
+ final PlayerInstance player = event.getPlayer();
+ if (player != null)
+ {
+ player.setDragonWeaponEquipped(true);
+ }
+ }
+
+ @RegisterEvent(EventType.ON_PLAYER_ITEM_UNEQUIP)
+ @RegisterType(ListenerRegisterType.ITEM)
+ @Id(36417)
+ @Id(36418)
+ @Id(36419)
+ @Id(36420)
+ @Id(36421)
+ @Id(36422)
+ @Id(36423)
+ @Id(36424)
+ @Id(36425)
+ @Id(36426)
+ @Id(36441)
+ @Id(36442)
+ @Id(36443)
+ @Id(36444)
+ @Id(36445)
+ @Id(36446)
+ @Id(36447)
+ @Id(36448)
+ @Id(36449)
+ @Id(36450)
+ @Id(36465)
+ @Id(36466)
+ @Id(36467)
+ @Id(36468)
+ @Id(36469)
+ @Id(36470)
+ @Id(36471)
+ @Id(36472)
+ @Id(36473)
+ @Id(36474)
+ @Id(36489)
+ @Id(36490)
+ @Id(36491)
+ @Id(36492)
+ @Id(36493)
+ @Id(36494)
+ @Id(36495)
+ @Id(36496)
+ @Id(36497)
+ @Id(36498)
+ @Id(36427)
+ @Id(36428)
+ @Id(36429)
+ @Id(36430)
+ @Id(36431)
+ @Id(36432)
+ @Id(36433)
+ @Id(36451)
+ @Id(36452)
+ @Id(36453)
+ @Id(36454)
+ @Id(36455)
+ @Id(36456)
+ @Id(36457)
+ @Id(36475)
+ @Id(36476)
+ @Id(36477)
+ @Id(36478)
+ @Id(36479)
+ @Id(36480)
+ @Id(36481)
+ @Id(36499)
+ @Id(36500)
+ @Id(36501)
+ @Id(36502)
+ @Id(36503)
+ @Id(36504)
+ @Id(36505)
+ @Id(36434)
+ @Id(36435)
+ @Id(36436)
+ @Id(36437)
+ @Id(36438)
+ @Id(36439)
+ @Id(36440)
+ @Id(36458)
+ @Id(36459)
+ @Id(36460)
+ @Id(36461)
+ @Id(36462)
+ @Id(36463)
+ @Id(36464)
+ @Id(36482)
+ @Id(36483)
+ @Id(36484)
+ @Id(36485)
+ @Id(36486)
+ @Id(36487)
+ @Id(36488)
+ @Id(36506)
+ @Id(36507)
+ @Id(36508)
+ @Id(36509)
+ @Id(36510)
+ @Id(36511)
+ @Id(36512)
+ @Id(80066)
+ @Id(80067)
+ @Id(80068)
+ @Id(80069)
+ @Id(80070)
+ @Id(80071)
+ @Id(80072)
+ @Id(80073)
+ @Id(80074)
+ @Id(80075)
+ @Id(80076)
+ @Id(80077)
+ @Id(80078)
+ @Id(80079)
+ @Id(80080)
+ @Id(80081)
+ @Id(80082)
+ @Id(80083)
+ @Id(80084)
+ @Id(80085)
+ @Id(80086)
+ @Id(80087)
+ @Id(80088)
+ @Id(80089)
+ @Id(80315)
+ @Id(80316)
+ @Id(80317)
+ @Id(80318)
+ public void onPlayerItemUnequip(OnPlayerItemUnequip event)
+ {
+ final PlayerInstance player = event.getPlayer();
+ if (player != null)
+ {
+ player.setDragonWeaponEquipped(false);
+ }
+ }
+
+ public static void main(String[] args)
+ {
+ new DragonWeaponListeners();
+ }
+}
diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/EffectMasterHandler.java
index eb02052546..80e8354efc 100644
--- a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/EffectMasterHandler.java
+++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/EffectMasterHandler.java
@@ -137,6 +137,7 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("DispelBySlotProbability", DispelBySlotProbability::new);
EffectHandler.getInstance().registerHandler("DispelCaster", DispelCaster::new);
EffectHandler.getInstance().registerHandler("DoubleCast", DoubleCast::new);
+ EffectHandler.getInstance().registerHandler("DragonWeaponDefence", DragonWeaponDefence::new);
EffectHandler.getInstance().registerHandler("DuelistFury", DuelistFury::new);
EffectHandler.getInstance().registerHandler("EnableCloak", EnableCloak::new);
EffectHandler.getInstance().registerHandler("EnergyAttack", EnergyAttack::new);
diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/DragonWeaponDefence.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/DragonWeaponDefence.java
new file mode 100644
index 0000000000..476fb537ad
--- /dev/null
+++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/DragonWeaponDefence.java
@@ -0,0 +1,31 @@
+/*
+ * 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 org.l2jmobius.gameserver.model.StatSet;
+import org.l2jmobius.gameserver.model.stats.Stat;
+
+/**
+ * @author Mobius
+ */
+public class DragonWeaponDefence extends AbstractStatPercentEffect
+{
+ public DragonWeaponDefence(StatSet params)
+ {
+ super(params, Stat.DRAGON_WEAPON_DEFENCE);
+ }
+}
diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_5.0_Salvation/dist/game/data/stats/skills/documentation.txt
index cca765ceaf..58c9171ba3 100644
--- a/L2J_Mobius_5.0_Salvation/dist/game/data/stats/skills/documentation.txt
+++ b/L2J_Mobius_5.0_Salvation/dist/game/data/stats/skills/documentation.txt
@@ -107,6 +107,7 @@ DispelBySlotMyself: Removes given amount of effects by specified AbnormalType
DispelBySlotProbability: Removes given amount of effects by specified AbnormalType at a given rate.
DispelCaster: Removes given amount of effects from caster by specified AbnormalType. (l2jmobius)
DoubleCast: Triggers Fire, Water, Wind, Earth stance and enables the ability to cast two skills at once.
+DragonWeaponDefence: Dragon weapon defence stat. (l2jmobius)
DuelistFury: Synergy effect for Faceoff effect. (l2jmobius)
EnableCloak: See/unsee cloaks.
EnemyCharge: Charges towards the enemy. Rush Impact.
diff --git a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
index 3132a58d4e..a7065c9ea9 100644
--- a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
+++ b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
@@ -753,6 +753,8 @@ public class PlayerInstance extends Playable
private int _cursedWeaponEquippedId = 0;
private boolean _combatFlagEquippedId = false;
+ private boolean _isDragonWeaponEquipped = false;
+
private boolean _canRevive = true;
private int _reviveRequested = 0;
private double _revivePower = 0;
@@ -11355,6 +11357,16 @@ public class PlayerInstance extends Playable
return _cursedWeaponEquippedId;
}
+ public void setDragonWeaponEquipped(boolean value)
+ {
+ _isDragonWeaponEquipped = value;
+ }
+
+ public boolean isDragonWeaponEquipped()
+ {
+ return _isDragonWeaponEquipped;
+ }
+
public boolean isCombatFlagEquipped()
{
return _combatFlagEquippedId;
diff --git a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/stats/Formulas.java
index 07500a7bfc..4ba05aa2a2 100644
--- a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/stats/Formulas.java
+++ b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/stats/Formulas.java
@@ -1604,7 +1604,18 @@ public class Formulas
pvpDefense = target.getStat().getValue(Stat.PVP_PHYSICAL_ATTACK_DEFENCE, 1) * Config.PVP_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
}
- return Math.max(0.05, 1 + (pvpAttack - pvpDefense)); // Bonus should not be negative.
+ // Dragon weapon defence stat.
+ final double dragonDefense;
+ if (attackerPlayer.isDragonWeaponEquipped())
+ {
+ dragonDefense = target.getStat().getValue(Stat.DRAGON_WEAPON_DEFENCE, 1);
+ }
+ else
+ {
+ dragonDefense = 1;
+ }
+
+ return Math.max(0.05, dragonDefense * (1 + (pvpAttack - pvpDefense))); // Bonus should not be negative.
}
// PvE Bonus
diff --git a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/stats/Stat.java
index 83a8726c94..675b6c6011 100644
--- a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/stats/Stat.java
+++ b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/stats/Stat.java
@@ -87,6 +87,7 @@ public enum Stat
CRITICAL_DAMAGE_ADD("cAtkAdd"), // this is another type for special critical damage mods - vicious stance, critical power and critical damage SA
HATE_ATTACK("attackHate"),
REAR_DAMAGE_RATE("rearDamage"),
+ DRAGON_WEAPON_DEFENCE("dragonWeaponDefence"),
// PVP BONUS
PVP_PHYSICAL_ATTACK_DAMAGE("pvpPhysDmg"),
diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/others/DragonWeaponListeners.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/others/DragonWeaponListeners.java
new file mode 100644
index 0000000000..085dcb2ca6
--- /dev/null
+++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/others/DragonWeaponListeners.java
@@ -0,0 +1,455 @@
+/*
+ * 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 ai.others;
+
+import org.l2jmobius.commons.util.CommonUtil;
+import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import org.l2jmobius.gameserver.model.events.EventType;
+import org.l2jmobius.gameserver.model.events.ListenerRegisterType;
+import org.l2jmobius.gameserver.model.events.annotations.Id;
+import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
+import org.l2jmobius.gameserver.model.events.annotations.RegisterType;
+import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemEquip;
+import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemUnequip;
+import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerLogin;
+import org.l2jmobius.gameserver.model.items.Weapon;
+
+import ai.AbstractNpcAI;
+
+/**
+ * @author Mobius
+ */
+public class DragonWeaponListeners extends AbstractNpcAI
+{
+ private static final int[] WEAPON_IDS =
+ {
+ 36417,
+ 36418,
+ 36419,
+ 36420,
+ 36421,
+ 36422,
+ 36423,
+ 36424,
+ 36425,
+ 36426,
+ 36441,
+ 36442,
+ 36443,
+ 36444,
+ 36445,
+ 36446,
+ 36447,
+ 36448,
+ 36449,
+ 36450,
+ 36465,
+ 36466,
+ 36467,
+ 36468,
+ 36469,
+ 36470,
+ 36471,
+ 36472,
+ 36473,
+ 36474,
+ 36489,
+ 36490,
+ 36491,
+ 36492,
+ 36493,
+ 36494,
+ 36495,
+ 36496,
+ 36497,
+ 36498,
+ 36427,
+ 36428,
+ 36429,
+ 36430,
+ 36431,
+ 36432,
+ 36433,
+ 36451,
+ 36452,
+ 36453,
+ 36454,
+ 36455,
+ 36456,
+ 36457,
+ 36475,
+ 36476,
+ 36477,
+ 36478,
+ 36479,
+ 36480,
+ 36481,
+ 36499,
+ 36500,
+ 36501,
+ 36502,
+ 36503,
+ 36504,
+ 36505,
+ 36434,
+ 36435,
+ 36436,
+ 36437,
+ 36438,
+ 36439,
+ 36440,
+ 36458,
+ 36459,
+ 36460,
+ 36461,
+ 36462,
+ 36463,
+ 36464,
+ 36482,
+ 36483,
+ 36484,
+ 36485,
+ 36486,
+ 36487,
+ 36488,
+ 36506,
+ 36507,
+ 36508,
+ 36509,
+ 36510,
+ 36511,
+ 36512,
+ 80066,
+ 80067,
+ 80068,
+ 80069,
+ 80070,
+ 80071,
+ 80072,
+ 80073,
+ 80074,
+ 80075,
+ 80076,
+ 80077,
+ 80078,
+ 80079,
+ 80080,
+ 80081,
+ 80082,
+ 80083,
+ 80084,
+ 80085,
+ 80086,
+ 80087,
+ 80088,
+ 80089,
+ 80315,
+ 80316,
+ 80317,
+ 80318,
+ };
+
+ @RegisterEvent(EventType.ON_PLAYER_LOGIN)
+ @RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
+ public void onPlayerLogin(OnPlayerLogin event)
+ {
+ final PlayerInstance player = event.getPlayer();
+ if (player != null)
+ {
+ final Weapon weapon = player.getActiveWeaponItem();
+ if ((weapon != null) && CommonUtil.contains(WEAPON_IDS, weapon.getId()))
+ {
+ player.setDragonWeaponEquipped(true);
+ }
+ }
+ }
+
+ @RegisterEvent(EventType.ON_PLAYER_ITEM_EQUIP)
+ @RegisterType(ListenerRegisterType.ITEM)
+ @Id(36417)
+ @Id(36418)
+ @Id(36419)
+ @Id(36420)
+ @Id(36421)
+ @Id(36422)
+ @Id(36423)
+ @Id(36424)
+ @Id(36425)
+ @Id(36426)
+ @Id(36441)
+ @Id(36442)
+ @Id(36443)
+ @Id(36444)
+ @Id(36445)
+ @Id(36446)
+ @Id(36447)
+ @Id(36448)
+ @Id(36449)
+ @Id(36450)
+ @Id(36465)
+ @Id(36466)
+ @Id(36467)
+ @Id(36468)
+ @Id(36469)
+ @Id(36470)
+ @Id(36471)
+ @Id(36472)
+ @Id(36473)
+ @Id(36474)
+ @Id(36489)
+ @Id(36490)
+ @Id(36491)
+ @Id(36492)
+ @Id(36493)
+ @Id(36494)
+ @Id(36495)
+ @Id(36496)
+ @Id(36497)
+ @Id(36498)
+ @Id(36427)
+ @Id(36428)
+ @Id(36429)
+ @Id(36430)
+ @Id(36431)
+ @Id(36432)
+ @Id(36433)
+ @Id(36451)
+ @Id(36452)
+ @Id(36453)
+ @Id(36454)
+ @Id(36455)
+ @Id(36456)
+ @Id(36457)
+ @Id(36475)
+ @Id(36476)
+ @Id(36477)
+ @Id(36478)
+ @Id(36479)
+ @Id(36480)
+ @Id(36481)
+ @Id(36499)
+ @Id(36500)
+ @Id(36501)
+ @Id(36502)
+ @Id(36503)
+ @Id(36504)
+ @Id(36505)
+ @Id(36434)
+ @Id(36435)
+ @Id(36436)
+ @Id(36437)
+ @Id(36438)
+ @Id(36439)
+ @Id(36440)
+ @Id(36458)
+ @Id(36459)
+ @Id(36460)
+ @Id(36461)
+ @Id(36462)
+ @Id(36463)
+ @Id(36464)
+ @Id(36482)
+ @Id(36483)
+ @Id(36484)
+ @Id(36485)
+ @Id(36486)
+ @Id(36487)
+ @Id(36488)
+ @Id(36506)
+ @Id(36507)
+ @Id(36508)
+ @Id(36509)
+ @Id(36510)
+ @Id(36511)
+ @Id(36512)
+ @Id(80066)
+ @Id(80067)
+ @Id(80068)
+ @Id(80069)
+ @Id(80070)
+ @Id(80071)
+ @Id(80072)
+ @Id(80073)
+ @Id(80074)
+ @Id(80075)
+ @Id(80076)
+ @Id(80077)
+ @Id(80078)
+ @Id(80079)
+ @Id(80080)
+ @Id(80081)
+ @Id(80082)
+ @Id(80083)
+ @Id(80084)
+ @Id(80085)
+ @Id(80086)
+ @Id(80087)
+ @Id(80088)
+ @Id(80089)
+ @Id(80315)
+ @Id(80316)
+ @Id(80317)
+ @Id(80318)
+ public void onPlayerItemEquip(OnPlayerItemEquip event)
+ {
+ final PlayerInstance player = event.getPlayer();
+ if (player != null)
+ {
+ player.setDragonWeaponEquipped(true);
+ }
+ }
+
+ @RegisterEvent(EventType.ON_PLAYER_ITEM_UNEQUIP)
+ @RegisterType(ListenerRegisterType.ITEM)
+ @Id(36417)
+ @Id(36418)
+ @Id(36419)
+ @Id(36420)
+ @Id(36421)
+ @Id(36422)
+ @Id(36423)
+ @Id(36424)
+ @Id(36425)
+ @Id(36426)
+ @Id(36441)
+ @Id(36442)
+ @Id(36443)
+ @Id(36444)
+ @Id(36445)
+ @Id(36446)
+ @Id(36447)
+ @Id(36448)
+ @Id(36449)
+ @Id(36450)
+ @Id(36465)
+ @Id(36466)
+ @Id(36467)
+ @Id(36468)
+ @Id(36469)
+ @Id(36470)
+ @Id(36471)
+ @Id(36472)
+ @Id(36473)
+ @Id(36474)
+ @Id(36489)
+ @Id(36490)
+ @Id(36491)
+ @Id(36492)
+ @Id(36493)
+ @Id(36494)
+ @Id(36495)
+ @Id(36496)
+ @Id(36497)
+ @Id(36498)
+ @Id(36427)
+ @Id(36428)
+ @Id(36429)
+ @Id(36430)
+ @Id(36431)
+ @Id(36432)
+ @Id(36433)
+ @Id(36451)
+ @Id(36452)
+ @Id(36453)
+ @Id(36454)
+ @Id(36455)
+ @Id(36456)
+ @Id(36457)
+ @Id(36475)
+ @Id(36476)
+ @Id(36477)
+ @Id(36478)
+ @Id(36479)
+ @Id(36480)
+ @Id(36481)
+ @Id(36499)
+ @Id(36500)
+ @Id(36501)
+ @Id(36502)
+ @Id(36503)
+ @Id(36504)
+ @Id(36505)
+ @Id(36434)
+ @Id(36435)
+ @Id(36436)
+ @Id(36437)
+ @Id(36438)
+ @Id(36439)
+ @Id(36440)
+ @Id(36458)
+ @Id(36459)
+ @Id(36460)
+ @Id(36461)
+ @Id(36462)
+ @Id(36463)
+ @Id(36464)
+ @Id(36482)
+ @Id(36483)
+ @Id(36484)
+ @Id(36485)
+ @Id(36486)
+ @Id(36487)
+ @Id(36488)
+ @Id(36506)
+ @Id(36507)
+ @Id(36508)
+ @Id(36509)
+ @Id(36510)
+ @Id(36511)
+ @Id(36512)
+ @Id(80066)
+ @Id(80067)
+ @Id(80068)
+ @Id(80069)
+ @Id(80070)
+ @Id(80071)
+ @Id(80072)
+ @Id(80073)
+ @Id(80074)
+ @Id(80075)
+ @Id(80076)
+ @Id(80077)
+ @Id(80078)
+ @Id(80079)
+ @Id(80080)
+ @Id(80081)
+ @Id(80082)
+ @Id(80083)
+ @Id(80084)
+ @Id(80085)
+ @Id(80086)
+ @Id(80087)
+ @Id(80088)
+ @Id(80089)
+ @Id(80315)
+ @Id(80316)
+ @Id(80317)
+ @Id(80318)
+ public void onPlayerItemUnequip(OnPlayerItemUnequip event)
+ {
+ final PlayerInstance player = event.getPlayer();
+ if (player != null)
+ {
+ player.setDragonWeaponEquipped(false);
+ }
+ }
+
+ public static void main(String[] args)
+ {
+ new DragonWeaponListeners();
+ }
+}
diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/EffectMasterHandler.java
index 61e5571e47..d99c1a6194 100644
--- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/EffectMasterHandler.java
+++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/EffectMasterHandler.java
@@ -138,6 +138,7 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("DispelBySlotProbability", DispelBySlotProbability::new);
EffectHandler.getInstance().registerHandler("DispelCaster", DispelCaster::new);
EffectHandler.getInstance().registerHandler("DoubleCast", DoubleCast::new);
+ EffectHandler.getInstance().registerHandler("DragonWeaponDefence", DragonWeaponDefence::new);
EffectHandler.getInstance().registerHandler("DuelistFury", DuelistFury::new);
EffectHandler.getInstance().registerHandler("EnableCloak", EnableCloak::new);
EffectHandler.getInstance().registerHandler("EnergyAttack", EnergyAttack::new);
diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/DragonWeaponDefence.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/DragonWeaponDefence.java
new file mode 100644
index 0000000000..476fb537ad
--- /dev/null
+++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/DragonWeaponDefence.java
@@ -0,0 +1,31 @@
+/*
+ * 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 org.l2jmobius.gameserver.model.StatSet;
+import org.l2jmobius.gameserver.model.stats.Stat;
+
+/**
+ * @author Mobius
+ */
+public class DragonWeaponDefence extends AbstractStatPercentEffect
+{
+ public DragonWeaponDefence(StatSet params)
+ {
+ super(params, Stat.DRAGON_WEAPON_DEFENCE);
+ }
+}
diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_5.5_EtinasFate/dist/game/data/stats/skills/documentation.txt
index 469497a74e..88be31ceb0 100644
--- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/stats/skills/documentation.txt
+++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/stats/skills/documentation.txt
@@ -108,6 +108,7 @@ DispelBySlotMyself: Removes given amount of effects by specified AbnormalType
DispelBySlotProbability: Removes given amount of effects by specified AbnormalType at a given rate.
DispelCaster: Removes given amount of effects from caster by specified AbnormalType. (l2jmobius)
DoubleCast: Triggers Fire, Water, Wind, Earth stance and enables the ability to cast two skills at once.
+DragonWeaponDefence: Dragon weapon defence stat. (l2jmobius)
DuelistFury: Synergy effect for Faceoff effect. (l2jmobius)
EnableCloak: See/unsee cloaks.
EnemyCharge: Charges towards the enemy. Rush Impact.
diff --git a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
index 8c24e88534..a26ff39303 100644
--- a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
+++ b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
@@ -753,6 +753,8 @@ public class PlayerInstance extends Playable
private int _cursedWeaponEquippedId = 0;
private boolean _combatFlagEquippedId = false;
+ private boolean _isDragonWeaponEquipped = false;
+
private boolean _canRevive = true;
private int _reviveRequested = 0;
private double _revivePower = 0;
@@ -11358,6 +11360,16 @@ public class PlayerInstance extends Playable
return _cursedWeaponEquippedId;
}
+ public void setDragonWeaponEquipped(boolean value)
+ {
+ _isDragonWeaponEquipped = value;
+ }
+
+ public boolean isDragonWeaponEquipped()
+ {
+ return _isDragonWeaponEquipped;
+ }
+
public boolean isCombatFlagEquipped()
{
return _combatFlagEquippedId;
diff --git a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/stats/Formulas.java
index 07500a7bfc..4ba05aa2a2 100644
--- a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/stats/Formulas.java
+++ b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/stats/Formulas.java
@@ -1604,7 +1604,18 @@ public class Formulas
pvpDefense = target.getStat().getValue(Stat.PVP_PHYSICAL_ATTACK_DEFENCE, 1) * Config.PVP_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
}
- return Math.max(0.05, 1 + (pvpAttack - pvpDefense)); // Bonus should not be negative.
+ // Dragon weapon defence stat.
+ final double dragonDefense;
+ if (attackerPlayer.isDragonWeaponEquipped())
+ {
+ dragonDefense = target.getStat().getValue(Stat.DRAGON_WEAPON_DEFENCE, 1);
+ }
+ else
+ {
+ dragonDefense = 1;
+ }
+
+ return Math.max(0.05, dragonDefense * (1 + (pvpAttack - pvpDefense))); // Bonus should not be negative.
}
// PvE Bonus
diff --git a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/stats/Stat.java
index d17424f182..d8790e3e16 100644
--- a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/stats/Stat.java
+++ b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/stats/Stat.java
@@ -87,6 +87,7 @@ public enum Stat
CRITICAL_DAMAGE_ADD("cAtkAdd"), // this is another type for special critical damage mods - vicious stance, critical power and critical damage SA
HATE_ATTACK("attackHate"),
REAR_DAMAGE_RATE("rearDamage"),
+ DRAGON_WEAPON_DEFENCE("dragonWeaponDefence"),
// PVP BONUS
PVP_PHYSICAL_ATTACK_DAMAGE("pvpPhysDmg"),
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/others/DragonWeaponListeners.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/others/DragonWeaponListeners.java
new file mode 100644
index 0000000000..085dcb2ca6
--- /dev/null
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/others/DragonWeaponListeners.java
@@ -0,0 +1,455 @@
+/*
+ * 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 ai.others;
+
+import org.l2jmobius.commons.util.CommonUtil;
+import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import org.l2jmobius.gameserver.model.events.EventType;
+import org.l2jmobius.gameserver.model.events.ListenerRegisterType;
+import org.l2jmobius.gameserver.model.events.annotations.Id;
+import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
+import org.l2jmobius.gameserver.model.events.annotations.RegisterType;
+import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemEquip;
+import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemUnequip;
+import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerLogin;
+import org.l2jmobius.gameserver.model.items.Weapon;
+
+import ai.AbstractNpcAI;
+
+/**
+ * @author Mobius
+ */
+public class DragonWeaponListeners extends AbstractNpcAI
+{
+ private static final int[] WEAPON_IDS =
+ {
+ 36417,
+ 36418,
+ 36419,
+ 36420,
+ 36421,
+ 36422,
+ 36423,
+ 36424,
+ 36425,
+ 36426,
+ 36441,
+ 36442,
+ 36443,
+ 36444,
+ 36445,
+ 36446,
+ 36447,
+ 36448,
+ 36449,
+ 36450,
+ 36465,
+ 36466,
+ 36467,
+ 36468,
+ 36469,
+ 36470,
+ 36471,
+ 36472,
+ 36473,
+ 36474,
+ 36489,
+ 36490,
+ 36491,
+ 36492,
+ 36493,
+ 36494,
+ 36495,
+ 36496,
+ 36497,
+ 36498,
+ 36427,
+ 36428,
+ 36429,
+ 36430,
+ 36431,
+ 36432,
+ 36433,
+ 36451,
+ 36452,
+ 36453,
+ 36454,
+ 36455,
+ 36456,
+ 36457,
+ 36475,
+ 36476,
+ 36477,
+ 36478,
+ 36479,
+ 36480,
+ 36481,
+ 36499,
+ 36500,
+ 36501,
+ 36502,
+ 36503,
+ 36504,
+ 36505,
+ 36434,
+ 36435,
+ 36436,
+ 36437,
+ 36438,
+ 36439,
+ 36440,
+ 36458,
+ 36459,
+ 36460,
+ 36461,
+ 36462,
+ 36463,
+ 36464,
+ 36482,
+ 36483,
+ 36484,
+ 36485,
+ 36486,
+ 36487,
+ 36488,
+ 36506,
+ 36507,
+ 36508,
+ 36509,
+ 36510,
+ 36511,
+ 36512,
+ 80066,
+ 80067,
+ 80068,
+ 80069,
+ 80070,
+ 80071,
+ 80072,
+ 80073,
+ 80074,
+ 80075,
+ 80076,
+ 80077,
+ 80078,
+ 80079,
+ 80080,
+ 80081,
+ 80082,
+ 80083,
+ 80084,
+ 80085,
+ 80086,
+ 80087,
+ 80088,
+ 80089,
+ 80315,
+ 80316,
+ 80317,
+ 80318,
+ };
+
+ @RegisterEvent(EventType.ON_PLAYER_LOGIN)
+ @RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
+ public void onPlayerLogin(OnPlayerLogin event)
+ {
+ final PlayerInstance player = event.getPlayer();
+ if (player != null)
+ {
+ final Weapon weapon = player.getActiveWeaponItem();
+ if ((weapon != null) && CommonUtil.contains(WEAPON_IDS, weapon.getId()))
+ {
+ player.setDragonWeaponEquipped(true);
+ }
+ }
+ }
+
+ @RegisterEvent(EventType.ON_PLAYER_ITEM_EQUIP)
+ @RegisterType(ListenerRegisterType.ITEM)
+ @Id(36417)
+ @Id(36418)
+ @Id(36419)
+ @Id(36420)
+ @Id(36421)
+ @Id(36422)
+ @Id(36423)
+ @Id(36424)
+ @Id(36425)
+ @Id(36426)
+ @Id(36441)
+ @Id(36442)
+ @Id(36443)
+ @Id(36444)
+ @Id(36445)
+ @Id(36446)
+ @Id(36447)
+ @Id(36448)
+ @Id(36449)
+ @Id(36450)
+ @Id(36465)
+ @Id(36466)
+ @Id(36467)
+ @Id(36468)
+ @Id(36469)
+ @Id(36470)
+ @Id(36471)
+ @Id(36472)
+ @Id(36473)
+ @Id(36474)
+ @Id(36489)
+ @Id(36490)
+ @Id(36491)
+ @Id(36492)
+ @Id(36493)
+ @Id(36494)
+ @Id(36495)
+ @Id(36496)
+ @Id(36497)
+ @Id(36498)
+ @Id(36427)
+ @Id(36428)
+ @Id(36429)
+ @Id(36430)
+ @Id(36431)
+ @Id(36432)
+ @Id(36433)
+ @Id(36451)
+ @Id(36452)
+ @Id(36453)
+ @Id(36454)
+ @Id(36455)
+ @Id(36456)
+ @Id(36457)
+ @Id(36475)
+ @Id(36476)
+ @Id(36477)
+ @Id(36478)
+ @Id(36479)
+ @Id(36480)
+ @Id(36481)
+ @Id(36499)
+ @Id(36500)
+ @Id(36501)
+ @Id(36502)
+ @Id(36503)
+ @Id(36504)
+ @Id(36505)
+ @Id(36434)
+ @Id(36435)
+ @Id(36436)
+ @Id(36437)
+ @Id(36438)
+ @Id(36439)
+ @Id(36440)
+ @Id(36458)
+ @Id(36459)
+ @Id(36460)
+ @Id(36461)
+ @Id(36462)
+ @Id(36463)
+ @Id(36464)
+ @Id(36482)
+ @Id(36483)
+ @Id(36484)
+ @Id(36485)
+ @Id(36486)
+ @Id(36487)
+ @Id(36488)
+ @Id(36506)
+ @Id(36507)
+ @Id(36508)
+ @Id(36509)
+ @Id(36510)
+ @Id(36511)
+ @Id(36512)
+ @Id(80066)
+ @Id(80067)
+ @Id(80068)
+ @Id(80069)
+ @Id(80070)
+ @Id(80071)
+ @Id(80072)
+ @Id(80073)
+ @Id(80074)
+ @Id(80075)
+ @Id(80076)
+ @Id(80077)
+ @Id(80078)
+ @Id(80079)
+ @Id(80080)
+ @Id(80081)
+ @Id(80082)
+ @Id(80083)
+ @Id(80084)
+ @Id(80085)
+ @Id(80086)
+ @Id(80087)
+ @Id(80088)
+ @Id(80089)
+ @Id(80315)
+ @Id(80316)
+ @Id(80317)
+ @Id(80318)
+ public void onPlayerItemEquip(OnPlayerItemEquip event)
+ {
+ final PlayerInstance player = event.getPlayer();
+ if (player != null)
+ {
+ player.setDragonWeaponEquipped(true);
+ }
+ }
+
+ @RegisterEvent(EventType.ON_PLAYER_ITEM_UNEQUIP)
+ @RegisterType(ListenerRegisterType.ITEM)
+ @Id(36417)
+ @Id(36418)
+ @Id(36419)
+ @Id(36420)
+ @Id(36421)
+ @Id(36422)
+ @Id(36423)
+ @Id(36424)
+ @Id(36425)
+ @Id(36426)
+ @Id(36441)
+ @Id(36442)
+ @Id(36443)
+ @Id(36444)
+ @Id(36445)
+ @Id(36446)
+ @Id(36447)
+ @Id(36448)
+ @Id(36449)
+ @Id(36450)
+ @Id(36465)
+ @Id(36466)
+ @Id(36467)
+ @Id(36468)
+ @Id(36469)
+ @Id(36470)
+ @Id(36471)
+ @Id(36472)
+ @Id(36473)
+ @Id(36474)
+ @Id(36489)
+ @Id(36490)
+ @Id(36491)
+ @Id(36492)
+ @Id(36493)
+ @Id(36494)
+ @Id(36495)
+ @Id(36496)
+ @Id(36497)
+ @Id(36498)
+ @Id(36427)
+ @Id(36428)
+ @Id(36429)
+ @Id(36430)
+ @Id(36431)
+ @Id(36432)
+ @Id(36433)
+ @Id(36451)
+ @Id(36452)
+ @Id(36453)
+ @Id(36454)
+ @Id(36455)
+ @Id(36456)
+ @Id(36457)
+ @Id(36475)
+ @Id(36476)
+ @Id(36477)
+ @Id(36478)
+ @Id(36479)
+ @Id(36480)
+ @Id(36481)
+ @Id(36499)
+ @Id(36500)
+ @Id(36501)
+ @Id(36502)
+ @Id(36503)
+ @Id(36504)
+ @Id(36505)
+ @Id(36434)
+ @Id(36435)
+ @Id(36436)
+ @Id(36437)
+ @Id(36438)
+ @Id(36439)
+ @Id(36440)
+ @Id(36458)
+ @Id(36459)
+ @Id(36460)
+ @Id(36461)
+ @Id(36462)
+ @Id(36463)
+ @Id(36464)
+ @Id(36482)
+ @Id(36483)
+ @Id(36484)
+ @Id(36485)
+ @Id(36486)
+ @Id(36487)
+ @Id(36488)
+ @Id(36506)
+ @Id(36507)
+ @Id(36508)
+ @Id(36509)
+ @Id(36510)
+ @Id(36511)
+ @Id(36512)
+ @Id(80066)
+ @Id(80067)
+ @Id(80068)
+ @Id(80069)
+ @Id(80070)
+ @Id(80071)
+ @Id(80072)
+ @Id(80073)
+ @Id(80074)
+ @Id(80075)
+ @Id(80076)
+ @Id(80077)
+ @Id(80078)
+ @Id(80079)
+ @Id(80080)
+ @Id(80081)
+ @Id(80082)
+ @Id(80083)
+ @Id(80084)
+ @Id(80085)
+ @Id(80086)
+ @Id(80087)
+ @Id(80088)
+ @Id(80089)
+ @Id(80315)
+ @Id(80316)
+ @Id(80317)
+ @Id(80318)
+ public void onPlayerItemUnequip(OnPlayerItemUnequip event)
+ {
+ final PlayerInstance player = event.getPlayer();
+ if (player != null)
+ {
+ player.setDragonWeaponEquipped(false);
+ }
+ }
+
+ public static void main(String[] args)
+ {
+ new DragonWeaponListeners();
+ }
+}
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/EffectMasterHandler.java
index 61e5571e47..d99c1a6194 100644
--- a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/EffectMasterHandler.java
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/EffectMasterHandler.java
@@ -138,6 +138,7 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("DispelBySlotProbability", DispelBySlotProbability::new);
EffectHandler.getInstance().registerHandler("DispelCaster", DispelCaster::new);
EffectHandler.getInstance().registerHandler("DoubleCast", DoubleCast::new);
+ EffectHandler.getInstance().registerHandler("DragonWeaponDefence", DragonWeaponDefence::new);
EffectHandler.getInstance().registerHandler("DuelistFury", DuelistFury::new);
EffectHandler.getInstance().registerHandler("EnableCloak", EnableCloak::new);
EffectHandler.getInstance().registerHandler("EnergyAttack", EnergyAttack::new);
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/DragonWeaponDefence.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/DragonWeaponDefence.java
new file mode 100644
index 0000000000..476fb537ad
--- /dev/null
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/DragonWeaponDefence.java
@@ -0,0 +1,31 @@
+/*
+ * 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 org.l2jmobius.gameserver.model.StatSet;
+import org.l2jmobius.gameserver.model.stats.Stat;
+
+/**
+ * @author Mobius
+ */
+public class DragonWeaponDefence extends AbstractStatPercentEffect
+{
+ public DragonWeaponDefence(StatSet params)
+ {
+ super(params, Stat.DRAGON_WEAPON_DEFENCE);
+ }
+}
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_6.0_Fafurion/dist/game/data/stats/skills/documentation.txt
index 469497a74e..88be31ceb0 100644
--- a/L2J_Mobius_6.0_Fafurion/dist/game/data/stats/skills/documentation.txt
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/stats/skills/documentation.txt
@@ -108,6 +108,7 @@ DispelBySlotMyself: Removes given amount of effects by specified AbnormalType
DispelBySlotProbability: Removes given amount of effects by specified AbnormalType at a given rate.
DispelCaster: Removes given amount of effects from caster by specified AbnormalType. (l2jmobius)
DoubleCast: Triggers Fire, Water, Wind, Earth stance and enables the ability to cast two skills at once.
+DragonWeaponDefence: Dragon weapon defence stat. (l2jmobius)
DuelistFury: Synergy effect for Faceoff effect. (l2jmobius)
EnableCloak: See/unsee cloaks.
EnemyCharge: Charges towards the enemy. Rush Impact.
diff --git a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
index ec659aafa5..77f8273c5e 100644
--- a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
+++ b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
@@ -753,6 +753,8 @@ public class PlayerInstance extends Playable
private int _cursedWeaponEquippedId = 0;
private boolean _combatFlagEquippedId = false;
+ private boolean _isDragonWeaponEquipped = false;
+
private boolean _canRevive = true;
private int _reviveRequested = 0;
private double _revivePower = 0;
@@ -11364,6 +11366,16 @@ public class PlayerInstance extends Playable
return _cursedWeaponEquippedId;
}
+ public void setDragonWeaponEquipped(boolean value)
+ {
+ _isDragonWeaponEquipped = value;
+ }
+
+ public boolean isDragonWeaponEquipped()
+ {
+ return _isDragonWeaponEquipped;
+ }
+
public boolean isCombatFlagEquipped()
{
return _combatFlagEquippedId;
diff --git a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/stats/Formulas.java
index 07500a7bfc..4ba05aa2a2 100644
--- a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/stats/Formulas.java
+++ b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/stats/Formulas.java
@@ -1604,7 +1604,18 @@ public class Formulas
pvpDefense = target.getStat().getValue(Stat.PVP_PHYSICAL_ATTACK_DEFENCE, 1) * Config.PVP_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
}
- return Math.max(0.05, 1 + (pvpAttack - pvpDefense)); // Bonus should not be negative.
+ // Dragon weapon defence stat.
+ final double dragonDefense;
+ if (attackerPlayer.isDragonWeaponEquipped())
+ {
+ dragonDefense = target.getStat().getValue(Stat.DRAGON_WEAPON_DEFENCE, 1);
+ }
+ else
+ {
+ dragonDefense = 1;
+ }
+
+ return Math.max(0.05, dragonDefense * (1 + (pvpAttack - pvpDefense))); // Bonus should not be negative.
}
// PvE Bonus
diff --git a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/stats/Stat.java
index d17424f182..d8790e3e16 100644
--- a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/stats/Stat.java
+++ b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/stats/Stat.java
@@ -87,6 +87,7 @@ public enum Stat
CRITICAL_DAMAGE_ADD("cAtkAdd"), // this is another type for special critical damage mods - vicious stance, critical power and critical damage SA
HATE_ATTACK("attackHate"),
REAR_DAMAGE_RATE("rearDamage"),
+ DRAGON_WEAPON_DEFENCE("dragonWeaponDefence"),
// PVP BONUS
PVP_PHYSICAL_ATTACK_DAMAGE("pvpPhysDmg"),
diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/ai/others/DragonWeaponListeners.java b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/ai/others/DragonWeaponListeners.java
new file mode 100644
index 0000000000..085dcb2ca6
--- /dev/null
+++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/ai/others/DragonWeaponListeners.java
@@ -0,0 +1,455 @@
+/*
+ * 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 ai.others;
+
+import org.l2jmobius.commons.util.CommonUtil;
+import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import org.l2jmobius.gameserver.model.events.EventType;
+import org.l2jmobius.gameserver.model.events.ListenerRegisterType;
+import org.l2jmobius.gameserver.model.events.annotations.Id;
+import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
+import org.l2jmobius.gameserver.model.events.annotations.RegisterType;
+import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemEquip;
+import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemUnequip;
+import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerLogin;
+import org.l2jmobius.gameserver.model.items.Weapon;
+
+import ai.AbstractNpcAI;
+
+/**
+ * @author Mobius
+ */
+public class DragonWeaponListeners extends AbstractNpcAI
+{
+ private static final int[] WEAPON_IDS =
+ {
+ 36417,
+ 36418,
+ 36419,
+ 36420,
+ 36421,
+ 36422,
+ 36423,
+ 36424,
+ 36425,
+ 36426,
+ 36441,
+ 36442,
+ 36443,
+ 36444,
+ 36445,
+ 36446,
+ 36447,
+ 36448,
+ 36449,
+ 36450,
+ 36465,
+ 36466,
+ 36467,
+ 36468,
+ 36469,
+ 36470,
+ 36471,
+ 36472,
+ 36473,
+ 36474,
+ 36489,
+ 36490,
+ 36491,
+ 36492,
+ 36493,
+ 36494,
+ 36495,
+ 36496,
+ 36497,
+ 36498,
+ 36427,
+ 36428,
+ 36429,
+ 36430,
+ 36431,
+ 36432,
+ 36433,
+ 36451,
+ 36452,
+ 36453,
+ 36454,
+ 36455,
+ 36456,
+ 36457,
+ 36475,
+ 36476,
+ 36477,
+ 36478,
+ 36479,
+ 36480,
+ 36481,
+ 36499,
+ 36500,
+ 36501,
+ 36502,
+ 36503,
+ 36504,
+ 36505,
+ 36434,
+ 36435,
+ 36436,
+ 36437,
+ 36438,
+ 36439,
+ 36440,
+ 36458,
+ 36459,
+ 36460,
+ 36461,
+ 36462,
+ 36463,
+ 36464,
+ 36482,
+ 36483,
+ 36484,
+ 36485,
+ 36486,
+ 36487,
+ 36488,
+ 36506,
+ 36507,
+ 36508,
+ 36509,
+ 36510,
+ 36511,
+ 36512,
+ 80066,
+ 80067,
+ 80068,
+ 80069,
+ 80070,
+ 80071,
+ 80072,
+ 80073,
+ 80074,
+ 80075,
+ 80076,
+ 80077,
+ 80078,
+ 80079,
+ 80080,
+ 80081,
+ 80082,
+ 80083,
+ 80084,
+ 80085,
+ 80086,
+ 80087,
+ 80088,
+ 80089,
+ 80315,
+ 80316,
+ 80317,
+ 80318,
+ };
+
+ @RegisterEvent(EventType.ON_PLAYER_LOGIN)
+ @RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
+ public void onPlayerLogin(OnPlayerLogin event)
+ {
+ final PlayerInstance player = event.getPlayer();
+ if (player != null)
+ {
+ final Weapon weapon = player.getActiveWeaponItem();
+ if ((weapon != null) && CommonUtil.contains(WEAPON_IDS, weapon.getId()))
+ {
+ player.setDragonWeaponEquipped(true);
+ }
+ }
+ }
+
+ @RegisterEvent(EventType.ON_PLAYER_ITEM_EQUIP)
+ @RegisterType(ListenerRegisterType.ITEM)
+ @Id(36417)
+ @Id(36418)
+ @Id(36419)
+ @Id(36420)
+ @Id(36421)
+ @Id(36422)
+ @Id(36423)
+ @Id(36424)
+ @Id(36425)
+ @Id(36426)
+ @Id(36441)
+ @Id(36442)
+ @Id(36443)
+ @Id(36444)
+ @Id(36445)
+ @Id(36446)
+ @Id(36447)
+ @Id(36448)
+ @Id(36449)
+ @Id(36450)
+ @Id(36465)
+ @Id(36466)
+ @Id(36467)
+ @Id(36468)
+ @Id(36469)
+ @Id(36470)
+ @Id(36471)
+ @Id(36472)
+ @Id(36473)
+ @Id(36474)
+ @Id(36489)
+ @Id(36490)
+ @Id(36491)
+ @Id(36492)
+ @Id(36493)
+ @Id(36494)
+ @Id(36495)
+ @Id(36496)
+ @Id(36497)
+ @Id(36498)
+ @Id(36427)
+ @Id(36428)
+ @Id(36429)
+ @Id(36430)
+ @Id(36431)
+ @Id(36432)
+ @Id(36433)
+ @Id(36451)
+ @Id(36452)
+ @Id(36453)
+ @Id(36454)
+ @Id(36455)
+ @Id(36456)
+ @Id(36457)
+ @Id(36475)
+ @Id(36476)
+ @Id(36477)
+ @Id(36478)
+ @Id(36479)
+ @Id(36480)
+ @Id(36481)
+ @Id(36499)
+ @Id(36500)
+ @Id(36501)
+ @Id(36502)
+ @Id(36503)
+ @Id(36504)
+ @Id(36505)
+ @Id(36434)
+ @Id(36435)
+ @Id(36436)
+ @Id(36437)
+ @Id(36438)
+ @Id(36439)
+ @Id(36440)
+ @Id(36458)
+ @Id(36459)
+ @Id(36460)
+ @Id(36461)
+ @Id(36462)
+ @Id(36463)
+ @Id(36464)
+ @Id(36482)
+ @Id(36483)
+ @Id(36484)
+ @Id(36485)
+ @Id(36486)
+ @Id(36487)
+ @Id(36488)
+ @Id(36506)
+ @Id(36507)
+ @Id(36508)
+ @Id(36509)
+ @Id(36510)
+ @Id(36511)
+ @Id(36512)
+ @Id(80066)
+ @Id(80067)
+ @Id(80068)
+ @Id(80069)
+ @Id(80070)
+ @Id(80071)
+ @Id(80072)
+ @Id(80073)
+ @Id(80074)
+ @Id(80075)
+ @Id(80076)
+ @Id(80077)
+ @Id(80078)
+ @Id(80079)
+ @Id(80080)
+ @Id(80081)
+ @Id(80082)
+ @Id(80083)
+ @Id(80084)
+ @Id(80085)
+ @Id(80086)
+ @Id(80087)
+ @Id(80088)
+ @Id(80089)
+ @Id(80315)
+ @Id(80316)
+ @Id(80317)
+ @Id(80318)
+ public void onPlayerItemEquip(OnPlayerItemEquip event)
+ {
+ final PlayerInstance player = event.getPlayer();
+ if (player != null)
+ {
+ player.setDragonWeaponEquipped(true);
+ }
+ }
+
+ @RegisterEvent(EventType.ON_PLAYER_ITEM_UNEQUIP)
+ @RegisterType(ListenerRegisterType.ITEM)
+ @Id(36417)
+ @Id(36418)
+ @Id(36419)
+ @Id(36420)
+ @Id(36421)
+ @Id(36422)
+ @Id(36423)
+ @Id(36424)
+ @Id(36425)
+ @Id(36426)
+ @Id(36441)
+ @Id(36442)
+ @Id(36443)
+ @Id(36444)
+ @Id(36445)
+ @Id(36446)
+ @Id(36447)
+ @Id(36448)
+ @Id(36449)
+ @Id(36450)
+ @Id(36465)
+ @Id(36466)
+ @Id(36467)
+ @Id(36468)
+ @Id(36469)
+ @Id(36470)
+ @Id(36471)
+ @Id(36472)
+ @Id(36473)
+ @Id(36474)
+ @Id(36489)
+ @Id(36490)
+ @Id(36491)
+ @Id(36492)
+ @Id(36493)
+ @Id(36494)
+ @Id(36495)
+ @Id(36496)
+ @Id(36497)
+ @Id(36498)
+ @Id(36427)
+ @Id(36428)
+ @Id(36429)
+ @Id(36430)
+ @Id(36431)
+ @Id(36432)
+ @Id(36433)
+ @Id(36451)
+ @Id(36452)
+ @Id(36453)
+ @Id(36454)
+ @Id(36455)
+ @Id(36456)
+ @Id(36457)
+ @Id(36475)
+ @Id(36476)
+ @Id(36477)
+ @Id(36478)
+ @Id(36479)
+ @Id(36480)
+ @Id(36481)
+ @Id(36499)
+ @Id(36500)
+ @Id(36501)
+ @Id(36502)
+ @Id(36503)
+ @Id(36504)
+ @Id(36505)
+ @Id(36434)
+ @Id(36435)
+ @Id(36436)
+ @Id(36437)
+ @Id(36438)
+ @Id(36439)
+ @Id(36440)
+ @Id(36458)
+ @Id(36459)
+ @Id(36460)
+ @Id(36461)
+ @Id(36462)
+ @Id(36463)
+ @Id(36464)
+ @Id(36482)
+ @Id(36483)
+ @Id(36484)
+ @Id(36485)
+ @Id(36486)
+ @Id(36487)
+ @Id(36488)
+ @Id(36506)
+ @Id(36507)
+ @Id(36508)
+ @Id(36509)
+ @Id(36510)
+ @Id(36511)
+ @Id(36512)
+ @Id(80066)
+ @Id(80067)
+ @Id(80068)
+ @Id(80069)
+ @Id(80070)
+ @Id(80071)
+ @Id(80072)
+ @Id(80073)
+ @Id(80074)
+ @Id(80075)
+ @Id(80076)
+ @Id(80077)
+ @Id(80078)
+ @Id(80079)
+ @Id(80080)
+ @Id(80081)
+ @Id(80082)
+ @Id(80083)
+ @Id(80084)
+ @Id(80085)
+ @Id(80086)
+ @Id(80087)
+ @Id(80088)
+ @Id(80089)
+ @Id(80315)
+ @Id(80316)
+ @Id(80317)
+ @Id(80318)
+ public void onPlayerItemUnequip(OnPlayerItemUnequip event)
+ {
+ final PlayerInstance player = event.getPlayer();
+ if (player != null)
+ {
+ player.setDragonWeaponEquipped(false);
+ }
+ }
+
+ public static void main(String[] args)
+ {
+ new DragonWeaponListeners();
+ }
+}
diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/EffectMasterHandler.java
index 7ab7e96e2a..8734287606 100644
--- a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/EffectMasterHandler.java
+++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/EffectMasterHandler.java
@@ -138,6 +138,7 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("DispelBySlotProbability", DispelBySlotProbability::new);
EffectHandler.getInstance().registerHandler("DispelCaster", DispelCaster::new);
EffectHandler.getInstance().registerHandler("DoubleCast", DoubleCast::new);
+ EffectHandler.getInstance().registerHandler("DragonWeaponDefence", DragonWeaponDefence::new);
EffectHandler.getInstance().registerHandler("DuelistFury", DuelistFury::new);
EffectHandler.getInstance().registerHandler("EnableCloak", EnableCloak::new);
EffectHandler.getInstance().registerHandler("EnergyAttack", EnergyAttack::new);
diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/DragonWeaponDefence.java b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/DragonWeaponDefence.java
new file mode 100644
index 0000000000..476fb537ad
--- /dev/null
+++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/DragonWeaponDefence.java
@@ -0,0 +1,31 @@
+/*
+ * 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 org.l2jmobius.gameserver.model.StatSet;
+import org.l2jmobius.gameserver.model.stats.Stat;
+
+/**
+ * @author Mobius
+ */
+public class DragonWeaponDefence extends AbstractStatPercentEffect
+{
+ public DragonWeaponDefence(StatSet params)
+ {
+ super(params, Stat.DRAGON_WEAPON_DEFENCE);
+ }
+}
diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/skills/documentation.txt
index 95e8125d48..14133e7c78 100644
--- a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/skills/documentation.txt
+++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/skills/documentation.txt
@@ -108,6 +108,7 @@ DispelBySlotMyself: Removes given amount of effects by specified AbnormalType
DispelBySlotProbability: Removes given amount of effects by specified AbnormalType at a given rate.
DispelCaster: Removes given amount of effects from caster by specified AbnormalType. (l2jmobius)
DoubleCast: Triggers Fire, Water, Wind, Earth stance and enables the ability to cast two skills at once.
+DragonWeaponDefence: Dragon weapon defence stat. (l2jmobius)
DuelistFury: Synergy effect for Faceoff effect. (l2jmobius)
EnableCloak: See/unsee cloaks.
EnemyCharge: Charges towards the enemy. Rush Impact.
diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
index b26dcbfddf..1af41e9d2a 100644
--- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
+++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
@@ -760,6 +760,8 @@ public class PlayerInstance extends Playable
private int _cursedWeaponEquippedId = 0;
private boolean _combatFlagEquippedId = false;
+ private boolean _isDragonWeaponEquipped = false;
+
private boolean _canRevive = true;
private int _reviveRequested = 0;
private double _revivePower = 0;
@@ -11365,6 +11367,16 @@ public class PlayerInstance extends Playable
return _cursedWeaponEquippedId;
}
+ public void setDragonWeaponEquipped(boolean value)
+ {
+ _isDragonWeaponEquipped = value;
+ }
+
+ public boolean isDragonWeaponEquipped()
+ {
+ return _isDragonWeaponEquipped;
+ }
+
public boolean isCombatFlagEquipped()
{
return _combatFlagEquippedId;
diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/stats/Formulas.java
index 15cb112641..42484eb483 100644
--- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/stats/Formulas.java
+++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/stats/Formulas.java
@@ -1604,7 +1604,18 @@ public class Formulas
pvpDefense = target.getStat().getValue(Stat.PVP_PHYSICAL_ATTACK_DEFENCE, 1) * Config.PVP_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
}
- return Math.max(0.05, 1 + (pvpAttack - pvpDefense)); // Bonus should not be negative.
+ // Dragon weapon defence stat.
+ final double dragonDefense;
+ if (attackerPlayer.isDragonWeaponEquipped())
+ {
+ dragonDefense = target.getStat().getValue(Stat.DRAGON_WEAPON_DEFENCE, 1);
+ }
+ else
+ {
+ dragonDefense = 1;
+ }
+
+ return Math.max(0.05, dragonDefense * (1 + (pvpAttack - pvpDefense))); // Bonus should not be negative.
}
// PvE Bonus
diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/stats/Stat.java
index d17424f182..d8790e3e16 100644
--- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/stats/Stat.java
+++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/stats/Stat.java
@@ -87,6 +87,7 @@ public enum Stat
CRITICAL_DAMAGE_ADD("cAtkAdd"), // this is another type for special critical damage mods - vicious stance, critical power and critical damage SA
HATE_ATTACK("attackHate"),
REAR_DAMAGE_RATE("rearDamage"),
+ DRAGON_WEAPON_DEFENCE("dragonWeaponDefence"),
// PVP BONUS
PVP_PHYSICAL_ATTACK_DAMAGE("pvpPhysDmg"),
diff --git a/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/ai/others/DragonWeaponListeners.java b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/ai/others/DragonWeaponListeners.java
new file mode 100644
index 0000000000..085dcb2ca6
--- /dev/null
+++ b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/ai/others/DragonWeaponListeners.java
@@ -0,0 +1,455 @@
+/*
+ * 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 ai.others;
+
+import org.l2jmobius.commons.util.CommonUtil;
+import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import org.l2jmobius.gameserver.model.events.EventType;
+import org.l2jmobius.gameserver.model.events.ListenerRegisterType;
+import org.l2jmobius.gameserver.model.events.annotations.Id;
+import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
+import org.l2jmobius.gameserver.model.events.annotations.RegisterType;
+import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemEquip;
+import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerItemUnequip;
+import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerLogin;
+import org.l2jmobius.gameserver.model.items.Weapon;
+
+import ai.AbstractNpcAI;
+
+/**
+ * @author Mobius
+ */
+public class DragonWeaponListeners extends AbstractNpcAI
+{
+ private static final int[] WEAPON_IDS =
+ {
+ 36417,
+ 36418,
+ 36419,
+ 36420,
+ 36421,
+ 36422,
+ 36423,
+ 36424,
+ 36425,
+ 36426,
+ 36441,
+ 36442,
+ 36443,
+ 36444,
+ 36445,
+ 36446,
+ 36447,
+ 36448,
+ 36449,
+ 36450,
+ 36465,
+ 36466,
+ 36467,
+ 36468,
+ 36469,
+ 36470,
+ 36471,
+ 36472,
+ 36473,
+ 36474,
+ 36489,
+ 36490,
+ 36491,
+ 36492,
+ 36493,
+ 36494,
+ 36495,
+ 36496,
+ 36497,
+ 36498,
+ 36427,
+ 36428,
+ 36429,
+ 36430,
+ 36431,
+ 36432,
+ 36433,
+ 36451,
+ 36452,
+ 36453,
+ 36454,
+ 36455,
+ 36456,
+ 36457,
+ 36475,
+ 36476,
+ 36477,
+ 36478,
+ 36479,
+ 36480,
+ 36481,
+ 36499,
+ 36500,
+ 36501,
+ 36502,
+ 36503,
+ 36504,
+ 36505,
+ 36434,
+ 36435,
+ 36436,
+ 36437,
+ 36438,
+ 36439,
+ 36440,
+ 36458,
+ 36459,
+ 36460,
+ 36461,
+ 36462,
+ 36463,
+ 36464,
+ 36482,
+ 36483,
+ 36484,
+ 36485,
+ 36486,
+ 36487,
+ 36488,
+ 36506,
+ 36507,
+ 36508,
+ 36509,
+ 36510,
+ 36511,
+ 36512,
+ 80066,
+ 80067,
+ 80068,
+ 80069,
+ 80070,
+ 80071,
+ 80072,
+ 80073,
+ 80074,
+ 80075,
+ 80076,
+ 80077,
+ 80078,
+ 80079,
+ 80080,
+ 80081,
+ 80082,
+ 80083,
+ 80084,
+ 80085,
+ 80086,
+ 80087,
+ 80088,
+ 80089,
+ 80315,
+ 80316,
+ 80317,
+ 80318,
+ };
+
+ @RegisterEvent(EventType.ON_PLAYER_LOGIN)
+ @RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
+ public void onPlayerLogin(OnPlayerLogin event)
+ {
+ final PlayerInstance player = event.getPlayer();
+ if (player != null)
+ {
+ final Weapon weapon = player.getActiveWeaponItem();
+ if ((weapon != null) && CommonUtil.contains(WEAPON_IDS, weapon.getId()))
+ {
+ player.setDragonWeaponEquipped(true);
+ }
+ }
+ }
+
+ @RegisterEvent(EventType.ON_PLAYER_ITEM_EQUIP)
+ @RegisterType(ListenerRegisterType.ITEM)
+ @Id(36417)
+ @Id(36418)
+ @Id(36419)
+ @Id(36420)
+ @Id(36421)
+ @Id(36422)
+ @Id(36423)
+ @Id(36424)
+ @Id(36425)
+ @Id(36426)
+ @Id(36441)
+ @Id(36442)
+ @Id(36443)
+ @Id(36444)
+ @Id(36445)
+ @Id(36446)
+ @Id(36447)
+ @Id(36448)
+ @Id(36449)
+ @Id(36450)
+ @Id(36465)
+ @Id(36466)
+ @Id(36467)
+ @Id(36468)
+ @Id(36469)
+ @Id(36470)
+ @Id(36471)
+ @Id(36472)
+ @Id(36473)
+ @Id(36474)
+ @Id(36489)
+ @Id(36490)
+ @Id(36491)
+ @Id(36492)
+ @Id(36493)
+ @Id(36494)
+ @Id(36495)
+ @Id(36496)
+ @Id(36497)
+ @Id(36498)
+ @Id(36427)
+ @Id(36428)
+ @Id(36429)
+ @Id(36430)
+ @Id(36431)
+ @Id(36432)
+ @Id(36433)
+ @Id(36451)
+ @Id(36452)
+ @Id(36453)
+ @Id(36454)
+ @Id(36455)
+ @Id(36456)
+ @Id(36457)
+ @Id(36475)
+ @Id(36476)
+ @Id(36477)
+ @Id(36478)
+ @Id(36479)
+ @Id(36480)
+ @Id(36481)
+ @Id(36499)
+ @Id(36500)
+ @Id(36501)
+ @Id(36502)
+ @Id(36503)
+ @Id(36504)
+ @Id(36505)
+ @Id(36434)
+ @Id(36435)
+ @Id(36436)
+ @Id(36437)
+ @Id(36438)
+ @Id(36439)
+ @Id(36440)
+ @Id(36458)
+ @Id(36459)
+ @Id(36460)
+ @Id(36461)
+ @Id(36462)
+ @Id(36463)
+ @Id(36464)
+ @Id(36482)
+ @Id(36483)
+ @Id(36484)
+ @Id(36485)
+ @Id(36486)
+ @Id(36487)
+ @Id(36488)
+ @Id(36506)
+ @Id(36507)
+ @Id(36508)
+ @Id(36509)
+ @Id(36510)
+ @Id(36511)
+ @Id(36512)
+ @Id(80066)
+ @Id(80067)
+ @Id(80068)
+ @Id(80069)
+ @Id(80070)
+ @Id(80071)
+ @Id(80072)
+ @Id(80073)
+ @Id(80074)
+ @Id(80075)
+ @Id(80076)
+ @Id(80077)
+ @Id(80078)
+ @Id(80079)
+ @Id(80080)
+ @Id(80081)
+ @Id(80082)
+ @Id(80083)
+ @Id(80084)
+ @Id(80085)
+ @Id(80086)
+ @Id(80087)
+ @Id(80088)
+ @Id(80089)
+ @Id(80315)
+ @Id(80316)
+ @Id(80317)
+ @Id(80318)
+ public void onPlayerItemEquip(OnPlayerItemEquip event)
+ {
+ final PlayerInstance player = event.getPlayer();
+ if (player != null)
+ {
+ player.setDragonWeaponEquipped(true);
+ }
+ }
+
+ @RegisterEvent(EventType.ON_PLAYER_ITEM_UNEQUIP)
+ @RegisterType(ListenerRegisterType.ITEM)
+ @Id(36417)
+ @Id(36418)
+ @Id(36419)
+ @Id(36420)
+ @Id(36421)
+ @Id(36422)
+ @Id(36423)
+ @Id(36424)
+ @Id(36425)
+ @Id(36426)
+ @Id(36441)
+ @Id(36442)
+ @Id(36443)
+ @Id(36444)
+ @Id(36445)
+ @Id(36446)
+ @Id(36447)
+ @Id(36448)
+ @Id(36449)
+ @Id(36450)
+ @Id(36465)
+ @Id(36466)
+ @Id(36467)
+ @Id(36468)
+ @Id(36469)
+ @Id(36470)
+ @Id(36471)
+ @Id(36472)
+ @Id(36473)
+ @Id(36474)
+ @Id(36489)
+ @Id(36490)
+ @Id(36491)
+ @Id(36492)
+ @Id(36493)
+ @Id(36494)
+ @Id(36495)
+ @Id(36496)
+ @Id(36497)
+ @Id(36498)
+ @Id(36427)
+ @Id(36428)
+ @Id(36429)
+ @Id(36430)
+ @Id(36431)
+ @Id(36432)
+ @Id(36433)
+ @Id(36451)
+ @Id(36452)
+ @Id(36453)
+ @Id(36454)
+ @Id(36455)
+ @Id(36456)
+ @Id(36457)
+ @Id(36475)
+ @Id(36476)
+ @Id(36477)
+ @Id(36478)
+ @Id(36479)
+ @Id(36480)
+ @Id(36481)
+ @Id(36499)
+ @Id(36500)
+ @Id(36501)
+ @Id(36502)
+ @Id(36503)
+ @Id(36504)
+ @Id(36505)
+ @Id(36434)
+ @Id(36435)
+ @Id(36436)
+ @Id(36437)
+ @Id(36438)
+ @Id(36439)
+ @Id(36440)
+ @Id(36458)
+ @Id(36459)
+ @Id(36460)
+ @Id(36461)
+ @Id(36462)
+ @Id(36463)
+ @Id(36464)
+ @Id(36482)
+ @Id(36483)
+ @Id(36484)
+ @Id(36485)
+ @Id(36486)
+ @Id(36487)
+ @Id(36488)
+ @Id(36506)
+ @Id(36507)
+ @Id(36508)
+ @Id(36509)
+ @Id(36510)
+ @Id(36511)
+ @Id(36512)
+ @Id(80066)
+ @Id(80067)
+ @Id(80068)
+ @Id(80069)
+ @Id(80070)
+ @Id(80071)
+ @Id(80072)
+ @Id(80073)
+ @Id(80074)
+ @Id(80075)
+ @Id(80076)
+ @Id(80077)
+ @Id(80078)
+ @Id(80079)
+ @Id(80080)
+ @Id(80081)
+ @Id(80082)
+ @Id(80083)
+ @Id(80084)
+ @Id(80085)
+ @Id(80086)
+ @Id(80087)
+ @Id(80088)
+ @Id(80089)
+ @Id(80315)
+ @Id(80316)
+ @Id(80317)
+ @Id(80318)
+ public void onPlayerItemUnequip(OnPlayerItemUnequip event)
+ {
+ final PlayerInstance player = event.getPlayer();
+ if (player != null)
+ {
+ player.setDragonWeaponEquipped(false);
+ }
+ }
+
+ public static void main(String[] args)
+ {
+ new DragonWeaponListeners();
+ }
+}
diff --git a/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/handlers/EffectMasterHandler.java
index 7ab7e96e2a..8734287606 100644
--- a/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/handlers/EffectMasterHandler.java
+++ b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/handlers/EffectMasterHandler.java
@@ -138,6 +138,7 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("DispelBySlotProbability", DispelBySlotProbability::new);
EffectHandler.getInstance().registerHandler("DispelCaster", DispelCaster::new);
EffectHandler.getInstance().registerHandler("DoubleCast", DoubleCast::new);
+ EffectHandler.getInstance().registerHandler("DragonWeaponDefence", DragonWeaponDefence::new);
EffectHandler.getInstance().registerHandler("DuelistFury", DuelistFury::new);
EffectHandler.getInstance().registerHandler("EnableCloak", EnableCloak::new);
EffectHandler.getInstance().registerHandler("EnergyAttack", EnergyAttack::new);
diff --git a/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/handlers/effecthandlers/DragonWeaponDefence.java b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/handlers/effecthandlers/DragonWeaponDefence.java
new file mode 100644
index 0000000000..476fb537ad
--- /dev/null
+++ b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/handlers/effecthandlers/DragonWeaponDefence.java
@@ -0,0 +1,31 @@
+/*
+ * 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 org.l2jmobius.gameserver.model.StatSet;
+import org.l2jmobius.gameserver.model.stats.Stat;
+
+/**
+ * @author Mobius
+ */
+public class DragonWeaponDefence extends AbstractStatPercentEffect
+{
+ public DragonWeaponDefence(StatSet params)
+ {
+ super(params, Stat.DRAGON_WEAPON_DEFENCE);
+ }
+}
diff --git a/L2J_Mobius_8.0_Homunculus/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_8.0_Homunculus/dist/game/data/stats/skills/documentation.txt
index 95e8125d48..14133e7c78 100644
--- a/L2J_Mobius_8.0_Homunculus/dist/game/data/stats/skills/documentation.txt
+++ b/L2J_Mobius_8.0_Homunculus/dist/game/data/stats/skills/documentation.txt
@@ -108,6 +108,7 @@ DispelBySlotMyself: Removes given amount of effects by specified AbnormalType
DispelBySlotProbability: Removes given amount of effects by specified AbnormalType at a given rate.
DispelCaster: Removes given amount of effects from caster by specified AbnormalType. (l2jmobius)
DoubleCast: Triggers Fire, Water, Wind, Earth stance and enables the ability to cast two skills at once.
+DragonWeaponDefence: Dragon weapon defence stat. (l2jmobius)
DuelistFury: Synergy effect for Faceoff effect. (l2jmobius)
EnableCloak: See/unsee cloaks.
EnemyCharge: Charges towards the enemy. Rush Impact.
diff --git a/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
index 475fcd3742..33ef455800 100644
--- a/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
+++ b/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
@@ -754,6 +754,8 @@ public class PlayerInstance extends Playable
private int _cursedWeaponEquippedId = 0;
private boolean _combatFlagEquippedId = false;
+ private boolean _isDragonWeaponEquipped = false;
+
private boolean _canRevive = true;
private int _reviveRequested = 0;
private double _revivePower = 0;
@@ -11368,6 +11370,16 @@ public class PlayerInstance extends Playable
return _cursedWeaponEquippedId;
}
+ public void setDragonWeaponEquipped(boolean value)
+ {
+ _isDragonWeaponEquipped = value;
+ }
+
+ public boolean isDragonWeaponEquipped()
+ {
+ return _isDragonWeaponEquipped;
+ }
+
public boolean isCombatFlagEquipped()
{
return _combatFlagEquippedId;
diff --git a/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/model/stats/Formulas.java
index 15cb112641..42484eb483 100644
--- a/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/model/stats/Formulas.java
+++ b/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/model/stats/Formulas.java
@@ -1604,7 +1604,18 @@ public class Formulas
pvpDefense = target.getStat().getValue(Stat.PVP_PHYSICAL_ATTACK_DEFENCE, 1) * Config.PVP_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
}
- return Math.max(0.05, 1 + (pvpAttack - pvpDefense)); // Bonus should not be negative.
+ // Dragon weapon defence stat.
+ final double dragonDefense;
+ if (attackerPlayer.isDragonWeaponEquipped())
+ {
+ dragonDefense = target.getStat().getValue(Stat.DRAGON_WEAPON_DEFENCE, 1);
+ }
+ else
+ {
+ dragonDefense = 1;
+ }
+
+ return Math.max(0.05, dragonDefense * (1 + (pvpAttack - pvpDefense))); // Bonus should not be negative.
}
// PvE Bonus
diff --git a/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/model/stats/Stat.java
index d17424f182..d8790e3e16 100644
--- a/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/model/stats/Stat.java
+++ b/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/model/stats/Stat.java
@@ -87,6 +87,7 @@ public enum Stat
CRITICAL_DAMAGE_ADD("cAtkAdd"), // this is another type for special critical damage mods - vicious stance, critical power and critical damage SA
HATE_ATTACK("attackHate"),
REAR_DAMAGE_RATE("rearDamage"),
+ DRAGON_WEAPON_DEFENCE("dragonWeaponDefence"),
// PVP BONUS
PVP_PHYSICAL_ATTACK_DAMAGE("pvpPhysDmg"),