Choices inside conditionals prevent knot from receiving divert more than once
- Dominant language
- C#
- Stars
- 4.9k
- Forks
- 540
- PR merge metrics
- No merged PRs in 30d
Description
### Working: Choice without conditional
If I create a story like this, it functions as expected whenever I divert to "test_case" using the Unity Ink Player:
```
=== test_case ===
Test prompt shown every time.
+ Choice 1
Response 1
+ Choice 2
Response 2
- (continue)
Ending text intended to be shown every time.
-> END
```

### Not working: Choice with conditional
Now, if I want to make the prompt shown only the first time it is diverted to, I might do something like this:
```
=== test_case ===
{ test_case == 1:
Test prompt shown first time only.
+ Choice 1
Response 1
+ Choice 2
Response 2
}
- (continue)
Ending text intended to be shown every time.
-> END
```
This works okay for the first run divert to 'test_case'. Unfortunately on the second and all following diverts, this causes something strange to happen where Ink believes it is out of content:

It doesn't report it inside the console or Ink Player, but in my own project, Ink generates a
> RUNTIME ERROR: ran out of content. Do you need a '-> DONE' or '-> END'?
### Working: Conditional without choice
If I remove the choice inside the conditional, it works fine:
```
=== test_case ===
{ test_case == 1:
Test text shown first time only.
}
- (continue)
Ending text intended to be shown every time.
-> END
```

---
Tested on Version 0.8.2
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the two ink stories in the issue through the Unity Ink Player, diverting to test_case repeatedly and comparing the conditional choice with the conditional text case. Start by tracing how conditional content containing choices is evaluated, then verify that repeated diverts reach the ending without the reported "ran out of content" runtime error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, unity
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100