Difference between revisions of "Manual"

From CCG Kit
Jump to: navigation, search
Line 1: Line 1:
 +
{| style="width: 920px; horizontal-align: left;"
 +
|
 +
 
== Stats ==
 
== Stats ==
  
Line 31: Line 34:
  
 
TODO: Abilities.
 
TODO: Abilities.
 +
 +
|}

Revision as of 01:39, 19 July 2017

Stats

Stats are a fundamental concept in CCG Kit. They represent integer values that can change over the course of a game and are used in both players and cards. For example, a player could have life and mana stats and a creature card could have cost, attack and defense stats. Stats are transmitted over the network, which means you should only use them to represent values that can actually change over the course of a game in order to save bandwidth.

Stats have the following properties:

  • Base value: The initial value of the stat.
  • Original value: A copy of the initial value of the stat (useful as the base value may change over time).
  • Minimum value: The minimum value of the stat.
  • Maximum value: The maximum value of the stat.
  • Modifiers: The modifiers that affect the current value (+3, -1, etc.). They can be permanent or temporary (i.e., have a duration of X turns). A modifier will never change the effective value of the stat in a way that makes it lower than its minimum value or higher than its maximum value. A modifier with a duration of 0 means it is permanent.
  • Effective value: The current value of the stat with all its modifiers applied. Game code will mostly use this to retrieve the actual value of a stat at a given moment in time.

Stats are implemented by the Stat class.

Keywords

You can think of keywords as enum-like stats. They are particularly useful if you need cards to have a field with a specific subset of possible values (like a static ability, which could take values such as "taunt" or "hexproof"). Just like stats, keywords are transmitted over the network.

Keywords are implemented by the Keyword class.

Properties

Properties are card values that are constant. Because they never change, they are never transmitted over the network (which helps saving bandwidth). Common examples of properties in a CCG are the card's name, its picture, its collector number, etc.

Effects

TODO: Effects.

Abilities

TODO: Abilities.