Closed sakimoe closed 2 years ago
I have verified that if I use a sword or any vanilla item and use the /qrpg set damage command, the same thing happens, the skill's damage is not applied correctly, so it is most likely that it is a problem with the damage of the items created with prorpgitems or the compatibility it has with proskillapi
Hi again, I found perhaps the source of the error, as the damage lore mechanics could not be solved, I used the Value lore mechanics as a substitute and I directly used the Damage mechanics, but I found that if in the Damage mechanics I left the active knockback option: The damage is bug and happens the same as with Damage lore, the damages with multipliers greater than 1 (1.5 = 150% for example) go very high, so they do much more damage than they should and if less damage is used a 1 (0.5 = 50%) the damage is not applied and instead takes the total damage of the item (If I have a weapon with 10 damage and I do a skill with 50% weapon damage, the 10 total damage of the weapon is applied instead of 50% so it ignores the multiplier entirely).
Edit: I don't know if the damage lore mechanic has something similar to what happens with Value lore and knockback, so I suppose that could be the error that occurs
This is not just the issue for your values, I have the dame probem in issue promcteam/proskillapi#177
This might be related to a similar issue I noticed.
Prorpgitems does extra damage when using skillapi skills based on damage in the lore of the item from rpgitems plugin. (even without using damage lore mechanic in skillapi you can still damage a player, you can test this by doing cast trigger, then any target, then use the skill within range of another player while holding an item in your hand from rpgitems that has damage lore from rpgitems custom damage)
it adds the values in the lore to whatever damage is set in skillapi skills, if skillapi has no damage set, it will still damage the target based on the items lore.
My thoughts here are that it's actually firing damage events through RPGItems, causing it's damage system to inflict damage, overriding the skill damage in a way. This'll be an interesting bug to figure out.
@Travja
an easy way to test this is to make a skillapi skill that has a cast trigger and any target
then make an rpgitem with some physical damage on it
hold the rpgitem in your hand and then do /class cast at a mob or another player
So I'm currently working on a fix to this... but there's a bit of a caveat. I have it mostly working. I'm just trying to decide if it's a good thing to have RPGItems' crit chance/modifier apply for skills being cast or not. Right now it's modifying the damage done based on equipped items, but I did get it to stop adding the equipped item's damage to the skill damage. Thoughts on crit damage and possibly other modifiers being applied when skill damage is done? Or should it just be skill damage?
I would prefer that only the damage of the ability be done, that of giving critical I prefer to control it separately, if it is not a mess then balancing the damage of the abilities, or what could be done if that "critical" is required is to use Value multiply or some mechanics to simulate that critical damage
Is there an existing issue for this?
Current Behavior
When creating a sword with prorpgitems, regardless of the damage the sword has, when I use a SkillApi ability using the Damage lore mechanic, the damage done is not what it should. For example, create a sword using Rpgitems with 20 damage, and an ability using the damage lore mechanic that should do 50% of the weapon's damage equivalent to 10 damage, but instead when using the ability it deals 20 damage as if it were taking 100% of the weapon's damage... It is ruled out that it is due to my regular expression, Since my ability works perfectly if instead of using an item made with rpgitems I grab a vanilla item and add a lore with the /lore add command, when doing this the ability does 50% of the damage correctly. In turn, this problem occurs with skills that use higher values such as 150% or 200% of weapon damage. This is an item generated with prorpgitems \u2694 Daño: {value} This is the regex that I use, I have tried without \u2694 but it does not work either, in turn I tried removing the color codes and it still does not work
Expected Behavior
I suppose it is a problem directly related to Prorpgitems, since as mentioned in the above, the Damage lore mechanic works perfectly if a vanilla item is used with a custom lore
Steps To Reproduce
Environment
latest.log
No response
Anything else?
No response