Lua Game Objects/Unit

From Civilization Modding Wiki
Revision as of 16:31, 24 October 2011 by Human machine (talk | contribs) (Created page with "Unit objects represent a single instance of a CvUnit. =Scoped Methods= ==AirSweepCombatMod== ''<summary>'' '''Usage''' int unit:AirSweepCombatMod(); '''Parameters''' None ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Unit objects represent a single instance of a CvUnit.

Scoped Methods

AirSweepCombatMod

<summary>

Usage

int unit:AirSweepCombatMod();

Parameters

None

Returns

No Description Available.

Example

No Example Available

At

<summary>

Usage

boolean unit:at(int iX, int iY);

Parameters

iX
No Description Available
iY
No Description Available

Returns

No Description Available.

Example

No Example Available

AtPlot

<summary>

Usage

boolean unit:atPlot(<Plot> pPlot);

Parameters

pPlot
No Description Available

Returns

No Description Available.

Example

No Example Available

AttackFortifiedModifier

<summary>

Usage

int unit:AttackFortifiedModifier();

Parameters

None

Returns

No Description Available.

Example

No Example Available

AttackWoundedModifier

<summary>

Usage

int unit:AttackWoundedModifier();

Parameters

None

Returns

No Description Available.

Example

No Example Available

AttackXPValue

<summary>

Usage

int unit:attackXPValue();

Parameters

None

Returns

No Description Available.

Example

No Example Available

CanAcquirePromotion

<summary>

Usage

boolean unit:canAcquirePromotion(PromotionTypes ePromotion);

Parameters

ePromotion
No Description Available

Returns

No Description Available.

Example

No Example Available

CanAcquirePromotionAny

<summary>

Usage

boolean unit:canAcquirePromotionAny();

Parameters

None

Returns

No Description Available.

Example

No Example Available

CanAirAttack

<summary>

Usage

boolean unit:canAirAttack();

Parameters

None

Returns

No Description Available.

Example

No Example Available

CanAirDefend

<summary>

Usage

boolean unit:canAirDefend(<Plot> pPlot);

Parameters

pPlot
No Description Available

Returns

No Description Available.

Example

No Example Available

CanAirlift

<summary>

Usage

boolean unit:canAirlift(<Plot> pPlot);

Parameters

pPlot
No Description Available

Returns

No Description Available.

Example

No Example Available

CanAirliftAt

<summary>

Usage

boolean unit:canAirliftAt(<Plot> pPlot, int iX, int iY);

Parameters

pPlot
No Description Available
iX
No Description Available
iY
No Description Available

Returns

No Description Available.

Example

No Example Available

CanAirPatrol

<summary>

Usage

boolean unit:canAirPatrol(<Plot> pPlot);

Parameters

pPlot
No Description Available

Returns

No Description Available.

Example

No Example Available

CanAutomate

<summary>

Usage

boolean unit:canAutomate(AutomateTypes eAutomate);

Parameters

eAutomate
No Description Available

Returns

No Description Available.

Example

No Example Available

CanBuild

<summary>

Usage

boolean unit:canBuild(<Plot> pPlot, BuildTypes eBuild, boolean bTestVisible = false, bTestGold = true);

Parameters

pPlot
No Description Available
eBuild
No Description Available
bTestVisible
No Description Available
bTestGold
No Description Available

Returns

No Description Available.

Example

No Example Available

CanBuildRoute

<summary>

Usage

boolean unit:canBuildRoute();

Parameters

None

Returns

No Description Available.

Example

No Example Available

CanBuildSpaceship

<summary>

Usage

boolean unit:CanBuildSpaceship(<Plot> pPlot, boolean bVisible);

Parameters

pPlot
No Description Available
bVisible
No Description Available

Returns

No Description Available.

Example

No Example Available

CanCargoAllMove

<summary>

Usage

boolean unit:canCargoAllMove();

Parameters

None

Returns

No Description Available.

Example

No Example Available

CanCoexistWithEnemyUnit

<summary>

Usage

boolean unit:canCoexistWithEnemyUnit(TeamTypes eTeam);

Parameters

eTeam
No Description Available

Returns

No Description Available.

Example

No Example Available

CanConstruct

<summary>

Usage

boolean unit:canConstruct(<Plot> pPlot, BuildingTypes eBuilding);

Parameters

pPlot
No Description Available
eBuilding
No Description Available

Returns

No Description Available.

Example

No Example Available

CanDiscover

<summary>

Usage

boolean unit:canDiscover(<Plot> pPlot);

Parameters

pPlot
No Description Available

Returns

No Description Available.

Example

No Example Available

CanDisembark

<summary>

Usage

boolean unit:canDisembark(<Plot> pPlot);

Parameters

pPlot
No Description Available

Returns

No Description Available.

Example

No Example Available

CanDisembarkOnto

<summary>

Usage

boolean unit:CanDisembarkOnto(<Plot> pPlot);

Parameters

pPlot
No Description Available

Returns

No Description Available.

Example

No Example Available

CanDistanceGift

<summary>

Usage

boolean unit:CanDistanceGift();

Parameters

None

Returns

No Description Available.

Example

No Example Available

CanDoCommand

<summary>

Usage

boolean unit:canDoCommand(CommandTypes eCommand, int iData1, int iData2, boolean bTestVisible = false, boolean bTestBusy = true);

Parameters

eCommand
No Description Available
iData1
No Description Available
iData2
No Description Available
bTestVisible
No Description Available
bTestBusy
No Description Available

Returns

No Description Available.

Example

No Example Available

CanEmbark

<summary>

Usage

boolean unit:canEmbark(<Plot> pPlot);

Parameters

pPlot
No Description Available

Returns

No Description Available.

Example

No Example Available

CanEmbarkOnto

<summary>

Usage

boolean unit:CanEmbarkOnto(<Plot> pPlot);

Parameters

pPlot
No Description Available

Returns

No Description Available.

Example

No Example Available

CanEnterTerritory

<summary>

Usage

boolean unit:canEnterTerritory(TeamTypes eTeam, boolean bIgnoreRightOfPassage = false, boolean bIsCity = false);

Parameters

eTeam
No Description Available
bIgnoreRightOfPassage
No Description Available
bIsCity
No Description Available

Returns

No Description Available.

Example

No Example Available

CanFortify

<summary>

Usage

boolean unit:canFortify(<Plot> pPlot);

Parameters

pPlot
No Description Available

Returns

No Description Available.

Example

No Example Available

CanFound

<summary>

Usage

boolean unit:canFound(<Plot> pPlot, boolean bTestVisible = false);

Parameters

pPlot
No Description Available
bTestVisible
No Description Available

Returns

No Description Available.

Example

No Example Available

CanGift

<summary>

Usage

boolean unit:canGift(boolean bTestVisible = false, boolean bTestTransport = false);

Parameters

bTestVisible
No Description Available
bTestTransport
No Description Available

Returns

No Description Available.

Example

No Example Available

CanGiveExperience

<summary>

Usage

int unit:canGiveExperience(<Plot> pPlot);

Parameters

pPlot
No Description Available

Returns

No Description Available.

Example

No Example Available

CanGoldenAge

<summary>

Usage

boolean unit:canGoldenAge(<Plot> pPlot, boolean bTestVisible);

Parameters

pPlot
No Description Available
bTestVisible
No Description Available

Returns

No Description Available.

Example

No Example Available

CanHeal

<summary>

Usage

boolean unit:canHeal(<Plot> pPlot);

Parameters

pPlot
No Description Available

Returns

No Description Available.

Example

No Example Available

CanHold

<summary>

Usage

boolean unit:canHold(<Plot> pPlot);

Parameters

pPlot
No Description Available

Returns

No Description Available.

Example

No Example Available

CanJoin

<summary>

Usage

boolean unit:canJoin(<Plot> pPlot, SpecialistTypes eSpecialist);

Parameters

pPlot
No Description Available
eSpecialist
No Description Available

Returns

No Description Available.

Example

No Example Available

CanLead

<summary>

Usage

int unit:canLead(<Plot> pPlot, int iUnitId);

Parameters

pPlot
No Description Available
iUnitId
No Description Available

Returns

No Description Available.

Example

No Example Available

CanLoad

<summary>

Usage

boolean unit:canLoad(<Plot> pPlot);

Parameters

pPlot
No Description Available

Returns

No Description Available.

Example

No Example Available

CanLoadUnit

<summary>

Usage

boolean unit:canLoadUnit(<Unit> pUnit, <Plot> pPlot);

Parameters

pUnit
No Description Available
pPlot
No Description Available

Returns

No Description Available.

Example

No Example Available

CanMove

<summary>

Usage

boolean unit:canMove();

Parameters

None

Returns

No Description Available.

Example

No Example Available

CanMoveAllTerrain

<summary>

Usage

boolean unit:canMoveAllTerrain();

Parameters

None

Returns

No Description Available.

Example

No Example Available

CanMoveImpassable

<summary>

Usage

boolean unit:canMoveImpassable();

Parameters

None

Returns

No Description Available.

Example

No Example Available

CanMoveOrAttackInto

<summary>

Usage

boolean unit:canMoveOrAttackInto(<Plot> pPlot, boolean bDeclareWar = false, bDestination = false);

Parameters

pPlot
No Description Available
bDeclareWar
No Description Available
bDestination
No Description Available

Returns

No Description Available.

Example

No Example Available

CanMoveThrough

<summary>

Usage

boolean unit:canMoveThrough(<Plot> pPlot);

Parameters

pPlot
No Description Available

Returns

No Description Available.

Example

No Example Available

CanNuke

<summary>

Usage

boolean unit:canNuke(<Plot> pPlot);

Parameters

pPlot
No Description Available

Returns

No Description Available.

Example

No Example Available

CanNukeAt

<summary>

Usage

boolean unit:canNukeAt(<Plot> pPlot, int iX, int iY);

Parameters

pPlot
No Description Available
iX
No Description Available
iY
No Description Available

Returns

No Description Available.

Example

No Example Available

CanParadrop

<summary>

Usage

boolean unit:canParadrop(<Plot> pPlot);

Parameters

pPlot
No Description Available

Returns

No Description Available.

Example

No Example Available

CanParadropAt

<summary>

Usage

boolean unit:canParadropAt(<Plot> pPlot, int iX, int iY);

Parameters

pPlot
No Description Available
iX
No Description Available
iY
No Description Available

Returns

No Description Available.

Example

No Example Available

CanPillage

<summary>

Usage

boolean unit:canPillage(<Plot> pPlot);

Parameters

pPlot
No Description Available

Returns

No Description Available.

Example

No Example Available

CanPromote

<summary>

Usage

boolean unit:canPromote(PromotionTypes ePromotion, int iLeaderUnitId);

Parameters

ePromotion
No Description Available
iLeaderUnitId
No Description Available

Returns

No Description Available.

Example

No Example Available

CanRangeStrike

<summary>

Usage

boolean unit:CanRangeStrike();

Parameters

None

Returns

No Description Available.

Example

No Example Available

CanRangeStrikeAt

<summary>

Usage

boolean unit:CanRangeStrikeAt(int iX, int iY);

Parameters

iX
No Description Available
iY
No Description Available

Returns

No Description Available.

Example

No Example Available

CanRebaseAt

<summary>

Usage

boolean unit:canRebaseAt( plot, x, y);

Parameters

plot
No Description Available
x
No Description Available
y
No Description Available

Returns

No Description Available.

Example

No Example Available

CanScrap

<summary>

Usage

boolean unit:canScrap();

Parameters

None

Returns

No Description Available.

Example

No Example Available

CanSentry

<summary>

Usage

boolean unit:canSentry(<Plot> pPlot);

Parameters

pPlot
No Description Available

Returns

No Description Available.

Example

No Example Available

CanSetUpForRangedAttack

<summary>

Usage

unit:();

Parameters

No Description Available

Returns

No Description Available.

Example

No Example Available

CanSiege

<summary>

Usage

boolean unit:canSiege(TeamTypes eTeam);

Parameters

eTeam
No Description Available

Returns

No Description Available.

Example

No Example Available

CanSleep

<summary>

Usage

boolean unit:canSleep(<Plot> pPlot);

Parameters

pPlot
No Description Available

Returns

No Description Available.

Example

No Example Available

CanStartMission

<summary>

Usage

boolean unit:CanStartMission(int iMission, int iData1, int iData2, <Plot> pPlot = nil, boolean bTestVisible = false);

Parameters

iMission
No Description Available
iData1
No Description Available
iData2
No Description Available
pPlot
No Description Available
bTestVisible
No Description Available

Returns

No Description Available.

Example

No Example Available

CanTrade

<summary>

Usage

boolean unit:canTrade(<Plot> pPlot, boolean bTestVisible);

Parameters

pPlot
No Description Available
bTestVisible
No Description Available

Returns

No Description Available.

Example

No Example Available

CanUnload

<summary>

Usage

boolean unit:canUnload();

Parameters

None

Returns

No Description Available.

Example

No Example Available

CanUnloadAll

<summary>

Usage

boolean unit:canUnloadAll();

Parameters

None

Returns

No Description Available.

Example

No Example Available

CanUpgradeRightNow

<summary>

Usage

unit:();

Parameters

No Description Available

Returns

No Description Available.

Example

No Example Available

CargoSpace

<summary>

Usage

int unit:cargoSpace();

Parameters

None

Returns

No Description Available.

Example

No Example Available

CargoSpaceAvailable

<summary>

Usage

int unit:cargoSpaceAvailable(SpecialUnitTypes eSpecialCargo, DomainTypes eDomainCargo);

Parameters

eSpecialCargo
No Description Available
eDomainCargo
No Description Available

Returns

No Description Available.

Example

No Example Available

ChanceFirstStrikes

<summary>

Usage

int unit:chanceFirstStrikes();

Parameters

None

Returns

No Description Available.

Example

No Example Available

ChangeCargoSpace

<summary>

Usage

void unit:changeCargoSpace(int iChange);

Parameters

iChange
No Description Available

Returns

No Description Available.

Example

No Example Available

ChangeDamage

<summary>

Usage

void unit:changeDamage(int iChange, PlayerTypes ePlayer);

Parameters

iChange
No Description Available
ePlayer
No Description Available

Returns

No Description Available.

Example

No Example Available

ChangeExperience

<summary>

Usage

void unit:changeExperience(int iChange, int iMax = -1, boolean bFromCombat = false, boolean bInBorders = false, boolean bUpdateGlobal = false);

Parameters

iChange
No Description Available
iMax
No Description Available
bFromCombat
No Description Available
bInBorders
No Description Available
bUpdateGlobal
No Description Available

Note that the third, fourth, and fifth inputs will give an error if you try to give a boolean. These variables have to be passed as integers.

Returns

No Description Available.

Example

No Example Available

ChangeLevel

<summary>

Usage

void unit:changeLevel(int iChange);

Parameters

iChange
No Description Available

Returns

No Description Available.

Example

No Example Available

ChangeMoves

<summary>

Usage

void unit:changeMoves(int iChange);

Parameters

iChange
No Description Available

Returns

No Description Available.

Example

No Example Available

CityAttackModifier

<summary>

Usage

int unit:cityAttackModifier();

Parameters

None

Returns

No Description Available.

Example

No Example Available

CityDefenseModifier

<summary>

Usage

int unit:cityDefenseModifier();

Parameters

None

Returns

No Description Available.

Example

No Example Available

Convert

<summary>

Usage

void unit:convert(<Unit> pUnit);

Parameters

pUnit
No Description Available

Returns

No Description Available.

Example

No Example Available

CurrInterceptionProbability

<summary>

Usage

int unit:currInterceptionProbability();

Parameters

None

Returns

No Description Available.

Example

No Example Available

DefenseXPValue

<summary>

Usage

int unit:defenseXPValue();

Parameters

None

Returns

No Description Available.

Example

No Example Available

DoCommand

<summary>

Usage

void unit:doCommand(CommandTypes eCommand, int iData1, int iData2);

Parameters

eCommand
No Description Available
iData1
No Description Available
iData2
No Description Available

Returns

No Description Available.

Example

No Example Available

DomainCargo

<summary>

Usage

DomainTypes unit:domainCargo();

Parameters

None

Returns

No Description Available.

Example

No Example Available

DomainModifier

<summary>

Usage

int unit:domainModifier(DomainTypes eDomain);

Parameters

eDomain
No Description Available

Returns

No Description Available.

Example

No Example Available

Embark

<summary>

Usage

void unit:Embark(<Plot> pPlot);

Parameters

pPlot
No Description Available

Returns

No Description Available.

Example

No Example Available

EvasionProbability

<summary>

Usage

int unit:evasionProbability();

Parameters

None

Returns

No Description Available.

Example

No Example Available

ExperienceNeeded

<summary>

Usage

int unit:experienceNeeded();

Parameters

None

Returns

No Description Available.

Example

No Example Available

FeatureAttackModifier

<summary>

Usage

int unit:featureAttackModifier(FeatureTypes eFeature);

Parameters

eFeature
No Description Available

Returns

No Description Available.

Example

No Example Available

FeatureDefenseModifier

<summary>

Usage

int unit:featureDefenseModifier(FeatureTypes eFeature);

Parameters

eFeature
No Description Available

Returns

No Description Available.

Example

No Example Available

FinishMoves

<summary>

Usage

void unit:finishMoves();

Parameters

None

Returns

No Description Available.

Example

No Example Available

FirstStrikes

<summary>

Usage

int unit:firstStrikes();

Parameters

None

Returns

No Description Available.

Example

No Example Available

FlatMovementCost

<summary>

Usage

boolean unit:flatMovementCost();

Parameters

None

Returns

No Description Available.

Example

No Example Available

FlavorValue

<summary>

Usage

int unit:flavorValue(FlavorTypes eFlavor);

Parameters

eFlavor
No Description Available

Returns

No Description Available.

Example

No Example Available

FortifyModifier

<summary>

Usage

int unit:fortifyModifier();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GeneratePath

<summary>

Usage

boolean unit:generatePath(<Plot> pToPlot, int iFlags = 0, boolean bReuse = false, piPathTurns = nil);

Parameters

pToPlot
No Description Available
iFlags
No Description Available
bReuse
No Description Available
piPathTurns
No Description Available

Returns

No Description Available.

Example

No Example Available

GetAdjacentModifier

<summary>

Usage

int unit:GetAdjacentModifier();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetAdjacentTileHeal

<summary>

Usage

int unit:getAdjacentTileHeal();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetAirCombatDamage

<summary>

Usage

int unit:airCombatDamage(<Unit> pDefender);

Parameters

pDefender
No Description Available

Returns

No Description Available.

Example

No Example Available

GetAmphibCount

<summary>

Usage

int unit:getAmphibCount();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetArea

<summary>

Usage

unit:area();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetAttackModifier

<summary>

Usage

int unit:getAttackModifier();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetBaseCombatStrength

<summary>

Usage

int unit:baseCombatStr();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetBaseRangedCombatStrength

<summary>

Usage

int unit:airBaseCombatStr();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetBestInterceptor

<summary>

Usage

unit:bestInterceptor(<Plot> pPlot);

Parameters

pPlot
No Description Available

Returns

No Description Available.

Example

No Example Available

GetBestSeaPillageInterceptor

<summary>

Usage

unit:bestSeaPillageInterceptor(<Plot> pPlot);

Parameters

pPlot
No Description Available

Returns

No Description Available.

Example

No Example Available

GetBlitzCount

<summary>

Usage

int unit:getBlitzCount();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetBuildType

<summary>

Usage

BuildTypes unit:getBuildType();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetCaptureUnitType

<summary>

Usage

UnitTypes unit:getCaptureUnitType(CivilizationTypes eCivilization);

Parameters

eCivilization
No Description Available

Returns

No Description Available.

Example

No Example Available

GetCargo

<summary>

Usage

int unit:getCargo();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetCivilizationType

<summary>

Usage

CivilizationTypes unit:getCivilizationType();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetCombatDamage

<summary>

Usage

int unit:getCombatDamage(int iStrength, int iOpponentStrength, int iCurrentDamage, boolean bIncludeRand = true, boolean bAttackerIsCity = false, boolean bDefenderIsCity = false);

Parameters

iStrength
No Description Available
iOpponentStrength
No Description Available
iCurrentDamage
No Description Available
bIncludeRand
No Description Available
bAttackerIsCity
No Description Available
bDefenderIsCity
No Description Available

Returns

No Description Available.

Example

No Example Available

GetCombatLimit

<summary>

Usage

int unit:combatLimit();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetCombatOwner

<summary>

Usage

int unit:getCombatOwner(TeamTypes eForTeam);

Parameters

eForTeam
No Description Available

Returns

No Description Available.

Example

No Example Available

GetCurrHitPoints

<summary>

Usage

int unit:currHitPoints();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetDamage

<summary>

Usage

int unit:getDamage();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetDeclareWarRangeStrike

<summary>

Usage

TeamTypes unit:GetDeclareWarRangeStrike(<Plot> pPlot);

Parameters

pPlot
No Description Available

Returns

No Description Available.

Example

No Example Available

GetDefenseModifier

<summary>

Usage

int unit:getDefenseModifier();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetDomainType

<summary>

Usage

DomainTypes unit:getDomainType();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetDropRange

<summary>

Usage

int unit:GetDropRange();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetExperience

<summary>

Usage

int unit:getExperience();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetExperiencePercent

<summary>

Usage

int unit:getExperiencePercent();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetExtraAttackFortifiedMod

<summary>

Usage

int unit:getExtraAttackFortifiedMod();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetExtraAttackWoundedMod

<summary>

Usage

int unit:getExtraAttackWoundedMod();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetExtraChanceFirstStrikes

<summary>

Usage

int unit:getExtraChanceFirstStrikes();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetExtraCityAttackPercent

<summary>

Usage

int unit:getExtraCityAttackPercent();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetExtraCityDefensePercent

<summary>

Usage

int unit:getExtraCityDefensePercent();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetExtraCombatPercent

<summary>

Usage

int unit:getExtraCombatPercent();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetExtraDomainModifier

<summary>

Usage

int unit:getExtraDomainModifier(DomainTypes eIndex);

Parameters

eIndex
No Description Available

Returns

No Description Available.

Example

No Example Available

GetExtraEnemyHeal

<summary>

Usage

int unit:getExtraEnemyHeal();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetExtraEvasion

<summary>

Usage

int unit:getExtraEvasion();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetExtraFeatureAttackPercent

<summary>

Usage

int unit:getExtraFeatureAttackPercent(FeatureTypes eIndex);

Parameters

eIndex
No Description Available

Returns

No Description Available.

Example

No Example Available

GetExtraFeatureDefensePercent

<summary>

Usage

int unit:getExtraFeatureDefensePercent(FeatureTypes eIndex);

Parameters

eIndex
No Description Available

Returns

No Description Available.

Example

No Example Available

GetExtraFirstStrikes

<summary>

Usage

int unit:getExtraFirstStrikes();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetExtraFriendlyHeal

<summary>

Usage

int unit:getExtraFriendlyHeal();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetExtraHillsAttackPercent

<summary>

Usage

int unit:getExtraHillsAttackPercent();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetExtraHillsDefensePercent

<summary>

Usage

int unit:getExtraHillsDefensePercent();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetExtraIntercept

<summary>

Usage

int unit:getExtraIntercept();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetExtraMoveDiscount

<summary>

Usage

int unit:getExtraMoveDiscount();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetExtraMoves

<summary>

Usage

int unit:getExtraMoves();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetExtraNeutralHeal

<summary>

Usage

int unit:getExtraNeutralHeal();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetExtraOpenAttackPercent

<summary>

Usage

int unit:getExtraOpenAttackPercent();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetExtraOpenDefensePercent

<summary>

Usage

int unit:getExtraOpenDefensePercent();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetExtraOpenRangedAttackMod

<summary>

Usage

int unit:getExtraOpenRangedAttackMod();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetExtraRange

<summary>

Usage

int unit:getExtraRange();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetExtraRoughAttackPercent

<summary>

Usage

int unit:getExtraRoughAttackPercent();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetExtraRoughRangedAttackMod

<summary>

Usage

int unit:getExtraRoughRangedAttackMod();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetExtraTerrainAttackPercent

<summary>

Usage

int unit:getExtraTerrainAttackPercent(TerrainTypes eIndex);

Parameters

eIndex
No Description Available

Returns

No Description Available.

Example

No Example Available

GetExtraTerrainDefensePercent

<summary>

Usage

int unit:getExtraTerrainDefensePercent(TerrainTypes eIndex);

Parameters

eIndex
No Description Available

Returns

No Description Available.

Example

No Example Available

GetExtraUnitCombatModifier

<summary>

Usage

int unit:getExtraUnitCombatModifier(UnitCombatTypes eIndex);

Parameters

eIndex
No Description Available

Returns

No Description Available.

Example

No Example Available

GetExtraVisibilityRange

<summary>

Usage

int unit:getExtraVisibilityRange();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetExtraWithdrawal

<summary>

Usage

int unit:getExtraWithdrawal();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetFacingDirection

<summary>

Usage

int unit:getFacingDirection();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetFireSupportUnit

<summary>

Usage

unit:getFireSupportUnit(PlayerTypes eDefender, int iX, int iY);

Parameters

eDefender
No Description Available
iX
No Description Available
iY
No Description Available

Returns

No Description Available.

Example

No Example Available

GetFortifyTurns

<summary>

Usage

int unit:getFortifyTurns();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetFriendlyLandsAttackModifier

<summary>

Usage

int unit:GetFriendlyLandsAttackModifier();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetFriendlyLandsModifier

<summary>

Usage

int unit:GetFriendlyLandsModifier();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetGameTurnCreated

<summary>

Usage

int unit:getGameTurnCreated();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetGarrisonedCity

<summary>

Usage

unit:lGetGarrisonedCity();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetGoldenAgeTurns

<summary>

Usage

int unit:GetGoldenAgeTurns();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetHandicapType

<summary>

Usage

HandicapTypes unit:getHandicapType();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetHotKeyNumber

<summary>

Usage

int unit:getHotKeyNumber();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetID

<summary>

Usage

int unit:getID();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetInvisibleType

<summary>

Usage

InvisibleTypes unit:getInvisibleType();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetKamikazePercent

<summary>

Usage

int unit:getKamikazePercent();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetLastMoveTurn

<summary>

Usage

int unit:getLastMoveTurn();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetLeaderUnitType

<summary>

Usage

UnitTypes unit:getLeaderUnitType();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetLevel

<summary>

Usage

int unit:getLevel();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetMaxAttackStrength

<summary>

Usage

int unit:GetMaxAttackStrength(<Plot> pFromPlot, <Plot> pToPlot, <Unit> pDefender);

Parameters

pFromPlot
No Description Available
pToPlot
No Description Available
pDefender
No Description Available

Returns

No Description Available.

Example

No Example Available

GetMaxDefenseStrength

<summary>

Usage

int unit:GetMaxDefenseStrength(<Plot> pInPlot, <Unit> pAttacker);

Parameters

pInPlot
No Description Available
pAttacker
No Description Available

Returns

No Description Available.

Example

No Example Available

GetMaxHitPoints

<summary>

Usage

int unit:maxHitPoints();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetMaxRangedCombatStrength

<summary>

Usage

int unit:airMaxCombatStr(<Unit> pOther, boolean bAttacking);

Parameters

pOther
No Description Available
bAttacking
No Description Available

Returns

No Description Available.

Example

No Example Available

GetMoves

<summary>

Usage

int unit:getMoves();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetName

<summary>

Usage

string unit:GetName();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetNameKey

<summary>

Usage

string unit:GetNameKey();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetNumEnemyUnitsAdjacent

<summary>

Usage

boolean unit:GetNumEnemyUnitsAdjacent(<Unit> pOtherUnit);

Parameters

pOtherUnit
No Description Available

Returns

No Description Available.

Example

No Example Available

GetNumResourceNeededToUpgrade

<summary>

Usage

unit:();

Parameters

No Description Available

Returns

No Description Available.

Example

No Example Available

GetOutsideFriendlyLandsModifier

<summary>

Usage

int unit:GetOutsideFriendlyLandsModifier();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetOwner

<summary>

Usage

int unit:getOwner();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetPathEndTurnPlot

<summary>

Usage

unit:getPathEndTurnPlot();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetPillageChange

<summary>

Usage

int unit:getPillageChange();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetPlot

<summary>

Usage

unit:plot();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetRangeCombatDamage

<summary>

Usage

int unit:rangeCombatDamage(<Unit> pDefender, pCity, boolean bIncludeRand);

Parameters

pDefender
No Description Available
pCity
No Description Available
bIncludeRand
No Description Available

Returns

No Description Available.

Example

No Example Available

GetRangedCombatLimit

<summary>

Usage

int unit:GetRangedCombatLimit();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetReconPlot

<summary>

Usage

unit:getReconPlot();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetRiverCrossingNoPenaltyCount

<summary>

Usage

int unit:getRiverCrossingNoPenaltyCount();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetSameTileHeal

<summary>

Usage

int unit:getSameTileHeal();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetScrapGold

<summary>

Usage

boolean unit:GetScrapGold();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetScriptData

<summary>

Usage

string unit:getScriptData();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetSeeInvisibleType

<summary>

Usage

InvisibleTypes unit:getSeeInvisibleType();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetSpecialUnitType

<summary>

Usage

SpecialUnitTypes unit:getSpecialUnitType();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetStrategicResourceCombatPenalty

<summary>

Usage

unit:();

Parameters

No Description Available

Returns

No Description Available.

Example

No Example Available

GetTeam

<summary>

Usage

int unit:getTeam();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetTradeGold

<summary>

Usage

int unit:getTradeGold(<Plot> pPlot);

Parameters

pPlot
No Description Available

Returns

No Description Available.

Example

No Example Available

GetTransportUnit

<summary>

Usage

unit:getTransportUnit();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetUnitAICargo

<summary>

Usage

int unit:getUnitAICargo(UnitAITypes eUnitAI);

Parameters

eUnitAI
No Description Available

Returns

No Description Available.

Example

No Example Available

GetUnitAIType

<summary>

Usage

int unit:GetUnitAIType();

Returns

UnitAITypes ID

Example

No Example Available

GetUnitClassModifier

<summary>

Usage

int unit:GetUnitClassModifier(UnitClassTypes eIndex);

Parameters

eIndex
No Description Available

Returns

No Description Available.

Example

No Example Available

GetUnitClassType

<summary>

Usage

UnitClassTypes unit:getUnitClassType();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetUnitCombatType

<summary>

Usage

UnitCombatTypes unit:getUnitCombatType();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetUnitFlagIconOffset

<summary>

Usage

unit:();

Parameters

No Description Available

Returns

No Description Available.

Example

No Example Available

GetUnitPortraitOffset

<summary>

Usage

unit:();

Parameters

No Description Available

Returns

No Description Available.

Example

No Example Available

GetUnitType

<summary>

Usage

UnitTypes unit:getUnitType();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetUpgradeDiscount

<summary>

Usage

int unit:getUpgradeDiscount();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetUpgradeUnitType

<summary>

Usage

int unit:GetUpgradeUnitType();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetVisualOwner

<summary>

Usage

int unit:getVisualOwner();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetX

<summary>

Usage

int unit:getX();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GetY

<summary>

Usage

int unit:getY();

Parameters

None

Returns

No Description Available.

Example

No Example Available

GiveExperience

<summary>

Usage

boolean unit:giveExperience();

Parameters

None

Returns

No Description Available.

Example

No Example Available

HasCargo

<summary>

Usage

boolean unit:hasCargo();

Parameters

None

Returns

No Description Available.

Example

No Example Available

HasMoved

<summary>

Usage

boolean unit:hasMoved();

Parameters

None

Returns

No Description Available.

Example

No Example Available

HillsAttackModifier

<summary>

Usage

int unit:hillsAttackModifier();

Parameters

None

Returns

No Description Available.

Example

No Example Available

HillsDefenseModifier

<summary>

Usage

int unit:hillsDefenseModifier();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IgnoreBuildingDefense

<summary>

Usage

boolean unit:ignoreBuildingDefense();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IgnoreTerrainCost

<summary>

Usage

boolean unit:ignoreTerrainCost();

Parameters

None

Returns

No Description Available.

Example

No Example Available

ImmuneToFirstStrikes

<summary>

Usage

boolean unit:immuneToFirstStrikes();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IsActionRecommended

<summary>

Usage

boolean unit:isActionRecommended(int i);

Parameters

i
No Description Available

Returns

No Description Available.

Example

No Example Available

IsAlwaysHeal

<summary>

Usage

boolean unit:isAlwaysHeal();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IsAmphib

<summary>

Usage

boolean unit:isAmphib();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IsAttacking

<summary>

Usage

boolean unit:isAttacking();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IsAutomated

<summary>

Usage

boolean unit:isAutomated();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IsBarbarian

<summary>

Usage

boolean unit:isBarbarian();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IsBetterDefenderThan

<summary>

Usage

boolean unit:isBetterDefenderThan(<Unit> pDefender, <Unit> pAttacker);

Parameters

pDefender
No Description Available
pAttacker
No Description Available

Returns

No Description Available.

Example

No Example Available

IsBlitz

<summary>

Usage

boolean unit:isBlitz();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IsCanAttack

<summary>

Usage

boolean unit:CanAttack();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IsCanAttackRanged

<summary>

Usage

boolean unit:CanAttackRanged();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IsCanAttackWithMove

<summary>

Usage

boolean unit:CanAttackWithMove();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IsCanAttackWithMoveNow

<summary>

Usage

boolean unit:CanAttackWithMoveNow();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IsCanDefend

<summary>

Usage

boolean unit:CanDefend(<Plot> pPlot);

Parameters

pPlot
No Description Available

Returns

No Description Available.

Example

No Example Available

IsCargo

<summary>

Usage

boolean unit:isCargo();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IsCombatUnit

<summary>

Usage

boolean unit:HasCombatStrength();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IsDead

<summary>

Usage

boolean unit:isDead();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IsDefending

<summary>

Usage

boolean unit:isDefending();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IsEmbarked

<summary>

Usage

boolean unit:isEmbarked();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IsEnemyCityAdjacent

<summary>

Usage

unit:();

Parameters

No Description Available

Returns

No Description Available.

Example

No Example Available

IsEnemyInMovementRange

<summary>

Usage

unit:();

Parameters

No Description Available

Returns

No Description Available.

Example

No Example Available

IsEnemyRoute

<summary>

Usage

boolean unit:isEnemyRoute();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IsEverFortifyable

<summary>

Usage

unit:();

Parameters

No Description Available

Returns

No Description Available.

Example

No Example Available

IsFeatureDoubleMove

<summary>

Usage

boolean unit:isFeatureDoubleMove(FeatureTypes eIndex);

Parameters

eIndex
No Description Available

Returns

No Description Available.

Example

No Example Available

IsFighting

<summary>

Usage

boolean unit:isFighting();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IsFortifyable

<summary>

Usage

boolean unit:isFortifyable();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IsFound

<summary>

Usage

boolean unit:isFound();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IsFriendlyUnitAdjacent

<summary>

Usage

boolean unit:IsFriendlyUnitAdjacent(boolean bCombatUnit);

Parameters

bCombatUnit
No Description Available

Returns

No Description Available.

Example

No Example Available

IsFull

<summary>

Usage

boolean unit:isFull();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IsGarrisoned

<summary>

Usage

boolean unit:IsGarrisoned();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IsGoldenAge

<summary>

Usage

boolean unit:isGoldenAge();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IsHasPromotion

<summary>

Usage

boolean unit:isHasPromotion(PromotionTypes ePromotion);

Parameters

ePromotion
No Description Available

Returns

No Description Available.

Example

No Example Available

IsHealOutsideFriendly

<summary>

Usage

boolean unit:isHealOutsideFriendly();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IsHillsDoubleMove

<summary>

Usage

boolean unit:isHillsDoubleMove();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IsHuman

<summary>

Usage

boolean unit:isHuman();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IsHurt

<summary>

Usage

boolean unit:isHurt();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IsImmobile

<summary>

Usage

int unit:IsImmobile();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IsInCombat

<summary>

Usage

boolean unit:isInCombat();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IsInvisible

<summary>

Usage

boolean unit:isInvisible(TeamTypes eTeam, boolean bDebug, bCheckCargo = false);

Parameters

eTeam
No Description Available
bDebug
No Description Available
bCheckCargo
No Description Available

Returns

No Description Available.

Example

No Example Available

IsMustSetUpToRangedAttack

<summary>

Usage

unit:();

Parameters

No Description Available

Returns

No Description Available.

Example

No Example Available

IsNearGreatGeneral

<summary>

Usage

boolean unit:IsNearGreatGeneral();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IsNeverInvisible

<summary>

Usage

boolean unit:isNeverInvisible();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IsNoBadGoodies

<summary>

Usage

boolean unit:isNoBadGoodies();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IsNoCapture

<summary>

Usage

boolean unit:isNoCapture();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IsNone

<summary>

Usage

boolean unit:isNone();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IsNukeImmune

<summary>

Usage

boolean unit:isNukeImmune();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IsNukeVictim

<summary>

Usage

boolean unit:isNukeVictim(<Plot> pPlot, TeamTypes eTeam);

Parameters

pPlot
No Description Available
eTeam
No Description Available

Returns

No Description Available.

Example

No Example Available

IsOnlyDefensive

<summary>

Usage

boolean unit:isOnlyDefensive();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IsOutOfAttacks

<summary>

Usage

boolean unit:isOutOfAttacks();

Parameters

None

Returns

No Description Available.

Example

No Example Available

isOutOfInterceptions

<summary>

Usage

boolean unit:isOutOfInterceptions();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IsPromotionReady

<summary>

Usage

boolean unit:isPromotionReady();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IsPromotionValid

<summary>

Usage

boolean unit:isPromotionValid(PromotionTypes ePromotion);

Parameters

ePromotion
No Description Available

Returns

No Description Available.

Example

No Example Available

IsRangeAttackIgnoreLOS

<summary>

Usage

boolean unit:IsRangeAttackIgnoreLOS(<Plot> pPlot);

Parameters

pPlot
No Description Available

Returns

No Description Available.

Example

No Example Available

IsRangeAttackOnlyInDomain

<summary>

Usage

unit:();

Parameters

No Description Available

Returns

No Description Available.

Example

No Example Available

IsRanged

<summary>

Usage

boolean unit:isRanged();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IsRivalTerritory

<summary>

Usage

boolean unit:isRivalTerritory();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IsRiverCrossingNoPenalty

<summary>

Usage

boolean unit:isRiverCrossingNoPenalty();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IsSelected

<summary>

Usage

boolean unit:IsSelected( void);

Parameters

void
No Description Available

Returns

No Description Available.

Example

No Example Available

IsSetUpForRangedAttack

<summary>

Usage

unit:();

Parameters

No Description Available

Returns

No Description Available.

Example

No Example Available

IsTerrainDoubleMove

<summary>

Usage

boolean unit:isTerrainDoubleMove(TerrainTypes eIndex);

Parameters

eIndex
No Description Available

Returns

No Description Available.

Example

No Example Available

IsWaiting

<summary>

Usage

boolean unit:isWaiting();

Parameters

None

Returns

No Description Available.

Example

No Example Available

IsWork

<summary>

Usage

boolean unit:IsWork();

Parameters

None

Returns

No Description Available.

Example

No Example Available

JumpToNearestValidPlot

<summary>

Usage

void unit:jumpToNearestValidPlot();

Parameters

None

Returns

No Description Available.

Example

No Example Available

Kill

<summary>

Usage

void unit:kill(boolean bDelay, PlayerTypes ePlayer = NO_PLAYER);

Parameters

bDelay
No Description Available
ePlayer
No Description Available

Returns

No Description Available.

Example

No Example Available

LastMissionPlot

<summary>

Usage

unit:LastMissionPlot();

Parameters

None

Returns

No Description Available.

Example

No Example Available

Lead

<summary>

Usage

boolean unit:lead(int iUnitId);

Parameters

iUnitId
No Description Available

Returns

No Description Available.

Example

No Example Available

MaxFirstStrikes

<summary>

Usage

int unit:maxFirstStrikes();

Parameters

None

Returns

No Description Available.

Example

No Example Available

MaxInterceptionProbability

<summary>

Usage

int unit:maxInterceptionProbability();

Parameters

None

Returns

No Description Available.

Example

No Example Available

MaxMoves

<summary>

Usage

int unit:maxMoves();

Parameters

None

Returns

No Description Available.

Example

No Example Available

MaxXPValue

<summary>

Usage

int unit:maxXPValue();

Parameters

None

Returns

No Description Available.

Example

No Example Available

MovesLeft

<summary>

Usage

int unit:movesLeft();

Parameters

None

Returns

No Description Available.

Example

No Example Available

NoDefensiveBonus

<summary>

Usage

boolean unit:noDefensiveBonus();

Parameters

None

Returns

No Description Available.

Example

No Example Available

NukeDamageLevel

<summary>

Usage

int unit:GetNukeDamageLevel();

Parameters

None

Returns

No Description Available.

Example

No Example Available

OpenAttackModifier

<summary>

Usage

int unit:openAttackModifier();

Parameters

None

Returns

No Description Available.

Example

No Example Available

OpenDefenseModifier

<summary>

Usage

int unit:openDefenseModifier();

Parameters

None

Returns

No Description Available.

Example

No Example Available

OpenRangedAttackModifier

<summary>

Usage

int unit:openRangedAttackModifier();

Parameters

None

Returns

No Description Available.

Example

No Example Available

PopMission

<summary>

Usage

void unit:PopMission();

Parameters

None

Returns

No Description Available.

Example

No Example Available

Promote

<summary>

Usage

void unit:promote(PromotionTypes ePromotion, int iLeaderUnitId);

Parameters

ePromotion
No Description Available
iLeaderUnitId
No Description Available

Returns

No Description Available.

Example

No Example Available

PushMission

<summary>

Usage

void unit:PushMission(MissionTypes eMission, int iData1 = -1, int iData2 = -1, int iFlags = 0, boolean bAppend = false, boolean bManual = fa;se, MissionAITypes eMissionAI = NO_MISSIONAI, <Plot> pMissionAIPlot = nil, <Unit> pMissionAIUnit = nil);

Parameters

eMission
No Description Available
iData1
No Description Available
iData2
No Description Available
iFlags
No Description Available
bAppend
No Description Available
bManual
No Description Available
eMissionAI
No Description Available
pMissionAIPlot
No Description Available
pMissionAIUnit
No Description Available

Returns

No Description Available.

Example

No Example Available

Range

<summary>

Usage

int unit:GetRange();

Parameters

None

Returns

No Description Available.

Example

No Example Available

RangeStrike

<summary>

Usage

void unit:rangeStrike(int iX, int iY);

Parameters

iX
No Description Available
iY
No Description Available

Returns

No Description Available.

Example

No Example Available

RotateFacingDirectionClockwise

<summary>

Usage

void unit:rotateFacingDirectionClockwise();

Parameters

None

Returns

No Description Available.

Example

No Example Available

RotateFacingDirectionCounterClockwise

<summary>

Usage

void unit:rotateFacingDirectionCounterClockwise();

Parameters

None

Returns

No Description Available.

Example

No Example Available

RoughAttackModifier

<summary>

Usage

int unit:RoughAttackModifier();

Parameters

None

Returns

No Description Available.

Example

No Example Available

RoughDefenseModifier

<summary>

Usage

int unit:RoughDefenseModifier();

Parameters

None

Returns

No Description Available.

Example

No Example Available

RoughRangedAttackModifier

<summary>

Usage

int unit:roughRangedAttackModifier();

Parameters

None

Returns

No Description Available.

Example

No Example Available

SetBaseCombatStrength

<summary>

Usage

void unit:setBaseCombatStr(int iCombat);

Parameters

iCombat
No Description Available

Returns

No Description Available.

Example

No Example Available

SetDamage

<summary>

Usage

void unit:setDamage(int iNewValue, PlayerTypes ePlayer, bNotifyEntity = true);

Parameters

iNewValue
No Description Available
ePlayer
No Description Available
bNotifyEntity
No Description Available

Returns

No Description Available.

Example

No Example Available

SetEmbarked

<summary>

Usage

void unit:SetEmbarked(boolean bNewValue);

Parameters

bNewValue
No Description Available

Returns

No Description Available.

Example

No Example Available

SetExperience

<summary>

Usage

void unit:setExperience(int iNewValue, int iMax = -1);

Parameters

iNewValue
No Description Available
iMax
No Description Available

Returns

No Description Available.

Example

No Example Available

SetHasPromotion

<summary>

Usage

void unit:setHasPromotion(PromotionTypes eIndex, boolean bNewValue);

Parameters

eIndex
No Description Available
bNewValue
No Description Available

Returns

No Description Available.

Example

No Example Available

SetHotKeyNumber

<summary>

Usage

void unit:setHotKeyNumber(int iNewValue);

Parameters

iNewValue
No Description Available

Returns

No Description Available.

Example

No Example Available

SetLeaderUnitType

<summary>

Usage

void unit:setLeaderUnitType(UnitTypes leaderUnitType);

Parameters

leaderUnitType
No Description Available

Returns

No Description Available.

Example

No Example Available

SetLevel

<summary>

Usage

void unit:setLevel(int iNewLevel);

Parameters

iNewLevel
No Description Available

Returns

No Description Available.

Example

No Example Available

SetMadeAttack

<summary>

Usage

void unit:setMadeAttack(boolean bNewValue);

Parameters

bNewValue
No Description Available

Returns

No Description Available.

Example

No Example Available

SetMadeInterception

<summary>

Usage

void unit:setMadeInterception(boolean bNewValue);

Parameters

bNewValue
No Description Available

Returns

No Description Available.

Example

No Example Available

SetMoves

<summary>

Usage

void unit:setMoves(int iNewValue);

Parameters

iNewValue
No Description Available

Returns

No Description Available.

Example

No Example Available

SetName

<summary>

Usage

void unit:setName(string szNewValue);

Parameters

szNewValue
No Description Available

Returns

No Description Available.

Example

No Example Available

SetPromotionReady

<summary>

Usage

void unit:setPromotionReady(boolean bNewValue);

Parameters

bNewValue
No Description Available

Returns

No Description Available.

Example

No Example Available

SetReconPlot

<summary>

Usage

void unit:setReconPlot(<Plot> pNewValue);

Parameters

pNewValue
No Description Available

Returns

No Description Available.

Example

No Example Available

SetScriptData

<summary>

Usage

void unit:setScriptData(string szNewValue);

Parameters

szNewValue
No Description Available

Returns

No Description Available.

Example

No Example Available

SetXY

<summary>

Usage

void unit:setXY(int iX, int iY, boolean bGroup = false, boolean bUpdate = true, boolean bShow = false, bCheckPlotVisible = false);

Parameters

iX
No Description Available
iY
No Description Available
bGroup
No Description Available
bUpdate
No Description Available
bShow
No Description Available
bCheckPlotVisible
No Description Available

Returns

No Description Available.

Example

No Example Available

SpecialCargo

<summary>

Usage

SpecialUnitTypes unit:specialCargo();

Parameters

None

Returns

No Description Available.

Example

No Example Available

TerrainAttackModifier

<summary>

Usage

int unit:terrainAttackModifier(TerrainTypes eTerrain);

Parameters

eTerrain
No Description Available

Returns

No Description Available.

Example

No Example Available

TerrainDefenseModifier

<summary>

Usage

int unit:terrainDefenseModifier(TerrainTypes eTerrain);

Parameters

eTerrain
No Description Available

Returns

No Description Available.

Example

No Example Available

UnitClassAttackModifier

<summary>

Usage

int unit:unitClassAttackModifier(UnitClassTypes eUnitClass);

Parameters

eUnitClass
No Description Available

Returns

No Description Available.

Example

No Example Available

UnitClassDefenseModifier

<summary>

Usage

int unit:unitClassDefenseModifier(UnitClassTypes eUnitClass);

Parameters

eUnitClass
No Description Available

Returns

No Description Available.

Example

No Example Available

UnitCombatModifier

<summary>

Usage

int unit:unitCombatModifier(UnitCombatTypes eUnitCombat);

Parameters

eUnitCombat
No Description Available

Returns

No Description Available.

Example

No Example Available

UpgradePrice

<summary>

Usage

int unit:upgradePrice(UnitTypes eUnit);

Parameters

eUnit
No Description Available

Returns

No Description Available.

Example

No Example Available

VisibilityRange

<summary>

Usage

int unit:visibilityRange();

Parameters

None

Returns

No Description Available.

Example

No Example Available

WithdrawalProbability

<summary>

Usage

int unit:withdrawalProbability();

Parameters

None

Returns

No Description Available.

Example

No Example Available

WorkRate

<summary>

Usage

int unit:workRate(boolean bMax);

Parameters

bMax
No Description Available

Returns

No Description Available.

Example

No Example Available