View Single Post
risner
Senior Member
Volunteer Data File Contributor
 
Join Date: Jun 2010
Posts: 623

Old February 20th, 2011, 03:36 PM
10) Improved Natural Attack (Bestiary p315) says "attack forms", so I take that to mean all weapons of that type (say if you have a bite and gain a bite from a feat or other effect, both should be improved.)

I updated INA to handle this case, and here is the "free to use" code. I consider it a bug in Pathfinder, so if you agree Mathis, you are welcome to include it.

Code:
  <thing id="fImpNatAtk" name="Improved Natural Attack" description="Attacks made by one of this creature&apos;s natural attacks leave vicious wounds.{br}{br}{b}Prerequisite{/b}: Natural weapon, base attack bonus +4.{br}{br}{b}Benefit{/b}: Choose one of the creature’s natural attack forms (not an unarmed strike). The damage for this natural weapon increases by one step, as if the creature’s size had increased by one category: 1d2, 1d3, 1d4, 1d6, 1d8, 2d6, 3d6, 4d6, 6d6, 8d6, 12d6. {br}{br}A weapon or attack that deals 1d10 points of damage increases as follows: 1d10, 2d8, 3d8, 4d8, 6d8, 8d8, 12d8." compset="Feat" summary="The damage of a natural attack increases by one step." replaces="fImpNatAtt">
    <tag group="fShowWhat" tag="WeaponsNat" name="Natural Weapons" abbrev="Natural Weapons"/>
    <tag group="ChooseSrc1" tag="Thing"/>
    <tag group="Helper" tag="NoPathSoc"/>
    <evalrule phase="PreLevel" priority="10000" message="You must have the weapon and may not take it twice for the same weapon." summary="You must have the weapon and may not take it twice for the same weapon."><![CDATA[
      ~ If we're disabled, do nothing
      doneif (tagis[Helper.FtDisable] <> 0)

      ~if nothing's been chosen, there's nothing we can do
      doneif (field[usrChosen1].ischosen = 0)


      var searchexpr as string
      searchexpr = "thingid." & field[usrChosen1].chosen.idstring

      foreach pick in hero from BaseNatWep where searchexpr

            ~ Upgrade damage of this weapon
            perform eachpick.assign[Helper.DamageUp]
      
            if (eachpick.tagis[HasFeat.fImpNatAtt] = 0) then
              @valid = 1
            endif

            ~ Assign the weapon a tag saying that it has this feat
            perform eachpick.assign[HasFeat.fImpNatAtt]
      nexteach]]></evalrule>
    <exprreq message="Base attack bonus +4 required." iserror="no"><![CDATA[child[Attack].field[tAtkBase].value >= 4]]></exprreq>
    <prereq message="Natural Weapon required." iserror="no">
      <validate>
        perform findchild[BaseNatWep].setfocus
        @valid = state.isfocus</validate>
      </prereq>
    </thing>
risner is offline   #74 Reply With Quote