• 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

[LotR] Rule question and upcoming release

  • Thread starter Thread starter turing2 at rcn.com
  • Start date Start date
T

turing2 at rcn.com

Guest
OK, so my brain is failing. Decipher has introduced a new tourney
format, complete with banned list (boo, hiss!). I'm trying to make a rule
that tells me if any of the banned cards are in "deck1", and for the life
of me I can't figure out the logical operation that I should be using. I
know it's something stupid, and I'm going to bang my head in the desk when
I see what it is, but at the moment said extremity is full of cold
medication and can't logic its way out of a wet paper bag. So, an example
of what I have is:

<rule id="xlist" message="No banned cards in the Standard Format!"
summary="Banned card." scope="deck1">
<set set="stdtow"/>
<![CDATA[
(
(card:id.Fel1R40 > 0) &
(card:id.Fel1R45 > 0)
)
]]>

Other than this, the latest (mostly bug-fix) release is ready to
go. All of the "orphan" issues have been found, I think. Various other
problems that people have reported have also been fixed, at least as of
today's reports.

Mark.

"Well I've always said, There's nothing an agnostic can't do if
he really doesn't know whether he believes in anything or not."
-- Graham Chapman


------------------------ Yahoo! Groups Sponsor ---------------------~-->
FREE Cell Phones with up to $400 Cash Back!
http://us.click.yahoo.com/_bBUKB/vYxFAA/i5gGAA/WuQolB/TM
---------------------------------------------------------------------~->
 
You could just add a "banned" tag, and then have a rule check for banned cards.
If you limit that rule to only applying in the particular format, then you are
good to go :)

Another choice would be to do a "tournament" tag group, which is what I did in
L5R. If the card does not have the proper tag for the selected tournament
format, it creates a validation error. This also uses the mechanism where rules
work only for a particular format, so that should help you out in either case.

--- Mark Perneta <turing2@rcn.com> wrote:
> OK, so my brain is failing. Decipher has introduced a new tourney
> format, complete with banned list (boo, hiss!). I'm trying to make a rule
> that tells me if any of the banned cards are in "deck1", and for the life
> of me I can't figure out the logical operation that I should be using. I
> know it's something stupid, and I'm going to bang my head in the desk when
> I see what it is, but at the moment said extremity is full of cold
> medication and can't logic its way out of a wet paper bag.

=====
---

Kuni Tetsu
Clan War rules guy
Moderator of ClanWar-l

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get a FREE REFINANCE QUOTE - click here!
http://us.click.yahoo.com/2CXtTB/ca0FAA/i5gGAA/WuQolB/TM
---------------------------------------------------------------------~->
 
--- In cardvault@yahoogroups.com, Kuni Tetsu <kuni_tetsu@y...> wrote:
> You could just add a "banned" tag, and then have a rule check for
banned cards.
> If you limit that rule to only applying in the particular format,
then you are
> good to go :)

Absolutely true. However, that would require that I change
RULES.DAT, LOTR.DEF, the generator code and all of the reference
files. I'm being lazy. :) Besides, if I can get this to work off the
card id (and I can't see a logical reason why it won't) I can do it by
only changing RULES.DAT if/when Decipher adds new cards to the list.
Either way, I need a rule that checks to see if a particular tag is
present, and pops up a flag if it is. I may have this one figured
out, but if anyone can give me a hint before I get home this
afternoon (still no CV at work) it may reduce the overall pain level.

Mark.



------------------------ Yahoo! Groups Sponsor ---------------------~-->
FREE Cell Phones with up to $400 Cash Back!
http://us.click.yahoo.com/_bBUKB/vYxFAA/i5gGAA/WuQolB/TM
---------------------------------------------------------------------~->
 
Mark Perneta wrote:

> OK, so my brain is failing. Decipher has introduced a new
> tourney
> format, complete with banned list (boo, hiss!). I'm trying to make a
> rule
> that tells me if any of the banned cards are in "deck1", and for the life


an easy way to do it:

create an extension file called banned.ext

assign this tag to each banned card:
<extcard card="cardID" group="restrict" tag="banned"/>

assign this tag to each restricted card:
<extcard card="cardID" group="restrict" tag="banned"/>

now in the def file, create a tag group:
<group id="restrict" name="Restricted/Banned Cards" filter="no" width="5"/>
<value id="banned" name="Banned"/>
<value id="one" name="Restricted"/>
</group>

now in the rules.dat file:

<rule id="banned" scope="all" message="Banned cards are not allowed in
this format." summary="Banned Cards" priority="31">
<![CDATA[ restrict.banned < 1 ]]>
<set set="std"/>
</rule>

<rule id="restricted" scope="card" message="Only 1 of Each Restricted
Card allowed." summary="Dupe Restricted Cards" priority="28">
<![CDATA[ !restrict.one | (# <= 1) ]]>
<set set="std"/>
</rule>

make sure you adjust the set to the ruleset that you want the cards
banned in.
if cards are banned in one format, but not in another you should change
the tag id from "banned" to (for example) "banfelblo" (for
banned-fellowship-block)
if the cards are banned in all formats than just used banned.

Take a look at the doomtrooper files I did. there are some cards that
are banned in head-to-head games, some in team games, some always, some
restricted.

--
Jim Williamson <jim@timewarpcomics.com <mailto:jim@timewarpcomics.com>>
TimeWarp Comics & Games
(973) 857-9788
www.timewarpcomics.com <http://www.timewarpcomics.com>



------------------------ Yahoo! Groups Sponsor ---------------------~-->
FREE Cell Phones with up to $400 Cash Back!
http://us.click.yahoo.com/_bBUKB/vYxFAA/i5gGAA/WuQolB/TM
---------------------------------------------------------------------~->
 
At 12:19 PM 4/8/2003 -0400, Jim Williamson wrote:
>an easy way to do it:
>
>create an extension file called banned.ext

[snip]
Excellent. After a few bumps, it works fine.

Mark.

"Well I've always said, There's nothing an agnostic can't do if
he really doesn't know whether he believes in anything or not."
-- Graham Chapman


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Make Money Online Auctions! Make $500.00 or We Will Give You Thirty Dollars for Trying!
http://us.click.yahoo.com/yMx78A/fNtFAA/i5gGAA/WuQolB/TM
---------------------------------------------------------------------~->
 
c_turing wrote:

> --- In cardvault@yahoogroups.com, Kuni Tetsu <kuni_tetsu@y...> wrote:
> > You could just add a "banned" tag, and then have a rule check for
> banned cards.
> > If you limit that rule to only applying in the particular format,
> then you are
> > good to go :)
>
> Absolutely true. However, that would require that I change
> RULES.DAT, LOTR.DEF, the generator code and all of the reference
> files. I'm being lazy. :) Besides, if I can get this to work off the
> card id (and I can't see a logical reason why it won't) I can do it by
> only changing RULES.DAT if/when Decipher adds new cards to the list.
> Either way, I need a rule that checks to see if a particular tag is
> present, and pops up a flag if it is. I may have this one figured
> out, but if anyone can give me a hint before I get home this
> afternoon (still no CV at work) it may reduce the overall pain level.


I still recommend doing it with tags. It will make editing easier in the
future, and I'm pretty sure causing the rules to do all the work will
cause the datafiles to run slower. I don't know how many cards they've
banned/restricted, but it shouldn't take that long.

Rob, any input on this one?

--
Jim Williamson <jim@timewarpcomics.com <mailto:jim@timewarpcomics.com>>
TimeWarp Comics & Games
(973) 857-9788
www.timewarpcomics.com <http://www.timewarpcomics.com>



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get a FREE REFINANCE QUOTE - click here!
http://us.click.yahoo.com/2CXtTB/ca0FAA/i5gGAA/WuQolB/TM
---------------------------------------------------------------------~->
 
At 02:34 AM 4/9/2003 -0400, Jim Williamson wrote:
>I still recommend doing it with tags. It will make editing easier in the
>future, and I'm pretty sure causing the rules to do all the work will
>cause the datafiles to run slower. I don't know how many cards they've
>banned/restricted, but it shouldn't take that long.

Well, as mentioned in a different reply, I used your
recommendation of an .EXT file. There are only 15 banned cards (at the
moment) but they are spread across four of the five sets of cards.

Mark.

"Well I've always said, There's nothing an agnostic can't do if
he really doesn't know whether he believes in anything or not."
-- Graham Chapman


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get a FREE REFINANCE QUOTE - click here!
http://us.click.yahoo.com/2CXtTB/ca0FAA/i5gGAA/WuQolB/TM
---------------------------------------------------------------------~->
 
I agree with everything that Jim has said on the topic thus far. :-)

Doing it as you are will run into some interesting problems in the future,
so you'll ultimately end up having to redo it later (most likely). The key
problem will be when banned/resticted cards are reprinted in the future. At
that point, you'll end up needing to impose the restrictions across all MRP
equivalent cards. The only way to do this without LOTS of work is to
utilize tags. If you do that, then it actually becomes trivial.

An example of this can be found in the Magic data files. Each card that is
banned/restricted is assigned an appropriate tag to indicate the fact. Then
the rule becomes a simple matter of checking for the tag and using the MRP
card count syntax to verify the limit is observed. Take a look at
"rules.dat" for the Magic files to see how easy it is when you've got the tags.

Modifying the converter shouldn't be too difficult. First, add a column (or
columns) to the database/spreadsheet that correspond to the
banned/restricted status for the various tournament formats. Then just set
the contents of the field appropriately for each card that is
banned/restricted. Next, check the field and add the appropriate tag(s) to
the card when the field contains something. Next, add a single tag group to
the definition file with the various banned/restricted tags. Lastly, define
the rule(s) that operate on those tags. When I helped Robert with this for
the Magic files, the whole process took no more than a couple hours,
including heavy testing. And you also have the Magic files as a reference
on how to do this. :-)

Anyways, that's my perspective on the topic. I hope this proves useful to
you. :-)

Thanks, Rob

At 02:34 AM 4/9/2003 -0400, you wrote:
>I still recommend doing it with tags. It will make editing easier in the
>future, and I'm pretty sure causing the rules to do all the work will
>cause the datafiles to run slower. I don't know how many cards they've
>banned/restricted, but it shouldn't take that long.
>
>Rob, any input on this one?


---------------------------------------------------------------------------
Rob Bowes (rob@wolflair.com) (559) 658-6995
Lone Wolf Development www.wolflair.com


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Save Smiley. Help put Messenger back in the office.
http://us.click.yahoo.com/4PqtEC/anyFAA/i5gGAA/WuQolB/TM
---------------------------------------------------------------------~->
 
ok. I've been getting mail out of sequence today and didn't get the
reply till after I sent this.

BTW: good work on the files.

Mark Perneta wrote:

> At 02:34 AM 4/9/2003 -0400, Jim Williamson wrote:
> >I still recommend doing it with tags. It will make editing easier in the
> >future, and I'm pretty sure causing the rules to do all the work will
> >cause the datafiles to run slower. I don't know how many cards they've
> >banned/restricted, but it shouldn't take that long.
>
> Well, as mentioned in a different reply, I used your
> recommendation of an .EXT file. There are only 15 banned cards (at the
> moment) but they are spread across four of the five sets of cards.
>
> Mark.
>
> "Well I've always said, There's nothing an agnostic can't do if
> he really doesn't know whether he believes in anything or not."
> -- Graham Chapman




--
Jim Williamson <jim@timewarpcomics.com <mailto:jim@timewarpcomics.com>>
TimeWarp Comics & Games
(973) 857-9788
www.timewarpcomics.com <http://www.timewarpcomics.com>



------------------------ Yahoo! Groups Sponsor ---------------------~-->
FREE Cell Phones with up to $400 Cash Back!
http://us.click.yahoo.com/_bBUKB/vYxFAA/i5gGAA/WuQolB/TM
---------------------------------------------------------------------~->
 
Back
Top