Team.IsAtWar (Civ5 API)

From Civilization Modding Wiki
Revision as of 11:31, 20 September 2012 by DonQuich (talk | contribs) (Bot update)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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 Team.

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


Usage

int Team:IsAtWar(TeamID index)


Returned Value

No description available.

Parameters

index: No description available.


Source code samples

Redundant occurences have been removed.

CityBannerManager.lua

UI/InGame/CityBannerManager.lua
0469
local bWar = Teams[iActiveTeam]:IsAtWar(team);


CityStateDiploPopup.lua

UI/InGame/Popups/CityStateDiploPopup.lua
0076
local bWar = pActiveTeam:IsAtWar(iTeam);


CityStateStatusHelper.lua (G&K)

DLC/Expansion/UI/CityStateStatusHelper.lua
0060
local bWar = pMajorTeam:IsAtWar(iMinorTeam);


CivsAlive.lua - DLC_01 DLC

DLC/DLC_01/Scenarios/Mongol Scenario/CivsAlive.lua
0141
if (pHumanTeam:IsAtWar(eDestroyedTeam)) then


DiploCorner.lua

UI/InGame/WorldView/DiploCorner.lua
0277
if( (pUsTeam:IsAtWar( iOtherTeam ) and (g_bAlwaysWar or g_bNoChangeWar) ) or


DiploGlobalRelationships.lua

UI/InGame/Popups/DiploGlobalRelationships.lua
0119
if (g_pUsTeam:IsAtWar(iOtherTeam)) then
0156
if (pOtherTeam:IsAtWar(iThirdTeam) and iThirdPlayer ~= g_iUs) then


DiploList.lua

UI/InGame/DiploList.lua
0156
if( (g_pTeam:IsAtWar( iOtherTeam ) and (g_bAlwaysWar or g_bNoChangeWar) ) or
0301
if( g_pTeam:IsAtWar( iOtherTeam ) ) then
0347
if( not( g_pTeam:IsAtWar( pOtherPlayer:GetTeam() ) and (g_bAlwaysWar or g_bNoChangeWar) ) ) then
0355
not g_pTeam:IsAtWar( pOtherPlayer:GetTeam()) and g_pTeam:CanDeclareWar(pOtherPlayer:GetTeam()) and
0441
if (g_pTeam:IsAtWar(iOtherTeam)) then
0469
local bWar = Teams[Game.GetActiveTeam()]:IsAtWar(pOtherPlayer:GetTeam());
0490
if( iQuest == -1 or g_pTeam:IsAtWar(iOtherTeam) ) then


DiploList.lua (G&K)

DLC/Expansion/UI/InGame/DiploList.lua
0497
or g_pTeam:IsAtWar(iOtherTeam)) then


DiploRelationships.lua

UI/InGame/Popups/DiploRelationships.lua
0066
if (pTeam:IsAtWar(iOtherTeam)) then
0376
local bWar = Teams[Game.GetActiveTeam()]:IsAtWar(pPlayer:GetTeam());


DiscussionDialog.lua

UI/InGame/LeaderHead/DiscussionDialog.lua
0066
if (pActiveTeam:IsAtWar(g_iAITeam)) then


EnemyUnitPanel.lua

UI/InGame/WorldView/EnemyUnitPanel.lua
1809
if (pTeam:IsAtWar(pCity:GetTeam()) or (UIManager:GetAlt() and pCity:GetOwner() ~= iTeam)) then
1845
if (pTeam:IsAtWar(pUnit:GetTeam()) or (UIManager:GetAlt() and pUnit:GetOwner() ~= iTeam)) then
1941
if (myTeam:IsAtWar(theirUnit:GetTeam()) or (UIManager:GetAlt() and theirUnit:GetOwner() ~= myTeamID)) then


InfoTooltipInclude.lua

UI/InGame/InfoTooltipInclude.lua
0758
if (pActiveTeam:IsAtWar(iOtherTeam)) then


LeaderHeadRoot.lua

UI/InGame/LeaderHead/LeaderHeadRoot.lua
0160
local bAtWar = pActiveTeam:IsAtWar(g_iAITeam);
0267
local bAtWar = Teams[Game.GetActiveTeam()]:IsAtWar(g_iAITeam);


MPList.lua

UI/InGame/WorldView/MPList.lua
0168
if( g_pLocalTeam:IsAtWar( pPlayer:GetTeam() ) ) then


PlotMouseoverInclude.lua

UI/InGame/PlotMouseoverInclude.lua
0286
elseif pTeam:IsAtWar(unitTeam) then
0362
elseif pTeam:IsAtWar(plotTeam) then


TradeLogic.lua

UI/InGame/WorldView/TradeLogic.lua
0261
print( "war: " .. tostring( g_pUsTeam:IsAtWar( g_iThemTeam ) ) );
0265
if( (g_pUsTeam:IsAtWar( g_iThemTeam ) and (g_bAlwaysWar or g_bNoChangeWar) ) or
0292
if( g_pUsTeam:IsAtWar( g_iThemTeam ) ) then
0616
if (g_iUsTeam >= 0 and g_iThemTeam >= 0 and Teams[g_iUsTeam]:IsAtWar(g_iThemTeam)) then
2574
if (not Teams[iLoopTeam]:IsAtWar(iFromTeam)) then
2587
elseif (pMinorTeam:IsAtWar(iFromTeam) and iAlly ~= -1 and Teams[Players[iAlly]:GetTeam()]:IsAtWar(iFromTeam)) then
2608
if (Teams[iLoopTeam]:IsAtWar(iFromTeam)) then


TradeLogic.lua (G&K)

DLC/Expansion/UI/InGame/WorldView/TradeLogic.lua
1374
if ( g_pUsTeam:IsAtWar( g_iThemTeam ) ) then
2982
if (g_pUsTeam:IsAtWar(g_iThemTeam )) then


TutorialChecks.lua

Tutorial/TutorialChecks.lua
1125
if (pOtherPlayer:IsMinorCiv() and pOtherPlayer:IsAlive() and not pTeam:IsAtWar(iOtherTeam)) then
2464
if (iPlotOwner >= 0 and Players[iPlotOwner]:IsMinorCiv() and not pTeam:IsAtWar(iPlotTeam)) then
2812
if (pTeam:IsHasMet(iOtherTeam) and not pTeam:IsAtWar(iOtherTeam)) then


VictoryProgress.lua (G&K)

DLC/Expansion/UI/InGame/Popups/VictoryProgress.lua
0798
if (Teams[iActiveTeam]:IsAtWar(iTeam)) 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.