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

Old November 16th, 2010, 08:30 PM
Spell: Coward’s Lament
Code:
  <thing id="pS2CowaLam" name="Coward’s Lament" description="You compel an opponent to face you in combat, or suffer for its cowardice. Each round that the target fails to attack you in melee, it receives a cumulative -1 penalty to its Armor Class, attack rolls, and saving throws (maximum penalty -5). Each round at the end of its turn, the target may attempt a Will saving throw to prevent the penalties from increasing for that round. All penalties reset to zero when the target attacks you in melee, but increase again if it stops attacking. If the target is prevented from attacking you by physical restraint, magic, or impassable terrain, the penalties do not increase. If you move away from the target, the spell ends." compset="InPlay">
    <fieldval field="pMinimum" value="-5"/>
    <fieldval field="pMaximum" value="0"/>
    <fieldval field="pDuration" value="1 round/level"/>
    <usesource source="APG"/>
    <tag group="Helper" tag="AdjSpell" name="Spell Adjustment" abbrev="Spell Adjustment"/>
    <eval phase="PreLevel" priority="10000"><![CDATA[
~ If we're not enabled, get out now
doneif (field[pIsOn].value = 0)

~ Give a 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 a penalty to AC
hero.child[ArmorClass].field[Penalty].value += field[pAdjust].value

~ Give a penalty to hit to all weapons
hero.child[Attack].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 to Attack rolls
ShadowChemosh is offline   #25 Reply With Quote