extended quest text formatting (trunk only)

Add questpgr formatting codes to support pronouns for leader,
nemesis, deity, and artifact.
  %lh -> "he" or "she" for leader; %nh for nemesis; %dh for hero's god;
  %li -> "him" or "her"; likewise %ni, %di;
  %lj -> "his" or "her"; and %nj, %dj;
H, I, and J modifiers yield capitalized form of same.
  %oh -> "it" or "they" for artifact (Eyes of the Overworld is plural);
  %oi -> "it" or "them";
  %oj -> "its" or "their"; plus capitalization with uppercase modifiers.
Also, %O yields shortened artifact name ("the Foo" in place of "the Foo
of Bar").  These provide support for terser summary lines, but can also
be used in the regular quest text passages.

     A couple of nemeses don't specify gender.  The random choices need
to be made early so that the leaders' messages can get them right.  This
chooses during role initialization and then uses that result once the
corresponding monster is eventually created.  It does the same for leader
even though no current leader needs it, and for deity too.
This commit is contained in:
nethack.rankin
2009-04-07 02:19:54 +00:00
parent a86187b398
commit e205569714
5 changed files with 103 additions and 13 deletions

View File

@@ -26,6 +26,13 @@ struct q_score { /* Quest "scorecard" */
Bitfield(offered_artifact,1); /* offered to leader */
Bitfield(got_thanks,1); /* final message from leader */
/* used by questpgr code when messages want to use pronouns
(set up at game start instead of waiting until monster creation;
1 bit each would suffice--nobody involved is actually neuter) */
Bitfield(ldrgend,2); /* leader's gender: 0=male, 1=female, 2=neuter */
Bitfield(nemgend,2); /* nemesis's gender */
Bitfield(godgend,2); /* deity's gender */
/* keep track of leader presence/absence even if leader is
polymorphed, raised from dead, etc */
Bitfield(leader_is_dead,1);