• 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

Rules query

  • Thread starter Thread starter geoff.gibbs at btopenworl
  • Start date Start date
G

geoff.gibbs at btopenworl

Guest
I've started messing around with the various validation rules in card vault
(mainly adding rules to existing datafiles while I get the hang of how it
all works) and I've come undone with one rule.

I'd like to specify that the sum of the cost of all copies of any card in
the deck must not exceed a given number.

Specifically, this came up in the D&D minis mass battle rules where you can
spend up to 20% of your points on multiples of a particular miniature.

Does anyone know how I can achieve this effect?
--
Geoff Gibbs
http://www.world-of-geoff.co.uk




------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/WuQolB/TM
---------------------------------------------------------------------~->


Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/cardvault/

<*> To unsubscribe from this group, send an email to:
cardvault-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 
Hi Geoff,

If I understand the question correctly, you're going to need a rule that
employs a number of different elements. One possible solution is outlined
below.

First, you need a rule with card scoping. You also need to make sure you
reference all equivalent cards, so that a figure that has two or more
different versions (e.g. a re-released fig in the future) has all versions
treated as the same figure. This entails use of the "#[equiv]" term.

To get the total cost of all instances of the model within the force,
you'll need to get the individual model cost and multiply it by the count.
To get the model cost, you'll need to obtain that with something like
"val:cost.?". I don't know the D&D minis files, but I'm sure there is a
cost tag associated with them (the name might be slightly different).

The net calculation would be something along the lines of "#[equiv] *
val:cost.?".

Next, you need to get the total cost of the entire force. This is obtained
with something like "sum:cost.?" for the entire force. You can get this
value easily via a deck scoping rule.

Unfortunately, you need it in a card-scoping rule. So how do you solve
this? You need to define a higher priority deck scoping rule that
calculates the force total and saves it into a variable. Then you can
reference that variable in your lower priority card scoping rule.

Setting a variable to the total would look something like:
"eval total as { sum:cost.? }".

Using that variable to compare it within the card scoping rule would look
something like:
"#[equiv] * val:cost.? <= @total * .2"

Please note that I have NOT actually written these rules and tried them.
I'm pretty sure something along these lines ought to achieve the objective
you set forth. Use this as a starting point and give it a try. If you run
into further problems, let me know and I'll take a closer look for you.

Hope this helps,
Rob


At 07:51 PM 2/15/2004 +0000, you wrote:
>I've started messing around with the various validation rules in card vault
>(mainly adding rules to existing datafiles while I get the hang of how it
>all works) and I've come undone with one rule.
>
>I'd like to specify that the sum of the cost of all copies of any card in
>the deck must not exceed a given number.
>
>Specifically, this came up in the D&D minis mass battle rules where you can
>spend up to 20% of your points on multiples of a particular miniature.
>
>Does anyone know how I can achieve this effect?


---------------------------------------------------------------------------
Rob Bowes (rob@wolflair.com) (650) 588-8252
Lone Wolf Development www.wolflair.com



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/WuQolB/TM
---------------------------------------------------------------------~->


Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/cardvault/

<*> To unsubscribe from this group, send an email to:
cardvault-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 
Back
Top