• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Some help with coding please!

ErinRigh

Well-known member
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
 
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.
 
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
 
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?
 
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

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

Store this in another value field.

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

No, I don't think this is something which needs conditional text.

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)

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.

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

Can do this by applying a tag in your foreach.

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.

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:
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
 
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
 
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?
 
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.
 
Would it be possible to limit to 1 attack like heavy crossbows, and then add the Helper.ExtraHigh to it similar to speed ability, and write a script to give both attacks a -2 penalty?
 
this is my script for this thus far but it is not pushing extra high

Post-Attr/10000

Code:
        if (field[xAllLev].value >= 14) then
      foreach pick in hero from BaseWep where "wCategory.Melee?"
        perform eachpick.pushtags[Helper.ExtraHigh]

        ~ Give a penalty to the melee attacks. 
        eachpick.field[atmPenalty].value -= field[abValue5].value
        nexteach
          endif

can you see anything wrong?
 
Yes. Push tags copies TAGS from the current Pick to the eachpick. So if your Pick does not have the tag "Helper.ExtraHigh" nothing is going to happen.

Instead use "assign" to assign a tag to the specific pick. I would advise avoid using pustags/pulltags until you get a better handle on them. Until then use only delete/assign for tags. :)

Also you have "wCategory.Melee?" as a wild card search? I don't recall their being different Melee types. A "?" in a search expression means wild card. Meaning 'wCategory.?' for search for picks with any category. In this case you don't need a wild card tag search. Please remove the "?".
 
Last edited:
Back
Top