mrimer wrote:
TFMurphy wrote:
* Each Attack: Doesn't work at all on shields or accessories.
Would you elaborate on this? I'm not getting your meaning.
Each Attack only seems to be called by a weapon during an attack. Using it on a Shield or Accessory doesn't work. While this is limiting and sorta makes sense for the Shield, it's even more limiting for an Accessory, which has no real reason for not being able to catch Attack or Defend calls.
mrimer wrote:
* Each Defend: Only runs *after* the defend that triggered it. While this doesn't interfere with the example above, it *does* interfere with the counterpart of trying to script something similar to "Goblin Weakness" (but say you don't want it to affect goblins) on a custom *weapon*.
What kind of behavior would you prefer?
Well, the critical thing is that if you change ATK or DEF values from this command, it doesn't take effect until the next attack. As an example, I was trying the following code on a weapon:
Set var "_MyATK" = 0
Each attack Attack
Go to End
Label Attack
If ...
Wait until var "_EnemyDEF" = 15
Set var "_WeaponATK" = _ATK
Else
Set var "_WeaponATK" = 0
If End
Label End
So here, I'm making it double the Attack of the player (well, sorta - I don't check whether the Shield or Accessory is increasing ATK too, but since I'd have to custom build equipment to do that in the first place, I'm not worried) if the enemy they're fighting has a Defense of 15. The Defense of 15 isn't important; it's just a quick way to identify what enemy the player may be facing. But the ATK change doesn't happen on the first hit, so the first hit does lesser damage.
(And I've just remembered why it's so difficult to script Weakness in the first place - even if all this was working in my favor, I still wouldn't be able to get around the "
not enough base ATK to even start the battle"
without using some rather nasty scripting on monsters. Huhm... what are the chances of getting Goblin/Wyrm Weakness to work on Shields and Accessories anyways? ^_^;)
mrimer wrote:
So is there a reasoning behind it working out this way? I'm asking this now so that if it *is* worth changing the order, it can be done before too many holds that might make use of it are released.
I'm not sure what order you're referring to.
Just the order things happen: like I said, equipment scripts running Monster engaged can't affect stats *during* the current battle, and using Each Attack/Defend can't affect stats during the current Attack/Defend, when they'd be most useful for ATK/DEF changing properties. I was mostly wondering if there was a hard reason why it was this way and if it'd be difficult/impossible to change, since it seems like it'd be more useful for the equipment to affect the attack.
That said, I could be missing certain situations where it'd be much better to have it happen after, hence this is more of an inquiry than a request just yet.