Bug Open

Bug with the damage function

#10041 opened by vinrey123 6 days ago

vinrey123reported this bug

I am reporting this issue again because I was misunderstood in build 6132. As a result, the changes did not fix the original problem and instead made the plugin's existing mechanics worse.

1. Shield breaking issue

You changed the shield-breaking mechanic, but this is not what I asked for. The original problem was completely different. After the changes, when a projectile hits a player who is blocking with a shield, it only deals damage and does not break the shield. I do not have any setting that should disable shield breaking.

2. damage function issue

I asked you to fix the damage function specifically. The problem is the following:

  • A projectile is flying toward Player A.
  • The boss is targeting Player A.
  • When the projectile hits Player A, the damage function works correctly and deals damage.
  • If Player B gets in the path of the projectile and the projectile hits Player B, Player B does not receive any damage.

The damage should be dealt to any player who is actually hit by the projectile, regardless of which player the boss is currently targeting. In other words, the problem is with the damage function: it uses the boss's current target instead of the player who was actually hit by the projectile.

Taiyoucommented

please check the latest build that i pushed.

vinrey123commented

I tested the new snapshot you published, and I am sure that you still misunderstand the issue.

Please revert the shieldbreak mechanic to how it worked before build 6132. It worked correctly before. My original report was not about shieldbreak, but specifically about the damage mechanic.

I made another video demonstrating the damage mechanic: https://youtu.be/5FDXLlCbm2s?si=T9rK0uNQWcklOxK2

In the video, you can see two players. When the boss is targeting one of them, the damage is applied only to the player the boss is targeting, instead of all players hit by the projectile.

If the second player walks into the projectile and gets hit by it, they should also receive damage, just like the first player.

Maybe I am misunderstanding how targets and the damage mechanic work. However, if I use damage together with, for example, effects, the effects are applied to both players when they are hit by the projectile. The damage mechanic, however, does not work the same way.

That is why I am reporting this issue.

Taiyoucommented

reverted, could you do /mm debug 5 and check and send the logs via mclo.gs and perhaps try paper too instead of purpur?

vinrey123commented

I checked - it had no effect whatsoever. I tested it on MythicMobsPremium-5.13.1-SNAPSHOT-6136.

The first test was performed on purpur-26.2-2633: https://mclo.gs/566Av7Q

The second test was performed on paper-26.2-123: https://mclo.gs/cjeJWil

vinrey123commented

Hi again! I found the cause of this problem by accident.

It turns out that if PvP is set to deny in WorldGuard, damage doesn't go through to the second player. I don't know exactly how it's connected, but it definitely is. Anyway, I found a solution for myself: now you can't fight in the arena, but both players take damage.

How did I do it? I set PvP to false via gamerule in this world, and set PvP to allow in WorldGuard - and that's it, everything works for me now.

And you'd better roll back the update with shieldbreak, because it used to work fine with projectiles. But now on the new snapshots there's a problem: a projectile breaks the shield and deals damage at the same time, even though that shouldn't happen.

vinrey123commented

Actually, shieldbreak works fine overall when PvP is disabled, so you don't need to revert it to how it worked before. However, it might be worth adding a warning to the damage mechanic that WorldGuard can affect whether damage is dealt.

Sign in to join the discussion.