Pet Battle Scripts

Pet Battle Scripts

265k Downloads

Test button in script editor

erigul opened this issue ยท 4 comments

commented

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)

commented

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)

commented

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.

commented

I have added some UX around this and it should be available in v1.3:

image

commented

Yeah, I didnt release v1.3 yet because I was aware of some issues but I had to head out today so pushed what I had time to do.