Difference between revisions of "Scripting Examples"
From theFarWilds
(New page: Example Scripts: // Fortified AI void configGame() { addAIPlayer("Evil Fish","Crypt Doctor",0); } void beforeStart() { Player aiPlayer=getAIPlayer(0); createEntity("Earthwo...) |
|||
Line 17: | Line 17: | ||
− | // | + | // Specifying the Deck |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
void beforeStart() | void beforeStart() | ||
{ | { | ||
− | Player | + | Player player=getHumanPlayer(0); |
− | + | int ds=player.deckSize(); | |
− | + | for(int n=0; n<ds; n++) | |
− | + | { | |
− | + | player.removeDeckCard(0); | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
} | } | ||
− | + | player.addToDeck("Graveyard",0); | |
− | + | player.addToDeck("Red Imp",0); | |
− | + | player.addToDeck("Red Imp",0); | |
− | + | player.addToDeck("Black Plague",0); | |
− | + | player.addToDeck("Crypt Doctor",0); | |
− | + | player.addToDeck("Hypnotic Banshee",0); | |
− | + | player.addToDeck("Nether Plasma",0); | |
− | + | player.addToDeck("Dank Pit",0); | |
− | + | player.shuffleDeck(); | |
} | } |
Revision as of 18:19, 19 March 2010
Example Scripts:
// Fortified AI void configGame() { addAIPlayer("Evil Fish","Crypt Doctor",0); } void beforeStart() { Player aiPlayer=getAIPlayer(0); createEntity("Earthworks",6,6,aiPlayer); createEntity("Earthworks",10,10,aiPlayer); createEntity("Axe Captain",6,7,aiPlayer); createEntity("Attrition",-1,-1,aiPlayer); }
// Specifying the Deck void beforeStart() { Player player=getHumanPlayer(0); int ds=player.deckSize(); for(int n=0; n<ds; n++) { player.removeDeckCard(0); } player.addToDeck("Graveyard",0); player.addToDeck("Red Imp",0); player.addToDeck("Red Imp",0); player.addToDeck("Black Plague",0); player.addToDeck("Crypt Doctor",0); player.addToDeck("Hypnotic Banshee",0); player.addToDeck("Nether Plasma",0); player.addToDeck("Dank Pit",0); player.shuffleDeck(); }