From 75e5652e3188eddb3a96373d0050f8b865ddf5ce Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Tue, 26 Feb 2008 17:55:34 +0000 Subject: Apply Paul's patch 1901892: reorganize/rewrite docs/monster_speech.txt And, while on the topic, of monster speech: * move weapon noises to a file of its own: noise.txt * finally outsource imp/demon insults (making insult.cc/h superfluous) This also activates the hitherto commented-out special racial insults pertaining to player species. As usual, more input welcome. :) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3465 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/docs/monster_speech.txt | 564 +++++++++-------- crawl-ref/source/dat/database/insult.txt | 1001 ++++++++++++++++++++++++++++++ crawl-ref/source/dat/database/noise.txt | 525 ++++++++++++++++ crawl-ref/source/dat/database/speak.txt | 503 --------------- crawl-ref/source/database.cc | 72 ++- crawl-ref/source/insult.cc | 689 -------------------- crawl-ref/source/insult.h | 14 - crawl-ref/source/mon-util.cc | 27 +- crawl-ref/source/monspeak.cc | 1 - crawl-ref/source/randart.cc | 6 + 10 files changed, 1903 insertions(+), 1499 deletions(-) create mode 100644 crawl-ref/source/dat/database/insult.txt create mode 100644 crawl-ref/source/dat/database/noise.txt delete mode 100644 crawl-ref/source/insult.cc delete mode 100644 crawl-ref/source/insult.h (limited to 'crawl-ref') diff --git a/crawl-ref/docs/monster_speech.txt b/crawl-ref/docs/monster_speech.txt index fc05c9f257..ea837201a9 100644 --- a/crawl-ref/docs/monster_speech.txt +++ b/crawl-ref/docs/monster_speech.txt @@ -1,154 +1,221 @@ -As of Dungeon Crawl Stone Soup 0.3 the previously hard-coded -monster speech has been outsourced by Matthew Cline into -shout.txt and speak.txt. This makes changing existing -messages, or adding new ones really easy. This file will -hopefully help you in this endeavour. +Overview +======== + +As of Dungeon Crawl Stone Soup 0.3 the previously hard-coded monster +speech has been outsourced by Matthew Cline into shout.txt and +speak.txt. This makes changing existing messages, or adding new ones +really easy. This file will hopefully help you in this endeavour. shout.txt handles message output for monsters noticing you. -speak.txt handles messages for monsters communicating, and -also the messages for weapon noises. -If you take a look through the two files, you'll see that -all entries have basically the same structure. Let's have a -look at an example: +speak.txt handles messages for monsters communicating. -############### -# Friendly imps -############### -%%%% -# Friendly imps are very common so they speak very rarely -friendly '5' +insult.txt handles insults thrown at you by imps and demons. -w:9 -__NONE +noise.txt handles messages randart weapons with the noisy property. -w:1 -@_friendly_imp_@ -%%%% +A simple example +================ +If you take a look through the two files, you'll see that all entries +have basically the same structure: a key, followed by one or more +values. Here is an example. -Now let's look at this entry's components in more detail: + %%%% + # Friendly imps are very common so they speak very rarely + friendly '5' -# Friendly imps - A '#' sign at the beginning of a line means that this line - will be ignored, so it is used to place comments. + w:1 + @The_monster@ laughs. + w:1 + @_friendly_imp_@ -%%%% - The four percentage signs mark beginning and end of a - database entry. If you forget to place these, buggy - monster speech will result. + __NONE + %%%% +Let's look at this entry's components in more detail. -friendly '5' - The first non-comment, non-clear line is interpreted as - the key of an entry. Most keys are hardcoded but there's - place for user defined ones as well. In this case, the key - is "friendly '5'". + %%%% - '5' refers to the monster glyph, so the speech will not be - entirely restricted to imps, though they are by far the - most common type of minor demons. - On the whole there are three ways the game tries to look - for keys in the database. First the actual monster name is - used, then the monster glyph (with prefix "cap-" for - capital letters), then a group description (such as insect - or humanoid) defined by the monster's body shape (winged, - tailed etc). The latter is entirely hardcoded, though. +Four percentage signs mark beginning and end of a database entry. If +you forget to place these, you will get buggy monster speech. - "friendly" is one of a couple of allowed prefixes, - distinguishing the speech from "hostile" (default). + # Friendly imps are very common so they speak very rarely - These prefixes are optional and tested in the following - order: - - default friendly/hostile fleeing silenced confused monster +A '#' sign at the beginning of a line causes it to be ignored; these +are comment lines. - First the database is searched for the whole prefix - string, then, reading from left to right, combinations are - tested, beginning at three prefixes and ending at none, at - which time the prefix "default" is used instead. + friendly '5' - Only keys that match a searching string perfectly - (ignoring upper/lower cases) will be found! +The first non-comment, non-blank line is interpreted as the key of an +entry. Most keys are hardcoded but there's place for user defined ones +as well. In this case, the key is "friendly '5'". - For the last round (shape comparison, e.g. winged - humanoid) occasionally an additional intelligence estimate - ("stupid", "smart") is prefixed to the search string. If - in this last round still nothing has been found, the - monster stays silent. +'5' refers to the monster glyph, so the speech will not be entirely +restricted to imps, though they are by far the most common type of +minor demons. - For obvious reasons, weapon noises get by without any such - prefixes, and the only hardcoded keywords are - "noisy weapon" for weapons with the noises property, and - "singing sword" for (who'd have guessed?) the Singing - Sword. + w:1 + @The_monster@ laughs. -w:9 - After a clear line the actual talk begins. You can skew - the probability of a given message with the weight ('w') - tag. A message will be chosen with a probability of its - weight (defaults to 10 if none set) out of the sum of - weights for this entry. In this case, nine times out of - ten a friendly imp will stay silent. +The rest of the entry consists of messages, separated by blank +lines. This is one of them. Each may be prefixed with an optional +weight ('w:1'). A message will be chosen with a probability of its +weight out of the sum of weights for its entry. Weight defaults to 10 +if not specified. In this example, this particular message will be +selected 1 time out of 12. + @The_monster@ laughs. -__NONE - Aside from "__NONE" there are a few other hardcoded - markers: +This is the message that will be printed. The '@' markers indicate +variables that will be substituted before printing. This particular +variable "@The_monster@" is treated specially by the game; the +substitution will change based on the monster giving the speech. See +below for more details. - __NONE : no message - __NEXT : try the next combination of attributes - __MORE : enforce a "--more--" prompt - __YOU_RESIST : "You resist." - __NOTHING_HAPPENS : "Nothing appears to happen." + w:1 + @_friendly_imp_@ + +This is another case of a substitution. Here, "_friendly_imp_" is an +entry in speak.txt. A random line from that entry will be substituted. + + __NONE + +This is a special command; it prints no message. See below for more +details on special commands. + + +Keys in detail +============== + +Key lookup is always case-insensitive. The game looks up several +different keys when finding monster speech. + +1. The actual monster name. + Examples: "crystal golem", "default confused moth of wrath" +2. Then the monster glyph, with prefix "cap-" for capital letters. + Examples: "default 'cap-J'", "default confused 'k'" +3. A group description (such as 'insect' or 'humanoid') defined by the + monster's body shape (winged, tailed etc). The latter is entirely + hardcoded, though. + Examples: "default winged insect" + +"friendly" is one of a couple of allowed prefixes, distinguishing the +speech from "hostile" (default). These prefixes are optional and +tested in the following order: + + default friendly/hostile fleeing silenced confused monster + +First the database is searched for the whole prefix string, then, +reading from left to right, combinations are tested, beginning at +three prefixes and ending at none, at which time the prefix "default" +is used instead. - In addition, some more are defined in speak.txt and - shout.txt, such as __RESIST_OR_NOTHING, __SHOUT, and - others. For the shouting messages, Crawl looks up the - noises a given monster can produce and looks for keys - that match the string, i.e. __SHOUT, __BARK and so on. +Only keys that match a searching string perfectly (ignoring case) will +be used. +For the last round (shape comparison, e.g. winged humanoid) +occasionally an additional intelligence estimate ("stupid", "smart") +is prefixed to the search string. -@_friendly_imp_@ - More variables can be defined in the form of @variable@. - The "@_friendly_imp_@" above is a reference to another - entry in the database that has the key "_friendly_imp_" - (without those '@' signs) that actually has imps talking. - Their speech includes messages such as the following. +If no matching keys are found after all 3 rounds, the monster stays silent. +For obvious reasons, weapon noises get by without any such prefixes, +and the only hardcoded keywords are "noisy weapon" for weapons with +the noises property, and "singing sword" for (who'd have guessed?) the +Singing Sword. -VISUAL:@The_monster@ grins impishly at you. -VISUAL:@The_monster@ picks up some beetles from the @surface@ and offers them to you. +Values in detail +================ +Spacing +------- -Again, there have to be clear lines between the different -messages. If messages are placed directly one after another -they will be printed as a block. This can be useful, e.g. -for outputting first a "spell" and then it's (fake) result. +There have to be blank lines between the different messages. If +messages are placed directly one after another they will be printed as +a block. This can be useful, e.g. for outputting first a "spell" and +then its (fake) result. -Note that this does not work for weapon noises. Here only -the first part of a paragraph before a carriage return is -parsed. +Note that this does not work for weapon noises. Here only the first +part of a paragraph before a carriage return is parsed. -The message entries themselves can be longer than a line, -though Crawl will simply truncate it should it exceed the -screen width (assuming 80 columns or less). The actual -message length will usually differ from the one defining an -entry as parameters can be stripped from the entry or -replaced by other values, as explained in the following -section. +The message entries themselves can be longer than a line, though Crawl +will simply truncate it should it exceed the screen width (assuming 80 +columns or less). The actual message length will usually differ from +the one defining an entry as parameters can be stripped from the entry +or replaced by other values, as explained in the following section. -Monster speech can be greatly customized by the use of -several variables. This example already includes a few. +Variables +--------- +Values can contain variable references, which look like text +surrounded by @@. These variables may be defined by entries in +shout/speak.txt, in which case they are replaced with a random value +from the entry; or they may have hardcoded expansions defined by the +game. -VISUAL: - This optional parameter at the beginning of a string - decides which message channel a string will be passed - through. The list of allowed tags is as follows: +Note that if variable replacement is recursive, so be careful to avoid +infinite loops. + +The following variables are hardcoded: + +@monster@ : Plain monster name, e.g. "rat" or "Sigmund" +@a_monster@ : Indefinite article plus monster name, + or only the name if it is unique ("Sigmund"). +@the_monster@ : Definite article plus monster name ("the rat"), + or a possessive if it is friendly ("your rat"), + or only the name if it is unique ("Sigmund"). +@something@ : Like @monster@, with monster name replaced by "something" + if the monster is invisible and the player cannot see invis. +@a_something@ : similar +@the_something@ : similar +@player_name@ : Player name. +@surface@ : Whatever the monster is standing on. +@feature@ : The monster's square's feature description. +@pronoun@ : it, she, he, as appropriate +@possessive@ : its, her, his, as appropriate +@imp_taunt@ : imp type insults (see insult.txt) +@demon_taunt@ : demon type insults (see insult.txt) +@says@ : synonym of 'say' that fits monster's (hardcoded) + speech pattern and noise level. + +Capitalized forms (@Monster@, @A_something@, @Possessive@, @Pronoun@) +are expanded with capitalized text. + +Weapon noises are handled differently in that all of the above +replacements don't hold. Instead you can use @The_weapon@, +@the_weapon@, @Your_weapon@, @your_weapon@ and @weapon@ which will get +replaced by "The (weapon name)", "the (weapon name)", "Your (weapon +name)", "your (weapon name)" and the plain weapon name, +respectively. Note that the Singing Sword, being unique, cannot be +referred to by the possessive variants, so they will be replaced with +one of the definite article ones. + +Pre-defined variables in the database include _high_priest_, +_mercenary_guard_, _wizard_, _hostile_adventurer_, _friendly_imp_, +_hostile_imp_, and _tormentor_. There are also a few synonyms defined +at the beginning of speak.txt such as for @ATTACK@, @pointless@, +@shouts@, @wails@, and others. + +Weapon noises also use a number of synonyms which are defined at the +end of noise.txt. + +The best way to learn about how variables and other concepts can be +used is probably to see how it has been done for existing messages. + +Channels +-------- + +An optional channel name at the beginning of a string causes messages +to be sent to that channel. For example: + +SPELL:@The_monster@ casts a spell. +WARN:Your equipment suddenly seems to weigh more. + +Here are the defined channels: TALK : MSGCH_TALK (Default value.) DANGER : MSGCH_DANGER @@ -159,185 +226,110 @@ VISUAL: VISUAL : MSGCH_TALK_VISUAL WARN : MSGCH_WARN - The channels have been assigned different colours and are - sometimes treated differently, e.g. any of MSGCH_TALK, - MSGCH_SOUND and MSGCH_TALK_VISUAL will never interrupt - resting or travel unless specifically added in the options - file. +The channels have been assigned different colours and are sometimes +treated differently, e.g. any of MSGCH_TALK, MSGCH_SOUND and +MSGCH_TALK_VISUAL will never interrupt resting or travel unless +specifically added in the options file. - Note that MSGCH_SOUND and MSGCH_TALK get filtered out - when you are silenced. For similar reasons monster speech - of channel SPELL is muted under silence, along with - ENCHANT and WARN, both of which currently only occur in - combination with SPELL. To allow for silent spells along - with fake warnings and enchantments, you can combine these - with VISUAL and enforce output even when silenced. +Note that MSGCH_SOUND and MSGCH_TALK get filtered out when you are +silenced. For similar reasons monster speech of channel SPELL is muted +under silence, along with ENCHANT and WARN, both of which currently +only occur in combination with SPELL. To allow for silent spells along +with fake warnings and enchantments, you can combine these with VISUAL +and enforce output even when silenced. VISUAL ENCHANT : MSGCH_MONSTER_ENCHANT VISUAL SPELL : MSGCH_MONSTER_SPELL VISUAL WARN : MSGCH_WARN - Note, though, that these rarely will take effect as - usually the "silenced humanoid" types will take - precedence. In the case of silenced monsters, first the - database is searched for the monster key along with - several prefixes including "silenced", and only if no - message can be found through all iterations of monster - name, glyph and group description, the search will repeat - ignoring the "silenced" prefix and only then these special - VISUAL cases can apply. - - For shouts the default is also MSGCH_TALK which is - automatically changed to MSGCH_TALK_VISUAL for monsters - that can't speak (animals, usually), and manually set to - MSGCH_SOUND for all those variants of "You hear a shout!" - - For weapon noises only a subset of the above is relevant, - as anything including VISUAL and the channel keys SPELL - and ENCHANT are considered invalid and will trigger a - default message instead. Again, the default channel is - MSGCH_TALK. - -@The_monster@, @surface@ - Like with @_friendly_imp_@ above, a number of variables - has been defined to allow for greater flexibility. - Whenever the speech code encounters an '@' sign it will - search the database for a variable of that name and - execute the necessary replacement. Note that recursive - replacement of one variable with another is possible, so - try to avoid loops. The remaining variables it was unable - to find in the database are hardcoded and will be replaced - before output. - If you add a new variable make sure to also add a database - entry for it (without those '@' marks around!); otherwise - it won't get replaced and just look weird. - - A variable that you will see all over the place is - @The_monster@, which is hardcoded and will be replaced by - the monster's name. This is particularly useful for groups - of monsters that share the same speech pattern. Another - variable you can see in this example is @surface@, which - will be replaced by whatever the monster is standing on. +Note, though, that these rarely will take effect as usually the +"silenced humanoid" types will take precedence. In the case of +silenced monsters, first the database is searched for the monster key +along with several prefixes including "silenced", and only if no +message can be found through all iterations of monster name, glyph and +group description, the search will repeat ignoring the "silenced" +prefix and only then these special VISUAL cases can apply. -The following variables are hardcoded: +For shouts the default is also MSGCH_TALK which is automatically +changed to MSGCH_TALK_VISUAL for monsters that can't speak (animals, +usually), and manually set to MSGCH_SOUND for all those variants of +"You hear a shout!" -@monster@ : replaced by plain monster name, - e.g. "rat" or "Sigmund" -@Monster@ : as above, but capitalized -@the_monster@ : replaced by definite article plus - monster name, or only the name if it is - unique, e.g. "the rat" or "Sigmund" -@The_monster@ : as above, but capitalized -@a_monster@ : replaced by indefinite article plus - monster name, if more than one can exist, - e.g. "a rat" or (again) "Sigmund" -@A_monster@ : as above, but capitalized - -For friendly monsters a special case takes effect. Instead -of adding the definite article for @the_xxx@ constructs, -"your" or "Your" is used, respecting both capitalization and -grammar. - -As an alternative there's also @the_something@, -@The_something@, @a_something@, @A_something@, @something@ -and @Something@, all of which behave like the corresponding -monster definitions above but get replaced by "something" -and "Something", respectively, should the monster be -invisible and the player be unable to see invisible. - -But wait, there's more! - -@player_name@ : replaced by player name - -@surface@ : replaced by whatever the monster stands on -@feature@ : replaced by the monster's square's feature - description - -@pronoun@ : replaced by it, she, he, as appropriate -@Pronoun@ : replaced by It, She, He, as appropriate -@possessive@ : replaced by its, her, his, as appropriate -@Possessive@ : replaced by Its, Her, His, as appropriate - -@imp_taunt@ : replaced by hardcoded imp type insults -@demon_taunt@ : replaced by hardcoded demon type insults - -Also, @says@ will get replaced with a synonym of 'say' that -fits a monster's (hardcoded) speech pattern and noise level. - -Weapon noises are handled differently in that all of the -above replacements don't hold. Instead you can use -@The_weapon@, @the_weapon@, @Your_weapon@, @your_weapon@ and -@weapon@ which will get replaced by "The (weapon name)", -"the (weapon name)", "Your (weapon name)", "your (weapon -name)" and the plain weapon name, respectively. Note that -the Singing Sword, being unique, cannot be referred to by -the possessive variants, so they will be replaced with one -of the definite article ones. - -Pre-defined variables in the database include _high_priest_, -_mercenary_guard_, _wizard_, _hostile_adventurer_, -_friendly_imp_, _hostile_imp_, and _tormentor_. There are -also a few synonyms defined at the beginning of speak.txt -such as for @ATTACK@, @pointless@, @shouts@, @wails@, and -others. -Weapon noises also use a number of synonyms which are -defined at the end of speak.txt. - -The best way to learn about how variables and other concepts -can be used is probably to see how it has been done for -existing messages. - - -TESTING YOUR CHANGES -Should you have a version of Stone Soup that has been -compiled with the WIZARD mode defined, this could greatly -simplify testing. You can check whether this is the case by -pressing '&' during the game. If you are told that this is -an "unknown command" you are out of luck and might consider -compiling the game for yourself. You can download the source -code from the Crawl homepage [1]. -Read the "INSTALL" file in the main directory for -instructions. Should you, after reading the documentation -and checking the archives of the Crawl newsgroup [2], still -have any questions, ask away! - -If you have WIZARD mode compiled in, you can simply answer -"yes" to the safety question resulting from pressing '&', -and then test to your heart's content. Pressing '&' followed -by a number of other keys will execute wizard mode commands -that are all listed in the wizard help menu (press '&?'). - -In particular, you can create a monster with '&M', and -enforce behaviour on a monster by examining it (with 'x', -as usual). In wizard mode this offers several new commands -such as 'F' (make monster friendly/unfriendly) and 's' -(make monster shout). These last two are of particular -interest to monster speech designers. - -The Singing Sword and all other hardcoded artefacts can be -created with '&|'. The Elemental Staff and the spear of -Voo-Doo are examples of noisy weapons. - -You can also temporarily increase the likelihood of a given -message by adding a high weight value before it, e.g. w:500, -or equally temporarily push it into another channel (e.g. -MSGCH_WARN) to make it more noticeable. - - -PUBLISHING YOUR ADDITIONS AND CHANGES -If you feel that your additions really add something to the -game and would like to make them available to the general -public, you can post them (in the form of a diff file, or in -plain text) in the newsgroup [2] or as a feature request on -sourceforge.net [1]. - - -[1] http://crawl-ref.sourceforge.net - http://sourceforge.net/projects/crawl-ref - -[2] rec.games.roguelike.misc -Since this newsgroup is being shared with a number of other -roguelike games, it is generally considered polite to flag -subjects of posts pertaining only to Crawl with "-crawl-" or -a similar marker. +For weapon noises only a subset of the above is relevant, as anything +including VISUAL and the channel keys SPELL and ENCHANT are considered +invalid and will trigger a default message instead. Again, the default +channel is MSGCH_TALK. + +Special commands and variables +------------------------------ + +Messages may also be one of these special commands. These aren't +variables, so they aren't surrounded by @@. They are not expanded, but +rather they produce special game behavior. + + __NONE : no message + __NEXT : try the next combination of attributes + __MORE : enforce a "--more--" prompt + __YOU_RESIST : "You resist." + __NOTHING_HAPPENS : "Nothing appears to happen." +Some special keys are defined in speak.txt and shout.txt, such as +__RESIST_OR_NOTHING and __SHOUT. These are normal variable expansions, +and may be used as such. They are given special-looking names because +Crawl looks up the noises a given monster can produce and looks for +keys that match the string, i.e. __SHOUT, __BARK and so on. + + +Testing your changes +==================== + +Get a version of Stone Soup that contains WIZARD mode. You can check +whether this is the case by pressing '&' during the game. If you are +told that this is an "unknown command" (likely, since WIZARD builds +are generally not distributed), you will have to compile the game for +yourself. + +To build Crawl yourself, download the source code from the Crawl +homepage [1] and read the "INSTALL" file in the main directory for +instructions. Should you still have any questions after reading the +documentation and checking the archives of the Crawl newsgroup [2], +ask away! + +If you have WIZARD mode compiled in, you can simply answer "yes" to +the safety question resulting from pressing '&', and then test to your +heart's content. Pressing '&' followed by a number of other keys will +execute wizard mode commands that are all listed in the wizard help +menu (press '&?'). + +In particular, you can create a monster with '&M', and enforce +behaviour on a monster by examining it (with 'x', as usual). In wizard +mode, examining monsters offers several new sub-commands such as 'F' +(make monster friendly/unfriendly) and 's' (make monster shout). These +last two are of particular interest to monster speech designers. + +The Singing Sword and all other hardcoded artefacts can be created +with '&|'. The Elemental Staff and the spear of Voo-Doo are examples +of noisy weapons. + +You can also temporarily increase the likelihood of a given message by +adding a high weight value before it, e.g. w:500, or equally +temporarily push it into another channel (e.g. MSGCH_WARN) to make it +more noticeable. + + +Publishing your changes +======================= + +If you feel that your additions add something to the game and would +like to make them available to the general public, you can post them +(in the form of a diff file, or in plain text) as a feature request on +sourceforge.net [1]_ or in the newsgroup [2]_. + +.. [1] http://crawl-ref.sourceforge.net + http://sourceforge.net/projects/crawl-ref + +.. [2] rec.games.roguelike.misc + Since this newsgroup is being shared with a number of other + roguelike games, it is generally considered polite to flag + subjects of posts pertaining only to Crawl with "-crawl-" or + a similar marker. diff --git a/crawl-ref/source/dat/database/insult.txt b/crawl-ref/source/dat/database/insult.txt new file mode 100644 index 0000000000..4a05ec3db3 --- /dev/null +++ b/crawl-ref/source/dat/database/insult.txt @@ -0,0 +1,1001 @@ +############################################################ +# Outsourced monster speech. +# +# insult.txt contains the messages imps and demons apply in +# Crawl to insult players. +# +# For an explanation of how to read insult.txt and how to +# add new messages, see monster_speech.txt in the docs +# directory +############################################################ +%%%% +imp_taunt + +@run_or_give_up@, thou @generic_insult@! + +%%%% +run_or_give_up + +w:6 +@run_away@ + +w:1 +@give_up@ + +%%%% +demon_taunt + +w:1 +@run_away@, thou @generic_insult@! + +w:2 +@give_up@, thou @generic_insult@! + +w:3 +@demon_taunt_special@ + +%%%% +demon_taunt_special + +Thy @body_or_spiritual_part@ shall be my @meal@! + +@give_up@, thou tasty @meal@! + +@run_away@ @whilst_thou_can@! + +I @will_or_shall@ @feast_or_devour@ thy @body_or_spiritual_part@! + +# Not currently used: +#Thou @generic_insult@! + +%%%% +body_or_spiritual_part + +w:3 +important_body_part + +w:1 +important_spiritual_part + +%%%% +####################################################### +# generic insults consists of three random parts +####################################################### +generic_insult + +@insult_adjective1@ @insult_adjective2@ @insult_noun@ + +%%%% + +important_body_part + +head + +brain + +heart + +viscera + +eyes + +lungs + +liver + +throat + +neck + +skull + +spine +%%%% + +important_spiritual_part + +soul + +spirit + +inner light + +hope + +faith + +will + +heart + +mind + +sanity + +fortitude + +life force +%%%% + +meal + +meal + +breakfast + +lunch + +dinner + +supper + +repast + +snack + +victuals + +refection + +junket + +luncheon + +snackling + +curdle + +snacklet + +mouthful +%%%% +# capitalized "flee" verbs +run_away + +Away with thee + +Back with thee + +Begone + +Bolt + +Crawl home + +Decamp + +Escape + +Flee + +Fly + +Get thee gone + +Get thee hence + +Give up + +Go and return not + +Leave + +Quit + +Remove thy stench + +Return whence thou came + +Run away + +Scamper away + +Scamper hence + +Scamper home + +Slither away + +Slither hence + +Slither home + +Take thy face hence + +Turn tail + +%%%% +# capitalized synonyms for "give up" +give_up + +Abandon hope + +Accept thy failure + +Accept thy fall + +Accept thy doom + +Admit defeat + +Beg for mercy + +Capitulate + +Despair + +Despond + +Disclaim thyself + +Embrace submission + +Embrace thy dedition + +Embrace thy doom + +Embrace thy failure + +Embrace thy fall + +Face thy fugue + +Face thy requiem + +Flounder + +Give in + +Give up + +Kneel + +Quail + +Quit + +Surrender + +Succumb + +Submit + +Tremble + +Relinquish hope + +Taste defeat + +%%%% + +whilst_thou_can + +whilst thou can + +whilst thou may + +whilst thou are able + +if wit thou hast + +whilst thy luck holds + +before doom catcheth thee + +lest death find thee + +whilst thou art whole + +# screen vs. this for undead? +whilst life thou hast + +%%%% +############################################################### +# adjective1, usually short and/or consisting of one word only +############################################################### +insult_adjective1 + +w:5 +@species_insult_adj1@ + +@insult general adj1@ + +%%%% +insult general adj1 + +artless + +baffled + +bawdy + +beslubbering + +bootless + +bumbling + +canting + +churlish + +cockered + +clouted + +craven + +currish + +dankish + +dissembling + +droning + +ducking + +errant + +fawning + +feckless + +feeble + +fobbing + +foppish + +froward + +frothy + +fulsome + +gleeking + +goatish + +gorbellied + +grime-gilt + +horrid + +hateful + +impertinent + +infectious + +jarring + +loggerheaded + +lumpish + +mammering + +mangled + +mewling + +odious + +paunchy + +pribbling + +puking + +puny + +qualling + +quaking + +rank + +pandering + +pecksniffian + +plume-plucked + +pottle-deep + +pox-marked + +reeling-ripe + +rough-hewn + +simpering + +spongy + +surly + +tottering + +twisted + +unctious + +unhinged + +unmuzzled + +vain + +venomed + +villainous + +warped + +wayward + +weedy + +worthless + +yeasty + +%%%% +########################################################## +# adjective1, Elf special +########################################################## +insult elf adj1 + +weakly + +sickly + +frail + +delicate + +fragile + +brittle + +tender + +mooning + +painted + +lily-hearted + +dandy + +featherweight + +flimsy + +rootless + +spindly + +puny + +shaky + +prissy + +%%%% +############################################################### +# adjective2, usually longer and consisting of two words +############################################################### +insult_adjective2 + +w:5 +@species_insult_adj2@ + +@insult general adj2@ + +%%%% +insult general adj2 + +base-court + +bat-fowling + +beef-witted + +beetle-headed + +boil-brained + +clapper-clawed + +clay-brained + +common-kissing + +crook-pated + +dismal-dreaming + +ditch-delivered + +dizzy-eyed + +doghearted + +dread-bolted + +earth-vexing + +elf-skinned + +fat-kidneyed + +fen-sucked + +flap-mouthed + +fly-bitten + +folly-fallen + +fool-born + +full-gorged + +guts-griping + +half-faced + +hasty-witted + +hedge-born + +hell-hated + +idle-headed + +ill-breeding + +ill-nurtured + +kobold-kissing + +knotty-pated + +limp-willed + +milk-livered + +miscreant + +moon-mazed + +motley-minded + +moldwarp + +mumble-news + +nose-picking + +nut-hook + +onion-eyed + +pigeon-egg + +roguish + +rude-growing + +rump-fed + +ruttish + +saucy + +shard-borne + +sheep-biting + +sow-suckled + +spleeny + +spur-galled + +swag-bellied + +tardy-gaited + +tickle-brained + +toad-spotted + +toenail-biting + +unchin-snouted + +weather-bitten + +weevil-witted + +%%%% +########################################################## +# adjective2, Dwarf special +########################################################## +insult dwarf adj2 + +dirt-grubbing + +grit-sucking + +muck-plodding + +stone-broke + +pelf-dandling + +fault-botching + +gravel-groveling + +boodle-bothering + +cabbage-coddling + +rhino-raveling + +thigh-biting + +dirt-delving + +%%%% +########################################################## +# adjective2, Kenku special +########################################################## +insult kenku adj2 + +hollow-boned + +feather-brained + +beak-witted + +hen-pecked + +lightweight + +frail-limbed + +bird-brained + +featherweight + +pigeon-toed + +crow-beaked + +magpie-eyed + +mallardish + +%%%% +############################################### +# noun of the insult +############################################### +insult_noun + +w:5 +@species_insult_noun@ + +@insult general noun@ + +%%%% +insult general noun + +apple-john + +baggage + +bandersnitch + +barnacle + +beggar + +bladder + +boar-pig + +bounder + +bugbear + +bum-bailey + +canker-blossom + +clack-dish + +clam + +clotpole + +coxcomb + +codpiece + +death-token + +dewberry + +dingleberry + +flap-bat + +flax-wench + +flirt-gill + +foot-licker + +fustilarian + +giglet + +gnoll-tail + +gudgeon + +guttersnipe + + +haggard + +harpy + +hedge-pig + +hugger-mugger + +joithead + +lewdster + +lout + +maggot-pie + +malt-worm + +mammet + +measle + +mendicant + +minnow reeky + +mule + +nightsoil + +nobody + +nothing + +pigeon-egg + +pignut + +pimple + +pustule + +puttock + +pumpion + +ratsbane + +scavenger + +scut + +serf + +simpleton + +skainsmate + +slime mold + +snaffler + +snake-molt + +strumpet + +surfacer + +tinkerer + +tiddler + +urchin + +varlet + +vassal + +vulture + +wastrel + +wagtail + +whey-face + +wormtrail + +yak-dropping + +zombie-fodder + +%%%% +########################################################## +# noun, small species special +########################################################## +small_food + +snackling + +crunchlet + +half-meal + +supper-setting + +snacklet + +noshlet + +morsel + +mug-up + +bite-bait + +crunch-chow + +snack-pap + +grub + +mouthful + +half-pint +%%%% +########################################################## +# noun, Halfling special +########################################################## +insult halfling noun + +w:100 +@small_food@ + +footstool + +munchkin + +side-stool + +pudgelet + +groundling + +burrow-snipe + +hole-bolter + +low-roller + +runt + +peewee + +mimicus + +manikin + +hop-o-thumb + +knee-biter + +burrow-botch + +hole-pimple + +hovel-pustule + +%%%% +########################################################## +# noun, Spriggan special +########################################################## +insult spriggan noun + +w:100 +@small_food@ + +rat-rider + +quarter-pint + +nissette + +fizzle-flop + +spell-botch + +feeblet + +weakling + +pinchbeck-pixie + +ankle-biter + +bootstain + +nano-nebbish + +sopling + +shrunken violet + +sissy-prig + +pussyfoot + +creepsneak + +%%%% +########################################################## +# noun, Minotaur special +########################################################## +insult minotaur noun + +bovine + +briscut + +bull-brain + +cud-chewer + +calf-wit + +cretin + +cow + +cattle + +horn-beast + +meatloaf + +meatball + +mooer + +rump-roast + +veal + +walking sirloin +%%%% \ No newline at end of file diff --git a/crawl-ref/source/dat/database/noise.txt b/crawl-ref/source/dat/database/noise.txt new file mode 100644 index 0000000000..cdc9f0b2d2 --- /dev/null +++ b/crawl-ref/source/dat/database/noise.txt @@ -0,0 +1,525 @@ +############################################################ +# As of Stone Soup 0.3 the previously hardcoded monster +# speech has been outsourced. This makes changing existing +# messages, and adding new ones really easy. +# +# noise.txt contains the messages of randart weapons with +# the noise property and of the Singing Sword, one of +# Crawl's fixed artefacts. +# +# For an explanation of how to read noise.txt and how to +# add new messages, see monster_speech.txt in the docs +# directory +############################################################ +%%%% +############################################################ +# The SINGING SWORD loves to sing and sometimes talks. +############################################################ +singing sword + +w:4 +@weapon_sings@ + +w:1 +@weapon_talks@ + +%%%% +############################################################ +# NOISY WEAPONS like to chatter and imitate dungeon noises. +############################################################ +noisy weapon + +w:2 +@weapon_talks@ + +w:1 +SOUND:You hear @weapon_noise@ +%%%% +############################################################ +# for the SINGING SWORD only! +############################################################ +weapon_sings + +#sings +@The_weapon@ hums a little @tune_or_melody@. + +@The_weapon@ breaks into glorious song! + +@The_weapon@ sings. + +@The_weapon@ sings loudly. + +@The_weapon@ sings off-key. + +@The_weapon@ sings, "Tra-la-la..." + +@The_weapon@ sings a lullaby. + +@The_weapon@ whines plaintively. + +@The_weapon@ wails mournfully. + +@The_weapon@ practices its scales. + +@The_weapon@ lilts tunefully. + +@The_weapon@ yodels. + +@The_weapon@ hums tunelessly. + +@The_weapon@ makes a painfully high-pitched squeak. + +@The_weapon@ sings a sudden staccato note. + +@The_weapon@ sings a catchy @tune_or_melody@. + +@The_weapon@ hums a slow waltz. + +@The_weapon@ whistles merrily. + +#Beethoven +@The_weapon@ goes "Da-da-da-dum". + +@The_weapon@ chants serenely. + +@The_weapon@ trills happily. + +@The_weapon@ chants a little melody. + +@The_weapon@ sings a deeply moving song. + +@The_weapon@ hums an eerie @tune_or_melody@. + +@The_weapon@ hums a slow and mournful tune. + +@The_weapon@ launches into yet another solo. + +@The_weapon@ strikes up a merry @tune_or_melody@. + +@The_weapon@ emits a series of high-pitched trills. + +@The_weapon@ composes a new song. + +@The_weapon@ makes a sound as if to clear its throat. + +@The_weapon@ sings a quivering drawn-out note. + +@The_weapon@ sings a little jingle. + +@The_weapon@ strikes up a funeral march. + +@The_weapon@ merrily whistles a melody. + +In a hysterical voice, @the_weapon@ strikes up a march. + +@The_weapon@ sings @several@ chords at once. + +@The_weapon@ trains the @kind_of_scales@ scales. + +@The_weapon@ pulls out all the stops. + +@The_weapon@ sets up a furious crescendo. + +@The_weapon@ plays a requiem for the unknown sword. + +@The_weapon@ strikes up a @dance@. + +@The_weapon@ intones @an_aria_or_fugue@. + +@The_weapon@ @nearly_or_clearly@ @hits_or_misses@ the concert pitch. + +#imitates instruments +@The_weapon@ makes a twanging sound. + +@The_weapon@ chimes melodiously. + +@The_weapon@ chimes harmoniously. + +@The_weapon@ makes beautiful music. + +@The_weapon@ produces a loud orchestral chord. + +@The_weapon@ tinkles. + +@The_weapon@ rings like a bell. + +@The_weapon@ imitates a saxophone. + +@The_weapon@ chimes like a gong. + +@The_weapon@ applauds itself. + +@The_weapon@ goes toot-toot! + +@The_weapon@ does a drum roll. + +@The_weapon@ holds a dissonant chord. + +@The_weapon@ beats time. + +#speaks +@The_weapon@ says, "Hi! I'm the Singing Sword!" + +@The_weapon@ shouts, "Sing along with me!" + +@The_weapon@ shouts, "One, two, three..." + +@The_weapon@ spouts musical wisdom. + +@The_weapon@ chants, "I am golden and pointed, and with blood well anointed." + +@The_weapon@ dictates a lengthy tome entitled 'The Well-Tempered Blade'. + +@The_weapon@ @points_out@ the lack of singing @not_swords@. + +@The_weapon@ embarks on a lenghty monologue about murderous music. + +@The_weapon@ curses its smith: "I was supposed to be the Stinging Sword!" + +@The_weapon@ muses how they don't make such fine swords anymore. + +@The_weapon@ tries to improvise rhymes, and fails miserably. + +@The_weapon@ complains about @double_or_triple@ swords. + +@The_weapon@ derides short swords. + +@The_weapon@ yells, "Ploughshares to swords!" and giggles. + +@The_weapon@ chants, "Rather stab than club, rather slice than rub!" + +# end Singing Sword +%%%% +############################################################ +# general chatter for noisy weapons, +# including Singing Sword +############################################################ +weapon_talks + +#speaks +@Your_weapon@ shouts, "Whoopee!" + +@Your_weapon@ argues with itself. + +@Your_weapon@ complains about the scenery. + +@Your_weapon@ says, "I'm bored." + +@Your_weapon@ shouts out instructions! + +@Your_weapon@ says, "Ssh! Did you hear that?" + +@Your_weapon@ cheers you on. + +@Your_weapon@ calls out a warning! + +@Your_weapon@ hurls insults at you. + +@Your_weapon@ chatters happily. + +@Your_weapon@ recites a poem. + +@Your_weapon@ prattles on and on. + +@Your_weapon@ regales you with its life story. + +@Your_weapon@ speaks gibberish. + +@Your_weapon@ raves incoherently. + +@Your_weapon@ shouts, "Help!" + +@Your_weapon@ happily shouts, "Violence is virtue, silence is sin." + +@Your_weapon@ says, "They will have to pry me from your cold, dead hands." + +@Your_weapon@ longs back for the days in the arena. + +#song by the Misfits +@Your_weapon@ asks plaintively, "Mommy, can I go out and kill tonight?" + +@Your_weapon@ cries, "Don't ditch me yet! I promise to be forever silent." + +@Your_weapon@ amuses itself with detailed descriptions of past executions. + +@Your_weapon@ wails, "I am too young to rust!" + +@Your_weapon@ wishes everyone in the dungeon @unpleasant_or_sudden@ @demise_or_death@. + +@Your_weapon@ fumes, "Being battered, bent and broken sure is better than this boredom!" + +@Your_weapon@ yells, "No battle, no fun!" + +@Your_weapon@ shouts, "This level is mine! Um, ours." + +@Your_weapon@ cracks jokes of @questionable@ humour. + +@Your_weapon@ dwells on sagas on the glory of old. + +@Your_weapon@ belts out, "Dying in battle is most honourable!" + +@Your_weapon@ gleefully confesses its misdeeds. + +@Your_weapon@ groans, "That's what you call fighting?" + +@Your_weapon@ shouts, "Left! No, no, right!". + +@Your_weapon@ says, "How I wish you were a better fighter." + +@Your_weapon@ grouses, "Could you please kill something? I'm itching all over." + +@Your_weapon@ shouts, "Make war, not love!" + +#makes noises +@Your_weapon@ growls menacingly. + +@Your_weapon@ sputters and hisses. + +@Your_weapon@ hollers! + +@Your_weapon@ pants and wheezes. + +@Your_weapon@ barks abruptly. + +@Your_weapon@ sighs. + +@Your_weapon@ wails. + +@Your_weapon@ howls with laughter! + +@Your_weapon@ laughs crazily. + +@Your_weapon@ burps! + +@Your_weapon@ goes snicker-snack! + +@Your_weapon@ lets out a mournful sigh. + +@Your_weapon@ yells in some weird language. + +@Your_weapon@ makes a horrible noise. + +@Your_weapon@ makes a deep moaning sound. + +@Your_weapon@ gives off a wolf whistle. + +@Your_weapon@ wails. + +@Your_weapon@ giggles. + +@Your_weapon@ lets out a whoop! + +@Your_weapon@ yawns loudly. + +@Your_weapon@ intones a prayer. + +@Your_weapon@ cries out! + +@Your_weapon@ swears loudly. + +@Your_weapon@ inquires about your family. + +@Your_weapon@ coughs loudly. + +@Your_weapon@ burbles away merrily. + +@Your_weapon@ gurgles. + +@Your_weapon@ suddenly shrieks! + +@Your_weapon@ cackles. + +@Your_weapon@ warbles. + +@Your_weapon@ suddenly bursts into laughter! + +@Your_weapon@ snorts. + +@Your_weapon@ comments on the weather. + +@Your_weapon@ makes a deep, guttural noise. + +@Your_weapon@ gives off a sizzling sound. + +@Your_weapon@ whistles innocently. + +@Your_weapon@ makes a popping sound. + +@Your_weapon@ yelps loudly! + +@Your_weapon@ lets out a series of bird calls. + +# end weapon chatter +%%%% +############################################################ +# noises for weapons with NOISES property (not Singing Sword!) +############################################################ +weapon_noise + +#dungeon noises +a shout. + +an angry hiss. + +a high-pitched scream! + +a roar! + +a hideous shriek! + +a piteous moan. + +a screech! + +a bellow! + +a loud, deep croak! + +an angry buzzing noise. + +an irritating high-pitched whine. + +a splashing noise. + +a sizzling sound. + +a loud clanging noise! + +a grinding noise. + +a mighty clap of thunder! + +a hideous screaming! + +a bark! + +a rumbling sound. + +a crunching sound. + +a distant "Zot"! + +the distant roaring of an enraged frog. + +# other noises, usually not found in the dungeon +a voice call your name. + +a very strange noise. + +someone snoring. + +the sound of rushing water. + +someone calling for help! + +strange voices. + +a knock. + +maniacal laughter. + +snatches of song. + +a twanging sound. + +the chiming of a distant gong. + +the tinkle of an enormous bell. + +an echo. + +the wailing of sirens. + +a flourish of trumpets! + +# end weapon noises +%%%% +############################################################ +# synonyms for weapon noises +############################################################ +several + +several + +three or four + +a multitude of +%%%% +kind_of_scales + +pentatonic + +chromatic + +diatonic +%%%% +not_swords + +clubs + +axes + +polearms +%%%% +points_out + +points out + +remarks in passing on +%%%% +dance + +bossanova + +waltz + +menuet +%%%% +an_aria_or_fugue + +an aria + +a fugue +%%%% +nearly_or_clearly + +nearly + +clearly +%%%% +hits_or_misses + +hits + +misses +%%%% +tune_or_melody + +tune + +melody +%%%% +unpleasant_or_sudden + +an unpleasant + +a sudden +%%%% +demise_or_death + +demise + +death +%%%% +questionable + +questionable + +doubtful +%%%% +double_or_triple + +double + +triple +%%%% \ No newline at end of file diff --git a/crawl-ref/source/dat/database/speak.txt b/crawl-ref/source/dat/database/speak.txt index b00ac3f199..5828d7b9b7 100644 --- a/crawl-ref/source/dat/database/speak.txt +++ b/crawl-ref/source/dat/database/speak.txt @@ -1806,506 +1806,3 @@ yak @The_monster@ snorts and paws the @surface@. %%%% -############################################## -############################################## -# Weapons that make noises. -############################################## -# The Singing Sword loves to sing and sometimes talks. -singing sword - -w:4 -@weapon_sings@ - -w:1 -@weapon_talks@ - -%%%% -# Noisy weapons like to chatter and imitate dungeon noises. -noisy weapon - -w:2 -@weapon_talks@ - -w:1 -SOUND:You hear @weapon_noise@ -%%%% -# for the Singing Sword only! -weapon_sings - -#sings -@The_weapon@ hums a little @tune_or_melody@. - -@The_weapon@ breaks into glorious song! - -@The_weapon@ sings. - -@The_weapon@ sings loudly. - -@The_weapon@ sings off-key. - -@The_weapon@ sings, "Tra-la-la..." - -@The_weapon@ sings a lullaby. - -@The_weapon@ whines plaintively. - -@The_weapon@ wails mournfully. - -@The_weapon@ practices its scales. - -@The_weapon@ lilts tunefully. - -@The_weapon@ yodels. - -@The_weapon@ hums tunelessly. - -@The_weapon@ makes a painfully high-pitched squeak. - -@The_weapon@ sings a sudden staccato note. - -@The_weapon@ sings a catchy @tune_or_melody@. - -@The_weapon@ hums a slow waltz. - -@The_weapon@ whistles merrily. - -#Beethoven -@The_weapon@ goes "Da-da-da-dum". - -@The_weapon@ chants serenely. - -@The_weapon@ trills happily. - -@The_weapon@ chants a little melody. - -@The_weapon@ sings a deeply moving song. - -@The_weapon@ hums an eerie @tune_or_melody@. - -@The_weapon@ hums a slow and mournful tune. - -@The_weapon@ launches into yet another solo. - -@The_weapon@ strikes up a merry @tune_or_melody@. - -@The_weapon@ emits a series of high-pitched trills. - -@The_weapon@ composes a new song. - -@The_weapon@ makes a sound as if to clear its throat. - -@The_weapon@ sings a quivering drawn-out note. - -@The_weapon@ sings a little jingle. - -@The_weapon@ strikes up a funeral march. - -@The_weapon@ merrily whistles a melody. - -In a hysterical voice, @the_weapon@ strikes up a march. - -@The_weapon@ sings @several@ chords at once. - -@The_weapon@ trains the @kind_of_scales@ scales. - -@The_weapon@ pulls out all the stops. - -@The_weapon@ sets up a furious crescendo. - -@The_weapon@ plays a requiem for the unknown sword. - -@The_weapon@ strikes up a @dance@. - -@The_weapon@ intones @an_aria_or_fugue@. - -@The_weapon@ @nearly_or_clearly@ @hits_or_misses@ the concert pitch. - -#imitates instruments -@The_weapon@ makes a twanging sound. - -@The_weapon@ chimes melodiously. - -@The_weapon@ chimes harmoniously. - -@The_weapon@ makes beautiful music. - -@The_weapon@ produces a loud orchestral chord. - -@The_weapon@ tinkles. - -@The_weapon@ rings like a bell. - -@The_weapon@ imitates a saxophone. - -@The_weapon@ chimes like a gong. - -@The_weapon@ applauds itself. - -@The_weapon@ goes toot-toot! - -@The_weapon@ does a drum roll. - -@The_weapon@ holds a dissonant chord. - -@The_weapon@ beats time. - -#speaks -@The_weapon@ says, "Hi! I'm the Singing Sword!" - -@The_weapon@ shouts, "Sing along with me!" - -@The_weapon@ shouts, "One, two, three..." - -@The_weapon@ spouts musical wisdom. - -@The_weapon@ chants, "I am golden and pointed, and with blood well anointed." - -@The_weapon@ dictates a lengthy tome entitled 'The Well-Tempered Blade'. - -@The_weapon@ @points_out@ the lack of singing @not_swords@. - -@The_weapon@ embarks on a lenghty monologue about murderous music. - -@The_weapon@ curses its smith: "I was supposed to be the Stinging Sword!" - -@The_weapon@ muses how they don't make such fine swords anymore. - -@The_weapon@ tries to improvise rhymes, and fails miserably. - -@The_weapon@ complains about @double_or_triple@ swords. - -@The_weapon@ derides short swords. - -@The_weapon@ yells, "Ploughshares to swords!" and giggles. - -@The_weapon@ chants, "Rather stab than club, rather slice than rub!" - -# end Singing Sword -%%%% -# general chatter for noisy weapons, -# including Singing Sword -weapon_talks - -#speaks -@Your_weapon@ shouts, "Whoopee!" - -@Your_weapon@ argues with itself. - -@Your_weapon@ complains about the scenery. - -@Your_weapon@ says, "I'm bored." - -@Your_weapon@ shouts out instructions! - -@Your_weapon@ says, "Ssh! Did you hear that?" - -@Your_weapon@ cheers you on. - -@Your_weapon@ calls out a warning! - -@Your_weapon@ hurls insults at you. - -@Your_weapon@ chatters happily. - -@Your_weapon@ recites a poem. - -@Your_weapon@ prattles on and on. - -@Your_weapon@ regales you with its life story. - -@Your_weapon@ speaks gibberish. - -@Your_weapon@ raves incoherently. - -@Your_weapon@ shouts, "Help!" - -@Your_weapon@ happily shouts, "Violence is virtue, silence is sin." - -@Your_weapon@ says, "They will have to pry me from your cold, dead hands." - -@Your_weapon@ longs back for the days in the arena. - -#song by the Misfits -@Your_weapon@ asks plaintively, "Mommy, can I go out and kill tonight?" - -@Your_weapon@ cries, "Don't ditch me yet! I promise to be forever silent." - -@Your_weapon@ amuses itself with detailed descriptions of past executions. - -@Your_weapon@ wails, "I am too young to rust!" - -@Your_weapon@ wishes everyone in the dungeon @unpleasant_or_sudden@ @demise_or_death@. - -@Your_weapon@ fumes, "Being battered, bent and broken sure is better than this boredom!" - -@Your_weapon@ yells, "No battle, no fun!" - -@Your_weapon@ shouts, "This level is mine! Um, ours." - -@Your_weapon@ cracks jokes of @questionable@ humour. - -@Your_weapon@ dwells on sagas on the glory of old. - -@Your_weapon@ belts out, "Dying in battle is most honourable!" - -@Your_weapon@ gleefully confesses its misdeeds. - -@Your_weapon@ groans, "That's what you call fighting?" - -@Your_weapon@ shouts, "Left! No, no, right!". - -@Your_weapon@ says, "How I wish you were a better fighter." - -@Your_weapon@ grouses, "Could you please kill something? I'm itching all over." - -@Your_weapon@ shouts, "Make war, not love!" - -#makes noises -@Your_weapon@ growls menacingly. - -@Your_weapon@ sputters and hisses. - -@Your_weapon@ hollers! - -@Your_weapon@ pants and wheezes. - -@Your_weapon@ barks abruptly. - -@Your_weapon@ sighs. - -@Your_weapon@ wails. - -@Your_weapon@ howls with laughter! - -@Your_weapon@ laughs crazily. - -@Your_weapon@ burps! - -@Your_weapon@ goes snicker-snack! - -@Your_weapon@ lets out a mournful sigh. - -@Your_weapon@ yells in some weird language. - -@Your_weapon@ makes a horrible noise. - -@Your_weapon@ makes a deep moaning sound. - -@Your_weapon@ gives off a wolf whistle. - -@Your_weapon@ wails. - -@Your_weapon@ giggles. - -@Your_weapon@ lets out a whoop! - -@Your_weapon@ yawns loudly. - -@Your_weapon@ intones a prayer. - -@Your_weapon@ cries out! - -@Your_weapon@ swears loudly. - -@Your_weapon@ inquires about your family. - -@Your_weapon@ coughs loudly. - -@Your_weapon@ burbles away merrily. - -@Your_weapon@ gurgles. - -@Your_weapon@ suddenly shrieks! - -@Your_weapon@ cackles. - -@Your_weapon@ warbles. - -@Your_weapon@ suddenly bursts into laughter! - -@Your_weapon@ snorts. - -@Your_weapon@ comments on the weather. - -@Your_weapon@ makes a deep, guttural noise. - -@Your_weapon@ gives off a sizzling sound. - -@Your_weapon@ whistles innocently. - -@Your_weapon@ makes a popping sound. - -@Your_weapon@ yelps loudly! - -@Your_weapon@ lets out a series of bird calls. - -# end weapon chatter -%%%% -# noises for weapons with NOISES property (not Singing Sword!) -weapon_noise - -#dungeon noises -a shout. - -an angry hiss. - -a high-pitched scream! - -a roar! - -a hideous shriek! - -a piteous moan. - -a screech! - -a bellow! - -a loud, deep croak! - -an angry buzzing noise. - -an irritating high-pitched whine. - -a splashing noise. - -a sizzling sound. - -a loud clanging noise! - -a grinding noise. - -a mighty clap of thunder! - -a hideous screaming! - -a bark! - -a rumbling sound. - -a crunching sound. - -a distant "Zot"! - -the distant roaring of an enraged frog. - -# other noises, usually not found in the dungeon -a voice call your name. - -a very strange noise. - -someone snoring. - -the sound of rushing water. - -someone calling for help! - -strange voices. - -a knock. - -maniacal laughter. - -snatches of song. - -a twanging sound. - -the chiming of a distant gong. - -the tinkle of an enormous bell. - -an echo. - -the wailing of sirens. - -a flourish of trumpets! - -# end weapon noises -%%%% -#synonyms for weapon noises -several - -several - -three or four - -a multitude of -%%%% -kind_of_scales - -pentatonic - -chromatic - -diatonic -%%%% -not_swords - -clubs - -axes - -polearms -%%%% -points_out - -points out - -remarks in passing on -%%%% -dance - -bossanova - -waltz - -menuet -%%%% -an_aria_or_fugue - -an aria - -a fugue -%%%% -nearly_or_clearly - -nearly - -clearly -%%%% -hits_or_misses - -hits - -misses -%%%% -tune_or_melody - -tune - -melody -%%%% -unpleasant_or_sudden - -an unpleasant - -a sudden -%%%% -demise_or_death - -demise - -death -%%%% -questionable - -questionable - -doubtful -%%%% -double_or_triple - -double - -triple -%%%% diff --git a/crawl-ref/source/database.cc b/crawl-ref/source/database.cc index d222c31988..7d4b3abd22 100644 --- a/crawl-ref/source/database.cc +++ b/crawl-ref/source/database.cc @@ -27,6 +27,7 @@ db_list openDBList; DBM *descriptionDB; DBM *randartDB; +DBM *speakDB; // shout and speak databases are all generated from a single // text file in the data directory and stored as .db files in the @@ -35,7 +36,6 @@ DBM *randartDB; enum db_id { DB_SHOUT, - DB_SPEAK, DB_HELP, MAX_DBID }; @@ -52,7 +52,6 @@ struct SingleFileDB SingleFileDB singleFileDBs[MAX_DBID] = { SingleFileDB("shout"), - SingleFileDB("speak"), SingleFileDB("help") }; @@ -62,12 +61,16 @@ SingleFileDB singleFileDBs[MAX_DBID] = #define DATABASE_TXT_DIR "database" #define RANDART_BASE_NAME "randart" +#define SPEAK_BASE_NAME "speak" #define RANDART_DB (RANDART_BASE_NAME ".db") +#define SPEAK_DB (SPEAK_BASE_NAME ".db") static std::vector description_txt_paths(); static std::vector randart_txt_paths(); +static std::vector speak_txt_paths(); static void generate_description_db(); static void generate_randart_db(); +static void generate_speak_db(); static void store_text_db(const std::string &in, const std::string &out); static DBM *get_dbm(db_id id); @@ -111,6 +114,25 @@ void databaseSystemInit() end(1, true, "Failed to open DB: %s", randartPath.c_str()); } + if (!speakDB) + { + std::string speakPath = get_savedir_path(SPEAK_DB); + std::vector textPaths = speak_txt_paths(); + + // If any of the speech text files are newer then + // aggregated speak db, then regenerate the whole db + for (int i = 0, size = textPaths.size(); i < size; i++) + if (is_newer(textPaths[i], speakPath)) + { + generate_speak_db(); + break; + } + + speakPath.erase(speakPath.length() - 3); + if (!(speakDB = openDB(speakPath.c_str()))) + end(1, true, "Failed to open DB: %s", speakPath.c_str()); + } + for (unsigned int i = 0; i < MAX_DBID; i++) { if (singleFileDBs[i].db) @@ -154,6 +176,7 @@ void databaseSystemShutdown() openDBList.clear(); descriptionDB = NULL; randartDB = NULL; + speakDB = NULL; } //////////////////////////////////////////////////////////////////////////// @@ -647,6 +670,46 @@ static void generate_randart_db() DO_CHMOD_PRIVATE(full_db_path.c_str()); } +static std::vector speak_txt_paths() +{ + std::vector txt_file_names; + std::vector paths; + + txt_file_names.push_back("speak"); // monster speech + txt_file_names.push_back("noise"); // noisy weapon speech + txt_file_names.push_back("insult"); // imp/demon taunts + + for (int i = 0, size = txt_file_names.size(); i < size; i++) + { + std::string name = DATABASE_TXT_DIR; + name += FILE_SEPARATOR; + name += txt_file_names[i]; + name += ".txt"; + + std::string txt_path = datafile_path(name); + + if (!txt_path.empty()) + paths.push_back(txt_path); + } + + return (paths); +} + +static void generate_speak_db() +{ + std::string db_path = get_savedir_path(SPEAK_BASE_NAME); + std::string full_db_path = get_savedir_path(SPEAK_DB); + + std::vector txt_paths = speak_txt_paths(); + + file_lock lock(get_savedir_path(SPEAK_BASE_NAME ".lk"), "wb"); + unlink( full_db_path.c_str() ); + + for (int i = 0, size = txt_paths.size(); i < size; i++) + store_text_db(txt_paths[i], db_path); + DO_CHMOD_PRIVATE(full_db_path.c_str()); +} + static DBM *get_dbm(db_id id) { DBM *ret = singleFileDBs[id].db; @@ -671,9 +734,12 @@ std::string getShoutString(const std::string &monst, // Speak DB specific functions. std::string getSpeakString(const std::string &monst) { + if (!speakDB) + return (""); + int num_replacements = 0; - return getRandomizedStr(get_dbm(DB_SPEAK), monst, "", num_replacements); + return getRandomizedStr(speakDB, monst, "", num_replacements); } ///////////////////////////////////////////////////////////////////////////// diff --git a/crawl-ref/source/insult.cc b/crawl-ref/source/insult.cc deleted file mode 100644 index 1c7384aaac..0000000000 --- a/crawl-ref/source/insult.cc +++ /dev/null @@ -1,689 +0,0 @@ -// insult generator -// Josh Fishman (c) 2001, All Rights Reserved -// This file is released under the GNU GPL, but special permission is granted -// to link with Linley Henzel's Dungeon Crawl (or Crawl) without change to -// Crawl's license. -// -// Modified for Crawl Reference by $Author$ on $Date$ -// -// The goal of this stuff is catachronistic feel. - -#include "AppHdr.h" - -#include -#include -#include -#include - -#include "externs.h" -#include "insult.h" -#include "mon-util.h" -#include "stuff.h" - -static const char* insults1(void); -static const char* insults2(void); -static const char* insults3(void); -static const char* run_away(void); -static const char* give_up(void); -static const char* meal(void); -static const char* whilst_thou_can(void); -static const char* important_body_part(void); -static const char* important_spiritual_part(void); - -static void init_cap(char *); - -void init_cap(char * str) -{ - if (str != NULL) - str[0] = toupper( str[0] ); -} - -std::string imp_taunt_str() -{ - char buff[80]; - snprintf( buff, sizeof(buff), - "%s, thou %s!", - random2(7) ? run_away() : give_up(), - generic_insult() ); - init_cap( buff ); - - return (buff); -} - -void imp_taunt( const monsters *mons ) -{ - std::string str = imp_taunt_str(); - std::string mon_name = mons->name(DESC_CAP_THE); - - - // XXX: Not pretty, but stops truncation... - if (mon_name.length() + 11 + str.length() >= 79) - { - mprf(MSGCH_TALK, "%s shouts:", mon_name.c_str() ); - mprf(MSGCH_TALK, "%s", str.c_str() ); - } - else - { - mprf(MSGCH_TALK, "%s shouts, \"%s\"", mon_name.c_str(), - str.c_str() ); - } -} - -std::string demon_taunt_str() -{ - char buff[80]; - if (coinflip()) - { - snprintf( buff, sizeof(buff), - "%s, thou %s!", - random2(3) ? give_up() : run_away(), - generic_insult() ); - } - else - { - switch( random2( 4 ) ) - { - case 0: - snprintf( buff, sizeof(buff), - "Thy %s shall be my %s!", - random2(4) ? important_body_part() - : important_spiritual_part(), meal() ); - break; - case 1: - snprintf( buff, sizeof(buff), - "%s, thou tasty %s!", give_up(), meal() ); - break; - case 2: - snprintf( buff, sizeof(buff), - "%s %s!", run_away(), whilst_thou_can() ); - break; - case 3: - snprintf( buff, sizeof(buff), - "I %s %s thy %s!", - coinflip() ? "will" : "shall", - coinflip() ? "feast upon" : "devour", - random2(4) ? important_body_part() - : important_spiritual_part() ); - break; - default: - snprintf( buff, sizeof(buff), "Thou %s!", generic_insult() ); - break; - } - } - - init_cap( buff ); - - return (buff); -} - -void demon_taunt( const monsters *mons ) -{ - std::string str = demon_taunt_str(); - const std::string mon_name = mons->name(DESC_CAP_THE); - - static const char * sound_list[] = - { - "says", // actually S_SILENT - "shouts", - "barks", - "shouts", - "roars", - "screams", - "bellows", - "screeches", - "buzzes", - "moans", - "whines", - "croaks", - "growls", - "hisses", - "breathes", // S_VERY_SOFT - "whispers", // S_SOFT - "says", // S_NORMAL - "shouts", // S_LOUD - "screams" // S_VERY_LOUD - }; - - const char *voice = sound_list[ mons_shouts(mons->type) ]; - - // XXX: Not pretty, but stops truncation... - if (mon_name.length() + strlen(voice) + str.length() + 5 >= 79) - { - mprf(MSGCH_TALK, "%s %s:", mon_name.c_str(), voice ); - mprf(MSGCH_TALK, "%s", str.c_str()); - } - else - { - mprf(MSGCH_TALK, "%s %s, \"%s\"", mon_name.c_str(), voice, - str.c_str() ); - } -} - -const char * generic_insult(void) -{ - static char buffer[80]; //FIXME: use string objects or whatnot - - strcpy(buffer, insults1()); - strcat(buffer, " "); - strcat(buffer, insults2()); - strcat(buffer, " "); - strcat(buffer, insults3()); - - return (buffer); -} - -static const char * important_body_part(void) -{ - static const char * part_list[] = { - "head", - "brain", - "heart", - "viscera", - "eyes", - "lungs", - "liver", - "throat", - "neck", - "skull", - "spine", - }; - - return (part_list[random2(sizeof(part_list) / sizeof(char *))]); -} - -static const char * important_spiritual_part(void) -{ - static const char * part_list[] = { - "soul", - "spirit", - "inner light", - "hope", - "faith", - "will", - "heart", - "mind", - "sanity", - "fortitude", - "life force", - }; - - return (part_list[random2(sizeof(part_list) / sizeof(char *))]); -} - -static const char * meal(void) -{ - static const char * meal_list[] = { - "meal", - "breakfast", - "lunch", - "dinner", - "supper", - "repast", - "snack", - "victuals", - "refection", - "junket", - "luncheon", - "snackling", - "curdle", - "snacklet", - "mouthful", - }; - - return (meal_list[random2(sizeof(meal_list) / sizeof(char *))]); -} - -static const char * run_away(void) -{ - static const char * run_away_list[] = { - "give up", - "quit", - "run away", - "escape", - "flee", - "fly", - "take thy face hence", - "remove thy stench", - "go and return not", - "get thee hence", - "back with thee", - "away with thee", - "turn tail", - "leave", - "return whence thou came", - "begone", - "get thee gone", - "get thee hence", - "slither away", - "slither home", - "slither hence", - "crawl home", - "scamper home", - "scamper hence", - "scamper away", - "bolt", - "decamp", - }; - - return (run_away_list[random2(sizeof(run_away_list) / sizeof(char *))]); -} - -static const char * give_up(void) -{ - static const char * give_up_list[] = { - "give up", - "give in", - "quit", - "surrender", - "kneel", - "beg for mercy", - "despair", - "submit", - "succumb", - "quail", - "embrace thy failure", - "embrace thy fall", - "embrace thy doom", - "embrace thy dedition", - "embrace submission", - "accept thy failure", - "accept thy fall", - "accept thy doom", - "capitulate", - "tremble", - "relinquish hope", - "taste defeat", - "despond", - "disclaim thyself", - "abandon hope", - "face thy requiem", - "face thy fugue", - "admit defeat", - "flounder", - }; - - return (give_up_list[random2(sizeof(give_up_list) / sizeof(char *))]); -} - -static const char * whilst_thou_can(void) -{ - static const char * threat_list[] = { - "whilst thou can", - "whilst thou may", - "whilst thou are able", - "if wit thou hast", - "whilst thy luck holds", - "before doom catcheth thee", - "lest death find thee", - "whilst thou art whole", - "whilst life thou hast", //jmf: hmm. screen vs. this for undead? - }; - - return (threat_list[random2(sizeof(threat_list) / sizeof(char *))]); -} - -static const char * insults1(void) -{ - static const char * insults1_list[] = { - "artless", - "baffled", - "bawdy", - "beslubbering", - "bootless", - "bumbling", - "canting", - "churlish", - "cockered", - "clouted", - "craven", - "currish", - "dankish", - "dissembling", - "droning", - "ducking", - "errant", - "fawning", - "feckless", - "feeble", - "fobbing", - "foppish", - "froward", - "frothy", - "fulsome", - "gleeking", - "goatish", - "gorbellied", - "grime-gilt", - "horrid", - "hateful", - "impertinent", - "infectious", - "jarring", - "loggerheaded", - "lumpish", - "mammering", - "mangled", - "mewling", - "odious", - "paunchy", - "pribbling", - "puking", - "puny", - "qualling", - "quaking", - "rank", - "pandering", - "pecksniffian", - "plume-plucked", - "pottle-deep", - "pox-marked", - "reeling-ripe", - "rough-hewn", - "simpering", - "spongy", - "surly", - "tottering", - "twisted", - "unctious", - "unhinged", - "unmuzzled", - "vain", - "venomed", - "villainous", - "warped", - "wayward", - "weedy", - "worthless", - "yeasty", - }; - - return (insults1_list[random2(sizeof(insults1_list) / sizeof(char*))]); -} - -static const char * insults2(void) -{ - static const char * insults2_list[] = { - "base-court", - "bat-fowling", - "beef-witted", - "beetle-headed", - "boil-brained", - "clapper-clawed", - "clay-brained", - "common-kissing", - "crook-pated", - "dismal-dreaming", - "ditch-delivered", - "dizzy-eyed", - "doghearted", - "dread-bolted", - "earth-vexing", - "elf-skinned", - "fat-kidneyed", - "fen-sucked", - "flap-mouthed", - "fly-bitten", - "folly-fallen", - "fool-born", - "full-gorged", - "guts-griping", - "half-faced", - "hasty-witted", - "hedge-born", - "hell-hated", - "idle-headed", - "ill-breeding", - "ill-nurtured", - "kobold-kissing", - "knotty-pated", - "limp-willed", - "milk-livered", - "moon-mazed", - "motley-minded", - "onion-eyed", - "miscreant", - "roguish", - "moldwarp", - "ruttish", - "mumble-news", - "saucy", - "nut-hook", - "spleeny", - "pigeon-egg", - "rude-growing", - "rump-fed", - "shard-borne", - "sheep-biting", - "sow-suckled", - "spur-galled", - "swag-bellied", - "tardy-gaited", - "tickle-brained", - "toad-spotted", - "toenail-biting", - "unchin-snouted", - "weather-bitten", - "weevil-witted", - }; - - return (insults2_list[random2(sizeof(insults2_list) / sizeof(char*))]); -} - -static const char * insults3(void) -{ - static const char * insults3_list[] = { - "apple-john", - "baggage", - "bandersnitch", - "barnacle", - "beggar", - "bladder", - "boar-pig", - "bounder", - "bugbear", - "bum-bailey", - "canker-blossom", - "clack-dish", - "clam", - "clotpole", - "coxcomb", - "codpiece", - "death-token", - "dewberry", - "dingleberry", - "flap-bat", - "flax-wench", - "flirt-gill", - "foot-licker", - "fustilarian", - "giglet", - "gnoll-tail", - "gudgeon", - "guttersnipe", - "haggard", - "harpy", - "hedge-pig", - "horn-beast", - "hugger-mugger", - "joithead", - "lewdster", - "lout", - "maggot-pie", - "malt-worm", - "mammet", - "measle", - "mendicant", - "minnow reeky", - "mule", - "nightsoil", - "nobody", - "nothing", - "pigeon-egg", - "pignut", - "pimple", - "pustule", - "puttock", - "pumpion", - "ratsbane", - "scavenger", - "scut", - "serf", - "simpleton", - "skainsmate", - "slime mold", - "snaffler", - "snake-molt", - "strumpet", - "surfacer", - "tinkerer", - "tiddler", - "urchin", - "varlet", - "vassal", - "vulture", - "wastrel", - "wagtail", - "whey-face", - "wormtrail", - "yak-dropping", - "zombie-fodder", - }; - - return (insults3_list[random2(sizeof(insults3_list) / sizeof(char*))]); -} - -// currently unused: -#if 0 -const char * racial_insult(void) -{ - static const char * food3[] = { - "snackling", - "crunchlet", - "half-meal", - "supper-setting", - "snacklet", - "noshlet", - "morsel", - "mug-up", - "bite-bait", - "crunch-chow", - "snack-pap", - "grub", - }; - - static const char * elf1[] = { - "weakly", - "sickly", - "frail", - "delicate", - "fragile", - "brittle", - "tender", - "mooning", - "painted", - "lily-hearted", - "dandy", - "featherweight", - "flimsy", - "rootless", - "spindly", - "puny", - "shaky", - "prissy", - }; - - static const char * halfling3[] = { - "half-pint", - "footstool", - "munchkin", - "side-stool", - "pudgelet", - "groundling", - "burrow-snipe", - "hole-bolter", - "low-roller", - "runt", - "peewee", - "mimicus", - "manikin", - "hop-o-thumb", - "knee-biter", - "burrow-botch", - "hole-pimple", - "hovel-pustule", - }; - - static const char * spriggan3[] = { - "rat-rider", - "mouthfull", - "quarter-pint", - "nissette", - "fizzle-flop", - "spell-botch", - "feeblet", - "weakling", - "pinchbeck-pixie", - "ankle-biter", - "bootstain", - "nano-nebbish", - "sopling", - "shrunken violet", - "sissy-prig", - "pussyfoot", - "creepsneak", - }; - - static const char * dwarf2[] = { - "dirt-grubbing", - "grit-sucking", - "muck-plodding", - "stone-broke", - "pelf-dandling", - "fault-botching", - "gravel-groveling", - "boodle-bothering", - "cabbage-coddling", - "rhino-raveling", - "thigh-biting", - "dirt-delving", - }; - - static const char * kenku2[] = { - "hollow-boned", - "feather-brained", - "beak-witted", - "hen-pecked", - "lightweight", - "frail-limbed", - "bird-brained", - "featherweight", - "pigeon-toed", - "crow-beaked", - "magpie-eyed", - "mallardish", - }; - - static const char * minotaur3[] = { - "bull-brain", - "cud-chewer", - "calf-wit", - "bovine", - //"mooer", // of Venice - "cow", - "cattle", - "meatloaf", - "veal", - "meatball", - "rump-roast", - "briscut", - "cretin", - "walking sirloin", - }; - - switch (you.species) - { - default: - break; - } -} -#endif diff --git a/crawl-ref/source/insult.h b/crawl-ref/source/insult.h deleted file mode 100644 index adeed139f3..0000000000 --- a/crawl-ref/source/insult.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef INSULT_H -#define INSULT_H - -#include "externs.h" - -void imp_taunt( const monsters *mons ); -void demon_taunt( const monsters *mons ); -const char * generic_insult(void); -const char * racial_insult(void); - -std::string imp_taunt_str(); -std::string demon_taunt_str(); - -#endif diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index ba07ef0b95..fa3b93b271 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -31,12 +31,12 @@ #include "externs.h" #include "beam.h" +#include "database.h" #include "debug.h" #include "delay.h" #include "dgnevent.h" #include "fight.h" #include "ghost.h" -#include "insult.h" #include "itemname.h" #include "itemprop.h" #include "items.h" @@ -5383,6 +5383,25 @@ void mon_enchant::set_duration(const monsters *mons, const mon_enchant *added) maxduration = duration; } +static std::string get_species_insult(const std::string type) +{ + std::string lookup = "insult "; + // get species genus + lookup += species_name(you.species, 1, true); + lookup += " "; + lookup += type; + + std::string insult = getSpeakString(lowercase(lookup)); + if (insult.empty()) // species too specific? + { + lookup = "insult general "; + lookup += type; + insult = getSpeakString(lookup); + } + + return (insult); +} + // Replaces the "@foo@" strings in monster shout and monster speak // definitions. std::string do_mon_str_replacements(const std::string &in_msg, @@ -5474,8 +5493,10 @@ std::string do_mon_str_replacements(const std::string &in_msg, msg = replace_all(msg, "@possessive@", monster->pronoun(PRONOUN_NOCAP_POSSESSIVE)); - msg = replace_all(msg, "@imp_taunt@", imp_taunt_str()); - msg = replace_all(msg, "@demon_taunt@", demon_taunt_str()); + // replace with species specific insults + msg = replace_all(msg, "@species_insult_adj1@", get_species_insult("adj1")); + msg = replace_all(msg, "@species_insult_adj2@", get_species_insult("adj2")); + msg = replace_all(msg, "@species_insult_noun@", get_species_insult("noun")); static const char * sound_list[] = { diff --git a/crawl-ref/source/monspeak.cc b/crawl-ref/source/monspeak.cc index dbf428ed2a..2b7e403e79 100644 --- a/crawl-ref/source/monspeak.cc +++ b/crawl-ref/source/monspeak.cc @@ -27,7 +27,6 @@ #include "debug.h" #include "fight.h" #include "ghost.h" -#include "insult.h" #include "itemname.h" #include "message.h" #include "misc.h" diff --git a/crawl-ref/source/randart.cc b/crawl-ref/source/randart.cc index ec38bcea9f..a7c06c1a05 100644 --- a/crawl-ref/source/randart.cc +++ b/crawl-ref/source/randart.cc @@ -203,6 +203,12 @@ static std::string replace_name_parts(const std::string name_in, name = replace_all(name, "@god_name@", god_name(which_god, false)); } + // copied from monster speech handling (mon-util.cc): + // The proper possessive for a word ending in an "s" is to + // put an apostrophe after the "s": "Chris" -> "Chris'", + // not "Chris" -> "Chris's". Stupid English language... + name = replace_all(name, "s's", "s'"); + return name; } -- cgit v1.2.3-54-g00ecf