ShadowChemosh
Well-known member
Spell: Crushing Despair
Code:
<thing id="pCrushDesp" name="Crushing Despair" description="An invisible cone of despair causes great sadness in the subjects. Each affected creature takes a -2 penalty on attack rolls, saving throws, ability checks, skill checks, and weapon damage rolls. \n\n{i}Crushing despair{/i} counters and dispels {i}good hope{/i}." compset="InPlay">
<fieldval field="pMinimum" value="-2"/>
<fieldval field="pMaximum" value="-2"/>
<fieldval field="pDuration" value="1 min./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>