Unit (Civ5 Type)

From Civilization Modding Wiki
Jump to navigationJump to search

This page is a part of the Lua and UI Reference (Civ5).


Instance Methods

Methods are functions that belong to an object. Instance methods are invoked through a colon, as in caller:SomeMethod(<args>), where caller is an instance of Unit.
A colon implictly passes the caller object as the first argument. That is, the former call is equivalent to this one: caller.SomeMethod(caller, <args>)

A

Base game Gods & Kings ___________________________
CheckButZero.png CheckButZero.png Star.png Speech.png int AirSweepCombatMod()
CheckButZero.png CheckButZero.png Star.png Speech.png bool At(int x, int y)
Check.png Check.png Star.png Speech.png int AtPlot(Plot plot)
Check.png Check.png Star.png Speech.png int AttackFortifiedModifier()
Check.png Check.png Star.png Speech.png int AttackWoundedModifier()
CheckButZero.png CheckButZero.png Star.png Speech.png int AttackXPValue()

C

Base game Gods & Kings ___________________________
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanAcquirePromotion(PromotionType promotion)
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanAcquirePromotionAny()
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanAirAttack()
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanAirDefend(Plot plot)
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanAirlift(Plot plot)
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanAirliftAt(Plot plot, int x, int y)
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanAirPatrol(Plot plot)
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanAutomate(AutomateType automate)
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanBuild(Plot plot, BuildActionType build, bool testVisible = false, bool testGold = true)
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanBuildRoute()
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanBuildSpaceship(Plot plot, bool visible)
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanCargoAllMove()
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanCoexistWithEnemyUnit(TeamID team)
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanConstruct(Plot plot, BuildingType building)
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanDiscover(Plot plot)
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanDisembark(Plot plot)
Check.png Check.png Star.png Speech.png bool CanDisembarkOnto(Plot plot)
Check.png Check.png Star.png Speech.png bool CanDistanceGift(TaskType toPlayer)
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanDoCommand(CommandType command, int data1, int data2, bool testVisible = false, bool testBusy = true)
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanEmbark(Plot plot)
Check.png Check.png Star.png Speech.png bool CanEmbarkOnto(Plot plot, Plot targetPlot)
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanEnterTerritory(TeamID team, bool ignoreRightOfPassage = false, bool isCity = false)
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanFortify(Plot plot)
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanFound(Plot plot, bool testVisible = false)
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanGift(bool testVisible = false, bool testTransport = false)
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanGiveExperience(Plot plot)
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanGoldenAge(Plot plot, bool testVisible)
Check.png Check.png Star.png Speech.png int CanHeal(Plot plot)
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanHold(Plot plot)
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanJoin(Plot plot, SpecialistType specialist)
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanLead(Plot plot, int unitId)
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanLoad(Plot plot)
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanLoadUnit(Unit unit, Plot plot)
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanMove()
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanMoveAllTerrain()
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanMoveImpassable()
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanMoveOrAttackInto(Plot plot, bool declareWar = false, bool destination = false)
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanMoveThrough(Plot plot)
Check.png Check.png Star.png Speech.png int CanNuke(Plot plot)
Check.png Check.png Star.png Speech.png bool CanNukeAt(Plot plot, int x, int y)
Check.png Check.png Star.png Speech.png bool CanParadrop(Plot plot, bool arg1)
Check.png Check.png Star.png Speech.png bool CanParadropAt(Plot plot, int x, int y)
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanPillage(Plot plot)
Check.png Check.png Star.png Speech.png bool CanPromote(PromotionType promotion, int leaderUnitId)
Check.png Check.png Star.png Speech.png int CanRangeStrike()
Check.png Check.png Star.png Speech.png int CanRangeStrikeAt(int x, int y, bool arg2 = nil, bool noncombatAllowed = nil)
Check.png Check.png Star.png Speech.png bool CanRebaseAt(Plot sourcePlot, int targetX, int targetY)
CheckButZero.png CheckButZero.png Star.png Speech.png Question-blue.png CanRepairFleet
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanScrap()
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanSentry(Plot plot)
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanSetUpForRangedAttack()
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanSiege(TeamID team)
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanSleep(Plot plot)
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanStartMission(int mission, int data1, int data2, Plot plot = nil, bool testVisible = false)
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanTrade(Plot plot, bool testVisible)
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanUnload()
CheckButZero.png CheckButZero.png Star.png Speech.png bool CanUnloadAll()
Check.png Check.png Star.png Speech.png int CanUpgradeRightNow()
Check.png Check.png Star.png Speech.png int CapitalDefenseFalloff()
Check.png Check.png Star.png Speech.png int CapitalDefenseModifier()
Check.png Check.png Star.png Speech.png int CargoSpace()
CheckButZero.png CheckButZero.png Star.png Speech.png int CargoSpaceAvailable(SpecialUnitType specialCargo, DomainType domainCargo)
CheckButZero.png CheckButZero.png Star.png Speech.png int ChanceFirstStrikes()
CheckButZero.png CheckButZero.png Star.png Speech.png ChangeCargoSpace(int change)
CheckButZero.png CheckButZero.png Star.png Speech.png ChangeDamage(int change, PlayerID player)
CheckButZero.png CheckButZero.png Star.png Speech.png ChangeExperience(int change, int max = -1, bool fromCombat = false, bool inBorders = false, bool updateGlobal = false)
CheckButZero.png CheckButZero.png Star.png Speech.png ChangeLevel(int change)
CheckButZero.png CheckButZero.png Star.png Speech.png ChangeMoves(int change)
Check.png Check.png Star.png Speech.png int CityAttackModifier()
CheckButZero.png CheckButZero.png Star.png Speech.png int CityDefenseModifier()
CheckButZero.png CheckButZero.png Star.png Speech.png Convert(Unit unit)
CheckButZero.png CheckButZero.png Star.png Speech.png int CurrInterceptionProbability()

D

Base game Gods & Kings ___________________________
CheckButZero.png CheckButZero.png Star.png Speech.png int DefenseXPValue()
CheckButZero.png CheckButZero.png Star.png Speech.png DoCommand(CommandType command, int data1, int data2)
CheckButZero.png CheckButZero.png Star.png Speech.png DomainType DomainCargo()
Check.png Check.png Star.png Speech.png int DomainModifier(DomainType domain)

E

Base game Gods & Kings ___________________________
Check.png Check.png Star.png Speech.png Embark(Plot plot)
CheckButZero.png CheckButZero.png Star.png Speech.png int EvasionProbability()
Check.png Check.png Star.png Speech.png ExecuteSpecialExploreMove(Plot targetPlot)
Check.png Check.png Star.png Speech.png int ExperienceNeeded()

F

Base game Gods & Kings ___________________________
Check.png Check.png Star.png Speech.png int FeatureAttackModifier(FeatureType feature)
Check.png Check.png Star.png Speech.png int FeatureDefenseModifier(FeatureType feature)
CheckButZero.png CheckButZero.png Star.png Speech.png Question-blue.png FinishMoves
CheckButZero.png CheckButZero.png Star.png Speech.png int FirstStrikes()
Check.png Check.png Star.png Speech.png int FlankAttackModifier()
CheckButZero.png CheckButZero.png Star.png Speech.png bool FlatMovementCost()
CheckButZero.png CheckButZero.png Star.png Speech.png int FlavorValue(FlavorType flavor)
Check.png Check.png Star.png Speech.png int FortifyModifier()

G

Base game Gods & Kings ___________________________
CheckButZero.png CheckButZero.png Star.png Speech.png bool GeneratePath(Plot toPlot, int flags = 0, bool reuse = false, unknown piPathTurns = nil)
Check.png Check.png Star.png Speech.png ActivityType GetActivityType()
Check.png Check.png Star.png Speech.png int GetAdjacentModifier()
CheckButZero.png CheckButZero.png Star.png Speech.png int GetAdjacentTileHeal()
CheckButZero.png CheckButZero.png Star.png Speech.png int GetAirCombatDamage(Unit defender)
CheckButZero.png CheckButZero.png Star.png Speech.png int GetAmphibCount()
CheckButZero.png CheckButZero.png Star.png Speech.png Area GetArea()
Check.png Check.png Star.png Speech.png int GetAttackModifier()
Check.png Check.png Star.png Speech.png int GetBaseCombatStrength()
Check.png Check.png Star.png Speech.png int GetBaseRangedCombatStrength()
CheckButZero.png CheckButZero.png Star.png Speech.png unknown GetBestInterceptor(Plot plot)
CheckButZero.png CheckButZero.png Star.png Speech.png unknown GetBestSeaPillageInterceptor(Plot plot)
CheckButZero.png CheckButZero.png Star.png Speech.png int GetBlitzCount()
Check.png Check.png Star.png Speech.png BuildActionType GetBuildType()
Check.png Check.png Star.png Speech.png UnitType GetCaptureUnitType(CivilizationType civilization)
CheckButZero.png CheckButZero.png Star.png Speech.png int GetCargo()
Check.png Check.png Star.png Speech.png CivilizationType GetCivilizationType()
Check.png Check.png Star.png Speech.png int GetCombatDamage(int strength, int opponentStrength, int currentDamage, bool includeRand = true, bool attackerIsCity = false, bool defenderIsCity = false)
CheckButZero.png CheckButZero.png Star.png Speech.png int GetCombatLimit()
CheckButZero.png CheckButZero.png Star.png Speech.png int GetCombatOwner(TeamID forTeam)
Check.png Check.png Star.png Speech.png unknown GetConversionStrength()
Check.png Check.png Star.png Speech.png int GetCurrHitPoints()
Check.png Check.png Star.png Speech.png int GetDamage()
Check.png Check.png Star.png Speech.png TeamID GetDeclareWarRangeStrike(Plot plot)
Check.png Check.png Star.png Speech.png int GetDefenseModifier()
Check.png Check.png Star.png Speech.png DomainType GetDomainType()
Check.png Check.png Star.png Speech.png int GetDropRange()
Check.png Check.png Star.png Speech.png int GetEmbarkedUnitDefense()
Check.png Check.png Star.png Speech.png int GetExperience()
CheckButZero.png CheckButZero.png Star.png Speech.png int GetExperiencePercent()
CheckButZero.png CheckButZero.png Star.png Speech.png int GetExtraAttackFortifiedMod()
CheckButZero.png CheckButZero.png Star.png Speech.png int GetExtraAttackWoundedMod()
CheckButZero.png CheckButZero.png Star.png Speech.png int GetExtraChanceFirstStrikes()
CheckButZero.png CheckButZero.png Star.png Speech.png int GetExtraCityAttackPercent()
CheckButZero.png CheckButZero.png Star.png Speech.png int GetExtraCityDefensePercent()
Check.png Check.png Star.png Speech.png int GetExtraCombatPercent()
CheckButZero.png CheckButZero.png Star.png Speech.png int GetExtraDomainModifier(DomainType index)
CheckButZero.png CheckButZero.png Star.png Speech.png int GetExtraEnemyHeal()
CheckButZero.png CheckButZero.png Star.png Speech.png int GetExtraEvasion()
CheckButZero.png CheckButZero.png Star.png Speech.png int GetExtraFeatureAttackPercent(FeatureType index)
CheckButZero.png CheckButZero.png Star.png Speech.png int GetExtraFeatureDefensePercent(FeatureType index)
CheckButZero.png CheckButZero.png Star.png Speech.png int GetExtraFirstStrikes()
CheckButZero.png CheckButZero.png Star.png Speech.png int GetExtraFriendlyHeal()
CheckButZero.png CheckButZero.png Star.png Speech.png int GetExtraHillsAttackPercent()
CheckButZero.png CheckButZero.png Star.png Speech.png int GetExtraHillsDefensePercent()
CheckButZero.png CheckButZero.png Star.png Speech.png int GetExtraIntercept()
CheckButZero.png CheckButZero.png Star.png Speech.png int GetExtraMoveDiscount()
CheckButZero.png CheckButZero.png Star.png Speech.png int GetExtraMoves()
CheckButZero.png CheckButZero.png Star.png Speech.png int GetExtraNeutralHeal()
CheckButZero.png CheckButZero.png Star.png Speech.png int GetExtraOpenAttackPercent()
CheckButZero.png CheckButZero.png Star.png Speech.png int GetExtraOpenDefensePercent()
CheckButZero.png CheckButZero.png Star.png Speech.png int GetExtraOpenRangedAttackMod()
CheckButZero.png CheckButZero.png Star.png Speech.png int GetExtraRange()
CheckButZero.png CheckButZero.png Star.png Speech.png int GetExtraRoughAttackPercent()
CheckButZero.png CheckButZero.png Star.png Speech.png int GetExtraRoughRangedAttackMod()
CheckButZero.png CheckButZero.png Star.png Speech.png int GetExtraTerrainAttackPercent(TerrainType index)
CheckButZero.png CheckButZero.png Star.png Speech.png int GetExtraTerrainDefensePercent(TerrainType index)
CheckButZero.png CheckButZero.png Star.png Speech.png int GetExtraUnitCombatModifier(UnitCombatType index)
CheckButZero.png CheckButZero.png Star.png Speech.png int GetExtraVisibilityRange()
CheckButZero.png CheckButZero.png Star.png Speech.png int GetExtraWithdrawal()
CheckButZero.png CheckButZero.png Star.png Speech.png int GetFacingDirection()
Check.png Check.png Star.png Speech.png Unit GetFireSupportUnit(PlayerID defender, int x, int y)
Check.png Check.png Star.png Speech.png int GetFortifyTurns()
Check.png Check.png Star.png Speech.png int GetFriendlyLandsAttackModifier()
Check.png Check.png Star.png Speech.png int GetFriendlyLandsModifier()
Check.png Check.png Star.png Speech.png int GetGameTurnCreated()
Check.png Check.png Star.png Speech.png int GetGarrisonedCity()
Check.png Check.png Star.png Speech.png int GetGoldenAgeTurns()
Check.png Check.png Star.png Speech.png int GetGreatGeneralCombatModifier()
CheckButZero.png CheckButZero.png Star.png Speech.png HandicapType GetHandicapType()
CheckButZero.png CheckButZero.png Star.png Speech.png int GetHotKeyNumber()
Check.png Check.png Star.png Speech.png UnitID GetID()
CheckButZero.png CheckButZero.png Star.png Speech.png InvisibilityScopeType GetInvisibleType()
CheckButZero.png CheckButZero.png Star.png Speech.png int GetKamikazePercent()
Check.png Check.png Star.png Speech.png int GetLastMoveTurn()
CheckButZero.png CheckButZero.png Star.png Speech.png unknown GetLeaderUnitType()
Check.png Check.png Star.png Speech.png int GetLevel()
Check.png Check.png Star.png Speech.png ReligionType GetMajorityReligionAfterSpread()
Check.png Check.png Star.png Speech.png int GetMaxAttackStrength(Plot fromPlot, Plot toPlot, Unit defender)
Check.png Check.png Star.png Speech.png int GetMaxDefenseStrength(Plot inPlot, Unit attacker, bool arg2 = nil)
Check.png Check.png Star.png Speech.png int GetMaxHitPoints()
Check.png Check.png Star.png Speech.png int GetMaxRangedCombatStrength(Unit other, int attacking, bool arg2, bool arg3)
CheckButZero.png CheckButZero.png Star.png Speech.png int GetMoves()
Check.png Check.png Star.png Speech.png string GetName()
Check.png Check.png Star.png Speech.png string GetNameKey()
Check.png Check.png Star.png Speech.png unknown GetNameNoDesc()
Check.png Check.png Star.png Speech.png int GetNearbyImprovementModifier()
Check.png Check.png Star.png Speech.png int GetNumEnemyUnitsAdjacent(Unit otherUnit)
Check.png Check.png Star.png Speech.png int GetNumFollowersAfterSpread()
Check.png Check.png Star.png Speech.png int GetNumResourceNeededToUpgrade(ResourceType resourceLoop)
Check.png Check.png Star.png Speech.png int GetOriginalOwner()
Check.png Check.png Star.png Speech.png int GetOutsideFriendlyLandsModifier()
Check.png Check.png Star.png Speech.png PlayerID GetOwner()
CheckButZero.png CheckButZero.png Star.png Speech.png unknown GetPathEndTurnPlot()
CheckButZero.png CheckButZero.png Star.png Speech.png int GetPillageChange()
Check.png Check.png Star.png Speech.png Plot GetPlot()
Check.png Check.png Star.png Speech.png int GetRangeCombatDamage(Unit defender, City city, bool includeRand)
Check.png Check.png Star.png Speech.png int GetRangedAttackModifier()
CheckButZero.png CheckButZero.png Star.png Speech.png int GetRangedCombatLimit()
CheckButZero.png CheckButZero.png Star.png Speech.png unknown GetReconPlot()
Check.png Check.png Star.png Speech.png ReligionType GetReligion()
Check.png Check.png Star.png Speech.png int GetReverseGreatGeneralModifier()
CheckButZero.png CheckButZero.png Star.png Speech.png int GetRiverCrossingNoPenaltyCount()
CheckButZero.png CheckButZero.png Star.png Speech.png int GetSameTileHeal()
CheckButZero.png CheckButZero.png Star.png Speech.png Question-blue.png GetScenarioData
Check.png Check.png Star.png Speech.png bool GetScrapGold()
CheckButZero.png CheckButZero.png Star.png Speech.png string GetScriptData()
CheckButZero.png CheckButZero.png Star.png Speech.png InvisibilityScopeType GetSeeInvisibleType()
Check.png Check.png Star.png Speech.png SpecialUnitType GetSpecialUnitType()
Check.png Check.png Star.png Speech.png int GetSpreadsLeft()
Check.png Check.png Star.png Speech.png int GetStrategicResourceCombatPenalty()
Check.png Check.png Star.png Speech.png TeamID GetTeam()
CheckButZero.png CheckButZero.png Star.png Speech.png int GetTradeGold(Plot plot)
Check.png Check.png Star.png Speech.png unknown GetTransportUnit()
CheckButZero.png CheckButZero.png Star.png Speech.png int GetUnitAICargo(UnitAIType unitAI)
Check.png Check.png Star.png Speech.png UnitAIType GetUnitAIType()
Check.png Check.png Star.png Speech.png int GetUnitClassModifier(UnitClassType index)
Check.png Check.png Star.png Speech.png UnitClassType GetUnitClassType()
Check.png Check.png Star.png Speech.png UnitCombatType GetUnitCombatType()
CheckButZero.png CheckButZero.png Star.png Speech.png unknown GetUnitFlagIconOffset()
CheckButZero.png CheckButZero.png Star.png Speech.png unknown GetUnitPortraitOffset()
Check.png Check.png Star.png Speech.png UnitType GetUnitType()
CheckButZero.png CheckButZero.png Star.png Speech.png int GetUpgradeDiscount()
Check.png Check.png Star.png Speech.png Unit GetUpgradeUnitFromPlot(Plot adjacentPlot)
Check.png Check.png Star.png Speech.png UnitType GetUpgradeUnitType()
CheckButZero.png CheckButZero.png Star.png Speech.png int GetVisualOwner()
Check.png Check.png Star.png Speech.png int GetX()
Check.png Check.png Star.png Speech.png int GetY()
CheckButZero.png CheckButZero.png Star.png Speech.png bool GiveExperience()

H

Base game Gods & Kings ___________________________
Check.png Check.png Star.png Speech.png bool HasCargo()
CheckButZero.png CheckButZero.png Star.png Speech.png bool HasMoved()
Check.png Check.png Star.png Speech.png bool HasName()
Check.png Check.png Star.png Speech.png int HillsAttackModifier()
Check.png Check.png Star.png Speech.png int HillsDefenseModifier()

I

Base game Gods & Kings ___________________________
CheckButZero.png CheckButZero.png Star.png Speech.png bool IgnoreBuildingDefense()
CheckButZero.png CheckButZero.png Star.png Speech.png bool IgnoreTerrainCost()
CheckButZero.png CheckButZero.png Star.png Speech.png bool ImmuneToFirstStrikes()
Check.png Check.png Star.png Speech.png bool IsActionRecommended(ActionType action)
CheckButZero.png CheckButZero.png Star.png Speech.png bool IsAlwaysHeal()
Check.png Check.png Star.png Speech.png bool IsAmphib()
CheckButZero.png CheckButZero.png Star.png Speech.png bool IsAttacking()
Check.png Check.png Star.png Speech.png bool IsAutomated()
Check.png Check.png Star.png Speech.png bool IsBarbarian()
CheckButZero.png CheckButZero.png Star.png Speech.png bool IsBetterDefenderThan(Unit defender, Unit attacker)
CheckButZero.png CheckButZero.png Star.png Speech.png bool IsBlitz()
Check.png Check.png Star.png Speech.png bool IsBusy()
Check.png Check.png Star.png Speech.png int IsCanAttack()
CheckButZero.png CheckButZero.png Star.png Speech.png bool IsCanAttackRanged()
CheckButZero.png CheckButZero.png Star.png Speech.png bool IsCanAttackWithMove()
CheckButZero.png CheckButZero.png Star.png Speech.png bool IsCanAttackWithMoveNow()
CheckButZero.png CheckButZero.png Star.png Speech.png bool IsCanDefend(Plot plot)
Check.png Check.png Star.png Speech.png int IsCargo()
Check.png Check.png Star.png Speech.png bool IsCityAttackOnly()
Check.png Check.png Star.png Speech.png int IsCombatUnit()
Check.png Check.png Star.png Speech.png int IsDead()
CheckButZero.png CheckButZero.png Star.png Speech.png bool IsDefending()
Check.png Check.png Star.png Speech.png int IsDelayedDeath()
Check.png Check.png Star.png Speech.png int IsEmbarked()
Check.png Check.png Star.png Speech.png int IsEnemyCityAdjacent()
Check.png Check.png Star.png Speech.png bool IsEnemyInMovementRange(bool arg0, bool arg1)
CheckButZero.png CheckButZero.png Star.png Speech.png bool IsEnemyRoute()
Check.png Check.png Star.png Speech.png bool IsEverFortifyable()
CheckButZero.png CheckButZero.png Star.png Speech.png bool IsFeatureDoubleMove(FeatureType index)
CheckButZero.png CheckButZero.png Star.png Speech.png bool IsFighting()
CheckButZero.png CheckButZero.png Star.png Speech.png bool IsFortifyable()
Check.png Check.png Star.png Speech.png int IsFound()
Check.png Check.png Star.png Speech.png bool IsFriendlyUnitAdjacent(bool combatUnit)
CheckButZero.png CheckButZero.png Star.png Speech.png bool IsFull()
Check.png Check.png Star.png Speech.png int IsGarrisoned()
CheckButZero.png CheckButZero.png Star.png Speech.png bool IsGoldenAge()
CheckButZero.png CheckButZero.png Star.png Speech.png Question-blue.png IsGreatPerson
Check.png Check.png Star.png Speech.png bool IsHasPromotion(PromotionType promotion)
CheckButZero.png CheckButZero.png Star.png Speech.png bool IsHealOutsideFriendly()
Check.png Check.png Star.png Speech.png int IsHigherTechThan(UnitType arg0)
CheckButZero.png CheckButZero.png Star.png Speech.png bool IsHillsDoubleMove()
CheckButZero.png CheckButZero.png Star.png Speech.png bool IsHuman()
Check.png Check.png Star.png Speech.png int IsHurt()
Check.png Check.png Star.png Speech.png bool IsImmobile()
CheckButZero.png CheckButZero.png Star.png Speech.png bool IsInCombat()
Check.png Check.png Star.png Speech.png bool IsInvisible(TeamID team, bool debug, bool checkCargo = false)
Check.png Check.png Star.png Speech.png int IsLargerCivThan(Unit myUnit)
Check.png Check.png Star.png Speech.png int IsMustSetUpToRangedAttack()
Check.png Check.png Star.png Speech.png bool IsNearGreatGeneral()
CheckButZero.png CheckButZero.png Star.png Speech.png bool IsNeverInvisible()
CheckButZero.png CheckButZero.png Star.png Speech.png bool IsNoBadGoodies()
CheckButZero.png CheckButZero.png Star.png Speech.png bool IsNoCapture()
CheckButZero.png CheckButZero.png Star.png Speech.png bool IsNone()
CheckButZero.png CheckButZero.png Star.png Speech.png bool IsNukeImmune()
CheckButZero.png CheckButZero.png Star.png Speech.png bool IsNukeVictim(Plot plot, TeamID team)
CheckButZero.png CheckButZero.png Star.png Speech.png bool IsOnlyDefensive()
CheckButZero.png CheckButZero.png Star.png Speech.png bool IsOutOfAttacks()
CheckButZero.png CheckButZero.png Star.png Speech.png bool isOutOfInterceptions()
Check.png Check.png Star.png Speech.png bool IsPromotionReady()
CheckButZero.png CheckButZero.png Star.png Speech.png bool IsPromotionValid(PromotionType promotion)
Check.png Check.png Star.png Speech.png bool IsRangeAttackIgnoreLOS(Plot plot)
Check.png Check.png Star.png Speech.png int IsRangeAttackOnlyInDomain()
Check.png Check.png Star.png Speech.png int IsRanged()
Check.png Check.png Star.png Speech.png int IsReadyToMove()
CheckButZero.png CheckButZero.png Star.png Speech.png bool IsRivalTerritory()
Check.png Check.png Star.png Speech.png bool IsRiverCrossingNoPenalty()
Check.png Check.png Star.png Speech.png int IsSelected(unknown void)
CheckButZero.png CheckButZero.png Star.png Speech.png bool IsSetUpForRangedAttack()
Check.png Check.png Star.png Speech.png int IsStackedGreatGeneral()
CheckButZero.png CheckButZero.png Star.png Speech.png bool IsTerrainDoubleMove(TerrainType index)
CheckButZero.png CheckButZero.png Star.png Speech.png bool IsWaiting()
Check.png Check.png Star.png Speech.png bool IsWork()

J

Base game Gods & Kings ___________________________
Check.png Check.png Star.png Speech.png JumpToNearestValidPlot()

K

Base game Gods & Kings ___________________________
Check.png Check.png Star.png Speech.png Kill(bool delay, PlayerID player = NO_PLAYER)

L

Base game Gods & Kings ___________________________
CheckButZero.png CheckButZero.png Star.png Speech.png Question-blue.png LastMissionPlot
CheckButZero.png CheckButZero.png Star.png Speech.png bool Lead(int unitId)

M

Base game Gods & Kings ___________________________
CheckButZero.png CheckButZero.png Star.png Speech.png int MaxFirstStrikes()
CheckButZero.png CheckButZero.png Star.png Speech.png int MaxInterceptionProbability()
Check.png Check.png Star.png Speech.png int MaxMoves()
CheckButZero.png CheckButZero.png Star.png Speech.png int MaxXPValue()
Check.png Check.png Star.png Speech.png int MovesLeft()

N

Base game Gods & Kings ___________________________
Check.png Check.png Star.png Speech.png bool NoDefensiveBonus()
CheckButZero.png CheckButZero.png Star.png Speech.png int NukeDamageLevel()

O

Base game Gods & Kings ___________________________
Check.png Check.png Star.png Speech.png int OpenAttackModifier()
Check.png Check.png Star.png Speech.png int OpenDefenseModifier()
Check.png Check.png Star.png Speech.png int OpenRangedAttackModifier()

P

Base game Gods & Kings ___________________________
CheckButZero.png CheckButZero.png Star.png Speech.png Question-blue.png PopMission
CheckButZero.png CheckButZero.png Star.png Speech.png Promote(PromotionType promotion, int leaderUnitId)
CheckButZero.png CheckButZero.png Star.png Speech.png PushMission(MissionType mission, int data1 = -1, int data2 = -1, int flags = 0, bool append = false, bool manual = fa;se, MissionType missionAI = NO_MISSIONAI, Plot missionAIPlot = nil, Unit missionAIUnit = nil)

R

Base game Gods & Kings ___________________________
Check.png Check.png Star.png Speech.png int Range()
CheckButZero.png CheckButZero.png Star.png Speech.png RangeStrike(int x, int y)
CheckButZero.png CheckButZero.png Star.png Speech.png Question-blue.png RotateFacingDirectionClockwise
CheckButZero.png CheckButZero.png Star.png Speech.png Question-blue.png RotateFacingDirectionCounterClockwise
Check.png Check.png Star.png Speech.png int RoughAttackModifier()
Check.png Check.png Star.png Speech.png int RoughDefenseModifier()
Check.png Check.png Star.png Speech.png int RoughRangedAttackModifier()

S

Base game Gods & Kings ___________________________
CheckButZero.png CheckButZero.png Star.png Speech.png SetBaseCombatStrength(int combat)
Check.png Check.png Star.png Speech.png SetDamage(int newValue, PlayerID player, bool notifyEntity = true)
Check.png Check.png Star.png Speech.png SetDeployFromOperationTurn(int arg0)
Check.png Check.png Star.png Speech.png SetEmbarked(bool newValue)
CheckButZero.png CheckButZero.png Star.png Speech.png SetExperience(int newValue, int max = -1)
Check.png Check.png Star.png Speech.png SetHasPromotion(PromotionType index, bool newValue)
CheckButZero.png CheckButZero.png Star.png Speech.png SetHotKeyNumber(int newValue)
CheckButZero.png CheckButZero.png Star.png Speech.png SetLeaderUnitType(UnitType leaderUnitType)
CheckButZero.png CheckButZero.png Star.png Speech.png SetLevel(int newLevel)
CheckButZero.png CheckButZero.png Star.png Speech.png SetMadeAttack(bool newValue)
CheckButZero.png CheckButZero.png Star.png Speech.png SetMadeInterception(bool newValue)
CheckButZero.png CheckButZero.png Star.png Speech.png SetMoves(int newValue)
Check.png Check.png Star.png Speech.png SetName(string newValue)
Check.png Check.png Star.png Speech.png SetOriginalOwner(PlayerID oldOwner)
CheckButZero.png CheckButZero.png Star.png Speech.png SetPromotionReady(bool newValue)
CheckButZero.png CheckButZero.png Star.png Speech.png SetReconPlot(Plot newValue)
CheckButZero.png CheckButZero.png Star.png Speech.png Question-blue.png SetScenarioData
CheckButZero.png CheckButZero.png Star.png Speech.png SetScriptData(string newValue)
CheckButZero.png CheckButZero.png Star.png Speech.png SetXY(int x, int y, bool group = false, bool update = true, bool show = false, bool checkPlotVisible = false)
CheckButZero.png CheckButZero.png Star.png Speech.png Question-blue.png SpecialCargo

T

Base game Gods & Kings ___________________________
Check.png Check.png Star.png Speech.png int TerrainAttackModifier(TerrainType terrain)
Check.png Check.png Star.png Speech.png int TerrainDefenseModifier(TerrainType terrain)

U

Base game Gods & Kings ___________________________
Check.png Check.png Star.png Speech.png int UnitClassAttackModifier(UnitClassType unitClass)
Check.png Check.png Star.png Speech.png int UnitClassDefenseModifier(UnitClassType unitClass)
Check.png Check.png Star.png Speech.png int UnitCombatModifier(UnitCombatType unitCombat)
Check.png Check.png Star.png Speech.png int UpgradePrice(UnitType unit)

V

Base game Gods & Kings ___________________________
CheckButZero.png CheckButZero.png Star.png Speech.png int VisibilityRange()

W

Base game Gods & Kings ___________________________
CheckButZero.png CheckButZero.png Star.png Speech.png int WithdrawalProbability()
Check.png Check.png Star.png Speech.png int WorkRate(bool max, BuildActionType build = nil)


Used by

City:AddProductionExperience(Unit unit, bool conscript = false)
Unit City:GetGarrisonedUnit()
int City:RangeCombatDamage(Unit theirUnit, unknown arg1)
int City:RangeCombatUnitDefense(Unit theirUnit)
CombatPredictionType Game.GetCombatPrediction(Unit myUnit, Unit theirUnit)
bool Player:CanReceiveGoody(Plot plot, GoodyType goody, Unit unit)
Player:CreateGreatGeneral(Unit eGreatPersonUnit, bool incrementThreshold, bool incrementExperience, int x, int y)
Player:DoGoody(Plot plot, Unit unit)
Unit Player:GetFirstReadyUnit()
Unit Player:GetUnitByID(UnitID unit)
Unit Player:InitUnit(UnitType unit, ResourceType x, ResourceType y, UnitAIType unitAI = NO_UNITAI, DirectionType facingDirection = NO_DIRECTION)
Player:ReceiveGoody(Plot plot, GoodyType goody, Unit unit)
iterator(Unit) Player:Units()
unknown Plot:GetBestDefender(PlayerID owner, PlayerID attackingPlayer, Unit attacker, bool testAtWar, bool testPotentialEnemy, bool testCanMove)
int Plot:GetNumFriendlyUnitsOfType(Unit unit)
int Plot:GetNumVisibleEnemyDefenders(Unit unit)
int Plot:GetNumVisiblePotentialEnemyDefenders(Unit unit)
Unit Plot:GetUnit(UnitID id)
int Plot:IsEnemyCity(Unit unit)
bool Plot:IsFriendlyCity(Unit unit, bool checkImprovement)
bool Plot:IsValidDomainForAction(Unit unit)
bool Plot:IsValidDomainForLocation(Unit unit)
int Plot:IsVisibleEnemyDefender(Unit unit)
int Plot:MovementCost(Unit unit, Plot fromPlot)
Plot:NukeExplosion(int range, Unit nukeUnit)
Unit UI.GetHeadSelectedUnit()
UI.HighlightCanPlacePlots(Unit unit, Plot arg1)
UI.SelectUnit(Unit v)
UI.SetPlaceUnit(Unit unit)
bool Unit:CanLoadUnit(Unit unit, Plot plot)
Unit:Convert(Unit unit)
int Unit:GetAirCombatDamage(Unit defender)
Unit Unit:GetFireSupportUnit(PlayerID defender, int x, int y)
int Unit:GetMaxAttackStrength(Plot fromPlot, Plot toPlot, Unit defender)
int Unit:GetMaxDefenseStrength(Plot inPlot, Unit attacker, bool arg2 = nil)
int Unit:GetMaxRangedCombatStrength(Unit other, int attacking, bool arg2, bool arg3)
int Unit:GetNumEnemyUnitsAdjacent(Unit otherUnit)
int Unit:GetRangeCombatDamage(Unit defender, City city, bool includeRand)
Unit Unit:GetUpgradeUnitFromPlot(Plot adjacentPlot)
bool Unit:IsBetterDefenderThan(Unit defender, Unit attacker)
int Unit:IsLargerCivThan(Unit myUnit)
Unit:PushMission(MissionType mission, int data1 = -1, int data2 = -1, int flags = 0, bool append = false, bool manual = fa;se, MissionType missionAI = NO_MISSIONAI, Plot missionAIPlot = nil, Unit missionAIUnit = nil)



The initial version of this page was created by the Civ5 API Bot, see the Civ5 API Reference FAQ. Some of the texts come from the 2kgames' wiki and most of code samples are copyrighted to Firaxis.
Functions' signatures were either copied from the 2kgames' wiki, or infered from the Lua source files and the binaries. Errors are possible.
Contributors may find help in the Contributors guide to the Civ5 API.