Test button in script editor
erigul opened this issue ยท 4 comments
Add an Evaluation/Test button in the script editor that would run the script and let the user know which action would have been carried out, without actually performing the action.
Would often be useful when writing scripts to check that the edit is doing what you'd want (and avoid facepalm moments where it really doesn't do what you want, and the fight moves on to the next turn with an unwanted action)
I had a quick test with it and I don't think it quite works. Looks like it only inspects the conditions, not if the actual action is possible even if the condition is met? (i.e. spell on cooldown, this pet doesn't have the spell, the pet you try to swap to is already active etc)
use(#3)
use(#1)
I.e. i ability 3 was on cooldown the test button still print out use(#3)
even what actually gets executed is use(#1)
Note that there already is a test()
action. It isn't the best UX, but you can transform
use(#1) [ enemy.dead ]
use(#2)
to
test(use(#1)) [ enemy.dead ]
test(use(#2))
and will get the wanted behaviour.
I suggest we would do the same transformation under the hood, if we add such a button.