A Project for Chronicle 4 based on L2JServer.


    Missing dagger dmg formula

    Share
    avatar
    Karakan

    Posts : 463
    Join date : 2013-10-04

    Missing dagger dmg formula

    Post  Karakan on 13th February 2018, 21:42

    Found something worth checking.



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

    @@ -45,6 +49,7 @@
     import net.sf.l2j.gameserver.skills.conditions.ConditionPlayerState.CheckPlayerState;
     import net.sf.l2j.gameserver.skills.conditions.ConditionUsingItemType;
     import net.sf.l2j.gameserver.skills.funcs.Func;
    +import net.sf.l2j.gameserver.templates.L2Armor;
     import net.sf.l2j.gameserver.templates.L2Item;
     import net.sf.l2j.gameserver.templates.L2PcTemplate;
     import net.sf.l2j.gameserver.templates.L2Weapon;



    @@ -1341,6 +1356,36 @@
           {
              damage = (70 * damage) / defence;
           }
    +
    +      // Sami: These values are a quick fix to balance dagger gameplay and give
    +      // armor resistances vs dagger. daggerWpnRes could also be used if a skill
    +      // was given to all classes. The values here try to be a compromise.
    +      // They were added in a late C4 rev (2289).
    +      if (target instanceof L2PcInstance && weapon != null && weapon.getItemType() == L2WeaponType.DAGGER && skill != null)
    +      {
    +         L2Armor armor = ((L2PcInstance)target).getActiveChestArmorItem();
    +         if (armor != null)
    +         {
    +            if (((L2PcInstance)target).isWearingHeavyArmor())
    +            {
    +               damage /= 2.2; // originally 2.2, 2.5 during early C5
    +            }
    +            if (((L2PcInstance)target).isWearingLightArmor())
    +            {
    +               damage /= 1.5; // originally 1.5, 2 during early C5
    +            }
    +            if (((L2PcInstance)target).isWearingMagicArmor())
    +            {
    +               damage /= 1; // originally 1, 1.8 during early C5
    +            }
    +         }
    +      }

           if (stat != null)
           {
    avatar
    DnR
    Admin
    Admin

    Posts : 1050
    Join date : 2012-12-03

    Re: Missing dagger dmg formula

    Post  DnR on 27th March 2018, 16:14

    I have seen this code check before, but i think it was invented because L2J damage formula was too messy back then. Smile
    There is probably no need to adapt this.

    Thanks
    DnR

      Current date/time is 23rd June 2018, 05:55