Guest
Posts: n/a
|
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? ------------------------ Yahoo! Groups Sponsor ---------------------~--> Plan to Sell a Home? http://us.click.yahoo.com/J2SnNA/y.l...fIAA/WuQolB/TM ---------------------------------------------------------------------~-> |
#1 |
Guest
Posts: n/a
|
--- Steve Ironside <aetherknight@yahoo.co.uk> wrote:
> I've got a rule that I'm trying to put together, which goes a little > like this: I will warn you right now that rules will likely make your head hurt > 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? You will have to use a rule that spans multiple decks. Take a look at the rules for the L5R data set... I had to span multiple decks there for some rules. ===== --- Kuni Tetsu Clan War rules guy Moderator of ClanWar-l __________________________________________________ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.com ------------------------ Yahoo! Groups Sponsor ---------------------~--> Plan to Sell a Home? http://us.click.yahoo.com/J2SnNA/y.l...fIAA/WuQolB/TM ---------------------------------------------------------------------~-> |
#2 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 8,232
|
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@wolflair.com) (559) 658-6995 Lone Wolf Development www.wolflair.com ------------------------ Yahoo! Groups Sponsor ---------------------~--> Plan to Sell a Home? http://us.click.yahoo.com/J2SnNA/y.l...fIAA/WuQolB/TM ---------------------------------------------------------------------~-> |
#3 |
Guest
Posts: n/a
|
Thanks for that, Rob! I was coming at it from the other direction,
so it's no wonder I was getting confused! The game I'm setting up is Raw Deal - you have your character card, which gives you a note of your starting hand size, superstar value (determines who plays first), and a superstar ability (effect text). This is completely different from all the other cards in the game, so I put it into a seperate deck to achieve two results: 1. Superstar cards cannot physically be added to any of the play decks, since I can use the deck attribute on the card element; 2. When seperate defined per-deck views come along, then I'm hoping that I can display this entirely different information more sensibly to the player (I've got it set up as extra data as well as invisible tag groups at the moment). 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 ---------------------~--> Plan to Sell a Home? http://us.click.yahoo.com/J2SnNA/y.l...fIAA/WuQolB/TM ---------------------------------------------------------------------~-> |
#4 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 8,232
|
Sounds like a reasonable strategy. Thanks for the info on Raw Deal. I've
never seen it played, so I wasn't aware of its special behaviors. Thanks, Rob At 08:11 AM 10/4/2002 +0000, you wrote: >Thanks for that, Rob! I was coming at it from the other direction, >so it's no wonder I was getting confused! > >The game I'm setting up is Raw Deal - you have your character card, >which gives you a note of your starting hand size, superstar value >(determines who plays first), and a superstar ability (effect text). >This is completely different from all the other cards in the game, >so I put it into a seperate deck to achieve two results: >1. Superstar cards cannot physically be added to any of the play >decks, since I can use the deck attribute on the card element; >2. When seperate defined per-deck views come along, then I'm hoping >that I can display this entirely different information more sensibly >to the player (I've got it set up as extra data as well as invisible >tag groups at the moment). > >Steve! --------------------------------------------------------------------------- Rob Bowes (rob@wolflair.com) (559) 658-6995 Lone Wolf Development www.wolflair.com ------------------------ Yahoo! Groups Sponsor ---------------------~--> Home Selling? Try Us! http://us.click.yahoo.com/QrPZMC/iTm...fIAA/WuQolB/TM ---------------------------------------------------------------------~-> |
#5 |
Thread Tools | |
Display Modes | |
|
|
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 29th, 2002 12:23 PM |