public class Player
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
int |
allUnitCount()
Retrieves the total number of units that the player has.
|
int |
allUnitCount(UnitType unit) |
int |
armor(UnitType unit)
Calculates the armor that a given unit type will have, including upgrades.
|
int |
completedUnitCount()
Retrieves the number of completed units that the player has.
|
int |
completedUnitCount(UnitType unit) |
int |
damage(WeaponType wpn)
Calculates the damage that a given weapon type can deal, including upgrades.
|
int |
deadUnitCount()
Retrieves the number units that have died for this player.
|
int |
deadUnitCount(UnitType unit) |
int |
gas()
Retrieves the current amount of vespene gas that this player has.
|
int |
gatheredGas()
Retrieves the cumulative amount of vespene gas that this player has gathered since the beginning of the game, including the amount that the player starts the game with (if any).
|
int |
gatheredMinerals()
Retrieves the cumulative amount of minerals/ore that this player has gathered since the beginning of the game, including the amount that the player starts the game with (if any).
|
int |
getBuildingScore()
Retrieves the total building score, as seen in the end-game score screen.
|
Color |
getColor()
Retrieves the color value of the current player.
|
int |
getCustomScore()
Retrieves the player's custom score.
|
Force |
getForce()
Retrieves the player's force.
|
int |
getID()
Retrieves a unique ID that represents the player.
|
int |
getKillScore()
Retrieves the total kill score, as seen in the end-game score screen.
|
int |
getMaxUpgradeLevel(UpgradeType upgrade)
Retrieves the maximum upgrades available specific to the player.
|
java.lang.String |
getName()
Retrieves the name of the player.
|
Race |
getRace()
Retrieves the race of the player.
|
int |
getRazingScore()
Retrieves the total razing score, as seen in the end-game score screen.
|
TilePosition |
getStartLocation()
Retrieve's the player's starting location.
|
char |
getTextColor()
Retrieves the control code character that changes the color of text messages to represent this player.
|
PlayerType |
getType()
Retrieves the player's controller type.
|
java.util.List<Unit> |
getUnits()
Retrieves the set of all units that the player owns.
|
int |
getUnitScore()
Retrieves the total unit score, as seen in the end-game score screen.
|
int |
getUpgradeLevel(UpgradeType upgrade)
Retrieves the current upgrade level that the player has attained for a given upgrade type.
|
boolean |
hasResearched(TechType tech)
Checks if the player has already researched a given technology.
|
boolean |
hasUnitTypeRequirement(UnitType unit)
Verifies that this player satisfies a unit type requirement.
|
boolean |
hasUnitTypeRequirement(UnitType unit,
int amount) |
int |
incompleteUnitCount()
Retrieves the number of incomplete units that the player has.
|
int |
incompleteUnitCount(UnitType unit) |
boolean |
isAlly(Player player)
Checks if this player is allied to the specified player.
|
boolean |
isDefeated()
Checks if the player has been defeated.
|
boolean |
isEnemy(Player player)
Checks if this player is unallied to the specified player.
|
boolean |
isNeutral()
Checks if this player is the neutral player.
|
boolean |
isObserver()
Checks if the player is an observer player, typically in a Use Map Settings observer game.
|
boolean |
isResearchAvailable(TechType tech)
Checks if a technology can be researched by the player.
|
boolean |
isResearching(TechType tech)
Checks if the player is researching a given technology type.
|
boolean |
isUnitAvailable(UnitType unit)
Checks if a unit type can be created by the player.
|
boolean |
isUpgrading(UpgradeType upgrade)
Checks if the player is upgrading a given upgrade type.
|
boolean |
isVictorious()
Checks if the player has achieved victory.
|
int |
killedUnitCount()
Retrieves the number units that the player has killed.
|
int |
killedUnitCount(UnitType unit) |
boolean |
leftGame()
Checks if the player has left the game.
|
int |
maxEnergy(UnitType unit)
Retrieves the maximum amount of energy that a unit type will have, taking the player's energy upgrades into consideration.
|
int |
minerals()
Retrieves the current amount of minerals/ore that this player has.
|
int |
refundedGas()
Retrieves the cumulative amount of vespene gas that this player has gained from refunding (cancelling) units and structures.
|
int |
refundedMinerals()
Retrieves the cumulative amount of minerals/ore that this player has gained from refunding (cancelling) units and structures.
|
int |
repairedGas()
Retrieves the cumulative amount of vespene gas that this player has spent on repairing units since the beginning of the game.
|
int |
repairedMinerals()
Retrieves the cumulative amount of minerals/ore that this player has spent on repairing units since the beginning of the game.
|
int |
sightRange(UnitType unit)
Retrieves the sight range of a unit type, taking the player's sight range upgrades into consideration.
|
int |
spentGas()
Retrieves the cumulative amount of vespene gas that this player has spent, excluding repairs.
|
int |
spentMinerals()
Retrieves the cumulative amount of minerals/ore that this player has spent, excluding repairs.
|
int |
supplyTotal()
Retrieves the total amount of supply the player has available for unit control.
|
int |
supplyTotal(Race race) |
int |
supplyUsed()
Retrieves the current amount of supply that the player is using for unit control.
|
int |
supplyUsed(Race race) |
double |
topSpeed(UnitType unit)
Retrieves the top speed of a unit type, taking the player's speed upgrades into consideration.
|
int |
visibleUnitCount()
Retrieves the total number of strictly visible units that the player has, even if information on the player is unrestricted.
|
int |
visibleUnitCount(UnitType unit) |
int |
weaponDamageCooldown(UnitType unit)
Retrieves the weapon cooldown of a unit type, taking the player's attack speed upgrades into consideration.
|
int |
weaponMaxRange(WeaponType weapon)
Retrieves the maximum weapon range of a weapon type, taking the player's weapon upgrades into consideration.
|
public int getID()
public java.lang.String getName()
public java.util.List<Unit> getUnits()
public Race getRace()
public PlayerType getType()
public Force getForce()
public boolean isAlly(Player player)
public boolean isEnemy(Player player)
public boolean isNeutral()
public TilePosition getStartLocation()
public boolean isVictorious()
public boolean isDefeated()
public boolean leftGame()
public int minerals()
public int gas()
public int gatheredMinerals()
public int gatheredGas()
public int repairedMinerals()
public int repairedGas()
public int refundedMinerals()
public int refundedGas()
public int spentMinerals()
public int spentGas()
public int supplyTotal()
public int supplyTotal(Race race)
public int supplyUsed()
public int supplyUsed(Race race)
public int allUnitCount()
public int allUnitCount(UnitType unit)
public int visibleUnitCount()
public int visibleUnitCount(UnitType unit)
public int completedUnitCount()
public int completedUnitCount(UnitType unit)
public int incompleteUnitCount()
public int incompleteUnitCount(UnitType unit)
public int deadUnitCount()
public int deadUnitCount(UnitType unit)
public int killedUnitCount()
public int killedUnitCount(UnitType unit)
public int getUpgradeLevel(UpgradeType upgrade)
public boolean hasResearched(TechType tech)
public boolean isResearching(TechType tech)
public boolean isUpgrading(UpgradeType upgrade)
public Color getColor()
public char getTextColor()
public int maxEnergy(UnitType unit)
public double topSpeed(UnitType unit)
public int weaponMaxRange(WeaponType weapon)
public int sightRange(UnitType unit)
public int weaponDamageCooldown(UnitType unit)
public int armor(UnitType unit)
public int damage(WeaponType wpn)
public int getUnitScore()
public int getKillScore()
public int getBuildingScore()
public int getRazingScore()
public int getCustomScore()
public boolean isObserver()
public int getMaxUpgradeLevel(UpgradeType upgrade)
public boolean isResearchAvailable(TechType tech)
public boolean isUnitAvailable(UnitType unit)
public boolean hasUnitTypeRequirement(UnitType unit)
public boolean hasUnitTypeRequirement(UnitType unit, int amount)