View Single Post
Garfunkel
Senior Member
Volunteer Data File Author
 
Join Date: May 2005
Location: Grenoble, France
Posts: 167

Old February 10th, 2012, 03:25 AM
Hello,

I don't know the right behaviour you need :
Is it the number of models, or units ?

For models, you can use the script:
Quote:
if (tally[model:size.M&!type.CAH] > tally[model:type.CAH]) then
@valid = 1
else
if (tally[model:type.CAH] =0) then
@valid = 1
endif
endif
It seems it works.
If it is units number to be compare, just replace the model term with unit.
I added a test in case there is no superheavy. (When the roster is empty for example)

What you misses is that your heavy cruisers also have the tag size.M.
The real test is you need more ship with size.M AND NOT type.CAH than type.CAH ships.

I advise you to show size and type on the available list profil instead of simply display it on the info. It is easyer to fulfill the rule when the discriminating type is displayed for the whole range of ship. (Instead of just one on the info) And use the same terms on the rule message than what is displayed (S or Small, M or Medium, Heavy Cruiser or CAH) or add the abbreviation in the rule message.

Hope that helps,

Garfunkel
Garfunkel is offline   #2 Reply With Quote