opinion: I personally wouldn't use Harlowe to create what you want due to the fact that Harlowe clones the entirety of an array (or data-map) every time you change the value of one of it's elements/members, but you asked for suggestions on how to implement what you want with that story format so the following is one possible method.
(set: $possible to (array: "Orc", "Kobold"))
(set: _selected to (shuffled: ...$possible)'s 1st)
(set: $monster to (datamap:))
|workarea)[]
<!-- Initialise the monster. -->
(replace: ?workarea)[(display: _selected)]
<!-- Execute the combat code. -->
(replace: ?workarea)[(display: "Combat")]
Monster: (print: $monster's name)
HP: (print: $monster's HP)
The above example does the following:
1. Uses an array to store the names of the Passages that define each Monster, then randomly selects on of those Passages.
2. Uses a known variable (eg. $monster) which will eventually contain the META data for the selected monster.
3. Uses a hidden named hook to suppress all visual output generated by the selected monster's passage.
4. Uses a (display:) macro to execute the META definition within the selected monster's passage.
5. Uses a (display:) macro to execute the generic combat related code.
6. Displays some information about the selected monster.
The following is an example of the Orc Passage, it modifies the $monster variable to contain the META data about that monster. The Kobold Passage would look similar but with different values.
(set: $monster to (dm:
"name", "Orc",
"HP", 100,
"AC", 5
))
The following is an example of the Combat Passage, which would contain all the code related to combat. In this particular example all it does is reduce the HP of the selected monster by 10.
(set: $monster's HP to $monster's HP - 10)