From 12ad31c6ddc910ba4e9977dccf0cb20f74faa8d1 Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Tue, 13 Nov 2018 19:59:12 +0000 Subject: [PATCH] Config to disable stun cancel chance upon hit. --- L2J_Mobius_1.0_Ertheia/dist/game/config/Character.ini | 4 ++++ L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/Config.java | 2 ++ .../java/com/l2jmobius/gameserver/model/stats/Formulas.java | 4 ++-- L2J_Mobius_2.5_Underground/dist/game/config/Character.ini | 4 ++++ L2J_Mobius_2.5_Underground/java/com/l2jmobius/Config.java | 2 ++ .../java/com/l2jmobius/gameserver/model/stats/Formulas.java | 4 ++-- L2J_Mobius_3.0_Helios/dist/game/config/Character.ini | 4 ++++ L2J_Mobius_3.0_Helios/java/com/l2jmobius/Config.java | 2 ++ .../java/com/l2jmobius/gameserver/model/stats/Formulas.java | 4 ++-- L2J_Mobius_4.0_GrandCrusade/dist/game/config/Character.ini | 4 ++++ L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/Config.java | 2 ++ .../java/com/l2jmobius/gameserver/model/stats/Formulas.java | 4 ++-- L2J_Mobius_5.0_Salvation/dist/game/config/Character.ini | 4 ++++ L2J_Mobius_5.0_Salvation/java/com/l2jmobius/Config.java | 2 ++ .../java/com/l2jmobius/gameserver/model/stats/Formulas.java | 4 ++-- L2J_Mobius_5.5_EtinasFate/dist/game/config/Character.ini | 4 ++++ L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/Config.java | 2 ++ .../java/com/l2jmobius/gameserver/model/stats/Formulas.java | 4 ++-- L2J_Mobius_Classic_2.0_Saviors/dist/game/config/Character.ini | 4 ++++ L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/Config.java | 2 ++ .../java/com/l2jmobius/gameserver/model/stats/Formulas.java | 4 ++-- L2J_Mobius_Classic_2.1_Zaken/dist/game/config/Character.ini | 4 ++++ L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/Config.java | 2 ++ .../java/com/l2jmobius/gameserver/model/stats/Formulas.java | 4 ++-- .../dist/game/config/Character.ini | 4 ++++ .../java/com/l2jmobius/Config.java | 2 ++ .../java/com/l2jmobius/gameserver/model/stats/Formulas.java | 4 ++-- .../dist/game/config/Character.ini | 4 ++++ .../java/com/l2jmobius/Config.java | 2 ++ .../java/com/l2jmobius/gameserver/model/stats/Formulas.java | 4 ++-- 30 files changed, 80 insertions(+), 20 deletions(-) diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/config/Character.ini b/L2J_Mobius_1.0_Ertheia/dist/game/config/Character.ini index 8978cbd19d..073b11b868 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/config/Character.ini +++ b/L2J_Mobius_1.0_Ertheia/dist/game/config/Character.ini @@ -114,6 +114,10 @@ AltGameCancelByHit = cast # Default: True MagicFailures = True +# This option, if enabled, will allow stuns to be canceled with 14% chance. +# Retail: True +BreakStun = False + # Protection from aggressive mobs after getting up from fake death. # The value is specified in seconds. # Default: 0 diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/Config.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/Config.java index 8239730839..66b897560e 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/Config.java @@ -164,6 +164,7 @@ public final class Config public static boolean ALT_GAME_CANCEL_BOW; public static boolean ALT_GAME_CANCEL_CAST; public static boolean ALT_GAME_MAGICFAILURES; + public static boolean ALT_GAME_STUN_BREAK; public static int PLAYER_FAKEDEATH_UP_PROTECTION; public static boolean STORE_SKILL_COOLTIME; public static boolean SUBCLASS_STORE_SKILL_COOLTIME; @@ -1472,6 +1473,7 @@ public final class Config ALT_GAME_CANCEL_BOW = Character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("bow") || Character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("all"); ALT_GAME_CANCEL_CAST = Character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("cast") || Character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("all"); ALT_GAME_MAGICFAILURES = Character.getBoolean("MagicFailures", true); + ALT_GAME_STUN_BREAK = Character.getBoolean("BreakStun", false); PLAYER_FAKEDEATH_UP_PROTECTION = Character.getInt("PlayerFakeDeathUpProtection", 0); STORE_SKILL_COOLTIME = Character.getBoolean("StoreSkillCooltime", true); SUBCLASS_STORE_SKILL_COOLTIME = Character.getBoolean("SubclassStoreSkillCooltime", false); diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/stats/Formulas.java index 0f21f51676..b47534faa8 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/stats/Formulas.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/stats/Formulas.java @@ -1397,8 +1397,8 @@ public final class Formulas */ public static boolean calcStunBreak(L2Character activeChar) { - // Check if target is stunned and 10% chance (retail is 14% and 35% on crit?) - if (activeChar.hasBlockActions() && (Rnd.get(10) == 0)) + // Check if target is stunned and break it with 14% chance. (retail is 14% and 35% on crit?) + if (Config.ALT_GAME_STUN_BREAK && activeChar.hasBlockActions() && (Rnd.get(14) == 0)) { // Any stun that has double duration due to skill mastery, doesn't get removed until its time reaches the usual abnormal time. return activeChar.getEffectList().hasAbnormalType(AbnormalType.STUN, info -> info.getTime() <= info.getSkill().getAbnormalTime()); diff --git a/L2J_Mobius_2.5_Underground/dist/game/config/Character.ini b/L2J_Mobius_2.5_Underground/dist/game/config/Character.ini index 98f726b2f1..1513709427 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/config/Character.ini +++ b/L2J_Mobius_2.5_Underground/dist/game/config/Character.ini @@ -114,6 +114,10 @@ AltGameCancelByHit = cast # Default: True MagicFailures = True +# This option, if enabled, will allow stuns to be canceled with 14% chance. +# Retail: True +BreakStun = False + # Protection from aggressive mobs after getting up from fake death. # The value is specified in seconds. # Default: 0 diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/Config.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/Config.java index b6216431d5..d755c6fa94 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/Config.java @@ -170,6 +170,7 @@ public final class Config public static boolean ALT_GAME_CANCEL_BOW; public static boolean ALT_GAME_CANCEL_CAST; public static boolean ALT_GAME_MAGICFAILURES; + public static boolean ALT_GAME_STUN_BREAK; public static int PLAYER_FAKEDEATH_UP_PROTECTION; public static boolean STORE_SKILL_COOLTIME; public static boolean SUBCLASS_STORE_SKILL_COOLTIME; @@ -1487,6 +1488,7 @@ public final class Config ALT_GAME_CANCEL_BOW = Character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("bow") || Character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("all"); ALT_GAME_CANCEL_CAST = Character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("cast") || Character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("all"); ALT_GAME_MAGICFAILURES = Character.getBoolean("MagicFailures", true); + ALT_GAME_STUN_BREAK = Character.getBoolean("BreakStun", false); PLAYER_FAKEDEATH_UP_PROTECTION = Character.getInt("PlayerFakeDeathUpProtection", 0); STORE_SKILL_COOLTIME = Character.getBoolean("StoreSkillCooltime", true); SUBCLASS_STORE_SKILL_COOLTIME = Character.getBoolean("SubclassStoreSkillCooltime", false); diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/stats/Formulas.java index 0f21f51676..b47534faa8 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/stats/Formulas.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/stats/Formulas.java @@ -1397,8 +1397,8 @@ public final class Formulas */ public static boolean calcStunBreak(L2Character activeChar) { - // Check if target is stunned and 10% chance (retail is 14% and 35% on crit?) - if (activeChar.hasBlockActions() && (Rnd.get(10) == 0)) + // Check if target is stunned and break it with 14% chance. (retail is 14% and 35% on crit?) + if (Config.ALT_GAME_STUN_BREAK && activeChar.hasBlockActions() && (Rnd.get(14) == 0)) { // Any stun that has double duration due to skill mastery, doesn't get removed until its time reaches the usual abnormal time. return activeChar.getEffectList().hasAbnormalType(AbnormalType.STUN, info -> info.getTime() <= info.getSkill().getAbnormalTime()); diff --git a/L2J_Mobius_3.0_Helios/dist/game/config/Character.ini b/L2J_Mobius_3.0_Helios/dist/game/config/Character.ini index 98f726b2f1..1513709427 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/config/Character.ini +++ b/L2J_Mobius_3.0_Helios/dist/game/config/Character.ini @@ -114,6 +114,10 @@ AltGameCancelByHit = cast # Default: True MagicFailures = True +# This option, if enabled, will allow stuns to be canceled with 14% chance. +# Retail: True +BreakStun = False + # Protection from aggressive mobs after getting up from fake death. # The value is specified in seconds. # Default: 0 diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/Config.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/Config.java index 0170db06a8..077465c706 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/Config.java @@ -170,6 +170,7 @@ public final class Config public static boolean ALT_GAME_CANCEL_BOW; public static boolean ALT_GAME_CANCEL_CAST; public static boolean ALT_GAME_MAGICFAILURES; + public static boolean ALT_GAME_STUN_BREAK; public static int PLAYER_FAKEDEATH_UP_PROTECTION; public static boolean STORE_SKILL_COOLTIME; public static boolean SUBCLASS_STORE_SKILL_COOLTIME; @@ -1495,6 +1496,7 @@ public final class Config ALT_GAME_CANCEL_BOW = Character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("bow") || Character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("all"); ALT_GAME_CANCEL_CAST = Character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("cast") || Character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("all"); ALT_GAME_MAGICFAILURES = Character.getBoolean("MagicFailures", true); + ALT_GAME_STUN_BREAK = Character.getBoolean("BreakStun", false); PLAYER_FAKEDEATH_UP_PROTECTION = Character.getInt("PlayerFakeDeathUpProtection", 0); STORE_SKILL_COOLTIME = Character.getBoolean("StoreSkillCooltime", true); SUBCLASS_STORE_SKILL_COOLTIME = Character.getBoolean("SubclassStoreSkillCooltime", false); diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/stats/Formulas.java index 0f21f51676..b47534faa8 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/stats/Formulas.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/stats/Formulas.java @@ -1397,8 +1397,8 @@ public final class Formulas */ public static boolean calcStunBreak(L2Character activeChar) { - // Check if target is stunned and 10% chance (retail is 14% and 35% on crit?) - if (activeChar.hasBlockActions() && (Rnd.get(10) == 0)) + // Check if target is stunned and break it with 14% chance. (retail is 14% and 35% on crit?) + if (Config.ALT_GAME_STUN_BREAK && activeChar.hasBlockActions() && (Rnd.get(14) == 0)) { // Any stun that has double duration due to skill mastery, doesn't get removed until its time reaches the usual abnormal time. return activeChar.getEffectList().hasAbnormalType(AbnormalType.STUN, info -> info.getTime() <= info.getSkill().getAbnormalTime()); diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/config/Character.ini b/L2J_Mobius_4.0_GrandCrusade/dist/game/config/Character.ini index b9d5b42d68..8e5fd141fd 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/config/Character.ini +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/config/Character.ini @@ -114,6 +114,10 @@ AltGameCancelByHit = cast # Default: True MagicFailures = True +# This option, if enabled, will allow stuns to be canceled with 14% chance. +# Retail: True +BreakStun = False + # Protection from aggressive mobs after getting up from fake death. # The value is specified in seconds. # Default: 0 diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/Config.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/Config.java index fccd491b6d..54d57bbe04 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/Config.java @@ -170,6 +170,7 @@ public final class Config public static boolean ALT_GAME_CANCEL_BOW; public static boolean ALT_GAME_CANCEL_CAST; public static boolean ALT_GAME_MAGICFAILURES; + public static boolean ALT_GAME_STUN_BREAK; public static int PLAYER_FAKEDEATH_UP_PROTECTION; public static boolean STORE_SKILL_COOLTIME; public static boolean SUBCLASS_STORE_SKILL_COOLTIME; @@ -1488,6 +1489,7 @@ public final class Config ALT_GAME_CANCEL_BOW = Character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("bow") || Character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("all"); ALT_GAME_CANCEL_CAST = Character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("cast") || Character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("all"); ALT_GAME_MAGICFAILURES = Character.getBoolean("MagicFailures", true); + ALT_GAME_STUN_BREAK = Character.getBoolean("BreakStun", false); PLAYER_FAKEDEATH_UP_PROTECTION = Character.getInt("PlayerFakeDeathUpProtection", 0); STORE_SKILL_COOLTIME = Character.getBoolean("StoreSkillCooltime", true); SUBCLASS_STORE_SKILL_COOLTIME = Character.getBoolean("SubclassStoreSkillCooltime", false); diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/stats/Formulas.java index 261530c08d..cf5c727ed5 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/stats/Formulas.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/stats/Formulas.java @@ -1397,8 +1397,8 @@ public final class Formulas */ public static boolean calcStunBreak(L2Character activeChar) { - // Check if target is stunned and 10% chance (retail is 14% and 35% on crit?) - if (activeChar.hasBlockActions() && (Rnd.get(10) == 0)) + // Check if target is stunned and break it with 14% chance. (retail is 14% and 35% on crit?) + if (Config.ALT_GAME_STUN_BREAK && activeChar.hasBlockActions() && (Rnd.get(14) == 0)) { // Any stun that has double duration due to skill mastery, doesn't get removed until its time reaches the usual abnormal time. return activeChar.getEffectList().hasAbnormalType(AbnormalType.STUN, info -> info.getTime() <= info.getSkill().getAbnormalTime()); diff --git a/L2J_Mobius_5.0_Salvation/dist/game/config/Character.ini b/L2J_Mobius_5.0_Salvation/dist/game/config/Character.ini index 021fd3cf5e..3c5a55a92a 100644 --- a/L2J_Mobius_5.0_Salvation/dist/game/config/Character.ini +++ b/L2J_Mobius_5.0_Salvation/dist/game/config/Character.ini @@ -114,6 +114,10 @@ AltGameCancelByHit = cast # Default: True MagicFailures = True +# This option, if enabled, will allow stuns to be canceled with 14% chance. +# Retail: True +BreakStun = False + # Protection from aggressive mobs after getting up from fake death. # The value is specified in seconds. # Default: 0 diff --git a/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/Config.java b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/Config.java index fccd491b6d..54d57bbe04 100644 --- a/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/Config.java @@ -170,6 +170,7 @@ public final class Config public static boolean ALT_GAME_CANCEL_BOW; public static boolean ALT_GAME_CANCEL_CAST; public static boolean ALT_GAME_MAGICFAILURES; + public static boolean ALT_GAME_STUN_BREAK; public static int PLAYER_FAKEDEATH_UP_PROTECTION; public static boolean STORE_SKILL_COOLTIME; public static boolean SUBCLASS_STORE_SKILL_COOLTIME; @@ -1488,6 +1489,7 @@ public final class Config ALT_GAME_CANCEL_BOW = Character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("bow") || Character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("all"); ALT_GAME_CANCEL_CAST = Character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("cast") || Character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("all"); ALT_GAME_MAGICFAILURES = Character.getBoolean("MagicFailures", true); + ALT_GAME_STUN_BREAK = Character.getBoolean("BreakStun", false); PLAYER_FAKEDEATH_UP_PROTECTION = Character.getInt("PlayerFakeDeathUpProtection", 0); STORE_SKILL_COOLTIME = Character.getBoolean("StoreSkillCooltime", true); SUBCLASS_STORE_SKILL_COOLTIME = Character.getBoolean("SubclassStoreSkillCooltime", false); diff --git a/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/model/stats/Formulas.java index 261530c08d..cf5c727ed5 100644 --- a/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/model/stats/Formulas.java +++ b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/model/stats/Formulas.java @@ -1397,8 +1397,8 @@ public final class Formulas */ public static boolean calcStunBreak(L2Character activeChar) { - // Check if target is stunned and 10% chance (retail is 14% and 35% on crit?) - if (activeChar.hasBlockActions() && (Rnd.get(10) == 0)) + // Check if target is stunned and break it with 14% chance. (retail is 14% and 35% on crit?) + if (Config.ALT_GAME_STUN_BREAK && activeChar.hasBlockActions() && (Rnd.get(14) == 0)) { // Any stun that has double duration due to skill mastery, doesn't get removed until its time reaches the usual abnormal time. return activeChar.getEffectList().hasAbnormalType(AbnormalType.STUN, info -> info.getTime() <= info.getSkill().getAbnormalTime()); diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/config/Character.ini b/L2J_Mobius_5.5_EtinasFate/dist/game/config/Character.ini index 021fd3cf5e..3c5a55a92a 100644 --- a/L2J_Mobius_5.5_EtinasFate/dist/game/config/Character.ini +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/config/Character.ini @@ -114,6 +114,10 @@ AltGameCancelByHit = cast # Default: True MagicFailures = True +# This option, if enabled, will allow stuns to be canceled with 14% chance. +# Retail: True +BreakStun = False + # Protection from aggressive mobs after getting up from fake death. # The value is specified in seconds. # Default: 0 diff --git a/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/Config.java b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/Config.java index fccd491b6d..54d57bbe04 100644 --- a/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/Config.java @@ -170,6 +170,7 @@ public final class Config public static boolean ALT_GAME_CANCEL_BOW; public static boolean ALT_GAME_CANCEL_CAST; public static boolean ALT_GAME_MAGICFAILURES; + public static boolean ALT_GAME_STUN_BREAK; public static int PLAYER_FAKEDEATH_UP_PROTECTION; public static boolean STORE_SKILL_COOLTIME; public static boolean SUBCLASS_STORE_SKILL_COOLTIME; @@ -1488,6 +1489,7 @@ public final class Config ALT_GAME_CANCEL_BOW = Character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("bow") || Character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("all"); ALT_GAME_CANCEL_CAST = Character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("cast") || Character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("all"); ALT_GAME_MAGICFAILURES = Character.getBoolean("MagicFailures", true); + ALT_GAME_STUN_BREAK = Character.getBoolean("BreakStun", false); PLAYER_FAKEDEATH_UP_PROTECTION = Character.getInt("PlayerFakeDeathUpProtection", 0); STORE_SKILL_COOLTIME = Character.getBoolean("StoreSkillCooltime", true); SUBCLASS_STORE_SKILL_COOLTIME = Character.getBoolean("SubclassStoreSkillCooltime", false); diff --git a/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/model/stats/Formulas.java index 261530c08d..cf5c727ed5 100644 --- a/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/model/stats/Formulas.java +++ b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/model/stats/Formulas.java @@ -1397,8 +1397,8 @@ public final class Formulas */ public static boolean calcStunBreak(L2Character activeChar) { - // Check if target is stunned and 10% chance (retail is 14% and 35% on crit?) - if (activeChar.hasBlockActions() && (Rnd.get(10) == 0)) + // Check if target is stunned and break it with 14% chance. (retail is 14% and 35% on crit?) + if (Config.ALT_GAME_STUN_BREAK && activeChar.hasBlockActions() && (Rnd.get(14) == 0)) { // Any stun that has double duration due to skill mastery, doesn't get removed until its time reaches the usual abnormal time. return activeChar.getEffectList().hasAbnormalType(AbnormalType.STUN, info -> info.getTime() <= info.getSkill().getAbnormalTime()); diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/Character.ini b/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/Character.ini index fb393b986e..9a3530821e 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/Character.ini +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/Character.ini @@ -110,6 +110,10 @@ AltGameCancelByHit = cast # Default: True MagicFailures = True +# This option, if enabled, will allow stuns to be canceled with 14% chance. +# Retail: True +BreakStun = False + # Protection from aggressive mobs after getting up from fake death. # The value is specified in seconds. # Default: 0 diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/Config.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/Config.java index 019142bbd5..79e581f7b4 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/Config.java @@ -170,6 +170,7 @@ public final class Config public static boolean ALT_GAME_CANCEL_BOW; public static boolean ALT_GAME_CANCEL_CAST; public static boolean ALT_GAME_MAGICFAILURES; + public static boolean ALT_GAME_STUN_BREAK; public static int PLAYER_FAKEDEATH_UP_PROTECTION; public static boolean STORE_SKILL_COOLTIME; public static boolean SUBCLASS_STORE_SKILL_COOLTIME; @@ -1429,6 +1430,7 @@ public final class Config ALT_GAME_CANCEL_BOW = Character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("bow") || Character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("all"); ALT_GAME_CANCEL_CAST = Character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("cast") || Character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("all"); ALT_GAME_MAGICFAILURES = Character.getBoolean("MagicFailures", true); + ALT_GAME_STUN_BREAK = Character.getBoolean("BreakStun", false); PLAYER_FAKEDEATH_UP_PROTECTION = Character.getInt("PlayerFakeDeathUpProtection", 0); STORE_SKILL_COOLTIME = Character.getBoolean("StoreSkillCooltime", true); SUBCLASS_STORE_SKILL_COOLTIME = Character.getBoolean("SubclassStoreSkillCooltime", false); diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/stats/Formulas.java index 002a03f3ee..4786e966ab 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/stats/Formulas.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/stats/Formulas.java @@ -1397,8 +1397,8 @@ public final class Formulas */ public static boolean calcStunBreak(L2Character activeChar) { - // Check if target is stunned and 10% chance (retail is 14% and 35% on crit?) - if (activeChar.hasBlockActions() && (Rnd.get(10) == 0)) + // Check if target is stunned and break it with 14% chance. (retail is 14% and 35% on crit?) + if (Config.ALT_GAME_STUN_BREAK && activeChar.hasBlockActions() && (Rnd.get(14) == 0)) { // Any stun that has double duration due to skill mastery, doesn't get removed until its time reaches the usual abnormal time. return activeChar.getEffectList().hasAbnormalType(AbnormalType.STUN, info -> info.getTime() <= info.getSkill().getAbnormalTime()); diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/config/Character.ini b/L2J_Mobius_Classic_2.1_Zaken/dist/game/config/Character.ini index fb393b986e..9a3530821e 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/config/Character.ini +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/config/Character.ini @@ -110,6 +110,10 @@ AltGameCancelByHit = cast # Default: True MagicFailures = True +# This option, if enabled, will allow stuns to be canceled with 14% chance. +# Retail: True +BreakStun = False + # Protection from aggressive mobs after getting up from fake death. # The value is specified in seconds. # Default: 0 diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/Config.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/Config.java index ca70e78e2b..0908a540c8 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/Config.java @@ -170,6 +170,7 @@ public final class Config public static boolean ALT_GAME_CANCEL_BOW; public static boolean ALT_GAME_CANCEL_CAST; public static boolean ALT_GAME_MAGICFAILURES; + public static boolean ALT_GAME_STUN_BREAK; public static int PLAYER_FAKEDEATH_UP_PROTECTION; public static boolean STORE_SKILL_COOLTIME; public static boolean SUBCLASS_STORE_SKILL_COOLTIME; @@ -1433,6 +1434,7 @@ public final class Config ALT_GAME_CANCEL_BOW = Character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("bow") || Character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("all"); ALT_GAME_CANCEL_CAST = Character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("cast") || Character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("all"); ALT_GAME_MAGICFAILURES = Character.getBoolean("MagicFailures", true); + ALT_GAME_STUN_BREAK = Character.getBoolean("BreakStun", false); PLAYER_FAKEDEATH_UP_PROTECTION = Character.getInt("PlayerFakeDeathUpProtection", 0); STORE_SKILL_COOLTIME = Character.getBoolean("StoreSkillCooltime", true); SUBCLASS_STORE_SKILL_COOLTIME = Character.getBoolean("SubclassStoreSkillCooltime", false); diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/stats/Formulas.java index 002a03f3ee..4786e966ab 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/stats/Formulas.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/stats/Formulas.java @@ -1397,8 +1397,8 @@ public final class Formulas */ public static boolean calcStunBreak(L2Character activeChar) { - // Check if target is stunned and 10% chance (retail is 14% and 35% on crit?) - if (activeChar.hasBlockActions() && (Rnd.get(10) == 0)) + // Check if target is stunned and break it with 14% chance. (retail is 14% and 35% on crit?) + if (Config.ALT_GAME_STUN_BREAK && activeChar.hasBlockActions() && (Rnd.get(14) == 0)) { // Any stun that has double duration due to skill mastery, doesn't get removed until its time reaches the usual abnormal time. return activeChar.getEffectList().hasAbnormalType(AbnormalType.STUN, info -> info.getTime() <= info.getSkill().getAbnormalTime()); diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/config/Character.ini b/L2J_Mobius_Classic_2.2_Antharas/dist/game/config/Character.ini index 7964c48fea..ac3672158e 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/config/Character.ini +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/config/Character.ini @@ -110,6 +110,10 @@ AltGameCancelByHit = cast # Default: True MagicFailures = True +# This option, if enabled, will allow stuns to be canceled with 14% chance. +# Retail: True +BreakStun = False + # Protection from aggressive mobs after getting up from fake death. # The value is specified in seconds. # Default: 0 diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/Config.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/Config.java index ca70e78e2b..0908a540c8 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/Config.java @@ -170,6 +170,7 @@ public final class Config public static boolean ALT_GAME_CANCEL_BOW; public static boolean ALT_GAME_CANCEL_CAST; public static boolean ALT_GAME_MAGICFAILURES; + public static boolean ALT_GAME_STUN_BREAK; public static int PLAYER_FAKEDEATH_UP_PROTECTION; public static boolean STORE_SKILL_COOLTIME; public static boolean SUBCLASS_STORE_SKILL_COOLTIME; @@ -1433,6 +1434,7 @@ public final class Config ALT_GAME_CANCEL_BOW = Character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("bow") || Character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("all"); ALT_GAME_CANCEL_CAST = Character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("cast") || Character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("all"); ALT_GAME_MAGICFAILURES = Character.getBoolean("MagicFailures", true); + ALT_GAME_STUN_BREAK = Character.getBoolean("BreakStun", false); PLAYER_FAKEDEATH_UP_PROTECTION = Character.getInt("PlayerFakeDeathUpProtection", 0); STORE_SKILL_COOLTIME = Character.getBoolean("StoreSkillCooltime", true); SUBCLASS_STORE_SKILL_COOLTIME = Character.getBoolean("SubclassStoreSkillCooltime", false); diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/stats/Formulas.java index 002a03f3ee..4786e966ab 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/stats/Formulas.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/stats/Formulas.java @@ -1397,8 +1397,8 @@ public final class Formulas */ public static boolean calcStunBreak(L2Character activeChar) { - // Check if target is stunned and 10% chance (retail is 14% and 35% on crit?) - if (activeChar.hasBlockActions() && (Rnd.get(10) == 0)) + // Check if target is stunned and break it with 14% chance. (retail is 14% and 35% on crit?) + if (Config.ALT_GAME_STUN_BREAK && activeChar.hasBlockActions() && (Rnd.get(14) == 0)) { // Any stun that has double duration due to skill mastery, doesn't get removed until its time reaches the usual abnormal time. return activeChar.getEffectList().hasAbnormalType(AbnormalType.STUN, info -> info.getTime() <= info.getSkill().getAbnormalTime()); diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/config/Character.ini b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/config/Character.ini index 7964c48fea..ac3672158e 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/config/Character.ini +++ b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/config/Character.ini @@ -110,6 +110,10 @@ AltGameCancelByHit = cast # Default: True MagicFailures = True +# This option, if enabled, will allow stuns to be canceled with 14% chance. +# Retail: True +BreakStun = False + # Protection from aggressive mobs after getting up from fake death. # The value is specified in seconds. # Default: 0 diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/Config.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/Config.java index ca70e78e2b..0908a540c8 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/Config.java @@ -170,6 +170,7 @@ public final class Config public static boolean ALT_GAME_CANCEL_BOW; public static boolean ALT_GAME_CANCEL_CAST; public static boolean ALT_GAME_MAGICFAILURES; + public static boolean ALT_GAME_STUN_BREAK; public static int PLAYER_FAKEDEATH_UP_PROTECTION; public static boolean STORE_SKILL_COOLTIME; public static boolean SUBCLASS_STORE_SKILL_COOLTIME; @@ -1433,6 +1434,7 @@ public final class Config ALT_GAME_CANCEL_BOW = Character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("bow") || Character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("all"); ALT_GAME_CANCEL_CAST = Character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("cast") || Character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("all"); ALT_GAME_MAGICFAILURES = Character.getBoolean("MagicFailures", true); + ALT_GAME_STUN_BREAK = Character.getBoolean("BreakStun", false); PLAYER_FAKEDEATH_UP_PROTECTION = Character.getInt("PlayerFakeDeathUpProtection", 0); STORE_SKILL_COOLTIME = Character.getBoolean("StoreSkillCooltime", true); SUBCLASS_STORE_SKILL_COOLTIME = Character.getBoolean("SubclassStoreSkillCooltime", false); diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/model/stats/Formulas.java index 002a03f3ee..4786e966ab 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/model/stats/Formulas.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/model/stats/Formulas.java @@ -1397,8 +1397,8 @@ public final class Formulas */ public static boolean calcStunBreak(L2Character activeChar) { - // Check if target is stunned and 10% chance (retail is 14% and 35% on crit?) - if (activeChar.hasBlockActions() && (Rnd.get(10) == 0)) + // Check if target is stunned and break it with 14% chance. (retail is 14% and 35% on crit?) + if (Config.ALT_GAME_STUN_BREAK && activeChar.hasBlockActions() && (Rnd.get(14) == 0)) { // Any stun that has double duration due to skill mastery, doesn't get removed until its time reaches the usual abnormal time. return activeChar.getEffectList().hasAbnormalType(AbnormalType.STUN, info -> info.getTime() <= info.getSkill().getAbnormalTime());