Build 2295:
My self-buffing code has this snippet in it:
Unfortunately, it is not behaving as I intend.
My intent is for this snippet to keep casting the skill until I have the target number of turns of the effect, but to stop if it fails to cast the skill (for example, because I have run out of meat and cannot afford any more mmj.)
However, use_skill() seems to return true even if it is unable to cast the skill due to autorecovery failure. So is this a bug, or am I just being stupid?
My self-buffing code has this snippet in it:
Code:
while(have_effect(TEffect) < turns && flag) {
flag = use_skill(1, TSkill);
}
return (have_effect(TEffect) >= turns);
Unfortunately, it is not behaving as I intend.
My intent is for this snippet to keep casting the skill until I have the target number of turns of the effect, but to stop if it fails to cast the skill (for example, because I have run out of meat and cannot afford any more mmj.)
However, use_skill() seems to return true even if it is unable to cast the skill due to autorecovery failure. So is this a bug, or am I just being stupid?