2v2 v1
2010-06-09 adjusted timers to 30s/25m.
#include 157
bool DEBUG = false;
////////////////////////////////////////////////////////////
void configGame()
{
setNumPlayers( 4 );
setMapSize( 17, 17 );
setGloryGoal( 20 );
// changed from 90s/40m on 2010-06-09 at Cavetroll's request
setTurnTime( 30 );
setPlayerTimeLimit( 25 * 60 ); // 25 minutes
// it would be nice to be able to set wells to zero so I don't have to remove default locations. requires dynamic update of flux well bar.
setNumFluxWells( 9 );
if( getDebug() )
{
addAiPlayer();
addAiPlayer();
addAiPlayer();
}
// doesn't work here ...
//getPlayer( 0 ).setTeam( 1 );
}
////////////////////////////////////////////////////////////
bool isDeckValid( Player p )
{
Player pNull;
string[] restrictedCards = {"Bronze Statue", "Flash Flood", "Land of Dreams", "That Hive", "Trade Routes"};
for( int i = 0; i < restrictedCards.length(); i++ )
{
if( isCardInDeck( p, restrictedCards[i] ) )
{
statusMsg( pNull, "{u," + p.getID() + "} tried to use a deck with {C," + restrictedCards[i] + "}! Boooo! Please select another deck." );
return false;
}
}
return true;
}
////////////////////////////////////////////////////////////
void beforeStart()
{
debug( "before start" );
if( getDebug() )
{
getPlayer( 0 ).setTeam( 1 );
getPlayer( 1 ).setTeam( 1 );
getPlayer( 2 ).setTeam( 2 );
getPlayer( 3 ).setTeam( 2 );
}
}
////////////////////////////////////////////////////////////
bool duringStart()
{
Player p1, p2;
debug( "during start" );
forEachEntity();
createEntity( "Flux Well", createLocation( 1, 1 ) );
createEntity( "Flux Well", createLocation( 1, 8 ) );
createEntity( "Flux Well", createLocation( 1, 15 ) );
createEntity( "Flux Well", createLocation( 8, 1 ) );
createEntity( "Flux Well", createLocation( 8, 8 ) );
createEntity( "Flux Well", createLocation( 8, 15 ) );
createEntity( "Flux Well", createLocation( 15, 1 ) );
createEntity( "Flux Well", createLocation( 15, 8 ) );
createEntity( "Flux Well", createLocation( 15, 15 ) );
fogMap();
p1 = getPlayer( 1 );
lightFog( p1, 0, 0, 1, 16 );
lightFog( p1, 0, 0, 9, 1 );
lightFog( p1, 0, 15, 3, 16 );
lightFog( p1, 8, 2, 8, 2 );
lightFog( p1, 2, 2, 2, 2 );
lightFog( p1, 2, 8, 2, 9 );
p2 = getPlayer( 2 );
if( p2.getTeam() == p1.getTeam() )
{
p2 = getPlayer( 3 );
}
lightFog( p2, 15, 0, 16, 16 );
lightFog( p2, 7, 15, 16, 16 );
lightFog( p2, 13, 0, 16, 1 );
lightFog( p2, 14, 2, 14, 2 );
lightFog( p2, 14, 8, 14, 9 );
lightFog( p2, 7, 14, 9, 14 );
return false;
}
////////////////////////////////////////////////////////////
void afterStart()
{
debug( "after start" );
}
////////////////////////////////////////////////////////////
void onNewRound()
{
debug( "new round" );
}
////////////////////////////////////////////////////////////
bool entityCallback( Entity e )
{
debug( "entity callback" );
if( e.isType( MARKER ) )
{
e.remove();
debug( "well removed" );
}
return true;
}