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
Redcap's Corner
Senior Member
 
Join Date: Jul 2010
Posts: 149

Old April 6th, 2015, 02:23 PM
A few months back I put together a replacement ability for the magus's Spell Combat in an attempt to make the ability functional in Hero Lab. It works fine... except any time I close out Hero Lab with Spell Combat still activated, it adds a -2 untyped penalty to my character's attacks IN ADDITION to the one I get from activating the ability. Can anyone take a quick look at my code and see if they can figure out why I'm occasionally getting this extra stacking penalty? I'm sure it's something simple, like adding one of the standard doneif statements. I'm just trying to figure out which of those statements is necessary and when.

Post-Attributes/1000
Code:
~ If this ability hasn't been activated, ignore the following.
doneif (field[abilActive].value = 0)

~ Apply the attack penalty.
hero.child[Attack].field[atmPenalty].value += field[actUser].value - 2

~ Apply the concentration bonus.
if (field[xIndex].value >= 4) then
  perform delete[Helper.UserAdjust]
elseif (field[xIndex].value = 3) then
  hero.child[cHelpMag].field[cConcCheck].value -= field[actUser].value * 2
elseif (field[xIndex].value = 2) then
  hero.child[cHelpMag].field[cConcCheck].value -= field[actUser].value + 2
else
  hero.child[cHelpMag].field[cConcCheck].value -= field[actUser].value
endif
Redcap's Corner is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old April 6th, 2015, 03:34 PM
xIndex is the field that specifies the position of that ability in the list of class specials for that class.

xCount is the number of copies that have been activated, so if you're making changes, you want to use xCount, not xIndex.
Mathias is offline   #2 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 12:32 AM.


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