Spell: Aspect of the Falcon
Code:
<thing id="pS2AspFalc" name="Aspect of the Falcon" description="You take on an aspect of a falcon. Your eyes become wide and raptor-like, and you grow feathers on the sides of your head. You gain a +3 competence bonus on Perception checks, a +1 competence bonus on ranged attacks, and the critical multiplier for your bows and crossbows becomes 19-20/x3. This effect does not stack with any other effect that expands the threat range of a weapon, such as the Improved Critical feat or a {i}keen{/i} weapon." compset="InPlay">
<fieldval field="pDuration" value="1 min/level"/>
<usesource source="APG"/>
<tag group="Helper" tag="NoIncr"/>
<tag group="Helper" tag="AdjSpell" name="Spell Adjustment" abbrev="Spell Adjustment"/>
<eval phase="PreLevel" priority="5000"><![CDATA[~ If we're not enabled, get out now
doneif (field[pIsOn].value = 0)
~ +3 competence bonus on Perception checks
#applybonus[BonComp,hero.child[skPercep],3]
~ Modify all the bows and ranged attacks
foreach pick in hero from BaseWep where "wCategory.RangeProj"
~All ranged attacks are at +1 to hit
eachpick.field[wAttBonus].value += 1
~Makes bows 19-20/x3
if (eachpick.tagis[wFtrGroup.Bows] <> 0) then
perform eachpick.assign[Broadcast.ImpCrit]
endif
~Makes bows 19-20/x3
if (eachpick.tagis[wFtrGroup.Crossbows] <> 0) then
perform eachpick.delete[wCritMult.2]
perform eachpick.assign[wCritMult.3]
endif
nexteach]]></eval>
</thing>