Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - d20 System (http://forums.wolflair.com/forumdisplay.php?f=46)
-   -   Calculating Ki points (http://forums.wolflair.com/showthread.php?t=7439)

Abrion February 8th, 2008 07:37 PM

Calculating Ki points
 
I am in the process of creating the ninja character class from CA and have gotten stuck calculating the ki points for the character's various abilities. The points are calculated by gaining 1 point for every two levels plus points equal to the character's wisdom bonus. I can calculate the points for levels just fine but have not been able to add the wisdom bonus.

Here is what I have so far:

~ set ki points for levels
var level as number
level = field[xTotalLev].value / 2
level = round(level, 0, 1)
field[hTotal].value = level

I've tried using the following code to add to the level total but apparently this doesn't work:

var bonus as number
bonus = hero.child[aWIS].field[aModBonus].value

Can anyone help?

Abrion February 9th, 2008 05:24 AM

I figured out the problem. I was in the wrong phase. I needed this to occur in the PostAttr phase and it worked like a charm.

Here is the code I used in case it helps anybody else out:

~ set ki points for levels
var level as number
level = field[xTotalLev].value / 2
level = round(level, 0, 1)
~ add wisdom bonus
var bonus as number
bonus = hero.child[aWIS].field[aModBonus].value
var total as number
total = level + bonus
field[hTotal].value = total

This will display the ki points in the charges section.


All times are GMT -8. The time now is 02:16 PM.

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