src/game/Strategic/Strategic_Mines.cc
// get workforce conscripted by enemy for mine
get workforce conscripted by enemy for mine
get workforce conscripted by enemy for mine
static INT32 GetAvailableWorkForceForMineForEnemy(UINT8 ubMineIndex)
{
	INT32 iWorkForceSize = 0;
	INT8 bTownId = 0;
	Assert(ubMineIndex < GCM->getMines().size());
	auto mine = GCM->getMine(ubMineIndex);
	if ( gMineStatus[ ubMineIndex ].fShutDown)
	{
		return ( 0 );
	}
	bTownId = mine->associatedTownId;
	UINT8 numSectors = GetTownSectorSize( bTownId );
	Assert(numSectors > 0);
	UINT8 numSectorsUnderControl = GetTownSectorsUnderControl( bTownId );
	Assert(numSectorsUnderControl <= numSectors);
	iWorkForceSize = 100 - gTownLoyalty[ bTownId ].ubRating;
	iWorkForceSize = iWorkForceSize * (numSectors - numSectorsUnderControl) / numSectors;
	return ( iWorkForceSize );
}
static INT32 GetAvailableWorkForceForMineForEnemy ( UINT8 ubMineIndex ) { INT32 iWorkForceSize = 0 ; INT8 bTownId = 0 ; Assert ( ubMineIndex < GCM -> getMines ( ) . size ( ) ) ; auto mine = GCM -> getMine ( ubMineIndex ) ; if ( gMineStatus [ ubMineIndex ] . fShutDown ) { return ( 0 ) ; } bTownId = mine -> associatedTownId ; UINT8 numSectors = GetTownSectorSize ( bTownId ) ; Assert ( numSectors > 0 ) ; UINT8 numSectorsUnderControl = GetTownSectorsUnderControl ( bTownId ) ; Assert ( numSectorsUnderControl <= numSectors ) ; iWorkForceSize = 100 - gTownLoyalty [ bTownId ] . ubRating ; iWorkForceSize = iWorkForceSize * ( numSectors - numSectorsUnderControl ) / numSectors ; return ( iWorkForceSize ) ; }
get workforce conscripted by enemy for mine
get workforce conscripted by enemy for mine
// look for available workforce in the town associated with the mine // return the loyalty of the town associated with the mine // if mine is shut down // get workforce size (is 0-100 based on REVERSE of local town's loyalty) // now adjust for town size.. the number of sectors you control