Deal (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 Deal.
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 ___________________________
AddAllowEmbassy(PlayerID us)
AddCityTrade(PlayerID player, ResourceType city)
AddDeclarationOfFriendship(PlayerID us)
AddDefensivePact(PlayerID us, ResourceType dealDuration)
AddGoldPerTurnTrade(PlayerID us, int goldPerTurn, ResourceType dealDuration)
AddGoldTrade(PlayerID us, int amount)
AddMapTrade
AddOpenBorders(PlayerID us, ResourceType dealDuration)
AddPeaceTreaty(PlayerID us, int arg1)
AddPermamentAlliance
AddResearchAgreement(PlayerID us, ResourceType dealDuration)
AddResourceTrade(PlayerID us, ResourceType resource, int amount, ResourceType dealDuration)
AddSurrender
AddThirdPartyEmbargo
AddThirdPartyPeace(PlayerID who, TeamID otherPlayer, int arg2)
AddThirdPartyWar(PlayerID who, TeamID otherPlayer)
AddTradeAgreement(PlayerID us, ResourceType dealDuration)
AddTruce
AddUnitTrade

C

Base game Gods & Kings ___________________________
ChangeGoldPerTurnTrade(PlayerID us, int goldPerTurn, ResourceType dealDuration)
ChangeGoldTrade(PlayerID us, int gold)
ChangeResourceTrade(PlayerID us, ResourceType resource, int numResource, ResourceType dealDuration)
ChangeThirdPartyEmbargoDuration
ChangeThirdPartyPeaceDuration
ChangeThirdPartyWarDuration
ClearItems()

G

Base game Gods & Kings ___________________________
GetDemandingPlayer
int GetDuration()
GetEndTurn
GetFromPlayer
int GetGoldAvailable(PlayerID us, TradeableItemType itemToBeChanged)
TradeableItemType, unknown, unknown, ResourceType, int, PlayerID GetNextItem()
int GetNumItems()
int GetNumResource(PlayerID us, ResourceType resType)
PlayerID GetOtherPlayer(PlayerID player)
GetRequestingPlayer
int GetStartTurn()
GetSurrenderingPlayer
GetToPlayer

I

Base game Gods & Kings ___________________________
int IsPossibleToTradeItem(PlayerID us, PlayerID them, TradeableItemType tradeType, TeamID dealDuration, ResourceType dealDuration = nil)

R

Base game Gods & Kings ___________________________
RemoveByType(TradeableItemType arg0, PlayerID us)
RemoveCityTrade(SpecialistType player, int cityID)
RemoveResourceTrade(ResourceType resource)
RemoveThirdPartyEmbargo
RemoveThirdPartyPeace(PlayerID firstParty, TeamID otherPlayer)
RemoveThirdPartyWar(PlayerID firstParty, TeamID otherPlayer)
RemoveUnitTrade
ResetIterator()

S

Base game Gods & Kings ___________________________
SetDemandingPlayer
SetFromPlayer(PlayerID us)
SetRequestingPlayer
SetSurrenderingPlayer
SetToPlayer(PlayerID them)


Used by

SpecialistType Player:GetDealMyValue(Deal Deal)
Deal UI.GetScratchDeal()



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.