Ability to define custom series for cards

From WarfishWiki

Jump to: navigation, search

I would love to see the ability to define a custom series for my cards in my maps (or during customized games). I realize that this could possibly be severely difficult if you took all mathematical considerations for a series (or maybe not, it's been a while since I've studied all the possibilities in a calc class - course, I suspect there's a reason this doesn't exist already).

[edit] Card Distribution

Do the three "types" of cards always have to be equal? Does the distribution have to be 18/18/18/2 Wild? I would like to have 6/6/9/0 Wild. I'd also like to design each of these cards. Would it be possible to upload 66 card images and then assign them into the three (four with wild cards) types?

[edit] Card Scale

For example, I've grown to hate the 4,6,8,10... scale as it's just too much. 4,5,6,7... works better, but it can still get out of hand. 5,5,5,5... is nice, but it does take away some card strategy. 4,6,8,10,4... is ok, but some people might almost always benefit from it where others don't (and a 5-way game has gotta suck even more for the 5th person, who the card bonus is partly meant for anyway). 3,6,9,12... and 5,10,15,20... and 4,6,8,10,15,20... or what have you are all totally ridiculous.

I would like to see the ability to define something like 4,4,4,5,5,5,6,6,6... A cap might be nice to set also, or perhaps a number that when reached causes the series to play out backwards to the beginning, etc.

I figured I would just include the current code for how the series are handled so we have a common point of reference for discussion. In theory instead of the 'a','b' and 'prefix' values being predefined they could be moved into a designer definable plugin without too much trouble, but it looks like this system would not cover all the possible series that you have listed as examples. We probably just have to figure out how to add additional "series parameters" to accommodate some of the other cases that you have listed. --Steven 20:14, 11 January 2009 (UTC)
class wrCardScale:
   def __init__ (self):
       # formula is "prefix,a+(b*x)" where x is
       self._scales = ( {'a':0,'b':0,'prefix':(0,)},
                        {'a':4,'b':1,'prefix':()},
                        {'a':15,'b':5,'prefix':(4,6,8,10,12)},
                        {'a':5,'b':0,'prefix':()},
                        {'a':0,'b':0,'prefix':(4,6,8,10)},
                        {'a':4,'b':2,'prefix':()},
                        {'a':5,'b':5,'prefix':()},
                        {'a':3,'b':3,'prefix':()} )
   def getValue(self,scaleid, pos):
       if scaleid >= len(self._scales):
           return 0
       if pos > 255: pos = 255
       prefix = self._scales[scaleid]['prefix']
       if pos < len(prefix):
           return prefix[pos]
       else:
           if self._scales[scaleid]['a'] == 0 and self._scales[scaleid]['b'] == 0:
               return prefix[pos % len(prefix)]
           else:
               return self._scales[scaleid]['a'] + (self._scales[scaleid]['b'] * (pos - len(prefix)))
   def getValues(self, scaleid, num = 10, start = 0):
       rlist = []
       for i in range(start, start + num):
           rlist.append(self.getValue(scaleid, i))
       return rlist

See also Change_Card_Distribution_System

Personal tools