Actually, I wasn't entirely sure which of the many attack invocations to replace and I chose Smiting mostly because of the new overlap with Zin and because such a change is easiest to revert (copy code from Zin). :p
Divine Shield strengthens existing shields (also magical, which might have to be excluded) or else creates a new magical one. Either way, the shields value is increased by 3 + skills(SHIELDS)/5 and this bonus lasts for 5 + (skills(SHIELS) + 2*skills(INVOCATIONS))/6 turns, after which it is decreased by 1 every two out of three turns until it reaches 0.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3225 c06c8d41-db1a-0410-9941-cceddc491573
KKEPQAZMWQFWPQ4P4KT5PWG2YFPG7H4JHL5K7USVHQ3Y6L4NWURQC QAKZWDYRDJVIP54L6VWEPTPZ2LYETVXCUOILX5SLNAO4FLXIXECAC DK362IHKSDADMUPD35NOTKM4WESQM37KG2PNOJRV2FGELDWULYPQC K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC JW2KRJHES33W7UTWZ6NDO4TLMK4EFU4HKZXBWR2UJOMPCCOTR4CQC KHHAE5ZK7ITEZVMMUKYROKECLE2RU5ZU5OQ4Z4XSRQXE2R65O67AC P52QVYEFQXNK6IXNN2EMZIBLOIHHGQ7LODWIGWPJLANGVIPQK5IAC WHY6LRRJ5T2NSBE3IUCR4X3TOAH7TTK5NPUPUIFT7TPNJ6J4HBDAC 5BJPWUPLJFS34FUTFJVKA4A52YMIGV6EWDXLNSDCWBJWBGVSQFGQC EFWEYIB2R3DPD3JWIPU6LS6SFLPMYN7J7X4GBZR7DJWKHJ3UELSAC CGYTZT5QWIEGYKUOLOK7MFXSLJKLYRZONER5ZCDZO5XYWSLG475QC WXSNNK2RXP3DQFAEQGQUZJHFWXJC7ZKG2WURZGL566UDM4YXFSWQC CQ24AVAI6SW3AHTIDMLPSTRRBEU6FHRF5I5FD6G5QIYE6PO4BQMQC LS3DAZVRDCXVN2BKBC6RGCKO3R43Z7HKG4GXJWLBK4AKBL2G6QDQC // shield bonus = attribute for duration turns, then decreasing by 1// every two out of three turns// overall shield duration = duration + attribute// recasting simply resets those two values (to better values, presumably)void cast_divine_shield(){if (!you.duration[DUR_DIVINE_SHIELD]){you.redraw_armour_class = true;if (you.shield() || you.duration[DUR_FIRE_SHIELD]|| you.duration[DUR_CONDENSATION_SHIELD]){mprf("Your shield is strengthened by %s's divine power.",god_name(you.religion).c_str());}elsempr("A divine shield forms around you!");}// duration of complete shield bonus up to 18 turnsyou.duration[DUR_DIVINE_SHIELD]= 5 + (you.skills[SK_SHIELDS] + you.skills[SK_INVOCATIONS]*2)/6;
if (you.duration[DUR_DIVINE_SHIELD]){if (you.duration[DUR_DIVINE_SHIELD] > 1){if (--you.duration[DUR_DIVINE_SHIELD] == 1)mpr("Your divine shield starts to fade.");}if (you.duration[DUR_DIVINE_SHIELD] == 1 && !one_chance_in(3)){you.redraw_armour_class = true;if (--you.attribute[ATTR_DIVINE_SHIELD] == 0){you.duration[DUR_DIVINE_SHIELD] = 0;mpr("Your divine shield fades completely.");}}}
case ABIL_TSO_REPEL_UNDEAD:turn_undead(you.piety);
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;
if (!you.duration[DUR_REPEL_UNDEAD])mpr( "You feel a holy aura protecting you." );you.duration[DUR_REPEL_UNDEAD] += 8+ roll_dice(2, 2 * you.skills[SK_INVOCATIONS]);
case ABIL_ZIN_REVITALISATION:if (cast_revitalisation( 3 + (you.skills[SK_INVOCATIONS] / 6) ))exercise(SK_INVOCATIONS, 1 + random2(3));break;
case ABIL_ZIN_REVITALISATION:if (cast_revitalisation( 3 + (you.skills[SK_INVOCATIONS] / 6) ))exercise(SK_INVOCATIONS, 1 + random2(3));break;
case ABIL_TSO_REPEL_UNDEAD:turn_undead(you.piety);if (!you.duration[DUR_REPEL_UNDEAD])mpr( "You feel a holy aura protecting you." );
case ABIL_ZIN_SANCTUARY:if (cast_sanctuary(you.skills[SK_INVOCATIONS] * 4))exercise(SK_INVOCATIONS, 5 + random2(8));
you.duration[DUR_REPEL_UNDEAD] += 8+ roll_dice(2, 2 * you.skills[SK_INVOCATIONS]);if (you.duration[ DUR_REPEL_UNDEAD ] > 50)you.duration[ DUR_REPEL_UNDEAD ] = 50;exercise(SK_INVOCATIONS, 1);
case ABIL_ZIN_SMITING:case ABIL_TSO_SMITING:if (your_spells( SPELL_SMITING, (2 + skill_bump(SK_INVOCATIONS)) * 6,false ) == SPRET_ABORT)return (false);
case ABIL_TSO_DIVINE_SHIELD:cast_divine_shield();