git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2569 c06c8d41-db1a-0410-9941-cceddc491573
M5ZDZJBTOJ7SWQPZZQPC24JYZKP26MWSRDHXBWQE2MPPL6WCXOIQC CC5NTNYE2VPD25CVJI6LL5TLZEGBGIL3PZEXKYXQDIVZGDLGBNOQC OVM7ZULJJ6Q23AQ747AWBGISGDQYCGF2NT5YTXKW633I56WIYZPQC CLIEHAE2PP7ZIGLLIMYCWM4FC54KBOAN5AILOLAZJ5S26GTJM4RQC ZBPZZ5A7AB2VFZKQ2UJXVDGUK22OCZJCEN2RWTGDGK3VXFCCDKVAC K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC RISMOCQM6BKK4XSIRKYLOBB2UPDYJNDAL6OGIIR5GGNZQAK5YSZAC 33ZMPQC6OXTESW7SRW765GRNJUEJRSYONRVZVIEUDAUEJ2PPMB4AC R22TTMI6WXWULC7ODKFF3QCB7MOTETQQ6IR4BUCUPOCQKQNCTT5AC P2ZCF3BBG523ZEOD6XQA4X5YEHBTWH3IM33YVHXP2SQ5POXZIH4QC RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC SDLKLUNFGVKDS55DDJZCBAVIB7NL3RRYPTACAY65SCUQKV6APFSAC LABXKXWWQY2V4FUDLGVTDYHXINAP6KRHZDHBQ2FE22FFOEIZPL6QC TAVHZJPVNJBZR7CUURAOYNDZPNVQ3AGHTXDEP5K4JGYETBLQJDRQC X2FMEN4E345XD26Z2X7JMJ7VGHOGCGIELMHQRE2ITLVNQACP3NOQC 7AMQN7MITMXBNVDAK5VOXTQ4TZIAOD6ZLOFJG7GQMBTY23Y2BKSAC ///////////////////////////////////////////////////////////////////////////*you.duration []: //jmf: obsolete, see enum.h instead//[ds] Well, can we lose it yet?0 - liquid flames1 - icy armour2 - repel missiles3 - prayer4 - regeneration5 - vorpal blade6 - fire brand7 - ice brand8 - lethal infusion9 - swiftness10 - insulation11 - stonemail12 - controlled flight13 - teleport14 - control teleport15 - poison weapon16 - resist poison17 - breathe something18 - transformation (duration)19 - death channel20 - deflect missiles*//* attributes0 - resist lightning1 - spec_air2 - spec_earth3 - control teleport4 - walk slowly (eg naga)5 - transformation (form)6 - Nemelex card gift countdown7 - Nemelex has given you a card table8 - How many demonic powers a dspawn has*//* armour list0 - wielded1 - cloak2 - helmet3 - gloves4 - boots5 - shield6 - body armour7 - ring 08 - ring 19 - amulet*/
// Note that this function only has the one static buffer, so if you// want to use the results, you'll want to make a copy.std::string species_name( int speci, int level, bool genus,bool adj, bool cap )// defaults: false false true
std::string species_name(species_type speci, int level, bool genus, bool adj)// defaults: false false
case SP_RED_DRACONIAN:strcpy( species_buff, "Red Draconian" );break;case SP_WHITE_DRACONIAN:strcpy( species_buff, "White Draconian" );break;case SP_GREEN_DRACONIAN:strcpy( species_buff, "Green Draconian" );break;case SP_GOLDEN_DRACONIAN:strcpy( species_buff, "Yellow Draconian" );break;case SP_GREY_DRACONIAN:strcpy( species_buff, "Grey Draconian" );break;case SP_BLACK_DRACONIAN:strcpy( species_buff, "Black Draconian" );break;case SP_PURPLE_DRACONIAN:strcpy( species_buff, "Purple Draconian" );break;case SP_MOTTLED_DRACONIAN:strcpy( species_buff, "Mottled Draconian" );break;case SP_PALE_DRACONIAN:strcpy( species_buff, "Pale Draconian" );break;
case SP_RED_DRACONIAN: res = "Red Draconian"; break;case SP_WHITE_DRACONIAN: res = "White Draconian"; break;case SP_GREEN_DRACONIAN: res = "Green Draconian"; break;case SP_GOLDEN_DRACONIAN: res = "Yellow Draconian"; break;case SP_GREY_DRACONIAN: res = "Grey Draconian"; break;case SP_BLACK_DRACONIAN: res = "Black Draconian"; break;case SP_PURPLE_DRACONIAN: res = "Purple Draconian"; break;case SP_MOTTLED_DRACONIAN: res = "Mottled Draconian"; break;case SP_PALE_DRACONIAN: res = "Pale Draconian"; break;
default:strcpy( species_buff, "Elf" );break;case SP_HIGH_ELF:strcpy( species_buff, "High Elf" );break;case SP_GREY_ELF:strcpy( species_buff, "Grey Elf" );break;case SP_DEEP_ELF:strcpy( species_buff, "Deep Elf" );break;case SP_SLUDGE_ELF:strcpy( species_buff, "Sludge Elf" );break;
case SP_HIGH_ELF: res = "High Elf"; break;case SP_GREY_ELF: res = "Grey Elf"; break;case SP_DEEP_ELF: res = "Deep Elf"; break;case SP_SLUDGE_ELF: res = "Sludge Elf"; break;default: res = "Elf"; break;
case SP_HUMAN:strcpy( species_buff, "Human" );break;case SP_HALFLING:strcpy( species_buff, "Halfling" );break;
case SP_HUMAN: res = "Human"; break;case SP_HALFLING: res = "Halfling"; break;case SP_KOBOLD: res = "Kobold"; break;case SP_MUMMY: res = "Mummy"; break;case SP_NAGA: res = "Naga"; break;// We've previously declared that these are radically// different from Ogres... so we're not going to// refer to them as Ogres. -- bwrcase SP_OGRE_MAGE: res = "Ogre-Mage"; break;case SP_CENTAUR: res = "Centaur"; break;case SP_SPRIGGAN: res = "Spriggan"; break;case SP_MINOTAUR: res = "Minotaur"; break;case SP_KENKU: res = "Kenku"; break;case SP_VAMPIRE: res = "Vampire"; break;
strcpy( species_buff, (adj) ? "Orcish" : (genus) ? "Orc": "Hill Orc" );break;case SP_KOBOLD:strcpy( species_buff, "Kobold" );break;case SP_MUMMY:strcpy( species_buff, "Mummy" );break;case SP_NAGA:strcpy( species_buff, "Naga" );break;case SP_GNOME:strcpy( species_buff, (adj) ? "Gnomish" : "Gnome" );break;case SP_OGRE:strcpy( species_buff, (adj) ? "Ogreish" : "Ogre" );break;case SP_TROLL:strcpy( species_buff, (adj) ? "Trollish" : "Troll" );break;case SP_OGRE_MAGE:// We've previously declared that these are radically// different from Ogres... so we're not going to// refer to them as Ogres. -- bwrstrcpy( species_buff, "Ogre-Mage" );
res = (adj ? "Orcish" : genus ? "Orc" : "Hill Orc");
case SP_CENTAUR:strcpy( species_buff, "Centaur" );break;case SP_DEMIGOD:strcpy( species_buff, (adj) ? "Divine" : "Demigod" );break;case SP_SPRIGGAN:strcpy( species_buff, "Spriggan" );break;case SP_MINOTAUR:strcpy( species_buff, "Minotaur" );break;case SP_DEMONSPAWN:strcpy( species_buff, (adj) ? "Demonic" : "Demonspawn" );break;case SP_GHOUL:strcpy( species_buff, (adj) ? "Ghoulish" : "Ghoul" );break;case SP_KENKU:strcpy( species_buff, "Kenku" );break;case SP_MERFOLK:strcpy( species_buff, (adj) ? "Merfolkian" : "Merfolk" );break;case SP_VAMPIRE:strcpy( species_buff, "Vampire" );break;default:strcpy( species_buff, (adj) ? "Yakish" : "Yak" );break;
case SP_GNOME: res = (adj ? "Gnomish" : "Gnome"); break;case SP_OGRE: res = (adj ? "Ogreish" : "Ogre"); break;case SP_TROLL: res = (adj ? "Trollish" : "Troll"); break;case SP_DEMIGOD: res = (adj ? "Divine" : "Demigod"); break;case SP_DEMONSPAWN: res = (adj ? "Demonic" : "Demonspawn" ); break;case SP_GHOUL: res = (adj ? "Ghoulish" : "Ghoul"); break;case SP_MERFOLK: res = (adj ? "Merfolkian" : "Merfolk"); break;default: res = (adj ? "Yakish" : "Yak"); break;
int prace = letter_to_species(race);return prace && prace != SP_UNKNOWN? species_name(prace, 1) : "Random";
species_type prace = letter_to_species(race);return prace != SP_UNKNOWN? species_name(prace, 1) : "Random";