Caltinor / Project-MMO-2.0

A continuation of Harmony's Project MMO project
37 stars 21 forks source link

Multiple `pmmo:damage_boost` Perks Causing Issues #519

Closed SomewhatDamaged closed 1 month ago

SomewhatDamaged commented 1 month ago

Describe the bug When having multiple pmmo:damage_boost perks affecting the same attack (but with different skills), they seem to interact and result in no damage being dealt.

This works:

        [[Perks.For_Event.DEAL_DAMAGE]]
            perk = "pmmo:damage_boost"
            skill = "combat"
            applies_to = ["#forge:tools/tridents"]
            per_level = 0.5
            base = 1
            multiplicative = true
            per_x_level = 2
            max_level = 50

This doesn't:

        [[Perks.For_Event.DEAL_DAMAGE]]
            perk = "pmmo:damage_boost"
            skill = "combat"
            applies_to = ["#forge:tools/tridents"]
            per_level = 0.5
            base = 1
            multiplicative = true
            per_x_level = 2
            max_level = 50

        [[Perks.For_Event.DEAL_DAMAGE]]
            perk = "pmmo:damage_boost"
            skill = "archery"
            applies_to = ["#forge:tools/tridents"]
            per_level = 0.5
            base = 1
            multiplicative = true
            max_level = 50
            per_x_level = 2
[07May2024 14:05:24.738] [Server thread/DEBUG] [harmonised.pmmo.util.MsLoggy/]: Perk Executed: pmmo:damage_boost
[07May2024 14:05:24.738] [Server thread/DEBUG] [harmonised.pmmo.util.MsLoggy/]: Pre-Perk Damage:9.1512
[07May2024 14:05:24.738] [Server thread/DEBUG] [harmonised.pmmo.util.MsLoggy/]: Damage Modified from 9.1512 to 9.1512
[07May2024 14:05:24.738] [Server thread/DEBUG] [harmonised.pmmo.util.MsLoggy/]: Attack Type: minecraft:player_attack | Damage Out: 9.1512

Expected behavior Each perk should trigger.

To Reproduce Steps to reproduce the behavior:

  1. Add the two-perks above to pmmo-Perks.toml
  2. Clear skills and then give yourself 50 combat
  3. See error

Versions:

Additional context

https://github.com/Caltinor/Project-MMO-2.0/assets/6394544/6dc2b2fa-988b-4e89-91b6-e9fc2a65eda0