of dolorous' fabulous blessing routines.
Allow the possibility of naming monsters: A monster's random name seed is stored in its number property, and the actual name gets picked from randname.txt. (Once this leaves the experimental stage I'll move them into a file of their own.) This means that monster types that already use number for something else (hydras for #heads, manticores for #spikes, or zombies for monster type) cannot be named.
Use the new functions for naming orcs blessed by Beogh. Only non-generic orcs may get named, e.g. orcs promoted to priesthood or orc warriors that get their weapon enchanted.
I tried to come up with a number of thematic orcish names, and if anyone would like to contribute, they're welcome to do so.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4586 c06c8d41-db1a-0410-9941-cceddc491573
47NSOFQMBZCDIBHEAZSENFUGDSQCX3GJHFBUZ65ARDKCYIZ435LAC DCNRR5IHKWAVY4MSSJ7KHFVH6EHVZEJPVNKIA54QPRJFZ7MHIZQAC SMYBWDAHD74PCW5WLNAWZA3FL6AXFEMVLOMD3OKY2Z4VWQGFNLQAC VOR2QOT3R3BC3H74GMW4PUBY77QBJXE5QGQNBIINBE3MPSH6CXWQC GRWDBVQM7X6QS7EW5PU5WQNOMR46H5ITKU57J3ZVJPIL3ILXIYPAC 552IZM3UEUREZJ5JCIIBVJZT3P3B342HRWSDWZGMHWXCIXNI3TRAC PEP66UHHARYWVV7DJK5MEGL4QISC2EYSVMOL36FKUNQODGTMNUVAC PI5BATR2SER3RFE76IUGHM2AGXVFOUM3PLU7WC2K2Q2BA5K2E73QC PRAEZIJQO6PNMV5XLOGPEHJNAFS2WL6F6NHI5APDNWVBSNKTMX4AC IJHH3PPN3KL6CXDXOB4I7VBEHHQJXXIKRZN45CT4DX5PQGER5REAC PCZU6R5IXBVWZ3TALJJNEBBLWSAVQGFFIMRTILFSCEP76ZD4OLQAC 62CWUC7WKYRODVOOUFHRPDZXGTBUIU7XPR3EHJWESPG2XVUM7SDAC K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC NLQNXH3SVJ52CWXEV35FSSZP32VHC4QFGN3HINF4KO5GZHZM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ses %s%s with %s.",pronoun.c_str(), blessed.c_str(), result.c_str());
std::string whom = get_unique_monster_name(mon);if (whom.empty())whom = pronoun + blessed;snprintf(info, INFO_SIZE, " blesses %s with %s.",whom.c_str(), result.c_str());
snprintf( buff, sizeof(buff), "%s%s",monster->name(descrip).c_str(), event );
std::string name = get_unique_monster_name(monster);if (name.empty())name = monster->name(descrip);snprintf( buff, sizeof(buff), "%s%s", name.c_str(), event );
std::string mons_type_name(int type, description_level_type desc );
std::string mons_type_name(int type, description_level_type desc);bool give_unique_monster_name(monsters *mon, bool orc_only = true);std::string get_unique_monster_name(const monsters *mon);
if ( result.length() >= 3 &&(result[0] == 'a' || result[0] == 'A') &&result[1] == ' ' &&is_vowel(result[2]) )
if ( result.length() >= 3&& (result[0] == 'a' || result[0] == 'A')&& result[1] == ' '&& is_vowel(result[2]) )
}// Fills the number parameter (if not otherwise needed) with a seed for// random name choice from randname.txt.bool give_unique_monster_name(monsters *mon, bool higher_orcs_only){// already have a nameif (mons_is_unique(mon->type) || mon->type == MONS_PLAYER_GHOST|| mon->type == MONS_PANDEMONIUM_DEMON){return false;}// need their number parameter for other informationif (mon->type == MONS_HYDRA // #heads|| mon->type == MONS_ABOMINATION_SMALL // colour|| mon->type == MONS_ABOMINATION_LARGE // colour|| mon->type == MONS_MANTICORE // #spikes|| mons_genus(mon->type) == MONS_DRACONIAN // subspecies|| mons_class_is_zombified(mon->type)) // zombie type{return false;}// Since this is called from the various divine blessing routines,// don't bless non-orcs, and don't bless plain orcs, either.if (higher_orcs_only&& (mons_species(mon->type) != MONS_ORC || mon->type == MONS_ORC)){return false;}// already has a unique nameif (mon->number > 0 && mon->number != MONS_PROGRAM_BUG)return false;// randomly pick a number// XXX: Why does unsigned int (number's type) get munged on save & reload?mon->number = (unsigned char) random_int();// mprf(MSGCH_DIAGNOSTICS, "new monster number is %d", mon->number);return (mon->number != 0 && mon->number != MONS_PROGRAM_BUG);
std::string get_unique_monster_name(const monsters *mon){if (mons_is_unique(mon->type))return get_monster_data(mon->type)->name;if (mon->type == MONS_PLAYER_GHOST)return mon->ghost->name + "'s ghost";if (mon->type == MONS_PANDEMONIUM_DEMON)return mon->ghost->name;// Since the seed for the monster name is stored in mon->number// any monster that uses number for something else cannot be named.if (mon->type == MONS_HYDRA // #heads|| mon->type == MONS_ABOMINATION_SMALL // colour|| mon->type == MONS_ABOMINATION_LARGE // colour|| mon->type == MONS_MANTICORE // #spikes|| mons_genus(mon->type) == MONS_DRACONIAN // subspecies|| mons_class_is_zombified(mon->type)) // zombie type{return "";}// unnamed, sorryif (mon->number <= 0 || mon->number == MONS_PROGRAM_BUG)return "";// mprf(MSGCH_DIAGNOSTICS, "get name from number %d", mon->number);rng_save_excursion rng_state;seed_rng( mon->number );std::string name= getRandNameString(get_monster_data(mon->type)->name, " name");if (!name.empty())return name;name = getRandNameString(get_monster_data(mons_genus(mon->type))->name," name");if (!name.empty())return name;name = getRandNameString("generic_monster_name");return name;}
hit_dice = ghost->xl;hit_points = ghost->max_hp;max_hit_points = ghost->max_hp;ac = ghost->ac;ev = ghost->ev;speed = (one_chance_in(3) ? 10 : 8 + roll_dice(2, 9));
hit_dice = ghost->xl;hit_points = ghost->max_hp;max_hit_points = ghost->max_hp;ac = ghost->ac;ev = ghost->ev;speed = (one_chance_in(3) ? 10 : 8 + roll_dice(2, 9));
type = MONS_PLAYER_GHOST;hit_dice = ghost->xl;hit_points = ghost->max_hp;max_hit_points = ghost->max_hp;ac = ghost->ac;ev = ghost->ev;speed = ghost->speed;
type = MONS_PLAYER_GHOST;hit_dice = ghost->xl;hit_points = ghost->max_hp;max_hit_points = ghost->max_hp;ac = ghost->ac;ev = ghost->ev;speed = ghost->speed;
attitude = ATT_HOSTILE;behaviour = BEH_WANDER;flags = 0;foe = MHITNOT;foe_memory = 0;colour = mons_class_colour(MONS_PLAYER_GHOST);number = MONS_PROGRAM_BUG;
attitude = ATT_HOSTILE;behaviour = BEH_WANDER;flags = 0;foe = MHITNOT;foe_memory = 0;colour = mons_class_colour(MONS_PLAYER_GHOST);number = MONS_PROGRAM_BUG;
flags = 0;experience = 0L;type = -1;hit_points = 0;max_hit_points = 0;hit_dice = 0;ac = 0;ev = 0;
flags = 0;experience = 0L;type = -1;hit_points = 0;max_hit_points = 0;hit_dice = 0;ac = 0;ev = 0;
if (monster->attitude == ATT_FRIENDLY && !mons_is_unique(monster->type)&& player_monster_visible(monster))
std::string name = get_unique_monster_name(monster);if (!name.empty() && player_monster_visible(monster)){msg = replace_all(msg, "@the_something@", name);msg = replace_all(msg, "@The_something@", name);msg = replace_all(msg, "@the_monster@", name);msg = replace_all(msg, "@The_monster@", name);}else if (monster->attitude == ATT_FRIENDLY && !mons_is_unique(monster->type)&& player_monster_visible(monster))
static bool _force_suitable(const monsters *mon){return (mon->alive());}void debug_apply_monster_blessing(monsters* mon){mpr("Apply blessing of (B)eogh, The (S)hining One, or (R)andomly?",MSGCH_PROMPT);char type = (char) getchm(KC_DEFAULT);type = tolower(type);if (type != 'b' && type != 's' && type != 'r'){canned_msg( MSG_OK );return;}god_type god = GOD_NO_GOD;if (type == 'b' || type == 'r' && coinflip())god = GOD_BEOGH;elsegod = GOD_SHINING_ONE;if (!bless_follower(mon, god, _force_suitable, true))mprf("%s won't bless this monster for you!", god_name(god).c_str());}#endif#ifdef WIZARD
############################################### monster names##############################################orc name# Some important syllables# beogh, bog = referring to Beogh# ork, orc, org, ok, oc, og (and more) = referring to orcs## Other syllables may be borrowed from real life, or made up.AlbeoghBogbart# slavic name, meaning "god's gift" :)Bogdan# Obvious references to BeoghBogdarBogmarBogwardBogwikMorbeoghSharbog# Obvious references to orcs in generalAlorkBorukMarborkMilorkOkristOregOrikOrkrulOrkwinOruk# OtherAgrik
ArboltArkwarBeroldDorogGorbashGorgLearukMargrimMorunMurdoNorbakOlfikOlfrunWardokWorakWulfocZoruk%%%%