Spell: Prayer
-These are two that originally done by huntercc I did a few small tweaks and changed them to match the new standards for actual spells. Their are two versions of the same spell one to apply if you are an ally and one if you are a foe.
Code:
<thing id="pPrayerAll" name="Prayer: Ally" description="You bring special favor upon yourself and your allies while bringing disfavor to your enemies. You and each of your allies gain a +1 luck bonus on attack rolls, weapon damage rolls, saves, and skill checks, while each of your foes takes a -1 penalty on such rolls." compset="InPlay">
<fieldval field="pMinimum" value="1"/>
<fieldval field="pMaximum" value="1"/>
<fieldval field="pDuration" value="1 round/level"/>
<tag group="Helper" tag="AdjSpell"/>
<eval phase="PreLevel" priority="10000"><![CDATA[
~ If we're not enabled, get out now
doneif (field[pIsOn].value = 0)
~ Give a Luck Bonus to all weapons
#applybonus[BonLuck,hero.child[Attack],field[pAdjust].value]
hero.child[Damage].field[tDamBonus].value += field[pAdjust].value
~Give bonus to saves
#applybonus[BonLuck, hero.child[svFort], field[pAdjust].value]
#applybonus[BonLuck, hero.child[svRef], field[pAdjust].value]
#applybonus[BonLuck, hero.child[svWill], field[pAdjust].value]
~Give bonus to all skills
#applybonus[BonLuck, hero.child[AllSkills], field[pAdjust].value]]]></eval>
</thing>
<thing id="pPrayerFoe" name="Prayer: Foe" description="You bring special favor upon yourself and your allies while bringing disfavor to your enemies. You and each of your allies gain a +1 luck bonus on attack rolls, weapon damage rolls, saves, and skill checks, while each of your foes takes a -1 penalty on such rolls." compset="InPlay">
<fieldval field="pMinimum" value="-1"/>
<fieldval field="pMaximum" value="-1"/>
<fieldval field="pDuration" value="1 round/level"/>
<tag group="Helper" tag="AdjSpell"/>
<eval phase="PreLevel" priority="10000"><![CDATA[
~ If we're not enabled, get out now
doneif (field[pIsOn].value = 0)
~ Give a Penalty to all weapons
hero.child[Attack].field[Penalty].value += field[pAdjust].value
hero.child[Damage].field[tDamBonus].value += field[pAdjust].value
~ Give penalty to all saves
hero.child[svFort].field[Penalty].value += field[pAdjust].value
hero.child[svRef].field[Penalty].value += field[pAdjust].value
hero.child[svWill].field[Penalty].value += field[pAdjust].value
~ Give penalty to all skills
hero.child[AllSkills].field[Penalty].value += field[pAdjust].value]]></eval>
</thing>