Scripting Examples
From theFarWilds
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); }
// Preset Scenario void configGame() { setMapSeed(12345); addAIPlayer("Evil Fish","Crypt Doctor",0); } void beforeStart() { Player aiPlayer=getAIPlayer(0); Player HumanPlayer=getHumanPlayer(0); setTerrain(createLocation(6,6),3,2); createEntity("Earthworks",6,6,aiPlayer); createEntity("Dwarven Hall",8,6,aiPlayer); createEntity("Gully Slingers",6,5,aiPlayer); createEntity("Gully Slingers",6,7,aiPlayer); createEntity("Axe Captain",7,5,aiPlayer); createEntity("Axe Captain",7,6,aiPlayer); createEntity("Flux Well",6,6,aiPlayer); createEntity("Attrition",-1,-1,aiPlayer); while(handSize(aiPlayer)>0){ removeHandCard(aiPlayer,0); } while(deckSize(aiPlayer)>0){ removeDeckCard(aiPlayer,0); } while(handSize(HumanPlayer)>0){ removeHandCard(HumanPlayer,0); } while(deckSize(HumanPlayer)>0){ removeDeckCard(HumanPlayer,0); } addToHand(HumanPlayer,"Graveyard"); addToHand(HumanPlayer,"Red Imp"); addToHand(HumanPlayer,"Red Imp"); addToHand(HumanPlayer,"Black Plague"); addToHand(HumanPlayer,"Crypt Doctor"); addToHand(HumanPlayer,"Hypnotic Banshee"); addToHand(HumanPlayer,"Nether Plasma"); addToHand(HumanPlayer,"Dank Pit"); addGlory(HumanPlayer,18); }