• 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

Bonus Spell Casting Slots

Mergon

Well-known member
I am trying to find the fields (or array) that tracks how many spells a hero can cast per spell level.

ie: 5th level caster - 4 x 1st, 3 x 2nd, 2 x 3rd

I'm trying to create an item that grants +1 to the number of 1st level spells a hero can cast.

For example a hero who is a 5th level caster would have 5 x 1st, 3 x 2nd, 2 x 3rd with this item.

I've found a set of children on hero called: SlotHold1 through SlotHold9 that I thought would do the trick.Each has a field named MaxAllow that I thought could e incremented, but I've had no luck.

Here is the code I am using atm:

Phase: Post-Level, Priority: 21000

~ If not equipped, get out now!
doneif (field[gIsEquip].value = 0)

~ If not attuned, get out now!
doneif (field[gIsAttuned].value = 0)

~ if not a spellcaster, get out now!
doneif (tagis[Hero.Caster] = 0)

~perform linkage
.setfocus
~doneif (state.isfocus = 0)

var iLevel as number
iLevel = herofield[tMaxCaster].value

if (iLevel >= 1) then
hero.child[SlotHold1].field[MaxAllow].value += 1
endif

if (iLevel >= 3) then
hero.child[SlotHold2].field[MaxAllow].value += 1
endif

if (iLevel >= 5) then
hero.child[SlotHold3].field[MaxAllow].value += 1
endif

if (iLevel >= 7) then
hero.child[SlotHold4].field[MaxAllow].value += 1
endif


This items should add +1 to the number of spells that the wielder could cast per level of spells he can cast to a max of 4th level spells. :confused:
 
Forget it, I found my problem right after posting this. I was looking for tagis[hero.Caster] on the item, not on the hero . .. <bah.
 
haha - the quickest way to solve any issue that i have found is to post it here and then /facepalm as you stare at the solution.
 
I've never come across the term 'Rubber duck debugging' before, but I shall treasure it henceforth! Right up there with 'bit bucket.' (No, not the website. Think punch cards.)
 
<ack> Punch card.

The year is 1981, I just finished a 1200 card program. I'm takign the stairs from the building's cafeteria to the auditorium for a math course . . .

Card box slips and spills its contents does the stairs . . .

<cry>
 
@ Mergon.... you're dating your self :O) ( I feel your pain by the way... ) only you left out the part where it was raining and the wind just blew the cards across campus... and AFTER your FINALLY gathered, replaced and resorted and debugged your cards your realize after many midnight hours in the computer lab (because no one had a computer then) ONE card was missing or has a crease the width of a hair that makes it a "null error"...... :p

And since it is certain that some wont fully understand the Mergon Dilemma.....

Translation for all you Millennials...

Mom got tired of the way your room "looked" and shuffled and put all your magic, pokemon, baseball AND those special "foil cards" that are "collectors" into one box to get them "organized"... :D

And somewhere within that single box, is that "epic deck" you built for the tournament TONIGHT.:mad::p
 
Punch cards, you guys shouldn't carbon date yourselves online. I was perfectly fine listening to my professors discuss punch cards as a thing of the past while using Mathematica to run 2 lines of code of solve complex iterative method problems. My university still has punch card machines in a museum like display on the first floor of the computational sciences building though. Boo Fortran, Boo I say!
 
Back
Top