Jump to content

Recommended Posts

Posted (edited)

Hello guysi m wonder how these numbers are working 

and how i could increase % of dmg per  attribute stat

 

i did some changes but nothing happend

 

Quote

    /**
     * Calculates the attribute bonus with the following formula: <BR>
     * diff > 0, so AttBonus = 1,025 + sqrt[(diff^3) / 2] * 0,0001, cannot be above 1,25! <BR>
     * diff < 0, so AttBonus = 0,975 - sqrt[(diff^3) / 2] * 0,0001, cannot be below 0,75! <BR>
     * diff == 0, so AttBonus = 1<br>
     * It has been tested that physical skills do get affected by attack attribute even<br>
     * if they don't have any attribute. In that case only the biggest attack attribute is taken.
     * @param attacker
     * @param target
     * @param skill Can be {@code null} if there is no skill used for the attack.
     * @return The attribute bonus
     */
    public static double calcAttributeBonus(L2Character attacker, L2Character target, Skill skill)
    {
        int attack_attribute;
        int defence_attribute;
        
        if ((skill != null) && (skill.getAttributeType() != AttributeType.NONE))
        {
            attack_attribute = attacker.getAttackElementValue(skill.getAttributeType()) + skill.getAttributeValue();
            defence_attribute = target.getDefenseElementValue(skill.getAttributeType());
        }
        else
        {
            attack_attribute = attacker.getAttackElementValue(attacker.getAttackElement());
            defence_attribute = target.getDefenseElementValue(attacker.getAttackElement());
        }
        
        final int diff = attack_attribute - defence_attribute;
        if (diff > 0)
        {
            return Math.min(1.025 + (Math.sqrt(Math.pow(diff, 3) / 2) * 0.0001), 1.25);
        }
        else if (diff < 0)
        {
            return Math.max(0.975 - (Math.sqrt(Math.pow(-diff, 3) / 2) * 0.0001), 0.75);
        }
        
        return 1;
    }
    

 

Edited by Pamela32
Posted

This probably calculate the bonus damage for each attack. Example if skill is fire and the player has Fire Attribute this probably does some check and return a number. 1 Is the default which mean no bonus.

The

if (diff > 0...

return something between 1.025 (+a square) and 1.25 which mean it multiply the attack dmg by that number

Let's say the dmg is 700 and it multiply by 1.025 which has a result of 717.25. Or if you multiply 700 with 1.25 has a result of 875

Posted
2 hours ago, Kara` said:

This probably calculate the bonus damage for each attack. Example if skill is fire and the player has Fire Attribute this probably does some check and return a number. 1 Is the default which mean no bonus.

The


if (diff > 0...

return something between 1.025 (+a square) and 1.25 which mean it multiply the attack dmg by that number

Let's say the dmg is 700 and it multiply by 1.025 which has a result of 717.25. Or if you multiply 700 with 1.25 has a result of 875

 

 

so  this is correct ?  

 

Quote

   return Math.min(1.075 + (Math.sqrt(Math.pow(diff, 3) / 2) * 0.0001), 1.75);

 

 

Quote

 {
            return Math.max(0.925 - (Math.sqrt(Math.pow(-diff, 3) / 2) * 0.0001), 0.25);
        }

 

Posted
2 minutes ago, Pamela32 said:

 

 

so  this is correct ?  

 

 

 

 

I don't know from which aspect you ask if is correct. As values? I dont know, as coding yes it's fine. You might no see difference because the damage addon is way too low. In 350 it add barely 5-50 bonus damage +/-

 

Do the maths. Ex. 350 Dmg * 1.075 and see the bonus.

Posted
1 minute ago, Kara` said:

I don't know from which aspect you ask if is correct. As values? I dont know, as coding yes it's fine. You might no see difference because the damage addon is way too low. In 350 it add barely 5-50 bonus damage +/-

 

Do the maths. Ex. 350 Dmg * 1.075 and see the bonus.

 

 

ok got it , thanks boy

Posted
On 12/22/2018 at 9:13 PM, Kara` said:

I don't know from which aspect you ask if is correct. As values? I dont know, as coding yes it's fine. You might no see difference because the damage addon is way too low. In 350 it add barely 5-50 bonus damage +/-

 

Do the maths. Ex. 350 Dmg * 1.075 and see the bonus.

 

 

solved , ty again can be locked

Guest
This topic is now closed to further replies.


  • Posts

    • Don’t miss the new Telegram gifts with our Telegram Stars purchasing bot! A great opportunity to invest in a stable digital asset at an early stage while the market is still forming. Buy other existing gifts in the official store using Telegram Stars, pay for subscriptions, donate to games and projects, pay for Premium subscriptions, and react to messages in channels! Low prices, multiple payment options, and other cool unique features! ⚡ Try it today — SOCNET STARS BOT ⚡ Active links to SOCNET stores: Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store via Telegram messenger. ⭐ Telegram Stars Purchase Bot: Go – fast and profitable way to buy stars in Telegram. SMM Panel: Go – promote your social media accounts. We present to you the current list of promotions and special offers for purchasing our products and services: 1️⃣ Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, bot) in October! You can also use the promo code SOCNET (15% discount) for your first purchase. 2️⃣ Get $1 on your store balance or a 10–20% discount — just write your username after registration on our website using the template: "SEND ME BONUS, MY USERNAME IS..." — post it in our forum thread! 3️⃣ Get $1 for your first SMM Panel trial — simply open a ticket titled “Get Trial Bonus” on our website (Support). 4️⃣ Weekly ⭐ Telegram Stars giveaways in our Telegram channel and in our Telegram Stars bot! News: ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp Channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord Server: https://discord.gg/y9AStFFsrh Contacts and Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Don’t miss the new Telegram gifts with our Telegram Stars purchasing bot! A great opportunity to invest in a stable digital asset at an early stage while the market is still forming. Buy other existing gifts in the official store using Telegram Stars, pay for subscriptions, donate to games and projects, pay for Premium subscriptions, and react to messages in channels! Low prices, multiple payment options, and other cool unique features! ⚡ Try it today — SOCNET STARS BOT ⚡ Active links to SOCNET stores: Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store via Telegram messenger. ⭐ Telegram Stars Purchase Bot: Go – fast and profitable way to buy stars in Telegram. SMM Panel: Go – promote your social media accounts. We present to you the current list of promotions and special offers for purchasing our products and services: 1️⃣ Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, bot) in October! You can also use the promo code SOCNET (15% discount) for your first purchase. 2️⃣ Get $1 on your store balance or a 10–20% discount — just write your username after registration on our website using the template: "SEND ME BONUS, MY USERNAME IS..." — post it in our forum thread! 3️⃣ Get $1 for your first SMM Panel trial — simply open a ticket titled “Get Trial Bonus” on our website (Support). 4️⃣ Weekly ⭐ Telegram Stars giveaways in our Telegram channel and in our Telegram Stars bot! News: ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp Channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord Server: https://discord.gg/y9AStFFsrh Contacts and Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Don’t miss the new Telegram gifts with our Telegram Stars purchasing bot! A great opportunity to invest in a stable digital asset at an early stage while the market is still forming. Buy other existing gifts in the official store using Telegram Stars, pay for subscriptions, donate to games and projects, pay for Premium subscriptions, and react to messages in channels! Low prices, multiple payment options, and other cool unique features! ⚡ Try it today — SOCNET STARS BOT ⚡ Active links to SOCNET stores: Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store via Telegram messenger. ⭐ Telegram Stars Purchase Bot: Go – fast and profitable way to buy stars in Telegram. SMM Panel: Go – promote your social media accounts. We present to you the current list of promotions and special offers for purchasing our products and services: 1️⃣ Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, bot) in October! You can also use the promo code SOCNET (15% discount) for your first purchase. 2️⃣ Get $1 on your store balance or a 10–20% discount — just write your username after registration on our website using the template: "SEND ME BONUS, MY USERNAME IS..." — post it in our forum thread! 3️⃣ Get $1 for your first SMM Panel trial — simply open a ticket titled “Get Trial Bonus” on our website (Support). 4️⃣ Weekly ⭐ Telegram Stars giveaways in our Telegram channel and in our Telegram Stars bot! News: ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp Channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord Server: https://discord.gg/y9AStFFsrh Contacts and Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Yes, just keep this post=)
  • Topics

×
×
  • 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