Darkness". (More synonyms welcome!) Also, if a randart book is not a god gift occasionally give it an old owner anyway, using make_name() like for shopkeepers.
I might have fixed the Divination issue. (It looks like for some reason SPELL_NO_SPELL always returns true for Div, though I don't understand why. At least in all three cases where I had this the counter for Div spells was equal to 8 - spells in the book.)
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7849 c06c8d41-db1a-0410-9941-cceddc491573
CEZMQA2KOTLG7IO5QBVAM2OALIZJ45CFLNLCG3OQA6IX6URDCCYAC
UC6V7JDZ6CKQNL5AARWFJ4ZPX4ZYCO5J3FW52I52I3PBJO6T6VEAC
SA3XGRMUEO3K6T4TJJWMWV2SG3JCEGLBM7SAN4IQ5A4VVMHFBCKQC
FWNNTOEERPUKXPE4OC52UABFZLKIU3O5GRNNLDK4QI4HR2IOU36QC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
6F6OFJCUOBUP7QTVWSMSQPW25RLVRYVXO3VO5GLMFRY6K5RMOWFAC
CCRQESB4ADT4WA7FGLNZZXAJ6G5QMCTYCZIWORBN45P6ZPILC34AC
QO5ZJWQ3JK3PEGBPTQSAYIPEJEHG2M2KTD74227G5VG7DVXUL3BQC
NAC6PRRR6SLQHJ7JBBBAJNKSWZVZ4NFKVHCZEN7M5HASDLT4IPOAC
EJKHYV2Z6UPRVYUAL4WRW33GBNHYBFPMPA57HMBX2LQKXHIUO5VQC
}
bool _spells_need_disc2(spell_type chosen_spells[], int d1, int d2)
{
for (int i = 0; i < SPELLBOOK_SIZE; i++)
{
if (chosen_spells[i] == SPELL_NO_SPELL)
break;
// If a spell matches the second type but not the first,
// we need the second in the title.
if (!spell_typematch( chosen_spells[i], d1 )
&& spell_typematch( chosen_spells[i], d2))
{
return (true);
}
}
return (false);
name += " of ";
std::string type_name = getRandNameString(spelltype_long_name(disc1));
// For the actual name there's a 50% chance of getting something like
// Flames and Displacement (Fire/Translocation), else
// Fiery Translocation
std::string type_name;
if (disc1 != disc2 && coinflip())
{
std::string search = spelltype_long_name(disc2);
type_name = getRandNameString(search + " adj");
}
name += spelltype_long_name(disc1);
{
// No adjective found, use the normal method of combining two nouns.
type_name = getRandNameString(spelltype_long_name(disc1));
if (type_name.empty())
name += spelltype_long_name(disc1);
else
name += type_name;
if (disc1 != disc2)
{
name += " and ";
type_name = getRandNameString(spelltype_long_name(disc2));
if (type_name.empty())
name += spelltype_long_name(disc2);
else
name += type_name;
}
}
%%%%
# adjectives for secondary spell school
Conjuration adj
Destructive
%%%%
Enchantment adj
Entchanted
%%%%
Fire adj
Fiery
Scorching
%%%%
Ice adj
Glacial
Freezing
Icy
%%%%
Transmigration adj
Shifting
%%%%
Necromancy adj
Dark
Evil
Lethal
%%%%
Summoning adj
Creative
%%%%
Divination adj
Spiritual
%%%%
Translocation adj
Spatial
%%%%
Poison adj
Poisonous
Venomous
Toxic
%%%%
Earth adj
Earthen
Ashen
Dusty
%%%%
Air adj
Aerial
Flying
Floating
Feathery