Commit graph

162 commits

Author SHA1 Message Date
Jason S. Ninneman
50435465a6 Completely wire vocab words in YAML to the code.
This massive patch:
* Finishes working all the vocab words into YAML structures.
* Adds vocab ID generator functions.
* Redoes the input-getting system, removing the need for GETIN(),
  GETTXT(), etc.
* Changes advent<->ascii mapping to avoid the special 'shift'
  character.
* Works around some bad behavior in the dragon attack logic.
* Handles the reservoir magic word without changing the database
  contents.
2017-06-29 01:59:37 -07:00
Eric S. Raymond
d96d5db51f More magic-number removal. 2017-06-28 17:29:33 -04:00
Eric S. Raymond
b5260417dd Magic-number elimination. 2017-06-28 17:07:15 -04:00
Eric S. Raymond
1ed8126912 Implement and document state-changes messages in YAML.
Examples at the lamp and grate.  This is a way to pull strings out of
arbitrary_messages and make them part of the object definition.
2017-06-28 16:14:23 -04:00
Eric S. Raymond
a1af74b534 Declare one-letter synonyms for some commands.
As issue #6 (Add single-letter verb synonyms) says:

Modern interactive fiction has converged on a fairly standard
vocabulary of one-letter abbreviations for common verbs. Besides
directional commands, they are:

d - drop
g - get
i - inventory
l - look
x - examine (synonymous in ADVENT with look)
z - wait

Open Adventure should implement these.

This commit doesn't make them work yet, but it declares them for when the
lexical analyzer is fully YAML-driven.
2017-06-28 12:05:41 -04:00
Eric S. Raymond
f5719f1aba Magic-number elimination. 2017-06-28 11:45:53 -04:00
Eric S. Raymond
45384f6bf2 More use of state labels. 2017-06-27 20:10:59 -04:00
Eric S. Raymond
b3b6314fa4 More use of state labels. 2017-06-27 17:27:42 -04:00
Eric S. Raymond
ed4e6ad422 Allow state labels in not clauses. 2017-06-27 16:54:58 -04:00
Jason S. Ninneman
37373c5277 Documentation polishing. 2017-06-26 22:27:44 -07:00
Jason S. Ninneman
7dc8839249 Abolish VOCWRD().
Action word mnemonics are now enums from adventure.yaml.
2017-06-26 22:07:24 -07:00
Jason S. Ninneman
2aa5f1dd61 Remove actspk[]. 2017-06-26 22:04:02 -07:00
Jason S. Ninneman
6d123b3fb1 Combine actspk and the action words into a single structure. 2017-06-26 21:36:24 -07:00
Jason S. Ninneman
f9edfc5151 Reexpress the motion words in adventure.yaml. 2017-06-26 22:22:51 -04:00
Eric S. Raymond
6b86811fbc Repair variois problems in travel YAML. 2017-06-26 22:13:22 -04:00
Eric S. Raymond
0fad8a25ba Repair a missing travel element it YAML.
Got left off due to an edge condition in travel.py.
2017-06-26 17:31:04 -04:00
Jason S. Ninneman
6ac098170c Use enums for object number mnemonics instead of VOCWRD() calls. 2017-06-26 11:27:27 -07:00
Jason S. Ninneman
0bab67e106 Fold object vocab words into the objects[] structure. 2017-06-26 10:25:01 -07:00
Jason S. Ninneman
2fac8d1aef object_descriptions[] is now objects[]. 2017-06-26 09:43:11 -07:00
Eric S. Raymond
3025388932 Subsume Section 8 into YAML. 2017-06-25 23:41:36 -04:00
Jason S. Ninneman
7ee571d832 Inline the hint messages. 2017-06-25 18:50:47 -07:00
Eric S. Raymond
f165aabad8 Capture Section 3 in YAML.
The temporary script travel.py emitted this YAML from the Section 3 data.
It will be removed when the compilation from YAML to an initializer is done.
2017-06-25 19:22:46 -04:00
Eric S. Raymond
4821aeff60 Comment polishing. 2017-06-25 13:54:07 -04:00
Eric S. Raymond
8a3757df59 Change structure of vocabulary YAML to cope with multiply-loaded words. 2017-06-25 12:36:40 -04:00
Eric S. Raymond
23680e3441 Comment polishing in adventure.yaml. 2017-06-25 08:18:06 -04:00
Eric S. Raymond
71ebe01af7 Vocabulary (adventure.txt section 4) is now in YAML...
...but no code to use that structure yet.
2017-06-25 08:08:25 -04:00
Eric S. Raymond
8a6e6aae7d Fully subsume section 7 into YAML. 2017-06-24 20:28:22 -04:00
Eric S. Raymond
2755eed5a2 Move the description of string escapes to where the strings now live. 2017-06-24 12:49:25 -04:00
Eric S. Raymond
c3a2816821 Replace magic MINTRS/MAXTRS with a treasure attribute in YAML. 2017-06-24 10:47:59 -04:00
Eric S. Raymond
0c2803638f Correct buggy behavior of sign in endgame. Add a test for this. 2017-06-24 09:30:15 -04:00
Eric S. Raymond
3a93b2b5f0 Elimination of OBJSND. 2017-06-24 09:08:48 -04:00
Eric S. Raymond
ecff53d3a8 Name the lamp, grate, and bird states. 2017-06-23 14:59:32 -04:00
Eric S. Raymond
2848494a01 Proof of cobcept for state defines.
It is now possible in the YAML to declare defines for all state values
associated with an object.  This are visible in the C code and can be used
to replace magic numbers.
2017-06-23 14:07:44 -04:00
Eric S. Raymond
6bd1c356e2 Documentation polishing. 2017-06-23 11:27:20 -04:00
Eric S. Raymond
1e8c3a4a1d Support loud locations. 2017-06-23 11:16:37 -04:00
Eric S. Raymond
8dd70624d1 Add YAML markup for location sounds. 2017-06-23 07:54:49 -04:00
Eric S. Raymond
6c6c72f327 Replace macros with condition bits. 2017-06-22 18:41:25 -04:00
Eric S. Raymond
537c4511e2 Generate initializer from YAML for Section 9 bits. 2017-06-22 16:45:38 -04:00
Eric S. Raymond
94d1aa5183 Use YAML references to tie hints to locations.
This change makes locbit.py obsolete; it's deleted.
2017-06-22 14:27:22 -04:00
Jason S. Ninneman
3215930f64 Fixups to the adventure.yaml commentary. 2017-06-22 14:16:33 -04:00
Eric S. Raymond
e4b2877733 Location YAML now has conditions.
COND initionalization doesn't use these yet. That's the next step.
2017-06-22 11:59:41 -04:00
Jason S. Ninneman
97241e87d7 Quick-fix the 'pillo bug'.
Once parsing no longer depends on text being broken up into
5-char tokens, the ugly hack to adventure.yaml must go away.
2017-06-21 22:43:16 -07:00
Eric S. Raymond
22613f06fa Documentation polishing. 2017-06-21 11:58:58 -04:00
Eric S. Raymond
c3a71f6db6 Documentation and polishing. 2017-06-21 11:45:16 -04:00
Eric S. Raymond
ddb0df85b3 YAMLify section 11 (hints). 2017-06-21 11:22:18 -04:00
Eric S. Raymond
b37f9f4b2d Document the YAML, remove some dead code, fix typos. 2017-06-21 07:39:10 -04:00
Eric S. Raymond
f6373dd32e Section 10 (class thresholds) is now parsed entirely from YAML. 2017-06-21 06:17:20 -04:00
Jason S. Ninneman
d029b08ad1 Refactor how turn threshold penalties are accounted for. 2017-06-20 19:26:55 -04:00
Jason S. Ninneman
4f042d0ca4 Clean up adventure.yaml. 2017-06-20 14:30:56 -07:00
NHOrus
e9aff2568f Even less magic 2017-06-19 20:18:20 +03:00