Unit.IsCombatUnit (Civ5 API)

From Civilization Modding Wiki
Jump to navigationJump to search

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


Function.png This function is a member of Unit.

This is an instance method, invoke it with a colon.


Usage

int Unit:IsCombatUnit()


Returned Value

No description available.


Source code samples

Redundant occurences have been removed.

EnemyUnitPanel.lua

UI/InGame/WorldView/EnemyUnitPanel.lua
1106
if (pTheirUnit:IsCombatUnit()) then
1455
if (theirUnit:IsCombatUnit()) then
1796
if (pHeadUnit:IsCombatUnit() and (pHeadUnit:IsRanged() and pHeadUnit:IsEmbarked()) == false) and ((pHeadUnit:IsRanged() and pHeadUnit:IsRangeAttackOnlyInDomain() and not pPlot:IsWater()) == false) then


MilitaryOverview.lua

UI/InGame/Popups/MilitaryOverview.lua
0147
if( unit:IsCombatUnit() ) then


TurnsRemaining.lua - DLC_04 DLC

DLC/DLC_04/Scenarios/1066Scenario/TurnsRemaining.lua
0143
if (unit:IsCombatUnit() and unit:GetOriginalOwner() == iCSPlayer) then
0151
if (unit:IsCombatUnit()) then


TutorialChecks.lua

Tutorial/TutorialChecks.lua
0062
if (pUnit:WorkRate() > 0 and not pUnit:IsCombatUnit() and pUnit:GetDomainType() == DomainTypes.DOMAIN_LAND and pUnit:GetSpecialUnitType() == -1) then
0251
if (v:IsCombatUnit() and pPlot:GetOwner() == v:GetOwner()) then
1553
local bCombatUnit = v:IsCombatUnit();
1557
local bCombatSecondUnit = w:IsCombatUnit();
1773
if (v:IsCombatUnit() and not v:IsBusy()) then
1791
if (v:IsCombatUnit()) then
3091
if (v:IsSelected() and not v:IsBusy() and v:GetSpecialUnitType() ~= -1 and not v:IsCombatUnit() and v:GetUnitClassType() ~= ggUnitClassID and v:GetDomainType() == DomainTypes.DOMAIN_LAND) then


UnitFlagManager.lua

UI/InGame/UnitFlagManager.lua
0080
if( pUnit:IsCombatUnit() ) then
0147
o.m_IsCivilian = not pUnit:IsCombatUnit();


UnitFlagManager.lua (G&K)

DLC/Expansion/UI/InGame/UnitFlagManager.lua
0080
if( pUnit:IsCombatUnit() and not pUnit:IsEmbarked()) then
0147
o.m_IsCivilian = not pUnit:IsCombatUnit() or pUnit:IsEmbarked();


UnitPanel.lua

UI/InGame/WorldView/UnitPanel.lua
0419
if unit:IsCombatUnit() or unit:GetDomainType() == DomainTypes.DOMAIN_AIR then



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.