So I've got a pretty spiffy damage calculation thing going on here. But it's got a couple issues.
This is basically the calculator I'm going to be using for normal attacks in my game. To use it, you just input the values desired into each of the locations, and then click the "Attack!" button. Then it automatically calculates damage and shows you the values for each step of the calculation. Fun stuff!
One thing to mention is that because of the way the elemental detection works, the Attacker Element needs to be set to -1. Which brings us to our first bug...
I'm basically trying to use Find(Enemy Elements, Attack Element) > 0 to see if there's an element match in the EnElem string with the singular AtkElem. This works fine when:
Attack Element = "f"
Enemy Elements = "f"
but if we change it to
Attack Element = "f"
Enemy Elements = "f, w, z" or Enemy Elements = "fwz"
it seems like it returns 0 and doesn't modify the Attack Power.
I have a Critical Hit chance set up. The calculation is
Attack Luck >= random(1024)
--> Attack Power * 1.5
I've tried to rig it in any number of ways to get it to work, from trying to set the delays a little longer to making it automatically attempt to modify the damage by toggling off the Luck requirement, and no dice. At least it's not reading these dice. <img src="smileys/smiley3.gif" border="0" align="middle">
Any thoughts, gentlemen? They would be much appreciated! <img src="smileys/smiley4.gif" border="0" align="middle">
Just noticed now none of the modifications are actually working... what am I screwing up on?
So I did even further examining, looking over my events, still unable to figure out what I was doing wrong in the damage calculations and discovered... I was actually doing it right and it was working as intended. The bugs were actually in the display code, where it wasn't displaying the actual damage being done, just the attack power after Step 2. So the displayed calculations don't function properly but the actual damage done works correctly. If you take the enemy HP value in the last equation and subtract the number down at the bottom (the final enemy HP) it shows the proper damage was delivered.
Oh, oversights! <img src="smileys/smiley9.gif" border="0" align="middle">