Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
ErinRigh
Senior Member
 
Join Date: Oct 2016
Posts: 621

Old February 7th, 2018, 11:57 AM
I need to code a for each loop on my ability (I think) that checks the character for melee weapons and assigns their Wis Bonus as an untyped bonus to attack if the ability is active, while restricting the attack to once a round. I know I need to look at;

foreach pick in hero from BaseWep where "wCategory.Melee"

and have it assign;

hero.child[Attack].field[Bonus].value += hero.child[aWIS].field[aModBonus].value

To each pick

But I don't know the script wording to do that, I know the code to disable it when not active but I don't know at all how to restrict the maneuver to once a round.

Any help greatly appreciated
ErinRigh is offline   #1 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old February 7th, 2018, 12:35 PM
Can you post the ability text?
Aaron is offline   #2 Reply With Quote
ErinRigh
Senior Member
 
Join Date: Oct 2016
Posts: 621

Old February 7th, 2018, 02:00 PM
Harrowing Strike (Su):
As a standard action, the malefactor can spend a point of strife to make a special attack called a harrowing strike. This melee attack, made at her highest attack bonus, functions against any target currently suffering from a curse effect.
At 2nd level, the malefactor making a harrowing strike adds her Wisdom bonus to attack rolls.
ErinRigh is offline   #3 Reply With Quote
ErinRigh
Senior Member
 
Join Date: Oct 2016
Posts: 621

Old February 7th, 2018, 02:15 PM
Actually there is more to it, I think I need to bootstrap a number of abilities to one activation as the rest of the text is;

At 5th level, the malefactor can add her Wisdom bonus to both her damage rolls.
At 8th level, the malefactor automatically bypasses concealment with her harrowing strike (targets with total concealment are treated as if they only had concealment).
At 11th level, a malefactor’s harrowing strike deal 1d6 bleed damage, as a semi-tangible Yla spirit claws and tears at the target.
At 14th level, the malefactor may make a second harrowing strike as part of the same standard action, against any eligible target. Both harrowing strike this round are made at a -2 penalty.
At 17th level, the malefactor’s harrowing strike are made as touch attacks.
At 20th level, harrowing strike deal 2d6 bleed damage, and the DC of the Heal check made to stop the bleed effect rises to 10 + ˝ the malefactor’s level + her Wisdom bonus. Magical healing only stops this bleed damage with a successful caster level check against the same DC.

Your guidance on this is appreciated
ErinRigh is offline   #4 Reply With Quote
ErinRigh
Senior Member
 
Join Date: Oct 2016
Posts: 621

Old February 7th, 2018, 02:27 PM
So basically what I am trying to do with the ability is

Check for activated, get malefactor level, check for melee weapon/natural weapon/unarmed (I don't know if those would need to be checked for separately or if natural/unarmed are, by default, melee)

If level >=2, apply Wis to Attack

If level >=5, apply Wis to damage + above

If level >=8, apply conditional text? + above 2

If level >=11, add 1d6 bleed damage + all of the above

If level >=14, add additional attack, add penalty to both attacks and all of the above

If level >=17, make all melee attacks into touch attacks + all of the above

If level >=20, increase bleed to 2d6 and add text to set DC to remove at 20+Wis Mod plus all of the above

If I want all of this under one activationI am going to have to do it as one ability am I not?
ErinRigh is offline   #5 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old February 7th, 2018, 03:25 PM
Quote:
Originally Posted by ErinRigh View Post
So basically what I am trying to do with the ability is

Check for activated, get malefactor level, check for melee weapon/natural weapon/unarmed (I don't know if those would need to be checked for separately or if natural/unarmed are, by default, melee)

If level >=2, apply Wis to Attack
Store this in one value field

Quote:
Originally Posted by ErinRigh View Post
If level >=5, apply Wis to damage + above
Store this in another value field.

Quote:
Originally Posted by ErinRigh View Post
If level >=8, apply conditional text? + above 2
No, I don't think this is something which needs conditional text.

Quote:
Originally Posted by ErinRigh View Post
If level >=11, add 1d6 bleed damage + all of the above
You can do this with an extradam macro, storing the number in another value field (which increases at 20)

Quote:
Originally Posted by ErinRigh View Post
If level >=14, add additional attack, add penalty to both attacks and all of the above
I assume you're not limiting the number of attacks when activating this ability, so I would skip this too.

Quote:
Originally Posted by ErinRigh View Post
If level >=17, make all melee attacks into touch attacks + all of the above
Can do this by applying a tag in your foreach.

Quote:
Originally Posted by ErinRigh View Post
If level >=20, increase bleed to 2d6 and add text to set DC to remove at 20+Wis Mod plus all of the above
Need to special calc the DC.

Quote:
Originally Posted by ErinRigh View Post
If I want all of this under one activationI am going to have to do it as one ability am I not?
Yes, all one ability. Alright, so first since you need to pull the wisdom attribute, this will have to run in post attribute.

PostAttr 10000
Code:
~Add the standard stops for class abilities
doneif (tagis[Helper.ShowSpec] = 0)
doneif (tagis[Helper.SpcDisable] <> 0)

~Calculate our various values
~abValue stores bonus to attack
field[abValue].value += #attrbonus[aWIS]

~abValue2 stores bonus to damage
if (field[xAllLev].value >= 2) then
  field[abValue2].value += #attrbonus[aWIS]
  endif

~abValue3 stores number of bleed dice
if (field[xAllLev].value >= 20) then
  field[abValue3].value += 2
elseif (field[xAllLev].value >= 11) then
  field[abValue3].value += 1
  endif

~abValue4 stores size of bleed dice
field[abValue4].value += 6

~At 20th, we get a DC
if (field[xAllLev].value >= 20) then
  perform assign[StandardDC.aWIS]
  endif

~Add a stop for the activation.
doneif (field[abilActive].value = 0)

      foreach pick in hero from AttDam where "wCategory.Melee"
        ~Apply melee attack
        eachpick.field[atmBonus].value += field[abValue].value
        ~Apply melee damage
        eachpick.field[dmmBonus].value += field[abValue2].value

        ~Apply bleed (if we were high enough level to have set a number of dice
        if (field[abValue3].value >= 1) then
          #extradamage[eachpick, " plus " & field[abValue3].value & "d" & field[abValue4].value & " bleed",field[thingname].text]
          endif

        ~Apply touch if higher than 17th level.
        if (field[xAllLev].value >= 17) then
          perform eachpick.assign[wCategory.Touch]
          endif
        nexteach
You'll probably also need an eval script to build a summary field which changes as you get benefits.

The above is not tested, tweak as necessary.

Last edited by Aaron; February 7th, 2018 at 03:30 PM. Reason: Adding disclaimer
Aaron is offline   #6 Reply With Quote
ErinRigh
Senior Member
 
Join Date: Oct 2016
Posts: 621

Old February 7th, 2018, 03:44 PM
Quote:
Originally Posted by Aaron View Post
I assume you're not limiting the number of attacks when activating this ability, so I would skip this too.
Actually it is limited to 1 attack per round (standard action) but at 14th level they may make 2 attacks, both at -2, like rapid shot
ErinRigh is offline   #7 Reply With Quote
ErinRigh
Senior Member
 
Join Date: Oct 2016
Posts: 621

Old February 7th, 2018, 04:10 PM
Ok, I don't know what I have done, but when I switch to the class tab, I get the following error;

Attempt to access non-live pick via script fails for pick 'cMALHarStr'
Location: 'additem' script for Portal 'ClsBaseCom' near line 2
- - -
Attempt to access 'focus' pick or thing from script when no focus exists
Location: 'additem' script for Portal 'ClsBaseCom' near line 4

cMALHarStr is the new ability
ErinRigh is offline   #8 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old February 7th, 2018, 05:45 PM
Quote:
Originally Posted by ErinRigh View Post
Ok, I don't know what I have done, but when I switch to the class tab, I get the following error;

Attempt to access non-live pick via script fails for pick 'cMALHarStr'
Location: 'additem' script for Portal 'ClsBaseCom' near line 2
- - -
Attempt to access 'focus' pick or thing from script when no focus exists
Location: 'additem' script for Portal 'ClsBaseCom' near line 4

cMALHarStr is the new ability
ClsBaseCom is the companion table on a class helper. I don't know why that would have anything to do with this. cMALHarStr is a class ability, right? What is bootstrapping it?
Aaron is offline   #9 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old February 7th, 2018, 05:50 PM
Quote:
Originally Posted by ErinRigh View Post
Actually it is limited to 1 attack per round (standard action) but at 14th level they may make 2 attacks, both at -2, like rapid shot
Rapid shot is an extra attack on a full attack, this is a different type of action, if I understand correctly. You can force a weapon to show a single attack relatively easily by assinging a tag. Forcing it to exactly two is possible, but it would require messing around with the matrix which shows attacks, which is much less simple. Probably not worth the effort.

Let me look around the processes for generating attack bonuses in case there is a tag or something I forgot about which might make this easier.
Aaron is offline   #10 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 06:46 AM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.