unwield your weapon rather than something arbitrary (I found no cases in the code where this wasn't what was wanted.)
Implemented some of David's deck changes:
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2082 c06c8d41-db1a-0410-9941-cceddc491573
KHHAE5ZK7ITEZVMMUKYROKECLE2RU5ZU5OQ4Z4XSRQXE2R65O67AC LP3U7LC6QK6TCMLAYTRGZ2CDZAHPM6VWDT6NPE5ET4WBBZVHBDXQC Z7SW3IKYNXMOHHD77NGXN6RGL32PZBO6AIHLJY74IRO23AIRKWMQC UWMN4HLG6YA2YFQEVIVMDISD6APKEPIZXMMPMNUYCBQDSAUYSXPQC K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC P52QVYEFQXNK6IXNN2EMZIBLOIHHGQ7LODWIGWPJLANGVIPQK5IAC 4O3VTUJT5T7NBNF3Q45XO2WHS6TCJXVLH6CKX4K36WUBDRT5F6KAC RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC 3KAINFIXO7WNWGUGZB43EUNFRS2ZPBLQZDTY456QACMRHYIJ7WDAC XRZPPYWPWUOM4SFNI6BHKH2UKJQNLKOV6Y7XIEPEZXE5QYRT26PAC MBBPLL4SZUB3JUUYQYLZW7S5OXRCEGJX3WWADOQXGHWQ7BIKCY5QC JP7SVXCIKEPVDD4Q5CDYDATPK7X5XOYW3T6QK2Y6EWHFH52LBK3QC 5V47S4NNTHWTSAHV3YLO2VGH7JTUIYJ3GBPDN5ZM4UQALT2ZEXDQC HJV7BZBM752K5I47ILBQJJXSPODBBLGKDX5DWJTRDXPJ3V7AEVWAC 2IJDLTWK74ULETLFTIPUIY2MSG6RNONVAFNFE7MADPT6UNYSSBDAC {// XXX: Ugly hack so that this currently works (don't want to// mess with the fact that currently this function doesn't// actually unwield the item, but we need it out of the player's// hand for this to work. -- bwrint tmp = you.equip[ EQ_WEAPON ];you.equip[ EQ_WEAPON ] = -1;
// pick a random monster nearby to banish (or yourself)const int mon_to_banish = choose_random_nearby_monster(1);
// Calculate how many extra banishments you get.const int power_level = get_power_level(power, rarity);int nemelex_bonus = 0;if ( you.religion == GOD_NEMELEX_XOBEH && !player_under_penance() )nemelex_bonus = you.piety / 20;int extra_targets = power_level + random2(you.skills[SK_EVOCATIONS] +nemelex_bonus) / 12;for ( int i = 0; i < 1 + extra_targets; ++i ){// pick a random monster nearby to banish (or yourself)const int mon_to_banish = choose_random_nearby_monster(1);
if ( mon_to_banish == NON_MONSTER ) // banish yourself!banished(DNGN_ENTER_ABYSS);elsemenv[mon_to_banish].banish();
// bonus banishments only banish monstersif ( i != 0 && mon_to_banish == NON_MONSTER )continue;if ( mon_to_banish == NON_MONSTER ) // banish yourself!{banished(DNGN_ENTER_ABYSS);break; // don't banish anything else}elsemenv[mon_to_banish].banish();}