Allow for easier switching between the good gods: starting piety after switching is up to 30 instead of 15.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3779 c06c8d41-db1a-0410-9941-cceddc491573
CQD3RU44235F3CYFDZBC3JRT2H3AE7PXJNVBBMCRF65Q5LPA3EHQC 5SUSEJ2RAOAXSTKDGDUSE4Q7FGOYA4XVG6JMUWIDA7MDEILRCUCAC LC2XZTUD56PLARIGBTDXDPJIYJNMJU446GFDGLRIFD2I4F66L6TAC YOSC3MX2F7VXOMQEIUQ5KH6L2KW3MI4AHU7TO5ZO32UB3TTQH77AC FS4MVTH4EEEECLEAO2FTNK5CLF2PHFYO2JZHC2YEOKYLWXRDRU6AC JDZCDMUCQ7VENYVLB62KQWUIRGABID37OKATOKCBUPCDL7W75NPAC EOJPYR3QD5GGS7GB2P7SBLMOP7YC57YMIVR7VKCOMWNCKNBPESBQC 23PFLB2E4QHL5SF3Q2YV5FXRH6MFHENEU2ACVC572ZCYDXCBZVQAC CGYTZT5QWIEGYKUOLOK7MFXSLJKLYRZONER5ZCDZO5XYWSLG475QC K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC DK362IHKSDADMUPD35NOTKM4WESQM37KG2PNOJRV2FGELDWULYPQC SWOYPTHJAWFEDBMB3ROT33VQZIXGZD5UOXEV456DDUENW2HGA66QC KFULGQQOHWUTXOM3BXCCYPGGVGGY4Z6265XUFRCBPNLTZAEHJZSQC B3HWU2BEQQ4E6WKVTW3JQQJFMWTVW3XWKY6BHFNBRHSZPRCF2OTQC WHY6LRRJ5T2NSBE3IUCR4X3TOAH7TTK5NPUPUIFT7TPNJ6J4HBDAC KKEPQAZMWQFWPQ4P4KT5PWG2YFPG7H4JHL5K7USVHQ3Y6L4NWURQC 4O3VTUJT5T7NBNF3Q45XO2WHS6TCJXVLH6CKX4K36WUBDRT5F6KAC SQFABNVS6OSVRBMJAIV6KIIZW2TYIOQ5BZGLPYJ6BPFD2HMRH4MAC KOBNLIHIAHSV6IPA3R4HI2KB5HY5XIIJQPJ2GBETYB5AK73NAKJQC VEOWM6UDFNWRAXP5YUO7XBH4ZALAJXCWRA4IRDITXJ3QWH42CTWAC JW2KRJHES33W7UTWZ6NDO4TLMK4EFU4HKZXBWR2UJOMPCCOTR4CQC WXSNNK2RXP3DQFAEQGQUZJHFWXJC7ZKG2WURZGL566UDM4YXFSWQC }static void ely_destroy_inventory_weapon(){int count = 0;int item = ENDOFPACK;for (int i = 0; i < ENDOFPACK; i++){if (!is_valid_item( you.inv[i] ))continue;if (you.inv[i].base_type == OBJ_WEAPONS|| you.inv[i].base_type == OBJ_MISSILES){if (is_artefact(you.inv[i]))continue;// item is valid for destroying, so give it a chancecount++;if (one_chance_in( count ))item = i;}}// any item to destroy?if (item == ENDOFPACK)return;int value = 1;bool wielded = false;// increase value wielded weapons or large stacks of ammoif (you.inv[item].base_type == OBJ_WEAPONS&& you.inv[item].link == you.equip[EQ_WEAPON]){wielded = true;value += 2;}else if (you.inv[item].quantity > random2(you.penance[GOD_ELYVILON]))value += 1 + random2(2);std::ostream& strm = msg::streams(MSGCH_GOD);strm << you.inv[item].name(DESC_CAP_YOUR);if (value == 1)strm << " barely";if ( you.inv[item].quantity == 1 )strm << " shimmers and breaks into pieces." << std::endl;elsestrm << " shimmer and break into pieces." << std::endl;if (wielded){unwield_item(true);you.wield_change = true;}// just in caseyou.quiver_change = true;destroy_item(you.inv[item]);burden_change();dec_penance(GOD_ELYVILON, value);
static bool elyvilon_retribution(){// healing theme and interfering with fighting// doesn't care unless you've gone over to evilif ( !is_evil_god(you.religion) )return false;const god_type god = GOD_ELYVILON;simple_god_message("'s displeasure finds you.", god);switch (random2(5)){case 0:case 1:confuse_player( 3 + random2(10), false );break;case 2: // mostly flavour messagesmiscast_effect(SPTYP_POISON, 0, 0, one_chance_in(3),"the will of Elyvilon");break;case 3:case 4: // destroy weapons in your inventoryely_destroy_inventory_weapon();break;}return true;}
for (int i = 0; i < ENDOFPACK; i++){if (!is_valid_item( you.inv[i] ))continue;if (you.inv[i].base_type == OBJ_WEAPONS|| you.inv[i].base_type == OBJ_MISSILES){if (is_artefact(you.inv[i]))continue;// item is valid for destroying, so give it a chancecount++;if (one_chance_in( count ))item = i;}}// any item to destroy?if (item == ENDOFPACK)return;int value = 1;bool wielded = false;// increase value wielded weapons or large stacks of ammoif (you.inv[item].base_type == OBJ_WEAPONS&& you.inv[item].link == you.equip[EQ_WEAPON]){wielded = true;value += 2;}else if (you.inv[item].quantity > random2(you.penance[GOD_ELYVILON]))value += 1 + random2(2);std::ostream& strm = msg::streams(MSGCH_GOD);strm << you.inv[item].name(DESC_CAP_YOUR);if (value == 1)strm << " barely";if ( you.inv[item].quantity == 1 )strm << " shimmers and breaks into pieces." << std::endl;elsestrm << " shimmer and break into pieces." << std::endl;if (wielded){unwield_item(true);you.wield_change = true;}// just in caseyou.quiver_change = true;destroy_item(you.inv[item]);burden_change();dec_penance(GOD_ELYVILON, value);}// comparatively lenientstatic bool elyvilon_retribution(){const god_type god = GOD_ELYVILON;simple_god_message("'s displeasure finds you.", god);// healing theme and interfering with fightingswitch (random2(5)){case 0:case 1:confuse_player( 3 + random2(10), false );break;case 2: // mostly flavour messagesmiscast_effect(SPTYP_POISON, 0, 0, one_chance_in(3),"the will of Elyvilon");break;case 3:case 4: // destroy weapons in your inventoryely_destroy_inventory_weapon();break;}return true;}
(which_god == GOD_ZIN) ? "Champion of Law" :(which_god == GOD_SHINING_ONE) ? "Divine Warrior" :(which_god == GOD_ELYVILON) ? "Champion of Light" :(which_god == GOD_OKAWARU) ? "Master of a Thousand Battles" :(which_god == GOD_YREDELEMNUL) ? "Master of Eternal Death" :
(which_god == GOD_ZIN) ? "Champion of Law" :(which_god == GOD_SHINING_ONE) ? "Divine Warrior" :(which_god == GOD_ELYVILON) ? "Champion of Light" :(which_god == GOD_OKAWARU) ? "Master of a Thousand Battles" :(which_god == GOD_YREDELEMNUL) ? "Master of Eternal Death" :
(which_god == GOD_MAKHLEB) ? "Champion of Chaos" :(which_god == GOD_VEHUMET) ? "Lord of Destruction" :(which_god == GOD_TROG) ? "Great Slayer" :
(which_god == GOD_MAKHLEB) ? "Champion of Chaos" :(which_god == GOD_VEHUMET) ? "Lord of Destruction" :(which_god == GOD_TROG) ? "Great Slayer" :
(which_god == GOD_SIF_MUNA) ? "Master of the Arcane" :(which_god == GOD_LUGONU) ? "Agent of Entropy" :(which_god == GOD_BEOGH) ? "Messiah" :(which_god == GOD_XOM) ? "Teddy Bear" :"Bogy the Lord of the Bugs");
(which_god == GOD_SIF_MUNA) ? "Master of the Arcane" :(which_god == GOD_LUGONU) ? "Agent of Entropy" :(which_god == GOD_BEOGH) ? "Messiah" :(which_god == GOD_XOM) ? "Teddy Bear": "Bogy the Lord of the Bugs");
{ ABIL_ZIN_SMITING, "Smiting",3, 0, 50, generic_cost::fixed(2), ABFLAG_NONE },{ ABIL_ZIN_REVITALISATION, "Revitalisation", 0, 0, 100, 3, ABFLAG_NONE },
{ ABIL_ZIN_REVITALISATION, "Revitalisation", 0, 0, 100, 2, ABFLAG_NONE },
case ABIL_ZIN_SMITING:if (your_spells( SPELL_SMITING, (2 + skill_bump(SK_INVOCATIONS)) * 6,false ) == SPRET_ABORT)return (false);exercise( SK_INVOCATIONS, (coinflip()? 3 : 2) );break;