Show stat blocks

This commit is contained in:
Dane Johnson 2021-12-29 15:53:03 -06:00
parent ea85bf005d
commit 901b4a004a
3 changed files with 16 additions and 4 deletions

View File

@ -3,9 +3,18 @@ START
One day Dane took a really big shit. One day Dane took a really big shit.
Dane: "Wow, that was a really big shit" Dane: "Wow, that was a really big shit"
GOTO NEXT 1) Don't die <Strength 100+> [DONTDIE]
2) Die [DIE]
NEXT DONTDIE
Using all of his strength, Dane didn't die.
But then he did.
GOTO DIE
DIE
Then he died. Then he died.
Fuck you Dane Fuck you Dane

View File

@ -84,7 +84,7 @@ StatName = < [A-Za-z]+ > - { $$.string = strdup(yytext); }
StatVal = < [0-9]+ > - { $$.num = atoi(yytext); } StatVal = < [0-9]+ > - { $$.num = atoi(yytext); }
StatRel = < ('+'|'-')? > { $$.num = 0x0 } - StatRel = < ('+'|'-')? > { $$.num = yytext[0] == '+' ? STATCHECK_GT : STATCHECK_LT; } -
EndOfFile = !. EndOfFile = !.

View File

@ -52,7 +52,10 @@ void Storybook::Find(const char* id) {
void print_choice(Choice* c) { void print_choice(Choice* c) {
printf("%d) %s", c->option, c->flavor); printf("%d) %s", c->option, c->flavor);
if (c->statcheck) { if (c->statcheck) {
//TODO printf("(%s %d%c)",
c->statcheck->stat,
c->statcheck->value,
c->statcheck->rel == STATCHECK_GT ? '+' : '-');
} }
printf("\n"); printf("\n");
} }