Yea, the physical attacks only thing is the only part not working (actually it isn't adding the damage at all).
However, the rest of my skill is working; when in effect it blocks an X amount of fire damage (has a threshold, break if it goes over; physical attacks go through and water and ice cause it to end), and deals X to attacks that hit physically.
Also, just checked, I am not getting any errors.
Also on the notetag part. I don't see it ever being called using the method above.
OK, I just tested with this notetag, which works for me. I think previously it was adding the damage but the second popup wasn't being shown.
Spoiler
Code:
<Custom Confirm Effect>
// Only if dealing physical damage
if (this.isPhysical() && value > 0) {
console.log("Fire!");
// 20% of standard damage
var bonusDmg = value * 0.2;
// Multiply by relevant element rate
bonusDmg *= defender.elementRate(2);
// Round down, add to damage
value += Math.floor(bonusDmg);
// Play animation!
defender.startAnimation(67);
}
</Custom Confirm Effect>
This version just adds the damage directly to the existing value, rather than trying to make a second "element damage" popup.
😮💨
I added an animation too, just for the example. Both the console text "Fire!" and the animation (default Fire One 2) play as expected for me, and the damage of my attack increased from 84 -> 100 (+20% rounded down) as expected.
If yours still isn't working, maybe copy+paste it here? You could also check the order of your Yanfly plugins (recommended order here:
link) and ensure they're all up-to-date.
Question...the bonusDmg *= defenders elemental rate. How does that work?
In English, the line says "multiply the bonusDmg variable by the defender's element rate for this element". So if elementRate(5) returns 0.5 (50%) then the bonusDmg is halved.
🙂
The element rate is a multiplier for damage of that element, e.g. 50% element rate means you'll take half damage from that element. The input value has already been multiplied by the element rate matching the skill element, and this bonus damage is of a particular element...so we calculate the damage, then "fake" the element rate thing.