Well, I found it throws an error when you have a weapon/ skill that does AOE damage and uses a special range like that of Rook/Line.
What error are you getting? is it an error regarding currentAction.item (line 73)? If so I fixed that bug (delete plugin and reinstall as it also changes the plugin parameters)
The bug i was referring to was to is demonstrated above. Notice the bat on the left isn't blue because its not in the "target range", it is in the AoE range (this also happens to any aoe attacks that apply damage outside the srpgRange zone so it's not just a problem of specialRange). I'll try to fix it. I have the script way on the bottom after everything (though it only changes one function so it shouldn't break anything)
Oh yeah, could you give an example on how to take the element amplification out?
Hmm, I looked at Yanfly's code and how amplifcation rate is calculated is actually pretty complicated
The main issue is if a skill has multiple elements.
I'm going to assume if you use rule 4 for element damage calculation (element Rates are averaged for multi-element attacks) then you want to change the plugin parameter (condition) to the following:
Code:
var amplifyRate = 0; var elements = actor.currentAction().getItemElements(); while (elements.length > 0) { var elementId = elements.shift(); amplifyRate += actor.elementAmplifyRate(elementId); } effectiveAmplifyRate = amplifyRate / Math.max(1, actor.currentAction().getItemElements().length); (actor.currentAction().calcElementRate(enemy) - effectiveAmplifyRate > 1)
I'll briefly explain how it works
1. It grabs actor's skill elements
2. For each element, it checks if there is amplifcation on the element
3. It then divides the 'total amplifcation' by the number of elements. This assumes rule 4 of yanfly's element_core
4. It then calculates the enemy's element rate to the current attack (this is a function that yanfly provides)
5. We then remove the 'amplify' value from the element rate and see if its above or below 1
Edit:
I added aoe compatibility. Note the second bat looks 'green' because srpg_aoe target tiles are yellow and zone_customisation tiles are cyan so blending the two results in green. You can fix this by changing the opacity setting defined in srpg_aoe.js (Sprite_SrpgAoE.prototype.updateAnimation)