Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Card Vault Forums > Card Vault

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
aetherknight at yahoo.co.
Guest
 
Posts: n/a

Old October 28th, 2002, 01:09 AM
OK, finally getting round to full-on testing of my Raw Deal files!
Woooo! There's a rule that is still causing me grief, though, so
I'll elaborate, and see if anyone can help!

I have a Superstar card (character) in deck2, and two playdecks:
deck1 (Arsenal) and deck3 (Backlash). You may only have one
Superstar card in play.

A Superstar has a logo which appears on the Superstar card. Certain
cards in the playdecks can also carry superstar logos, which are
special cards that can be played by that character. I want to check
that if a user selects such a card, that they have picked a card
that is valid for play by that Superstar. The solution that Rob
suggested (below) works great if there is only one logo on the card.

HOWEVER - certain cards carry more than one logo. With the current
solution, you get one validation failure for each additional symbol
on each card.

The basic test for validity is:
"If a card in the playdecks has logos on it, does one of those logos
match the logo on the character card?"

What am I missing? Can anyone help?

Regards,

Steve.

--- In cardvault@y..., Rob Bowes <rob@w...> wrote:
> To make this work, I need to make sure you've got things
structured the
> same way I'm thinking, so I'm going to start with steps that you
may
> already have in place from your description. Then I'll build on
that to
> reach the full solution. I'm going to use a single character as an
example,
> and you can extrapolate this to other characters, as needed.
>
> 1. Start with a tag group named "character" and create a tag for
each
> character. For this example, let's use the name "Fred". So define
the tag
> group and a tag of "Fred" within it.
>
> 2. Assign the "character.Fred" tag to the Fred character card.
>
> 3. Define another tag group named "ischar" and create a tag for
each
> character. We'll use this to identify which cards require which
characters.
> So define the tag group and add a tag of "Fred" within it.
>
> 4. Assign the "ischar.Fred" tag to all cards that require the Fred
> character to be in the deck.
>
> Everything is in place that we need. Now let's look at the rule
you need to
> write...
>
> 1. The rule needs to span multiple cards, so you have to write a
rule with
> deck scoping.
>
> 2. Since you need to verify that the character card is present for
any
> cards requiring the character, you'll have to write a separate
rule for
> each character - i.e. one rule to check for Fred, another for
George, etc.
>
> 3. Since we have a separate rule for each character, the rule
needs to be
> declared valid if there are no cards requiring that character.
This is done
> with the term "card:ischar.Fred = 0". So we'll start each rule
with a first
> term of "card:ischar.Fred = 0" and use an OR ('|') to combine it
with the
> rest of the rule. This way, the rest of the rule will be ignored
if there
> are no cards requiring Fred.
>
> 4. If our rule gets past the first term, then we know there is at
least one
> card that requires our character. So the next part is to verify
the
> character is present. This done with the term "card:character.Fred
> 0".
>
> 5. Putting it all together, our rule is given below. This rule
verifies
> that we have at least one Fred card when there are any cards
present that
> require Fred.
> (card:ischar.Fred = 0) | (card:character.Fred > 0)
>
> 6. Verifying separately that a card is doesn't have any character
> requirements is unnecessary with the above rule. If a card has no
character
> requirements, it will satisfy the first term of each rule and be
declared
> valid for each rule.
>
> 7. The last factor to address is the actual scope of the deck
rule. Since
> you have two play decks, you either have to assign the rule a
scope of
> "all" OR you have to define the rule twice, with each instance of
the rule
> applying to a separate deck. However, given your description of
things, you
> should be fine with simply using a single rule with "all" scope.
>
> Now that everything is figured out, the complete rule entry within
the data
> file will look something like this:
> <rule id="isFred" scope="all"
> message="One or more cards require Fred" summary="Fred needed">
> <![CDATA[
> (card:ischar.Fred = 0) | (card:character.Fred > 0)
> ]]>
> </rule>
>
> I'm quite curious what prompted the placement of the character
card in its
> own separate deck. Was it done in an effort to make the above
rules work
> correctly? If so, then it should not be necessary and you can have
the
> character card placed into a deck with the rest of the cards. If
not,
> please explain. There are SO many different games, each with its
own
> assortment of bizarre game mechanics, and I'm always looking to
learn more
> about those mechanics so that future releases of Card Vault can
better
> support them. :-)
>
> Hope all this helps,
> Rob
>
>
> At 03:15 PM 10/3/2002 +0000, you wrote:
> >I've got a rule that I'm trying to put together, which goes a
little
> >like this:
> >
> >You have a character card, and two play decks. There are certain
> >cards in those decks which are flagged as only being played by
> >specific character(s).
> >
> >Now, I've got the character card set up as existing in its own
deck,
> >separate from the play decks, and I've got a tag group set up to
> >hold the characters that can use a specific card (the character
card
> >holds a single value in that tag group).
> >
> >How can I check that all the cards in the play decks are either
non-
> >character based, or have the required character attribution?
>
>
> -------------------------------------------------------------------
--------
> Rob Bowes (rob@w...) (559) 658-6995
> Lone Wolf Development
www.wolflair.com


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Sell a Home for Top $
http://us.click.yahoo.com/RrPZMC/jTm...3IAA/WuQolB/TM
---------------------------------------------------------------------~->
  #1 Reply With Quote
 

Thread Tools
Display Modes

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Greetings, I'm in over my head! (most likely) tkitch at thrasherkitch.c Army Builder 28 March 7th, 2006 09:26 PM
Trying to get my head 'round a rule... aetherknight at yahoo.co. Card Vault 4 October 6th, 2002 02:18 PM


All times are GMT -8. The time now is 05:25 PM.


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