On 7/21/07, James Paige <[EMAIL PROTECTED]> wrote:
> On Fri, Jul 20, 2007 at 05:39:18PM -0500, Mike Caron wrote:
> > On 7/20/07, James Paige <[EMAIL PROTECTED]> wrote:
> > > On Fri, Jul 20, 2007 at 05:36:04PM -0500, Mike Caron wrote:
> > > > On 7/20/07, James Paige <[EMAIL PROTECTED]> wrote:
> > > > > On Fri, Jul 20, 2007 at 05:28:16PM -0500, Mike Caron wrote:
> > > > > >
> > > > > > No no, make the type named. The Union should be anonymous.
> > > > > >
> > > > > > (actually, there is no place in the code that actually uses the stat
> > > > > > names, so we could just turf that)
> > > > >
> > > > > But they would be really nice to have in a lot of places. They would
> > > > > make the battle code especially a lot cleaner.
> > > > >
> > > > > I am not sure which is greater: the number of places where we need to
> > > > > access stats as an array, or the number of places where we need to
> > > > > access them individually...
> > > >
> > > > To be frank, there are only a few places where they would need to be
> > > > accessed by name. Mostly in the attack damage routine, and inns.
> > > >
> > > > Right now, there isn't any place. But, I set the Stats UDT up for
> > > > future reuse in other applications, so... hmm... I wonder if we could
> > > > get away with naming it "sta", so that we can do this:
> > > >
> > > > her.sta.hp
> > > > her.sta(0)
> > >
> > >
> > > How about her.st.hp and her.sta(0)?
> >
> > Win. It works for me.
>
> Okay, I'll do it now.
>

Hold on! Why on earth don't you just do this:

Union Stats
        stat(11) as integer
        Type
                hp as integer
                mp as integer
                str as integer
                acc as integer
                def as integer
                dog as integer
                mag as integer
                wil as integer
                spd as integer
                ctr as integer
                foc as integer
                hits as integer
        End Type
End Union

It works in 0.16, and it's less ugly. Did everyone forget about RGBcolor?

Now, why did you two call the array sta instead of stat? (Also, it
should have a ubound of 11, not 12) I would commit this, but I want to
rename sta.

TMC
_______________________________________________
ohrrpgce mailing list
[email protected]
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org

Reply via email to