View Single Post
daplunk
Senior Member
 
Join Date: Jan 2016
Location: Adelaide, Australia
Posts: 2,294

Old February 1st, 2016, 03:55 AM
NOTES - Pathfinder Scripting:

Two Weapon Defense

Quote:
~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)

~ Check to see if we have something equipped in each hand
doneif (hero.tagis[Hero.EquipMain] + hero.tagis[Hero.EquipOff] < 2)

~ Check to see that we have at least two weapons equipped, or a double
~ weapon
if (hero.tagcount[Hero.EquipWep] < 2) then
doneif (hero.tagcount[Hero.EquipDbl] = 0)
endif

~ Check to see if our Unarmed Strike is selected in either main or off
~ hands
doneif (hero.child[wUnarmed].tagis[Hero.MainHand] + hero.child[wUnarmed].tagis[Hero.OffHand] > 0)

~ Otherwise, add a +1 Shield bonus to our AC
#applybonus[tACShield, hero.child[ArmorClass], field[abValue].value]

~ If we're in output mode, don't do anything
doneif (state.isoutput <> 0)

#appenddesc[pstTotDef,"{b}Addition from Two-weapon Defense{/b}: When wielding a double weapon or two weapons (not including natural weapons or unarmed strikes), you gain a " & signed(field[abValue].value) & " shield bonus to your AC.{br}{br}When you are fighting defensively or using the total defense action, this shield bonus increases to " & signed(field[abValue2].value) & "."]
#appenddesc[pstFtDefen,"{b}Addition from Two-weapon Defense{/b}: When wielding a double weapon or two weapons (not including natural weapons or unarmed strikes), you gain a " & signed(field[abValue].value) & " shield bonus to your AC.{br}{br}When you are fighting defensively or using the total defense action, this shield bonus increases to " & signed(field[abValue2].value) & "."]

~ if we're fighting defensively or total defense, the shield bonus increases to +2
if (#hascondition[pstFtDefen] + #hascondition[pstTotDef] <> 0) then
#applybonus[tACShield, hero.child[ArmorClass], field[abValue2].value]
endif
Aldori Dueling Mastery

Quote:
~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)

~ If we have a shield, do nothing, we are done.
doneif (hero.tagis[Hero.EquipShld] <> 0)

~ If we have something in our off hand, is it an Aldori Dueling sword wielded 2 handed? If so set our bonus to 1, if not, done.
var shield as number
if (hero.tagis[Hero.EquipOff] <> 0) then
foreach pick in hero from BaseWep where "IsWeapon.wDuelSwo"
if (eachpick.field[gIsEquip].value + eachpick.field[wIs2nd].value = 2) then
shield = 1
endif
nexteach

doneif (shield = 0)

~ If we don't have something in our off hand, is an Aldori Dueling sword equipped in 1 hand? If so set our bonus to 2, if not, done.
elseif (hero.tagis[Hero.EquipOff] = 0) then
foreach pick in hero from BaseWep where "IsWeapon.wDuelSwo"
if (eachpick.field[gIsEquip].value = 1) then
shield = 2
endif
nexteach
doneif (shield = 0)
endif

~ Add the shield bonus to our Value field, and then add that as a shield bonus to AC. Doesn't stack with other shield bonuses (like the spell)
field[abValue].value += shield
#applybonus[tACShield, hero.child[ArmorClass], field[abValue].value]
Quote:
~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)

~ Assign the piercing weapon tag so dueling swords work with Duelist abilities.
foreach pick in hero from BaseWep where "IsWeapon.wDuelSwo"
perform eachpick.assign[wType.P]
nexteach

~ Do we have a dueling sword equipped in either hand? If so +2 Init.
foreach pick in hero from BaseWep where "IsWeapon.wDuelSwo"
if (eachpick.field[gIsEquip].value + eachpick.field[wIs2nd].value <> 0) then
hero.child[Initiative].field[Bonus].value += 2
endif
nexteach
Armor Proficiency (Heavy)

Quote:
Type: Expr-reqs
Message: Armor Proficiency (Light) required.
tagis[Hero.ProfLight] <> 0
tagis[Hero.ProfMedium] <> 0

Last edited by daplunk; February 1st, 2016 at 03:59 AM.
daplunk is offline   #19 Reply With Quote