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

@@ -984,6 +984,13 @@ register int mmflags;
if (is_female(ptr)) mtmp->female = TRUE;
else if (is_male(ptr)) mtmp->female = FALSE;
/* leader and nemesis gender is usually hardcoded in mons[],
but for ones which can be random, it has already been chosen
(in role_init(), for possible use by the quest pager code) */
else if (ptr->msound == MS_LEADER && quest_info(MS_LEADER) == mndx)
mtmp->female = quest_status.ldrgend;
else if (ptr->msound == MS_NEMESIS && quest_info(MS_NEMESIS) == mndx)
mtmp->female = quest_status.nemgend;
else mtmp->female = rn2(2); /* ignored for neuters */
if (In_sokoban(&u.uz) && !mindless(ptr)) /* know about traps here */