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:
Stats are implemented by the Stat class, which you can find in the Core/Scripts/Foundation folder.
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, which you can find in the Core/Scripts/Foundation folder.
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.
Properties are implemented by the Property class, which you can find in the Core/Scripts/Foundation folder.
CCG Kit was born with extensibility in mind. Central to this idea is the CCG Kit editor, which allows for easy manipulation of the game configuration files that store the fundamental properties of a game and its cards. We are going to walk you through the available options in the CCG Kit editor using the accompanying demo game's configuration as a reference. To open the editor, select the Tools/CCG Kit Editor menu option:
You can open an existing game configuration by clicking on the Open button (your selection will be remembered in future sessions for convenience). The accompanying demo game's configuration is located in the CCGKit/Demo/Resources folder.
Game configuration tab
The game configuration tab allows you to modify the following general settings of your game:
The game/turn actions and end game conditions are a convenient way to script automatic behavior for your game without the need of programming. For example, the accompanying demo game uses the following actions:
And the following end game conditions:
The actions are executed in the same order they have in the editor (from top to bottom).
Game zones tab
The game zones tab allows you to define the game zones available in your game and their settings:
The player tab allows you to define the stats that players in your game will have:
Card types tab
The card types tab allows you to define the stats, properties and destroy conditions that cards in your game will have.
Card stats have the following properties:
Card properties have the following properties:
The keywords tab allows you to define the keywords available in your game and their values.
Card collection tab
The card collection tab allows you to define the cards available in your game and their settings:
There are two types of abilities:
These abilities always have an effect, which is the actual gameplay of the ability ("deal 1 damage to enemy player", "heal all player creatures", etc.).
Additionally, you can use keywords to implement static abilities. Static abilities require additional, custom programming for implementing their specific gameplay (e.g., see the impetus and provoke keywords in the accompanying demo).
Please note that the accompanying demo game does not currently have any examples of cards with activated abilities. This is something we might tackle in a future update (as it requires additional UI work); in the meantime you can also implement your own system because the underlying code exists and is functional. In order to activate an activated ability, you simply need to call the ActivateAbility method in the Player class with appropriate arguments (the zone of the card, the instance identifier of the card and the index of the ability you want to activate). Most likely, you will want to do this from within the DemoHumanPlayer class (if you are taking the demo game as a reference).
The target of an effect can be a player or a card. The target conditions list allows you to specify one or more conditions that need to be true for the target in order for the effect to be triggered. If more than one condition is specified, all of them will need to be true.