View Single Post
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old November 19th, 2010, 01:15 PM
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>

Hero Lab Resources:
Pathfinder - d20pfsrd and Pathfinder Pack Setup
3.5 D&D (d20) - Community Server Setup
5E D&D - Community Server Setup
Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources.
Created by the community for the community
- Realm Works kickstarter backer (Alpha Wolf) and Beta tester.
- d20 HL package volunteer editor.

Last edited by ShadowChemosh; November 24th, 2010 at 09:31 PM. Reason: Fixed how I was applying bonus/penalty to Attack rolls.
ShadowChemosh is offline   #28 Reply With Quote