View Single Post
vrimage
Junior Member
 
Join Date: May 2015
Posts: 14

Old August 11th, 2017, 03:12 PM
This might be a bit more complex than the title suggests

I am working on advances right now for my earthdawn system, and have run into a little problem. Let me explain:

Various classed get various abilities at various levels, and since it is possible to have more than one class, It is possible to get the same ability at different class levels. The levels they are aquired on is represented by adding a number of tags to the ability equal to that level.

When increasing an ability, the price of that advance is calculated based on what level it was aquired and the order of the learned classed.

to simplify, the cost could have been something like:
100 * ability rank * learned level * (2 for the first class or 4 for the second)

So I need a way to go through all classes and check if they get the ability, and on what level they get it.

All the abilities are bootstrapped from the classes, using a condition to set the level, and adding one tag for each level.

I was trying to use something like this:
Code:
		if (parent.tagis[AdvanceId.advTalent]<>0) then
			var circle as number
			circle=1
                        startcost=100
			foreach pick in hero where "Discipline.?"
				if (eachpick.tagis[Component.Discipline]<>0) then
					
					startcost=linkage[basis].tagcount[Discipline.#childname[eachpick]]
				endif
			nexteach
			
			incval=linkage[basis].field[trtUser].value + linkage[basis].field[trtBonus].value			
		endif
Nothing inside the foreach works, just using it to give an idea of my thoughts.


Any advice?

thx
vrimage is offline   #1 Reply With Quote