Unit.GetDomainType (Civ5 API)
From Civilization Modding Wiki
Jump to navigationJump to search
This page is a part of the Lua and UI Reference (Civ5).
This function is a member of Unit. This is an instance method, invoke it with a colon. |
Usage
DomainType Unit:GetDomainType()
Returned Value
- No description available.
Source code samples
Redundant occurences have been removed.
Bombardment.lua
UI/InGame/Bombardment.lua
0057
|
if thingThatCanActuallyFire:GetDomainType() == DomainTypes.DOMAIN_LAND and pTargetPlot:IsWater() then |
0059
|
elseif thingThatCanActuallyFire:GetDomainType() == DomainTypes.DOMAIN_SEA and not pTargetPlot:IsWater() then |
EnemyUnitPanel.lua
UI/InGame/WorldView/EnemyUnitPanel.lua
0194
|
if(pUnit:GetDomainType() == DomainTypes.DOMAIN_AIR) then |
0209
|
if(pUnit:GetDomainType() ~= DomainTypes.DOMAIN_AIR) then |
0602
|
if (iTheirStrength == 0 or pTheirUnit:GetDomainType() == DomainTypes.DOMAIN_SEA) then |
0921
|
iModifier = pMyUnit:DomainModifier(pTheirUnit:GetDomainType()); |
1273
|
iModifier = pTheirUnit:DomainModifier(pMyUnit:GetDomainType()); |
1838
|
if (pHeadUnit:GetDomainType() == pUnit:GetDomainType() or pHeadUnit:IsRanged()) then |
1939
|
if (theirUnit:GetDomainType() ~= DomainTypes.DOMAIN_AIR) then |
EnemyUnitPanel.lua (G&K)
DLC/Expansion/UI/InGame/WorldView/EnemyUnitPanel.lua
0792
|
if (not pToPlot:IsWater() and pMyUnit:GetPlot():IsWater() and pMyUnit:GetDomainType() == DomainTypes.DOMAIN_LAND) then |
0810
|
if (pMyUnit:GetDomainType() == DomainTypes.DOMAIN_LAND) then |
1267
|
if (pTheirUnit:GetDomainType() == DomainTypes.DOMAIN_LAND) then |
1692
|
if (theirUnit:GetDomainType() == DomainTypes.DOMAIN_LAND) then |
2086
|
if (pHeadUnit:GetDomainType() == pUnit:GetDomainType() or pHeadUnit:IsRanged() or (pHeadUnit:GetDomainType() == DomainTypes.DOMAIN_SEA and pUnit:IsEmbarked())) 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 |
1635
|
if (v:IsRanged() and v:GetDomainType() == DomainTypes.DOMAIN_LAND and v:IsSelected()) then |
1650
|
if (v:IsRanged() and v:GetDomainType() == DomainTypes.DOMAIN_LAND) then |
2267
|
if (v:GetDomainType() == DomainTypes.DOMAIN_SEA and v:IsCanAttack()) then |
2318
|
if (v:GetDomainType() == DomainTypes.DOMAIN_SEA and v:WorkRate() > 0) then |
2369
|
if (v:GetDomainType() == DomainTypes.DOMAIN_LAND and v:IsCanAttack() and v:IsMustSetUpToRangedAttack()) 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
0083
|
if( pUnit:GetDomainType() == DomainTypes.DOMAIN_AIR ) then |
0572
|
if (pUnit:GetDomainType() == DomainTypes.DOMAIN_AIR) then |
1028
|
if( pPlotUnit:GetDomainType() == DomainTypes.DOMAIN_AIR ) then |
UnitPanel.lua
UI/InGame/WorldView/UnitPanel.lua
0419
|
if unit:IsCombatUnit() or unit:GetDomainType() == DomainTypes.DOMAIN_AIR then |
0587
|
if unit:GetDomainType() == DomainTypes.DOMAIN_AIR then |
0616
|
if(unit:GetDomainType() == DomainTypes.DOMAIN_AIR) then |
0631
|
if(unit:GetDomainType() ~= DomainTypes.DOMAIN_AIR) then |
0957
|
if (unit:GetDomainType() == DomainTypes.DOMAIN_AIR and not pPlot:IsCity()) then |
WorldView.lua
UI/InGame/WorldView/WorldView.lua
0629
|
if (pHeadSelectedUnit:GetDomainType() == DomainTypes.DOMAIN_AIR) then |
0646
|
if (not cityOwner:IsMinorCiv() and city:GetGarrisonedUnit() == nil and pHeadSelectedUnit:GetDomainType() == DomainTypes.DOMAIN_LAND) 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.