Senior Member
Join Date: Jul 2010
Posts: 149
|
I have a custom ability that either gives the hero a pair of claw attacks OR increases the damage of the hero's claw attacks by one step if the hero already has claws.
I have wClaw bootstrapped at First/600 with the following condition: Code:
(fieldval:abValue2 <> 1) Code:
FIRST/599 ~ If the hero already has claws, ignore the following. doneif (hero.childlives[wClaw] <> 0) ~ Increase the existing claws' damage by one step. perform hero.child[wClaw].assign[Helper.DamageUp] ~ Flag the hero as having claws for the conditional claw bootstrapping. field[abValue2].value = 1 |
#1 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
I'd approach it slightly differently than with a bootstrap condition. The pick which bootstraps claws always bootstraps them, but includes a custom tag as a marker, then an eval script on the pick foreaches through all claws on the hero which do NOT have that marker, and increases their damage. If it increased anyone's damage, then find the marked set of claws and hide them with Hide.Weapon.
|
#2 |
Senior Member
Join Date: Jul 2010
Posts: 149
|
Hmm... That's an interesting suggestion, and one I definitely hadn't considered. Immediately after posting this, I had a bit of a revelation that the problem might be that claws could actually be a child of a variety of different children of the hero, and thus a foreach statement was probably necessary either way. And I came up with the following (which seems to be working) to replace the code in the evalscript I posted above:
Code:
First/599 ~ If the hero already has claws, instead increase their damage. foreach pick in hero from BaseNatWep where "IsWeapon.wClaw" perform eachpick.assign[Helper.DamageUp] field[abValue2].value = 1 nexteach Code:
foreach pick in hero from BaseNatWep where "IsWeapon.wClaw" !& "Custom.GrislyHands" Last edited by Redcap's Corner; December 1st, 2014 at 11:19 AM. |
#3 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Quote:
Also the above is not a valid search string. Here it is fixed: Code:
foreach pick in hero from BaseNatWep where "IsWeapon.wClaw & !Custom.GrislyHands" 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. |
|
#4 |
|
|