Config to disable stun cancel chance upon hit.
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
@@ -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);
 | 
			
		||||
 
 | 
			
		||||
@@ -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());
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user