This was written in 2009, subsequently there is Dialog: https://linusakesson.net/dialog/index.php which is a meld of Prolog (!) with IF and it's very, very nice to program in.
>> The parser and game logic are all one mass of loops and gotos. Nobody would consider writing a complex program that way today.
No, of course not. Today it would be done as a 1000-line case statements where each case jumps off to another case statement.