I did end up using a lot of Tilt, yeah. And as a related question, I copy/pasted this almost exactly from Tilt:
After reading a command:
if the player's command includes "of [suit]":
while the player's command includes "of":
cut the matched text;
repeat through the Table of Card Names:
while the player's command includes topic entry:
replace the matched text with written value entry.
It worked for a while, but something seems to have broken it and I don’t know what. Inform no longer recognizes Jack, Ace, etc. Does anyone have any idea why this might have stopped working?
EDIT: I have discovered several incorrect ways of solving this problem. It’s not because of the table being set up wrong. Even when mapped to a table identical to the one found in Tilt, it still doesn’t work.
It’s definitely something to do with my code, specifically, because copying Tilt exactly with nothing else works fine.
It’s not because of some kind of conflict with other “After reading a command” code, because there’s only one other part of the code that uses that syntax and the problem persists even when that part is commented out.
Wherever the problem is, it exists in the encounter code, because it persists even in the encounter demo project I created to test the code in isolation from the rest of my story.
It’s not a problem with recognizing the existence of face cards at all. Trying to play an 11 works just fine, but trying to play a jack does not.
EDIT 2: It’s also not a problem with Inform failing to read the entire block of code entirely. Editing the code to this:
After reading a command while the player is imperiled:
if the player's command includes "of [suit]":
while the player's command includes "of":
cut the matched text;
repeat through the Table of Card Names:
while the player's command includes Topic entry:
replace the matched text with Written Value entry;
if the player's command includes "fizzbop":
showme the contents of the Table of Card Names.
Causes the story to show the contents of the table properly when “fizzbop” is entered.
It’s not a problem with the table or the way that specific code block is written. Copying the table and the code block from Tilt exactly does not solve the problem.
So Inform knows that “play 11” means to play the jack. It’s reading this code block. The table is formatted properly and the entries we’re looking for all match. But for some reason, it’s not replacing “play jack” with “play 11.”
EDIT 3: Copy/pasting the table from Tilt didn’t work the first time, but while flailing about hoping to get insight into what the bug actually was, I tried it again and now it works. So, problem solved, but also, huh?