a weapon of dragon slaying (with the somewhat weak reasoning that a dragon will try to avert its eyes from your awful weapon).
From how I read the code this function is only called if you are attacked as monsters will not breathe at other monsters, so that the above check is valid.
Also fix 1865179: Airstrike now wakes (and annoys) monsters. 1861118: Evaporate now can be cancelled during potion or direction choice.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3223 c06c8d41-db1a-0410-9941-cceddc491573
4NBPZKMZBKB3QYX4FFUAKDXQS43NJCBDLMHKDJFVXHQLX4MQDINAC
CV2Q7Y3P7SRU5ARIMVDLNVZV4VIMCBYOLIMS6HK6IK3WW4DGIIIAC
EAAACIJUVSBDOB6S73O4NFSMRDLFLQTFO7SXWWALGMVDZTQTHQBQC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC
NQMXQ6OQVUSC7Y7F7IL252QW4A5JED224EECNHWAM4ZZYVNY745AC
WG6O475IOLZFMUQSLVR2KHM7XTBF5HH276L2KDGF7UOSESDOAILQC
PFEJ4LMDNEKLMGRCMWQ7EIRVU4JMYGICI4G7X4WVWOROVXQCBZ7QC
BWAQ3FHBBM6G3K3KYP75CRTR343RDQZJRYX5ZGYUEXYBAC3APDLAC
UURAYLSSITZLQR56MCWFPIWMECU7F3USMA2UPJAO4IPIY5WVKP5QC
FVCAZQ5Y3MJUSYWOLGBWPGE2CNXVGQF3LHF2GT2JZ7Z2ZPWL2YNAC
YCL3W2PFE6ILTGBFODCSXNPDIA46KVSZP2TI7HDMYAOEJT65RIEAC
TJRYL3NXPW5IUGEV3YOC7JYWEXCZDBFPLT4AUG4P227WVKVB72ZAC
else if (spell == SPELL_EVAPORATE)
{
potion = prompt_invent_item( "Throw which potion?",
MT_INVLIST, OBJ_POTIONS );
if (potion == -1)
return (SPRET_ABORT);
else if (you.inv[potion].base_type != OBJ_POTIONS)
{
mpr( "This spell works only on potions!" );
return (SPRET_ABORT);
}
mprf(MSGCH_PROMPT, "Where do you want to aim %s?",
you.inv[potion].name(DESC_NOCAP_YOUR).c_str());
}
{
msg::stream << "Wisps of steam play over your " << your_hand(true)
<< '.' << std::endl;
return;
}
return (false);
canned_msg(MSG_SPELL_FIZZLES);
return;
}
message_current_target();
direction( spelld, DIR_NONE, TARG_ENEMY );
if (!spelld.isValid)
{
// accuracy is halved if you're wielding a weapon of dragon slaying
// (which makes the dragon/draconian avoid looking at you)
if ((mons_genus(monster->type) == MONS_DRAGON
|| mons_genus(monster->type) == MONS_DRACONIAN)
&& you.equip[EQ_WEAPON]
&& get_weapon_brand(you.inv[you.equip[EQ_WEAPON]])
== SPWPN_DRAGON_SLAYING)
{
pbolt.hit /= 2;
}