Plot (Civ5 Type): Difference between revisions
(Bot update) |
(plot equality operator) |
||
Line 2: | Line 2: | ||
''This page is a part of the [[Lua and UI Reference (Civ5)]].''<br/> | ''This page is a part of the [[Lua and UI Reference (Civ5)]].''<br/> | ||
Plots apparently have an equality operator handler, i.e. two variables of plot type can be compared directly without have to compare both their X and Y coordinates. | |||
=Instance Methods= | =Instance Methods= |
Revision as of 14:05, 20 February 2014
This page is a part of the Lua and UI Reference (Civ5).
Plots apparently have an equality operator handler, i.e. two variables of plot type can be compared directly without have to compare both their X and Y coordinates.
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 Plot.
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
|
AddFeatureDummyModel(string dummyTag, string modelTag)
| ||||
Area
|
Area()
| ||||
bool
|
At(int x, int y)
|
C
D
int
|
DefenseModifier(TeamID defendTeam, bool ignoreBuilding, bool help)
|
E
|
Erase
|
G
H
int
|
HasBarbarianCamp()
| ||||
bool
|
HasYield(YieldType yield)
|
I
M
int
|
MovementCost(Unit unit, Plot fromPlot)
|
N
|
NukeExplosion(int range, Unit nukeUnit)
|
P
string
|
PickFeatureDummyTag(int mouseX, int mouseY)
|
R
|
RemoveGoody
| ||||
|
ResetFeatureModel
|
S
int
|
SeeFromLevel(TeamID team)
| ||||
int
|
SeeThroughLevel()
| ||||
|
SetArea(AreaID area)
| ||||
|
SetContinentArtType(ArtStyleType style)
| ||||
|
SetFeatureDummyTexture(string dummyTag, string textureTag)
| ||||
|
SetFeatureDummyVisibility(string dummyTag, bool show)
| ||||
|
SetFeatureType(int featureID, int arg1 = nil)
| ||||
|
SetImprovementDuration(int newValue)
| ||||
|
SetImprovementPillaged(bool pillaged)
| ||||
|
SetImprovementType(int newValue)
| ||||
|
SetNEOfRiver(bool newValue)
| ||||
|
SetNumResource(int num)
| ||||
|
SetNWOfRiver(bool newValue)
| ||||
|
SetOwner(PlayerID newValue, int acquiringCityID, bool checkUnits = true, bool updateResources = true)
| ||||
|
SetOwnershipDuration(int newValue)
| ||||
|
SetPlotType(PlotType terrain, bool recalculateAreas = nil, bool rebuildGraphics) = nil)
| ||||
|
SetResourceType(int newValue, ResourceType numResource)
| ||||
|
SetRevealed(TeamID team, bool newValue, bool terrainOnly, TeamID fromTeam)
| ||||
|
SetRouteType(int newValue)
| ||||
|
SetScriptData(string newValue)
| ||||
|
SetStartingPlot(bool newValue)
| ||||
|
SetTerrainType(TerrainType terrain, bool recalculateAreas, bool rebuildGraphics))
| ||||
|
SetUpgradeProgress(int newValue)
| ||||
|
SetWOfRiver(bool newValue)
| ||||
bool
|
Plot plot)
( |
U
|
UpdateFog
| ||||
|
UpdateVisibility
|
W
|
WaterArea
|
Used by
bool
|
CanPlaceGoodyAt(ImprovementType improvement, Plot plot)
|
|
DoRiver(Plot startPlot, FlowDirectionType thisFlowDirection = nil, FlowDirectionType originalFlowDirection = nil, int riverID = nil)
|
string
|
GetCivStateQuestString(Plot plot, bool shortVersion)
|
string
|
GetImprovementString(Plot plot)
|
string
|
GetNatureString(Plot plot)
|
string
|
GetOwnerString(Plot plot)
|
string
|
GetResourceString(Plot plot, bool longForm)
|
int
|
GetRiverValueAtPlot(Plot plot)
|
string
|
GetUnitsString(Plot plot)
|
string
|
GetYieldString(Plot plot)
|
bool
|
City:AtPlot(Plot plot)
|
int
|
City:CanWork(Plot plot)
|
Plot
|
City:GetCityIndexPlot(CityPlotID index)
|
CityPlotID
|
City:GetCityPlotIndex(Plot plot)
|
int
|
City:GetNumForcedWorkingPlots(Plot plot)
|
int
|
City:IsForcedWorkingPlot(Plot plot)
|
int
|
City:IsPlotBlockaded(Plot plot)
|
int
|
City:IsWorkingPlot(Plot plot)
|
Plot
|
City:Plot()
|
|
FeatureGenerator:AddForestsAtPlot(Plot plot, int x, int y, int lat)
|
|
FeatureGenerator:AddIceAtPlot(Plot plot, int x, int y, int lat)
|
|
FeatureGenerator:AddJunglesAtPlot(Plot plot, int x, int y, int lat)
|
|
FeatureGenerator:AddMarshAtPlot(Plot plot, int x, int y, int lat)
|
|
FeatureGenerator:AddOasisAtPlot(Plot plot, int x, int y, int lat)
|
bool
|
Game.CanHandleAction(ActionType action, Plot plot = nil, bool testVisible = false)
|
bool
|
Game.CyclePlotUnits(Plot plot, bool forward, bool auto, int count)
|
int
|
Game.GetImprovementUpgradeTime(ImprovementType improvement, Plot plot)
|
|
Game.SelectionListMove(Plot plot, int alt, bool shift, int ctrl)
|
bool
|
Map.FindWater(Plot plot, int range, bool isFreshWater)
|
Plot
|
Map.GetPlot(int x, int y = nil)
|
Plot
|
Map.GetPlotByIndex(PlotID index)
|
Plot
|
Map.GetPlotXY(int x, int y, int xOffset, int yOffset)
|
Plot
|
Map.PlotDirection(int x, int y)
|
Plot
|
Map.PlotXYWithRangeCheck(int x, int y, int xOffset, int yOffset, int maxRange)
|
bool
|
Player:CanBuild(Plot plot, BuildActionType build, bool testEra = false, bool testVisible = false, bool testGold = false)
|
bool
|
Player:CanReceiveGoody(Plot plot, GoodyType goody, Unit unit)
|
|
Player:DoGoody(Plot plot, Unit unit)
|
int
|
Player:GetAdvancedStartCityCost(bool add, Plot plot)
|
int
|
Player:GetAdvancedStartImprovementCost(ImprovementType improvement, bool add, Plot plot)
|
int
|
Player:GetAdvancedStartRouteCost(RouteType route, bool add, Plot plot)
|
int
|
Player:GetAdvancedStartUnitCost(UnitType unit, bool add, Plot plot)
|
int
|
Player:GetAdvancedStartVisibilityCost(bool add, Plot plot)
|
unknown
|
Player:GetBestRoute(Plot plot)
|
Plot
|
Player:GetClosestGoodyPlot(unknown void)
|
int
|
Player:GetFoundedReligionEnemyCityCombatMod(Plot toPlot)
|
int
|
Player:GetFoundedReligionFriendlyCityCombatMod(Plot toPlot)
|
int
|
Player:GetPlotDanger(Plot plot)
|
bool
|
Player:GetPlotHasOrder(Plot Plot)
|
Plot
|
Player:GetStartingPlot()
|
|
Player:ReceiveGoody(Plot plot, GoodyType goody, Unit unit)
|
|
Player:SetStartingPlot(Plot plot)
|
bool
|
Plot:CanSeePlot(Plot target, TeamID team, int range)
|
Plot
|
Plot:GetInlandCorner()
|
Plot
|
Plot:GetNearestLandPlot()
|
int
|
Plot:MovementCost(Unit unit, Plot fromPlot)
|
bool
|
Plot:ShareAdjacentArea(Plot plot)
|
bool
|
UI.CanPlaceUnitAt(unknown unit, Plot plot)
|
|
UI.DoSelectCityAtPlot(Plot plot)
|
|
UI.HighlightCanPlacePlots(Unit unit, Plot arg1)
|
|
UI.LocationSelect(Plot plot, int ctrl, int alt, bool shift)
|
|
UI.LookAt(Plot plot, int arg1 = nil)
|
int
|
Unit:AtPlot(Plot plot)
|
bool
|
Unit:CanAirDefend(Plot plot)
|
bool
|
Unit:CanAirlift(Plot plot)
|
bool
|
Unit:CanAirliftAt(Plot plot, int x, int y)
|
bool
|
Unit:CanAirPatrol(Plot plot)
|
bool
|
Unit:CanBuild(Plot plot, BuildActionType build, bool testVisible = false, bool testGold = true)
|
bool
|
Unit:CanBuildSpaceship(Plot plot, bool visible)
|
bool
|
Unit:CanConstruct(Plot plot, BuildingType building)
|
bool
|
Unit:CanDiscover(Plot plot)
|
bool
|
Unit:CanDisembark(Plot plot)
|
bool
|
Unit:CanDisembarkOnto(Plot plot)
|
bool
|
Unit:CanEmbark(Plot plot)
|
bool
|
Unit:CanEmbarkOnto(Plot plot, Plot targetPlot)
|
bool
|
Unit:CanFortify(Plot plot)
|
bool
|
Unit:CanFound(Plot plot, bool testVisible = false)
|
bool
|
Unit:CanGiveExperience(Plot plot)
|
bool
|
Unit:CanGoldenAge(Plot plot, bool testVisible)
|
int
|
Unit:CanHeal(Plot plot)
|
bool
|
Unit:CanHold(Plot plot)
|
bool
|
Unit:CanJoin(Plot plot, SpecialistType specialist)
|
bool
|
Unit:CanLead(Plot plot, int unitId)
|
bool
|
Unit:CanLoad(Plot plot)
|
bool
|
Unit:CanLoadUnit(Unit unit, Plot plot)
|
bool
|
Unit:CanMoveOrAttackInto(Plot plot, bool declareWar = false, bool destination = false)
|
bool
|
Unit:CanMoveThrough(Plot plot)
|
int
|
Unit:CanNuke(Plot plot)
|
bool
|
Unit:CanNukeAt(Plot plot, int x, int y)
|
bool
|
Unit:CanParadrop(Plot plot, bool arg1)
|
bool
|
Unit:CanParadropAt(Plot plot, int x, int y)
|
bool
|
Unit:CanPillage(Plot plot)
|
bool
|
Unit:CanRebaseAt(Plot sourcePlot, int targetX, int targetY)
|
bool
|
Unit:CanSentry(Plot plot)
|
bool
|
Unit:CanSleep(Plot plot)
|
bool
|
Unit:CanStartMission(int mission, int data1, int data2, Plot plot = nil, bool testVisible = false)
|
bool
|
Unit:CanTrade(Plot plot, bool testVisible)
|
|
Unit:Embark(Plot plot)
|
|
Unit:ExecuteSpecialExploreMove(Plot targetPlot)
|
bool
|
Unit:GeneratePath(Plot toPlot, int flags = 0, bool reuse = false, unknown piPathTurns = nil)
|
unknown
|
Unit:GetBestInterceptor(Plot plot)
|
unknown
|
Unit:GetBestSeaPillageInterceptor(Plot plot)
|
TeamID
|
Unit:GetDeclareWarRangeStrike(Plot plot)
|
int
|
Unit:GetMaxAttackStrength(Plot fromPlot, Plot toPlot, Unit defender)
|
int
|
Unit:GetMaxDefenseStrength(Plot inPlot, Unit attacker, bool arg2 = nil)
|
Plot
|
Unit:GetPlot()
|
int
|
Unit:GetTradeGold(Plot plot)
|
Unit
|
Unit:GetUpgradeUnitFromPlot(Plot adjacentPlot)
|
bool
|
Unit:IsCanDefend(Plot plot)
|
bool
|
Unit:IsNukeVictim(Plot plot, TeamID team)
|
bool
|
Unit:IsRangeAttackIgnoreLOS(Plot plot)
|
|
Unit:PushMission(MissionType mission, int data1 = -1, int data2 = -1, int flags = 0, bool append = false, bool manual = fa;se, MissionType missionAI = NO_MISSIONAI, Plot missionAIPlot = nil, Unit missionAIUnit = nil)
|
|
Unit:SetReconPlot(Plot newValue)
|
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.