Deal (Civ5 Type)

From Civilization Modding Wiki
Revision as of 15:17, 19 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).


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

C

Base game Gods & Kings ___________________________
Check.png Check.png Star.png Speech.png ChangeGoldPerTurnTrade(PlayerID us, int goldPerTurn, ResourceType dealDuration)
Check.png Check.png Star.png Speech.png ChangeGoldTrade(PlayerID us, int gold)
Check.png Check.png Star.png Speech.png ChangeResourceTrade(PlayerID us, ResourceType resource, int numResource, ResourceType dealDuration)
CheckButZero.png CheckButZero.png Star.png Speech.png Question-blue.png ChangeThirdPartyEmbargoDuration
CheckButZero.png CheckButZero.png Star.png Speech.png Question-blue.png ChangeThirdPartyPeaceDuration
CheckButZero.png CheckButZero.png Star.png Speech.png Question-blue.png ChangeThirdPartyWarDuration
Check.png Check.png Star.png Speech.png ClearItems()

G

Base game Gods & Kings ___________________________
CheckButZero.png CheckButZero.png Star.png Speech.png Question-blue.png GetDemandingPlayer
Check.png Check.png Star.png Speech.png int GetDuration()
CheckButZero.png CheckButZero.png Star.png Speech.png Question-blue.png GetEndTurn
CheckButZero.png CheckButZero.png Star.png Speech.png Question-blue.png GetFromPlayer
Check.png Check.png Star.png Speech.png int GetGoldAvailable(PlayerID us, TradeableItemType itemToBeChanged)
Check.png Check.png Star.png Speech.png TradeableItemType, unknown, unknown, ResourceType, int, PlayerID GetNextItem()
Check.png Check.png Star.png Speech.png int GetNumItems()
Question.png Check.png Star.png Speech.png int GetNumResource(PlayerID us, ResourceType resType)
Check.png Check.png Star.png Speech.png PlayerID GetOtherPlayer(PlayerID player)
CheckButZero.png CheckButZero.png Star.png Speech.png Question-blue.png GetRequestingPlayer
Check.png Check.png Star.png Speech.png int GetStartTurn()
CheckButZero.png CheckButZero.png Star.png Speech.png Question-blue.png GetSurrenderingPlayer
CheckButZero.png CheckButZero.png Star.png Speech.png Question-blue.png GetToPlayer

I

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

R

Base game Gods & Kings ___________________________
Check.png Check.png Star.png Speech.png RemoveByType(TradeableItemType arg0, PlayerID us)
Check.png Check.png Star.png Speech.png RemoveCityTrade(SpecialistType player, int cityID)
Check.png Check.png Star.png Speech.png RemoveResourceTrade(ResourceType resource)
CheckButZero.png CheckButZero.png Star.png Speech.png Question-blue.png RemoveThirdPartyEmbargo
Check.png Check.png Star.png Speech.png RemoveThirdPartyPeace(PlayerID firstParty, TeamID otherPlayer)
Check.png Check.png Star.png Speech.png RemoveThirdPartyWar(PlayerID firstParty, TeamID otherPlayer)
CheckButZero.png CheckButZero.png Star.png Speech.png Question-blue.png RemoveUnitTrade
Check.png Check.png Star.png Speech.png ResetIterator()

S

Base game Gods & Kings ___________________________
CheckButZero.png CheckButZero.png Star.png Speech.png Question-blue.png SetDemandingPlayer
Check.png Check.png Star.png Speech.png SetFromPlayer(PlayerID us)
CheckButZero.png CheckButZero.png Star.png Speech.png Question-blue.png SetRequestingPlayer
CheckButZero.png CheckButZero.png Star.png Speech.png Question-blue.png SetSurrenderingPlayer
Check.png Check.png Star.png Speech.png 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.