CyUnit
bool isNone ()
bool () - Is this a valid unit instance?
void convert (CyUnit pUnit)
void (CyUnit* pUnit)
void kill (bool bDelay, PlayerType ePlayer)
void (bool bDelay, int /*PlayerTypes*/ ePlayer)
void NotifyEntity (int EntityEventType)
void (int EntityEventType)
int isActionRecommended (int i)
int (int i)
bool isBetterDefenderThan (CyUnit pDefender, CyUnit pAttacker)
bool (CyUnit* pDefender, CyUnit* pAttacker)
bool canDoCommand ()
bool (eCommand, iData1, iData2, bTestVisible = False) - can the unit perform eCommand?
void doCommand (CommandTypes eCommand, int iData1, int iData2)
void (eCommand, iData1, iData2) - force the unit to perform eCommand
CyPlot getPathEndTurnPlot ()
CyPlot* ()
bool generatePath ()
bool (CyPlot* pToPlot, int iFlags = 0, bool bReuse = false, int* piPathTurns = NULL)
bool canEnterTerritory (TeamType eTeam, bool bIgnoreRightOfPassage)
bool (int (TeamTypes) eTeam, bool bIgnoreRightOfPassage)
bool canEnterArea (TeamType eTeam, CyArea pArea, bool bIgnoreRightOfPassage)
bool (int (TeamTypes) eTeam, CyArea* pArea, bool bIgnoreRightOfPassage)
TeamType getDeclareWarMove (CyPlot pPlot)
TeamTypes (CyPlot* pPlot)
bool canMoveInto (CyPlot pPlot, bool bAttack, bool bDeclareWar, bool bIgnoreLoad)
bool (CyPlot* pPlot, bool bAttack, bool bDeclareWar, bool bIgnoreLoad)
bool canMoveOrAttackInto (CyPlot pPlot, bool bDeclareWar)
bool (CyPlot* pPlot, bool bDeclareWar)
bool canMoveThrough (CyPlot pPlot)
bool (CyPlot* pPlot)
void jumpToNearestValidPlot ()
void ()
bool canAutomate (AutomateType eAutomate)
bool (int (AutomateTypes) eAutomate)
bool canScrap ()
bool ()
bool canGift (bool bTestVisible)
bool (bool bTestVisible)
bool canLoadUnit (CyUnit pUnit, CyPlot pPlot)
bool (CyUnit* pUnit, CyPlot* pPlot)
bool canLoad ()
bool ()
bool canUnload ()
bool ()
bool canUnloadAll ()
bool ()
bool canHold (CyPlot pPlot)
bool (CyPlot* pPlot)
bool canSleep (CyPlot pPlot)
bool (CyPlot* pPlot)
bool canFortify (CyPlot pPlot)
bool (CyPlot* pPlot)
bool canPlunder (CyPlot pPlot) BtS Only
bool (CyPlot* pPlot)
bool canAirPatrol (CyPlot pPlot)
bool (CyPlot* pPlot)
bool canSeaPatrol (CyPlot pPlot) BtS Only
bool (CyPlot* pPlot)
bool canHeal (CyPlot pPlot)
bool (CyPlot* pPlot)
bool canSentry (CyPlot pPlot)
bool (CyPlot* pPlot)
bool canAirlift (CyPlot pPlot)
bool (CyPlot* pPlot)
bool canAirliftAt (CyPlot pPlot, int iX, int iY)
bool (CyPlot* pPlot, int iX, int iY)
bool isNukeVictim (CyPlot pPlot, int eTeam)
bool (CyPlot* pPlot, int eTeam)
bool canNuke ()
bool ()
bool canNukeAt (CyPlot pPlot, int iX, int iY)
bool (CyPlot* pPlot, int iX, int iY)
bool canRecon ()
bool ()
bool canReconAt (CyPlot pPlot, int iX, int iY)
bool (CyPlot* pPlot, int iX, int iY)
bool canRecon ()
bool ()
bool canReconAt (CyPlot pPlot, int iX, int iY)
bool (CyPlot* pPlot, int iX, int iY)
bool canAirBomb ()
bool ()
bool canAirBombAt (CyPlot pPlot, int iX, int iY)
bool (CyPlot* pPlot, int iX, int iY)
CyCity bombardTarget (CyPlot pPlot)
CyCity* (CyPlot* pPlot)
bool canBombard (CyPlot pPlot)
bool (CyPlot* pPlot)
bool canPillage (CyPlot pPlot)
bool (CyPlot* pPlot)
int sabotageCost (CyPlotpPlot)
int (CyPlot* pPlot)
int sabotageProb (CyPlot pPlot, ProbabilityType eProbStyle)
int (CyPlot* pPlot, int /*ProbabilityTypes*/ eProbStyle)
bool canSabotage (CyPlot pPlot, bool bTestVisible)
bool (CyPlot* pPlot, bool bTestVisible)
int destroyCost (CyPlot pPlot)
int (CyPlot* pPlot)
int destroyProb (CyPlot pPlot, ProbabilityType eProbStyle)
int (CyPlot* pPlot, int /*ProbabilityTypes*/ eProbStyle)
bool canDestroy (CyPlot pPlot, bool bTestVisible)
bool (CyPlot* pPlot, bool bTestVisible)
int stealPlansCost (CyPlot pPlot)
int (CyPlot* pPlot)
int stealPlansProb (CyPlot pPlot, ProbabilityType eProbStyle)
int (CyPlot* pPlot, int /*ProbabilityTypes*/ eProbStyle)
bool canStealPlans (CyPlot pPlot, bool bTestVisible)
bool (CyPlot* pPlot, bool bTestVisible)
bool canFound (CyPlot pPlot, bool bTestVisible)
bool (CyPlot* pPlot, bool bTestVisible)
bool canSpread (CyPlot pPlot, ReligionType eReligion, bool bTestVisible)
bool (CyPlot* pPlot, int /*ReligionTypes*/ eReligion, bool bTestVisible)
bool canJoin (CyPlot pPlot, SpecialistType eSpecialist)
bool (CyPlot* pPlot, int (SpecialistTypes) eSpecialist)
bool canConstruct (CyPlot pPlot, BuildingType eBuilding)
bool (CyPlot* pPlot, int (BuildingTypes) eBuilding)
int getDiscoveryTech ()
int /*TechTypes*/ ()
int getDiscoverResearch (TechType eTech)
int (int /*TechTypes*/ eTech)
bool canDiscover (CyPlot pPlot)
bool (CyPlot* pPlot)
int getMaxHurryProduction (CyCity pCity)
int (CyCity* pCity)
int getHurryProduction (CyPlot pPlot)
int (CyPlot* pPlot)
bool canHurry (CyPlot pPlot, bool bTestVisible)
bool (CyPlot* pPlot, bool bTestVisible)
int getTradeGold (CyPlot pPlot)
int (CyPlot* pPlot)
bool canTrade (CyPlot pPlot, bool bTestVisible)
bool (CyPlot* pPlot, bool bTestVisible)
int getGreatWorkCulture (CyPlot pPlot)
int (CyPlot* pPlot)
bool canGreatWork (CyPlot pPlot)
bool (CyPlot* pPlot)
int getEspionagePoints (CyPlot pPlot) BtS Only
int (CyPlot* pPlot)
bool canInfiltrate (CyPlot pPlot, bool bTestVisible) BtS Only
bool (CyPlot* pPlot, bool bTestVisible)
bool canEspionage (CyPlot pPlot) BtS Only
bool (CyPlot* pPlot)
bool canGoldenAge (CyPlot pPlot, bool bTestVisible)
bool (CyPlot* pPlot, bool bTestVisible)
bool canBuild (CyPlot pPlot, BuildType eBuild, bool bTestVisible)
bool (CyPlot* pPlot, int (BuildTypes) eBuild, bool bTestVisible)
int canLead (CyPlot pPlot, int)
int (CyPlot* pPlot, int)
bool lead (int)
bool (int)
int canGiveExperience (CyPlot pPlot)
int (CyPlot* pPlot)
bool giveExperience ()
bool ()
bool canPromote (PromotionTypes ePromotion, int iLeaderUnitId)
bool (ePromotion, iLeaderUnitId)
bool promote (PromotionTypes ePromotion)
bool (ePromotion)
int upgradePrice (UnitTypes eUnit)
int (UnitTypes eUnit)
bool upgradeAvailable (UnitType eFromUnit, UnitClassType eToUnitClass, int iCount)
bool (int /*UnitTypes*/ eFromUnit, int /*UnitClassTypes*/ eToUnitClass, int iCount)
bool canUpgrade (UnitType eUnit, bool bTestVisible)
bool (int /*UnitTypes*/ eUnit, bool bTestVisible)
bool hasUpgrade (bool bSearch) BtS Only
bool (bool bSearch)
int getHandicapType ()
int ()
int getCivilizationType ()
int ()
int getSpecialUnitType ()
int ()
int getCaptureUnitType (CivilizationType eCivilization)
int (int /*CivilizationTypes*/ eCivilization)
int getUnitCombatType ()
int ()
int getDomainType ()
int ()
int getInvisibleType (InvisibleType eIndex)
int (InvisibleTypes) ()
int getSeeInvisibleType (InvisibleType eIndex)
int (InvisibleTypes) ()
int flavorValue (FlavorTypes eFlavor)
int (FlavorTypes eFlavor)
bool isBarbarian ()
bool ()
bool isHuman ()
bool ()
int visibilityRange ()
int ()
int baseMoves ()
int ()
int movesLeft ()
int ()
int maxMoves ()
int ()
bool canMove ()
bool ()
bool hasMoved ()
bool ()
int airRange ()
int ()
int nukeRange ()
int ()
bool canBuildRoute ()
bool ()
int getBuildType (BuildType eIndex)
int (BuildTypes) ()
int workRate (bool bMax)
int (bool bMax)
bool isAnimal ()
bool ()
bool isNoBadGoodies ()
bool ()
bool isOnlyDefensive ()
bool ()
bool isNoCapture ()
bool ()
bool isRivalTerritory ()
bool ()
bool isMilitaryHappiness ()
bool ()
bool isInvestigate ()
bool ()
bool isCounterSpy ()
bool ()
bool isFound ()
bool ()
bool isGoldenAge ()
bool ()
bool canCoexistWithEnemyUnit () BtS Only
bool ()
bool isFighting ()
bool ()
bool isAttacking ()
bool ()
bool isDefending ()
bool ()
bool isCombat ()
bool ()
bool maxHitPoints ()
bool ()
bool currHitPoints ()
bool ()
bool isHurt ()
bool ()
bool isDead ()
bool ()
void setBaseCombatStr (int) BtS Only
void (int)
int baseCombatStr ()
int ()
int maxCombatStr (CyPlot pPlot, CyUnit pAttacker)
int (CyPlot* pPlot, CyUnit* pAttacker)
int currCombatStr (CyPlot pPlot, CyUnit pAttacker)
int (CyPlot* pPlot, CyUnit* pAttacker)
int currFirepower (CyPlot pPlot, CyUnit pAttacker)
int (CyPlot* pPlot, CyUnit* pAttacker)
float maxCombatStrFloat (CyPlot pPlot, CyUnit pAttacker)
float (CyPlot* pPlot, CyUnit* pAttacker)
float currCombatStrFloat (CyPlot pPlot, CyUnit pAttacker)
float (CyPlot* pPlot, CyUnit* pAttacker)
bool canFight ()
bool ()
bool canAttack ()
bool ()
bool canDefend (CyPlot pPlot)
bool (CyPlot* pPlot)
bool canSiege (TeamType eTeam)
bool (int /*TeamTypes*/ eTeam)
int airBaseCombatStr ()
int ()
int airMaxCombatStr (CyUnit pOther)
int (CyUnit* pOther)
int airCurrCombatStr (CyUnit pOther)
int (CyUnit* pOther)
float airMaxCombatStrFloat (CyUnit pOther)
float (CyUnit* pOther)
float airCurrCombatStrFloat (CyUnit pOther)
float (CyUnit* pOther)
int combatLimit () BtS Only
int ()
int airCombatLimit ()
int ()
bool canAirAttack ()
bool ()
bool canAirDefend (CyPlot pPlot)
bool (CyPlot*)
int airCombatDamage (CyUnit pDefender)
int (CyUnit* pDefender)
CyUnit bestInterceptor (CyPlot pPlot)
CyUnit* (CyPlot*)
CyUnit bestSeaPillageInterceptor (CyPlot pPlot) BtS Only
CyUnit* (CyPlot*)
bool isAutomated ()
bool ()
bool isWaiting ()
bool ()
bool isFortifyable ()
bool ()
int fortifyModifier ()
int ()
int experienceNeeded ()
int ()
int attackXPValue ()
int ()
int defenseXPValue ()
int ()
int maxXPValue ()
int ()
int firstStrikes ()
int ()
int chanceFirstStrikes ()
int ()
int maxFirstStrikes ()
int ()
bool isRanged ()
bool ()
bool alwaysInvisible ()
bool ()
bool immuneToFirstStrikes ()
bool ()
bool noDefensiveBonus ()
bool ()
bool ignoreBuildingDefense ()
bool ()
bool canMoveImpassable ()
bool ()
bool canMoveAllTerrain () BtS Only
bool ()
bool flatMovementCost ()
bool ()
bool ignoreTerrainCost ()
bool ()
bool isNeverInvisible ()
bool ()
bool isInvisible (TeamType eTeam, bool bDebug)
bool (int (TeamTypes) eTeam, bool bDebug)
bool isNukeImmune ()
bool ()
int maxInterceptionProbability ()
int ()
int currInterceptionProbability ()
int ()
int evasionProbability ()
int ()
int withdrawalProbability ()
int ()
int collateralDamage ()
int ()
int collateralDamageLimit ()
int ()
int collateralDamageMaxUnits ()
int ()
int cityAttackModifier ()
int ()
int cityDefenseModifier ()
int ()
int animalCombatModifier ()
int ()
int hillsAttackModifier ()
int ()
int hillsDefenseModifier ()
int ()
int terrainAttackModifier (TerrainType eTerrain) BtS Only
int (int /*TerrainTypes*/ eTerrain)
int terrainDefenseModifier (TerrainType eTerrain)
int (int /*TerrainTypes*/ eTerrain)
int featureAttackModifier (FeatureType eFeature) BtS Only
int (int /*FeatureTypes*/ eFeature)
int featureDefenseModifier (FeatureType eFeature)
int (int /*FeatureTypes*/ eFeature)
int unitClassAttackModifier (UnitClassType eUnitClas)
int (int /*UnitClassTypes*/ eUnitClass)
int unitClassDefenseModifier (UnitClassType eUnitClas)
int (int /*UnitClassTypes*/ eUnitClass)
int unitCombatModifier (UnitCombatType eUnitCombat)
int (int /*UnitCombatTypes*/ eUnitCombat)
int domainModifier (DomainType eDomain)
int (int /*DomainTypes*/ eDomain)
int bombardRate ()
int ()
int airBombBaseRate ()
int ()
int airBombCurrRate ()
int ()
int specialCargo ()
int ()
int domainCargo ()
int ()
int cargoSpace ()
int ()
void changeCargoSpace (int i) BtS Only
void (int)
bool isFull ()
bool ()
int cargoSpaceAvailable ()
int ()
bool hasCargo ()
bool ()
bool canCargoAllMove ()
bool ()
int getUnitAICargo (UnitAIType eUnitAI)
int (int (UnitAITypes) eUnitAI)
int getID ()
int ()
int getGroupID ()
int ()
bool isInGroup ()
bool ()
bool isGroupHead ()
bool ()
CySelectionGroup getGroup ()
CySelectionGroup* ()
int getHotKeyNumber ()
int () - returns the HotKey number for this unit
void setHotKeyNumber (int iNewValue)
void (int iNewValue)
int getX ()
int ()
int getY ()
int ()
int setXY (int iX, int iY)
int (int iX, int iY)
bool at (int iX, int iY)
bool (int iX, int iY)
bool atPlot (CyPlot pPlot)
bool (CyPlot* pPlot)
CyPlot plot ()
CyPlot* ()
CyArea area ()
CyArea* ()
CyPlot getReconPlot ()
CyPlot* ()
void setReconPlot (CyPlot pPlot)
void (CyPlot)
int getGameTurnCreated ()
int ()
int getDamage ()
int ()
void setDamage (int iNewValue, PlayerType ePlayer)
void (int iNewValue, int /*PlayerTypes*/ ePlayer)
void changeDamage (int iChange, PlayerType ePlayer)
void (int iChange, int /*PlayerTypes*/ ePlayer)
int getMoves ()
int ()
void setMoves (int iNewValue)
void (int iNewValue)
void changeMoves (int iChange)
void (int iChange)
void finishMoves ()
void ()
int getExperience ()
int ()
void setExperience (int iNewValue)
void (int iNewValue)
void changeExperience (int iChange, int iMax, bool bFromCombat, bool bInBorders, bool bUpdateGlobal)
void (int iChange, int iMax, bool bFromCombat, bool bInBorders, bool bUpdateGlobal)
int getLevel ()
int ()
int getFacingDirection () BtS Only
int ()
void rotateFacingDirectionClockwise () BtS Only
void ()
void rotateFacingDirectionCounterClockwise () BtS Only
void ()
int getCargo ()
int ()
int getFortifyTurns ()
int ()
int getBlitzCount ()
int ()
bool isBlitz ()
bool ()
int getAmphibCount ()
int ()
bool isAmphib ()
bool ()
int getRiverCount ()
int ()
bool isRiver ()
bool ()
bool isEnemyRoute ()
bool ()
bool isAlwaysHeal ()
bool ()
bool isHillsDoubleMove ()
bool ()
int getExtraVisibilityRange ()
int ()
int getExtraMoves ()
int ()
int getExtraMoveDiscount ()
int ()
int getExtraAirRange () BtS Only
int ()
int getExtraIntercept () BtS Only
int ()
int getExtraEvasion () BtS Only
int ()
int getExtraFirstStrikes ()
int ()
int getExtraChanceFirstStrikes ()
int ()
int getExtraWithdrawal ()
int ()
int getExtraCollateralDamage ()
int ()
int getExtraEnemyHeal ()
int ()
int getExtraNeutralHeal ()
int ()
int getExtraFriendlyHeal ()
int ()
int getSameTileHeal ()
int ()
int getAdjacentTileHeal ()
int ()
int getExtraCombatPercent ()
int ()
int getExtraCityAttackPercent ()
int ()
int getExtraCityDefensePercent ()
int ()
int getExtraHillsAttackPercent ()
int ()
int getExtraHillsDefensePercent ()
int ()
int getRevoltProtection ()
int ()
int getCollateralDamageProtection ()
int ()
int getPillageChange ()
int ()
int getUpgradeDiscount ()
int ()
int getExperiencePercent ()
int ()
int getKamikazePercent ()
int ()
int getImmobileTimer () BtS Only
int ()
void setImmobileTimer (int) BtS Only
void (int)
bool isMadeAttack ()
bool ()
void setMadeAttack (int iNewValue)
void (int iNewValue)
bool isMadeInterception ()
bool ()
void setMadeInterception (int iNewValue)
void (int iNewValue)
bool isPromotionReady ()
bool ()
void setPromotionReady (int iNewValue)
void (int iNewValue)
int getOwner ()
int ()
int getVisualOwner () BtS Only
int ()
int getCombatOwner (int) BtS Only
int (int)
int getTeam ()
int ()
int getUnitType ()
int ()
int getUnitClassType ()
int ()
int getLeaderUnitType ()
int ()
void setLeaderUnitType (int iNewValue)
void (int iNewValue)
CyUnit getTransportUnit ()
CyUnit* ()
bool isCargo ()
bool ()
int getExtraDomainModifier ()
int ()
string getName ()
str () - Returns the name of a unit along with its type description in parens if using a custom name
string getNameForm (int iForm)
str (int iForm)
string getNameKey ()
str ()
string getNameNoDesc ()
str () - Returns the name of a unit without any description afterwards
void setName (string szName)
void (str)
string getScriptData ()
str ()
void setScriptData (string szNewValue)
void (str)
bool isTerrainDoubleMove (TerrainType eIndex)
bool (TerrainType)
bool isFeatureDoubleMove (FeatureType eIndex)
bool (FeatureType)
int getExtraTerrainAttackPercent () BtS Only
int ()
int getExtraTerrainDefensePercent ()
int ()
int getExtraFeatureAttackPercent () BtS Only
int ()
int getExtraFeatureDefensePercent ()
int ()
int getExtraUnitCombatModifier ()
int ()
bool canAcquirePromotion (PromotionType ePromotion)
bool (int /*PromotionTypes*/ ePromotion)
bool canAcquirePromotionAny ()
bool ()
bool isPromotionValid (PromotionType ePromotion)
bool (int /*PromotionTypes*/ ePromotion)
bool isHasPromotion (PromotionType ePromotion)
bool (int /*PromotionTypes*/ ePromotion)
void setHasPromotion (PromotionType eIndex, bool bNewValue)
void (int (PromotionTypes) eIndex, bool bNewValue)
int getUnitAIType ()
int UnitAIType () - returns the int value of the UnitAIType
void setUnitAIType (int iUnitAIType)
void UnitAIType (int iUnitAIType) - sets the unit's UnitAIType
void centerCamera ()
void () - Centers the Camera on the unit
void attackForDamage () BtS Only
void attackForDamage(CyUnit *defender, int attakerDamageChange, int defenderDamageChange)
void rangeStrike () BtS Only
void rangeStrike(int iX, int iY)
CvArtInfoUnit getArtInfo (int i, EraTypes eEra) BtS Only
CvArtInfoUnit* (int i, eEra)