Jump to content

[share]Olympiad Balanced Regen


Recommended Posts

In Olympiad, 1vs1, some classes are disadvantaged due to high regen multiplier :S

 

So, if you want to have a balanced gameplay reguarding regen HP/MP/CP at least in Olympiad... this is for you (:

 

Index: /java/net/sf/l2j/gameserver/skills/Formulas.java

===================================================================

--- /UtopiaL2j_gameserver/java/net/sf/l2j/gameserver/skills/Formulas.java (revision 126)

+++ /UtopiaL2j_gameserver/java/net/sf/l2j/gameserver/skills/Formulas.java (revision 144)

@@ -854,20 +854,24 @@

            ClanHall clansHall = ClanHallManager.getInstance().getClanHall(clanHallIndex);

            if(clansHall != null)

            if (clansHall.getFunction(ClanHall.FUNC_RESTORE_HP) != null)

            hpRegenMultiplier *= 1+ clansHall.getFunction(ClanHall.FUNC_RESTORE_HP).getLvl()/100;

            }

            }

 

// Mother Tree effect is calculated at last

if (player.getInMotherTreeZone()) hpRegenBonus += 2;

 

+            // Custom: 1x Olympiad modifier

+            if(player.isInOlympiadMode())

+            hpRegenMultiplier = 1;

+

            // Calculate Movement bonus

            if (player.isSitting()) hpRegenMultiplier *= 1.5;      // Sitting

            else if (!player.isMoving()) hpRegenMultiplier *= 1.1; // Staying

            else if (player.isRunning()) hpRegenMultiplier *= 0.7; // Running

 

            // Add CON bonus

            init *= cha.getLevelMod() * CONbonus[cha.getCON()];

}

 

        if (init < 1) init = 1;

@@ -903,20 +907,24 @@

            int clanHallIndex = player.getClan().getHasHideout();

            if (clanHallIndex > 0)

            {

            ClanHall clansHall = ClanHallManager.getInstance().getClanHall(clanHallIndex);

            if(clansHall != null)

            if (clansHall.getFunction(ClanHall.FUNC_RESTORE_MP) != null)

            mpRegenMultiplier *= 1+ clansHall.getFunction(ClanHall.FUNC_RESTORE_MP).getLvl()/100;

            }

            }

           

+            // Custom: 1x Olympiad modifier

+            if(player.isInOlympiadMode())

+            mpRegenMultiplier = 1;

+           

// Calculate Movement bonus

            if (player.isSitting()) mpRegenMultiplier *= 1.5;      // Sitting

            else if (!player.isMoving()) mpRegenMultiplier *= 1.1; // Staying

            else if (player.isRunning()) mpRegenMultiplier *= 0.7; // Running

 

            // Add MEN bonus

            init *= cha.getLevelMod() * MENbonus[cha.getMEN()];

}

 

if (init < 1) init = 1;

@@ -932,20 +940,24 @@

        double init = cha.getTemplate().baseHpReg;

        double cpRegenMultiplier = Config.CP_REGEN_MULTIPLIER;

        double cpRegenBonus = 0;

 

        if (cha instanceof L2PcInstance)

        {

        L2PcInstance player = (L2PcInstance) cha;

 

        // Calculate correct baseHpReg value for certain level of PC

        init += (player.getLevel() > 10) ? ((player.getLevel()-1)/10) : 0.5;

+        

+         // Custom: 1x Olympiad modifier

+         if(player.isInOlympiadMode())

+         cpRegenMultiplier *= 1;

       

        // Calculate Movement bonus

        if (player.isSitting()) cpRegenMultiplier *= 1.5;      // Sitting

        else if (!player.isMoving()) cpRegenMultiplier *= 1.1; // Staying

        else if (player.isRunning()) cpRegenMultiplier *= 0.7; // Running

        } else

        {

        // Calculate Movement bonus

        if (!cha.isMoving()) cpRegenMultiplier *= 1.1; // Staying

        else if (cha.isRunning()) cpRegenMultiplier *= 0.7; // Running

 

 

enjoy

 

 

Link to comment
Share on other sites

So This is your work?

 

and why not.....

 

+//Olympiad Regeneration Before Match Start.

+          activeChar.getStatus().setCurrentHp(activeChar.getMaxHp());

+         activeChar.getStatus().setCurrentMp(activeChar.getMaxMp());

+         activeChar.getStatus().setCurrentCp(activeChar.getMaxCp());

+    

 

L2JFree User;

+// Olympiad Regeneration Before Match Start.

+ player.getStatus().setCurrentCp(player.getMaxCp());

+ player.getStatus().setCurrentHp(player.getMaxHp());

+ player.getStatus().setCurrentMp(player.getMaxMp());

 

Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock