Blade card can now give different brands, not just SPWPN_VORPAL. Type safety on brand_weapon().
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2522 c06c8d41-db1a-0410-9941-cceddc491573
LHVZICXASE4UFBQQ3UEQF4DLPFGD2NNZV7FFTRUK6PVB6XLZNQQAC
brand_weapon(SPWPN_VORPAL, random2(power/4)); // maybe other brands?
const brand_type brands[] = {
SPWPN_FLAMING, SPWPN_FREEZING, SPWPN_VENOM, SPWPN_DRAINING,
SPWPN_VORPAL, SPWPN_DISTORTION, SPWPN_PAIN, SPWPN_DUMMY_CRUSHING
};
if ( !brand_weapon(RANDOM_ELEMENT(brands), random2(power/4)) )
{
if ( you.equip[EQ_WEAPON] == -1 )
{
msg::stream << "Your " << your_hand(true) << " twitch."
<< std::endl;
}
else
{
msg::stream << "Your weapon vibrates for a moment."
<< std::endl;
}
}