rather than only a portion of it. Also tidy up Ely's destruction code and print the evil weapon destruction message in addition to the normal one, so you know which one Ely was so happy about.
And use the non-blessed weapon tiles for the blessed blade also for building the player doll.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4497 c06c8d41-db1a-0410-9941-cceddc491573
V4F3SDV2H4HBH6G6W5M3REN3BDSSE4IDF2RNM7PJMKRW3IDJ7PNAC
PBKRKGKARGZSLVFVDTK5NWDXQD26NHNN67LDSSB75CLEWBR6TLEQC
O5ARRFXNCIBPS7WWADQIUG3FKPIV5WYOENVKPKN64EGFJLA33TSAC
LP5EK64IEM7AHNYQID4GGKOQJQNZLKY4DCCZN47SIUZ6IXAXH5UAC
25CH7HH4LKXFIZ75YNMXS3TSXO6O27DYSOPLOD45K4OCNFWLS4LQC
PRQVFUGUGPKI2Q74ODEI3CYUJQB63CKC6ONQTE3BTOHKXG4JCNLQC
IIUK3DT26O7F4IBKB6QFTPLO4EVKBH55SAEXLNQEQRLDGJ37NDGAC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
IBOWTB7TZLGE454RTNFG3L3VCSBSU6A43AZ3TSAH545QFV7OEACAC
LSDVSZVU3LUENWKHYJGX3VEHPRNAGAMLNSXPJQSSUUYZDCYHEQPQC
2SU35FKBXMKAYJY76OXAC55R6JWTSHQSHBNBR3ICWUQREJME2ZSAC
WZNB427K3EUNV3FMVXLQTM4UIHER4FIKQXWLUUXRNQC3OQ33VQYAC
SJDOBXECX7F3ZPPVR7FPURE53D47PP2TFIF4SB6XPS456PZV3DQAC
UFMLS3XTVA5IUYWNJUHXCR67X5QI26PRFKGWBM6CGWSE2VUPBBJQC
V4DWL5WBO2JCODVS5QQNWXDH4DAYZN3D5V3UDCHM2KKOMADOTEDQC
X7X6JKZXOCG6NVLZLGNCQDFFXW4H3S77BVAJ5LS7ZHZ4GQVLMOMAC
case WPN_KNIFE: return TILEP_HAND1_DAGGER_SLANT;
case WPN_DAGGER: return TILEP_HAND1_DAGGER_SLANT;
case WPN_SHORT_SWORD: return TILEP_HAND1_SHORT_SWORD_SLANT;
case WPN_LONG_SWORD: return TILEP_HAND1_LONG_SWORD_SLANT;
case WPN_GREAT_SWORD: return TILEP_HAND1_GREAT_SWORD_SLANT;
case WPN_SCIMITAR: return TILEP_HAND1_SCIMITAR;
case WPN_FALCHION: return TILEP_HAND1_FALCHION;
case WPN_SABRE: return TILEP_HAND1_SABRE;
case WPN_DEMON_BLADE: return TILEP_HAND1_SWORD_BLACK;
case WPN_QUICK_BLADE: return TILEP_HAND1_DAGGER;
case WPN_KATANA: return TILEP_HAND1_KATANA_SLANT;
case WPN_DOUBLE_SWORD: return TILEP_HAND1_DOUBLE_SWORD;
case WPN_TRIPLE_SWORD: return TILEP_HAND1_TRIPLE_SWORD;
case WPN_BLESSED_BLADE: return TILEP_HAND1_BLESSED_BLADE;
case WPN_KNIFE: return TILEP_HAND1_DAGGER_SLANT;
case WPN_DAGGER: return TILEP_HAND1_DAGGER_SLANT;
case WPN_SHORT_SWORD: return TILEP_HAND1_SHORT_SWORD_SLANT;
case WPN_LONG_SWORD: return TILEP_HAND1_LONG_SWORD_SLANT;
case WPN_GREAT_SWORD: return TILEP_HAND1_GREAT_SWORD_SLANT;
case WPN_SCIMITAR: return TILEP_HAND1_SCIMITAR;
case WPN_FALCHION: return TILEP_HAND1_FALCHION;
case WPN_SABRE: return TILEP_HAND1_SABRE;
case WPN_DEMON_BLADE: return TILEP_HAND1_SWORD_BLACK;
case WPN_QUICK_BLADE: return TILEP_HAND1_DAGGER;
case WPN_KATANA: return TILEP_HAND1_KATANA_SLANT;
case WPN_DOUBLE_SWORD: return TILEP_HAND1_DOUBLE_SWORD;
case WPN_TRIPLE_SWORD: return TILEP_HAND1_TRIPLE_SWORD;
case WPN_BLESSED_BLADE: return TILEP_HAND1_BLESSED_BLADE;
// new blessed blades
case WPN_BLESSED_LONG_SWORD: return TILEP_HAND1_LONG_SWORD_SLANT;
case WPN_BLESSED_GREAT_SWORD: return TILEP_HAND1_GREAT_SWORD_SLANT;
case WPN_BLESSED_SCIMITAR: return TILEP_HAND1_SCIMITAR;
case WPN_BLESSED_FALCHION: return TILEP_HAND1_FALCHION;
case WPN_BLESSED_KATANA: return TILEP_HAND1_KATANA_SLANT;
case WPN_BLESSED_DOUBLE_SWORD: return TILEP_HAND1_DOUBLE_SWORD;
case WPN_BLESSED_TRIPLE_SWORD: return TILEP_HAND1_TRIPLE_SWORD;
" disappear% <>without a glow</>.",
" <>glow% slightly</> and disappear%.",
" <>glow% with a rainbow of weird colours</> and disappear%.",
" disappear% without a glow.",
" glow% slightly and disappear%.",
" glow% with a rainbow of weird colours and disappear%.",
" <>barely shimmer%</> and break% into pieces.",
" <>shimmer%</> and break% into pieces.",
" <>shimmer% wildly</> and break% into pieces.",
// " <>slowly evaporate%</>.",
// " <>evaporate%</>.",
// " <>glow% and evaporate%</>.",
" barely shimmer% and break% into pieces.",
" shimmer% and break% into pieces.",
" shimmer% wildly and break% into pieces.",
}
// Is the destroyed weapon valuable enough to gain piety by doing so?
// Evil weapon are handled specially.
static bool _destroyed_valuable_weapon(int value, int type)
{
// Artefacts (incl. most randarts).
if (random2(value) >= random2(250))
return true;
// Medium valuable items are more likely to net piety at low piety.
// This includes missiles in sufficiently large quantities.
if (random2(value) >= random2(100)
&& one_chance_in(1 + you.piety/50))
{
return true;
}
// If not for the above, missiles shouldn't yield piety.
if (type == OBJ_MISSILES)
return false;
// Weapons, on the other hand, are always acceptable to boost low piety.
if (you.piety < 30 || player_under_penance())
return true;
return false;
else
{
piety_gain_t pgain = PIETY_NONE;
if (random2(value) >= random2(250) // artefacts (incl. most randarts)
|| (random2(value) >= random2(100)
&& one_chance_in(1 + you.piety/50))
|| (mitm[i].base_type == OBJ_WEAPONS
&& (you.piety < 30 || player_under_penance())))
{
pgain = PIETY_SOME;
gain_piety(1);
}
// Elyvilon doesn't care about item sacrifices at altars, so
// I'm stealing _Sacrifice_Messages.
_print_sacrifice_message(GOD_ELYVILON, mitm[i], pgain);
// Elyvilon doesn't care about item sacrifices at altars, so
// I'm stealing _Sacrifice_Messages.
_print_sacrifice_message(GOD_ELYVILON, mitm[i], pgain);
if (is_evil_weapon)
{
simple_god_message(" welcomes the destruction of this evil weapon.",
GOD_ELYVILON);