Jump to content

[Share] Retail Grade Penalty System ( Interlude - Gracia pt2)


Recommended Posts

Posted

Here i have Grade Penalty retail system for interlude to Gracia Part2 (On Gracia final it was changed) 90% working.

It's been reworked for aCis, so you will need to apply it on your pack :)

What needed to be fixed:

Strider speed.

Weapons SA not applying on weapon penalty

Mage Success rate

* I just noticed main armor matches 1 item, so it needs to be changed.

 

How it works:

Grade Penalties:

Weapon:

*General: No SA Applied,-20 Accuracy

*Mage:  Attack failed on magic skills

 

Armor:

Armor goes by level, each item which is not allowed to wear due to grade increases penalty level

Main armor matches 2 items.

Shield & Jewels is used for armor penalty.

Max Armor penalty = 4, even if you wear full jewel set and armor, level is maxxed on 4.

Set Extra stats such as for example casting speed etc is applied normaly.

Grade doesn't matter, same results for D,C,B,A,S grades.

 

Values affected:

Evasion: -2 * penalty lvl

Speed: -15%, -30%, -45%, -50%

Casting Speed: -15%, -30%, -45%, -50%

 

 

 

### Eclipse Workspace Patch 1.0
#P aCis
Index: aCis_datapack/data/xml/skills/4200-4299.xml
===================================================================
--- aCis_datapack/data/xml/skills/4200-4299.xml	(revision 269)
+++ aCis_datapack/data/xml/skills/4200-4299.xml	(working copy)
@@ -1007,11 +1007,6 @@
		<set name="skillType" val="DEBUFF" />
		<set name="operateType" val="OP_PASSIVE" />
		<set name="stayAfterDeath" val="true" />
-		<for>
-			<mul order="0x30" stat="pAtkSpd" val="0.5" />
-			<mul order="0x30" stat="mAtkSpd" val="0.5" />
-			<mul order="0x30" stat="runSpd" val="0.5" />
-		</for>
	</skill>
	<skill id="4268" levels="1" name="Danger Area">
		<set name="target" val="TARGET_SELF" />
Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/stat/PcStat.java
===================================================================
--- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/stat/PcStat.java	(revision 269)
+++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/stat/PcStat.java	(working copy)
@@ -350,21 +350,82 @@
		if (getActiveChar() == null)
			return 1;

-		int val;
+		int val = super.getRunSpeed();
+		int pen = getActiveChar().getExpertiseArmorPenalty();

		L2PcInstance player = getActiveChar();
-		if (player.is-beep-ted())
+
+		if (pen == 1)
+			val = (int)(val - (val * 0.15));
+		
+		else if (pen == 2)
+			val = (int)(val - (val * 0.3));
+		
+		else if (pen == 3)
+			val = (int)(val - (val * 0.45));
+		
+		else if (pen == 4)
+			val = (int)(val - (val * 0.5));
+
+		/*if (player.is-beep-ted())
		{
			int baseRunSpd = NpcTable.getInstance().getTemplate(getActiveChar().get-beep-tNpcId()).getBaseRunSpd();
			val = (int) (calcStat(Stats.RUN_SPEED, baseRunSpd, null, null));
		}
-		else
-			val = super.getRunSpeed();
+		*/
+		return val;
+	}
+	
+	@Override
+	public int getMAtkSpd()
+	{
+		if (getActiveChar() == null)
+			return 1;

+		int val = super.getMAtkSpd();
+		int pen = getActiveChar().getExpertiseArmorPenalty();
+		if (pen == 1)
+			val = (int)(val - (val * 0.15));
+		
+		else if (pen == 2)
+			val = (int)(val - (val * 0.3));
+		
+		else if (pen == 3)
+			val = (int)(val - (val * 0.45));
+		
+		else if (pen == 4)
+			val = (int)(val - (val * 0.5));
+
		return val;
	}

	@Override
+	public int getEvasionRate(L2Character target)
+	{
+		if (getActiveChar() == null)
+			return 1;
+		
+		int val = super.getEvasionRate(target);
+		int pen = getActiveChar().getExpertiseArmorPenalty();
+		if (pen > 0)
+			val = (int) val - (2 * pen);
+		return val;
+	}
+	
+	@Override
+	public int getAccuracy()
+	{
+		if (getActiveChar() == null)
+			return 1;
+		
+		int val = super.getAccuracy();
+		int pen = getActiveChar().getExpertiseWeaponPenalty();
+		if (pen > 0)
+			val = (val -20);
+		return val;
+	}
+	
+	@Override
	public float getMovementSpeedMultiplier()
	{
		if (getActiveChar() == null)
Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(revision 269)
+++ aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(working copy)
@@ -595,7 +595,9 @@

	/** The current higher Expertise of the L2PcInstance (None=0, D=1, C=2, B=3, A=4, S=5) */
	private int _expertiseIndex; // index in EXPERTISE_LEVELS
-	private int _expertisePenalty = 0;
+    private int _expertiseArmorPenalty = 0; 
+	private int _expertiseWeaponPenalty = 0; 
+	private int _expertisePenalty = 0; 

	private L2ItemInstance _activeEnchantItem = null;

@@ -1735,11 +1737,22 @@
		return (int) calcStat(Stats.MAX_LOAD, baseLoad * Config.ALT_WEIGHT_LIMIT, this, null);
	}

-	public int getExpertisePenalty()
-	{
-		return _expertisePenalty;
+	public int getExpertiseArmorPenalty() 
+ 	{ 
+		return _expertiseArmorPenalty; 
+ 	} 
+	
+	public int getExpertiseWeaponPenalty() 
+	{ 
+		return _expertiseWeaponPenalty; 
	}

+	public int getExpertisePenalty() 
+	{ 
+		return _expertisePenalty; 
+	}
+	
+	
	public int getWeightPenalty()
	{
		return _curWeightPenalty;
@@ -1791,33 +1804,58 @@

	public void refreshExpertisePenalty()
	{
-		int newPenalty = 0;
+		int armorPenalty = 0;
+		int weaponPenalty = 0;
+		int expertisePenalty = 0;

		for (L2ItemInstance item : getInventory().getItems())
		{
-			if (item != null && item.isEquipped())
+			if (item != null && item.isEquipped() && (item.getItemType() != L2EtcItemType.ARROW))
			{
				int crystaltype = item.getItem().getCrystalType();

-				if (crystaltype > newPenalty)
-					newPenalty = crystaltype;
+				if (crystaltype > getExpertiseIndex())
+				{
+					expertisePenalty++;
+					if (item.isWeapon() && crystaltype > weaponPenalty)
+						weaponPenalty++;
+					else if (crystaltype > armorPenalty)
+						armorPenalty++;
+				}
			}
		}

-		newPenalty = newPenalty - getExpertiseIndex();
+		boolean changed = false;

-		if (newPenalty <= 0)
-			newPenalty = 0;
+		// calc armor penalty

-		if (getExpertisePenalty() != newPenalty)
+		if (armorPenalty < 0)
+			armorPenalty = 0;
+		else if (armorPenalty > 4)
+			armorPenalty = 4;
+		
+		
+		// calc weapon penalty
+		if (weaponPenalty < 0)
+			weaponPenalty = 0;
+		else if (weaponPenalty > 1)
+			weaponPenalty = 1;
+		
+		if ((getExpertiseWeaponPenalty() != weaponPenalty) || (getExpertiseArmorPenalty() != armorPenalty))
		{
-			_expertisePenalty = newPenalty;
-			
-			if (newPenalty > 0)
-				super.addSkill(SkillTable.getInstance().getInfo(4267, 1)); // level used to be newPenalty
+			_expertiseWeaponPenalty = weaponPenalty;
+			_expertiseArmorPenalty = armorPenalty;
+			_expertisePenalty = expertisePenalty;
+			if ((_expertiseWeaponPenalty > 0) || (_expertiseArmorPenalty > 0))
+				super.addSkill(SkillTable.getInstance().getInfo(4267, 1)); 
			else
				super.removeSkill(getKnownSkill(4267));

+			changed = true;
+		}
+		
+		if (changed)
+		{
			sendSkillList();
			sendPacket(new EtcStatusUpdate(this));
		}

 

Credits dEvilKinG.

Reworked for aCis.

Have fun :)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • I usually stick to legit ways to tweak my setup, since cheats can tank accounts fast. If you’re just looking to freshen up the game or try new builds without headaches, grabbing cheap keys or DLC from places I’ve used before, like https://www.cdkeysforgames.com/seller/, has been an easy win. Kept my runs smooth without putting my profile at risk.
    • If anyone needs coding services, such as community boards, buffers, auto-farm systems, or daily/weekly/monthly task systems, feel free to get in touch with me on Discord: gerardas1816   Please find attached examples of my work.
    • you cant add cloaks on interlude client if im not mistaken,the image you show us on login screen is from another chronicle and not interlude.
    • Hello!  I need help with two things if any one is willing to help! Im making an interlude server using l2jmobius interlude server pack. First i need help with adding viewable cloaks how can i  do that ??  Also i found this client https://www.gildor.org/smf/index.php?topic=8525.0 and when i launch it it logins and when im in the server selection phase i select my server and i click ok but it doesnt get in the game any possible solution ???  Thanks for helping!!! <3
    • Join the growing L2Genesis community: https://discord.gg/mcuHsQzNCm Also check our website: https://l2genesis.com/   Since the Genesis community is still very small, I decided to ask a larger Lineage 2 community for advice — so here I am, Redditors.   I’m coming back to you with the second version of the proposed changes regarding Destroyer balance in Interlude. You can read about the first proposal here: https://www.reddit.com/r/Lineage2/comments/1rb9da7/l2genesiscom_seek_for_feedback_destro_balance/   User DanPWN3D suggested a pretty interesting idea that we managed to implement for testing with our testers, but we’d like to get some outside opinions as well.     Do you think a Destroyer nerf in Interlude is needed to bring it in line with Warlord in AoE farming?   If yes, which approach would be better?   Option 1 – Frenzy + Guts blocked when using Polearms The skills would still work normally with all other weapons, so Destroyer wouldn’t lose its strength in PvP or single-target PvE farming. https://www.youtube.com/watch?v=tedOGNOeHQY     Option 2 – Splash damage nerf All mobs (except the main target) receive reduced damage by a percentage. (The exact value could be anything from 1 to 99 and would need to be defined.) https://www.youtube.com/watch?v=FDf4fdZ6Ik0
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..