A Project for Chronicle 4 based on L2JServer.


    Level dependent damage

    Share
    avatar
    Karakan

    Posts : 428
    Join date : 2013-10-04

    Level dependent damage

    Post  Karakan on 17th August 2015, 16:34

    This is a "non-retail/just for fun" custom modification.

    What it does is it'll give Players or Monster  more/less dmg if the target has a level diff of 6+.

    This can stop pwer leveling on to high monsters (red name)

    Maybe someone wants to use it.


    Idea taken from a Dungeons & Dragons based game (Baldurs Gate)





    Code:

    Index: Formulas.java
    ===================================================================
    --- Formulas.java   (revision 531)
    +++ Formulas.java   (working copy)



                                    damage *= attacker.calcStat(Stats.VALAKAS_PHYSICAL_DMG, 1, null, null);
     }
    -
    +
    + // By Karakan : Level diff. based damage reduction from Players to Monsters
    + if (target instanceof L2NpcInstance)
    + {
    + if (target.getLevel() - attacker.getLevel() >= 6)
    + damage /= 2;
    + }
    + // By Karakan : Level diff. based damage reduction from Summons to Monsters
    +        if ((attacker instanceof L2SummonInstance) && (target instanceof L2NpcInstance))
    + {
    + if (attacker.getLevel() - target.getLevel() >= 6)
    + damage /= 2;
    + }
    +
     if (damage > 0 && damage < 1)
     {
     damage = 1;

      Current date/time is 19th November 2017, 14:05