Game

Class

class pybrood.Game
getForces() → Forceset
getPlayers() → Playerset
getAllUnits() → Unitset
getMinerals() → Unitset
getGeysers() → Unitset
getNeutralUnits() → Unitset
getStaticMinerals() → Unitset
getStaticGeysers() → Unitset
getStaticNeutralUnits() → Unitset
getBullets() → Bulletset
getNukeDots() → list
getForce(forceID: int) → Force
getPlayer(playerID: int) → Player
getUnit(unitID: int) → Unit
indexToUnit(unitIndex: int) → Unit
getRegion(regionID: int) → Region
getGameType() → GameType
getLatency() → int
getFrameCount() → int
getReplayFrameCount() → int
getFPS() → int
getAverageFPS() → float
getMousePosition() → Tuple[int, int]
getMouseState(button: MouseButton) → bool
getKeyState(key: Key) → bool
getScreenPosition() → Tuple[int, int]
setScreenPosition(x: int, y: int)
setScreenPosition(p: Tuple[int, int])
pingMinimap(x: int, y: int)
pingMinimap(p: Tuple[int, int])
isFlagEnabled(flag: int) → bool
enableFlag(flag: int)
getUnitsOnTile(tileX: int, tileY: int) → Unitset
getUnitsOnTile(tile: Tuple[int, int]) → Unitset
getUnitsInRectangle(left: int, top: int, right: int, bottom: int) → Unitset
getUnitsInRectangle(topLeft: Tuple[int, int], bottomRight: Tuple[int, int]) → Unitset
getUnitsInRadius(x: int, y: int, radius: int) → Unitset
getUnitsInRadius(center: Tuple[int, int], radius: int) → Unitset
getClosestUnit(center: Tuple[int, int], radius: int=999999) → Unit
getClosestUnitInRectangle(center: Tuple[int, int], left: int=0, top: int=0, right: int=999999, bottom: int=999999) → Unit
getLastError() → Error
setLastError(e: Error=Errors.None) → bool
mapWidth() → int
mapHeight() → int
mapFileName() → str
mapPathName() → str
mapName() → str
mapHash() → str
isWalkable(walkX: int, walkY: int) → bool
isWalkable(position: Tuple[int, int]) → bool
getGroundHeight(tileX: int, tileY: int) → int
getGroundHeight(position: Tuple[int, int]) → int
isBuildable(tileX: int, tileY: int, includeBuildings: bool=False) → bool
isBuildable(position: Tuple[int, int], includeBuildings: bool=False) → bool
isVisible(tileX: int, tileY: int) → bool
isVisible(position: Tuple[int, int]) → bool
isExplored(tileX: int, tileY: int) → bool
isExplored(position: Tuple[int, int]) → bool
hasCreep(tileX: int, tileY: int) → bool
hasCreep(position: Tuple[int, int]) → bool
hasPowerPrecise(x: int, y: int, unitType: UnitType=UnitTypes.None) → bool
hasPowerPrecise(position: Tuple[int, int], unitType: UnitType=UnitTypes.None) → bool
hasPower(tileX: int, tileY: int, unitType: UnitType=UnitTypes.None) → bool
hasPower(position: Tuple[int, int], unitType: UnitType=UnitTypes.None) → bool
hasPower(tileX: int, tileY: int, tileWidth: int, tileHeight: int, unitType: UnitType=UnitTypes.None) → bool
hasPower(position: Tuple[int, int], tileWidth: int, tileHeight: int, unitType: UnitType=UnitTypes.None) → bool
canBuildHere(position: Tuple[int, int], type: UnitType, builder: Unit=None, checkExplored: bool=False) → bool
canMake(type: UnitType, builder: Unit=None) → bool
canResearch(type: TechType, unit: Unit=None, checkCanIssueCommandType: bool=True) → bool
canUpgrade(type: UpgradeType, unit: Unit=None, checkCanIssueCommandType: bool=True) → bool
getStartLocations() → list
print(line: str)
sendText(line: str)
sendTextEx(toAllies: bool, line: str)
isInGame() → bool
isMultiplayer() → bool
isBattleNet() → bool
isPaused() → bool
isReplay() → bool
pauseGame()
resumeGame()
leaveGame()
restartGame()
setLocalSpeed(speed: int)
getSelectedUnits() → Unitset
self() → Player
enemy() → Player
neutral() → Player
allies() → Playerset
enemies() → Playerset
observers() → Playerset
setTextSize(size: TextSize=TextSize.Default)
drawText(ctype: CoordinateType, x: int, y: int, line: str)
drawTextMap(x: int, y: int, line: str)
drawTextMap(p: Tuple[int, int], line: str)
drawTextMouse(x: int, y: int, line: str)
drawTextMouse(p: Tuple[int, int], line: str)
drawTextScreen(x: int, y: int, line: str)
drawTextScreen(p: Tuple[int, int], line: str)
drawBox(ctype: CoordinateType, left: int, top: int, right: int, bottom: int, color: Color, isSolid: bool=False)
drawBoxMap(left: int, top: int, right: int, bottom: int, color: Color, isSolid: bool=False)
drawBoxMap(leftTop: Tuple[int, int], rightBottom: Tuple[int, int], color: Color, isSolid: bool=False)
drawBoxMouse(left: int, top: int, right: int, bottom: int, color: Color, isSolid: bool=False)
drawBoxMouse(leftTop: Tuple[int, int], rightBottom: Tuple[int, int], color: Color, isSolid: bool=False)
drawBoxScreen(left: int, top: int, right: int, bottom: int, color: Color, isSolid: bool=False)
drawBoxScreen(leftTop: Tuple[int, int], rightBottom: Tuple[int, int], color: Color, isSolid: bool=False)
drawTriangle(ctype: CoordinateType, ax: int, ay: int, bx: int, by: int, cx: int, cy: int, color: Color, isSolid: bool=False)
drawTriangleMap(ax: int, ay: int, bx: int, by: int, cx: int, cy: int, color: Color, isSolid: bool=False)
drawTriangleMap(a: Tuple[int, int], b: Tuple[int, int], c: Tuple[int, int], color: Color, isSolid: bool=False)
drawTriangleMouse(ax: int, ay: int, bx: int, by: int, cx: int, cy: int, color: Color, isSolid: bool=False)
drawTriangleMouse(a: Tuple[int, int], b: Tuple[int, int], c: Tuple[int, int], color: Color, isSolid: bool=False)
drawTriangleScreen(ax: int, ay: int, bx: int, by: int, cx: int, cy: int, color: Color, isSolid: bool=False)
drawTriangleScreen(a: Tuple[int, int], b: Tuple[int, int], c: Tuple[int, int], color: Color, isSolid: bool=False)
drawCircle(ctype: CoordinateType, x: int, y: int, radius: int, color: Color, isSolid: bool=False)
drawCircleMap(x: int, y: int, radius: int, color: Color, isSolid: bool=False)
drawCircleMap(p: Tuple[int, int], radius: int, color: Color, isSolid: bool=False)
drawCircleMouse(x: int, y: int, radius: int, color: Color, isSolid: bool=False)
drawCircleMouse(p: Tuple[int, int], radius: int, color: Color, isSolid: bool=False)
drawCircleScreen(x: int, y: int, radius: int, color: Color, isSolid: bool=False)
drawCircleScreen(p: Tuple[int, int], radius: int, color: Color, isSolid: bool=False)
drawEllipse(ctype: CoordinateType, x: int, y: int, xrad: int, yrad: int, color: Color, isSolid: bool=False)
drawEllipseMap(x: int, y: int, xrad: int, yrad: int, color: Color, isSolid: bool=False)
drawEllipseMap(p: Tuple[int, int], xrad: int, yrad: int, color: Color, isSolid: bool=False)
drawEllipseMouse(x: int, y: int, xrad: int, yrad: int, color: Color, isSolid: bool=False)
drawEllipseMouse(p: Tuple[int, int], xrad: int, yrad: int, color: Color, isSolid: bool=False)
drawEllipseScreen(x: int, y: int, xrad: int, yrad: int, color: Color, isSolid: bool=False)
drawEllipseScreen(p: Tuple[int, int], xrad: int, yrad: int, color: Color, isSolid: bool=False)
drawDot(ctype: CoordinateType, x: int, y: int, color: Color)
drawDotMap(x: int, y: int, color: Color)
drawDotMap(p: Tuple[int, int], color: Color)
drawDotMouse(x: int, y: int, color: Color)
drawDotMouse(p: Tuple[int, int], color: Color)
drawDotScreen(x: int, y: int, color: Color)
drawDotScreen(p: Tuple[int, int], color: Color)
drawLine(ctype: CoordinateType, x1: int, y1: int, x2: int, y2: int, color: Color)
drawLineMap(x1: int, y1: int, x2: int, y2: int, color: Color)
drawLineMap(a: Tuple[int, int], b: Tuple[int, int], color: Color)
drawLineMouse(x1: int, y1: int, x2: int, y2: int, color: Color)
drawLineMouse(a: Tuple[int, int], b: Tuple[int, int], color: Color)
drawLineScreen(x1: int, y1: int, x2: int, y2: int, color: Color)
drawLineScreen(a: Tuple[int, int], b: Tuple[int, int], color: Color)
getLatencyFrames() → int
getLatencyTime() → int
getRemainingLatencyFrames() → int
getRemainingLatencyTime() → int
getRevision() → int
getClientVersion() → int
isDebug() → bool
isLatComEnabled() → bool
setLatCom(isEnabled: bool)
isGUIEnabled() → bool
setGUI(enabled: bool)
getInstanceNumber() → int
getAPM(includeSelects: bool=False) → int
setMap(mapFileName: str) → bool
setMap(mapFileName: str) → bool
setFrameSkip(frameSkip: int)
hasPath(source: Tuple[int, int], destination: Tuple[int, int]) → bool
setAlliance(player: Player, allied: bool=True, alliedVictory: bool=True) → bool
setVision(player: Player, enabled: bool=True) → bool
elapsedTime() → int
setCommandOptimizationLevel(level: int)
countdownTimer() → int
getAllRegions() → Regionset
getRegionAt(x: int, y: int) → Region
getRegionAt(position: Tuple[int, int]) → Region
getLastEventTime() → int
setRevealAll(reveal: bool=True) → bool
getBuildLocation(type: UnitType, desiredPosition: Tuple[int, int], maxRange: int=64, creep: bool=False) → Tuple[int, int]
getDamageFrom(fromType: UnitType, toType: UnitType, fromPlayer: Player=None, toPlayer: Player=None) → int
getDamageTo(toType: UnitType, fromType: UnitType, toPlayer: Player=None, fromPlayer: Player=None) → int
getRandomSeed() → int