Bug - Not A Bug adv1() fails with unmet goals - intended?

Sorry if this behavior is intended; I couldn't find anything posted referencing this.

When you run adv1() while having any unmet conditions set, it gives the user a red failure message and returns false or aborts if the false condition isn't handled (or does it?). This means any script looping through adv1() for whatever reason will look like it's failing repeatedly; I believe bumcheekascend runs into this at certain points - specifically it happens in the Hidden City, where it uses adv1 to handle combats when it runs into one.

I don't know for sure that this behavior isn't intended, but I can't think of why it would be. Obvious solution might be to not use conditions when calling adv1, but the problem with that is consult scripts like SmartStasis and WHAM use goals to determine how to act; so conditions sometimes need to be set for those to work as desired.

It's not a huge problem to leave it, since the script can still continue anyway, but I didn't find any posts on it and thought it worth bringing up.

Just realized I put ash1() instead of adv1() in the thread topic, can't seem to change it now.. sorry.
 
Last edited:

Theraze

Active member
This is functioning as intended. If you want a condition, it works much better with adventure() instead of adv1(). Or make a wrapper for SS/WHAM that removes the goal and re-add it as part of an afterBattleScript, if you really get bothered by it.

But I'd suggest using adventure() instead.
 

slyz

Developer
This is intended behavior. If you call any form of adventure(), and the adventuring finishes before all the goals are met, it will return false. If it looks like it is failing repeatedly, it's because it is failing repeatedly.

The fact that adventure() will abort a script if its return value isn't captured also is intended behavior.
 
Top