Difference between revisions of "Scripting"

From theFarWilds
Jump to: navigation, search
(New page: This is the start of the scripting API. It will be expanded over time. If you want something ask for it in the forum. Functions you can implement: void setupGame(); // Sets up the game s...)
 
Line 10: Line 10:
  
 
void playersTurn(IPlayer player);  
 
void playersTurn(IPlayer player);  
 +
 +
bool canPass(IPlayer player);
 +
// called when the real players try to pass. This is so you can ensure they do a particular action before passing.
  
  

Revision as of 20:09, 14 March 2010

This is the start of the scripting API. It will be expanded over time. If you want something ask for it in the forum.

Functions you can implement:

void setupGame(); // Sets up the game state such as # of players, Map Size, if they need to set a deck or not, etc

void beforeStart(); // Do things here before any action. Place creatures and buildings, change their decks etc.

void afterAction();

void playersTurn(IPlayer player);

bool canPass(IPlayer player); // called when the real players try to pass. This is so you can ensure they do a particular action before passing.


Functions you can call:


Example Scripts: