File: Games\Viktory2\Game.js

GamesByEmail
Class Viktory2Unit

Object
  
 
 
GamesByEmail.Viktory2Unit

All Implemented Interfaces:

Class


GamesByEmail.Viktory2Unit

implements Foundation.Class

Constructor Summary
GamesByEmail.Viktory2Unit(piece, index, color, type, attributes)

Enum Summary
static  BOMBARDMENT_RANGE
static  CARGO_CAPACITY
static  CARGO_OFFSET
static  CARGO_STAGGER
static  CARGO_VALUE
static  HIT_VALUE
static  MOVEMENT_ALLOWANCE
static  SORT_ORDER
static  TYPE

Constant Summary
static  COLOR_BLIND

Method Summary
 addBombardables(bombardables, x, y, range, distance)
 addFrigateMovables(movables, x, y, allowance, distance, lastWasLand, retreatIndex)
 addLandMovables(movables, x, y, allowance, distance, retreatIndex)
 addRelocatable(relocatables, x, y)
 addTransportMoveable(movables, x, y)
 addTransportMoveables(movables)
 addUnloadMoveable(movables, x, y, retreatIndex)
 addUnloadMoveables(movables)
 calcSubjugation()
 canBeAttackedBy(color, rulerColor)
 canBombard()
 canMove()
 canTakeReserveUnit(unitType, controlsCapital)
 carriesCargo(cargoType)
 centerUnload(screenPoint, piece)
 couldUnload()
 countMilitaryUnits(unitList, property)
 debug()
 dispose()
 elementId(id)
 eliminateCargo(cargoType, update)
static  fromValue(piece, index, value)
 getActiveCargoType()
 getAttackFromHexHtml()
 getAttackingFromIndex()
 getAttributes()
 getBattleHtml()
 getBombardRange()
 getBombardables()
 getCargoClip(unitType, hilite)
 getCargoValue()
 getClipRect(hilite, piece, loaded)
 getElement(id)
 getHitValue(unitList)
 getHtml(src, screenPoint, zIndex)
 getMovables(forUndarkness)
 getName()
static  getNextValue(value)
 getRelocatables()
 getRetreatables()
 getScore(color)
 getValue()
 hasUnloadables(cargoType)
 ignoresSlowTerrain()
 isArtillery()
 isBombarder()
 isCapital()
 isCavalry()
 isCity()
 isCivilization()
 isFrigate()
 isHit()
 isInAlliance(color, rulerColor)
 isInfantry()
 isLandUnit()
 isLoadable(forRetreat)
 isMetropolis()
 isMilitary()
 isNewThisTurn()
 isOptionalHit()
 isPennant()
 isRelocatable()
 isRelocating()
 isRolling()
 isTown()
 isUnloadableCargoAtIndex(index, cargoType)
 loadCargo(unit)
 moveTo(destination, spacesNeeded, retreatIndex)
 noteClosestCargoToScreenPoint(screenPoint, cargoType)
 parseAttributes(attributes)
 remove(update, orphanedPennantToo)
 removedReserveUnit(unitType)
 resetAttributes()
 resetTurnAttributes()
 retreatCargo(unit)
 retreatTo(destination)
 saveScore(cargoExpendability)
 setActive()
 setHilite(hiliteOn)
 setHit(hit, isOptional)
 setRelocating(relocating)
 setSubjugation(rulerColor)
 setVisibility(visible)
 snapCargo(piece)
 snapUnload(boardPoint, piece)
 toString()
 tookReserveUnit(unitType)
static  unitSorter(u1, u2)
 unloadCargo(piece, update)
 upgradeToCity()
 upgradeToMetropolis()
 whackAllUnits(unitType)

Methods inherited from Foundation.Class
getTypePath, isInstanceOf

Constructor Detail

Viktory2Unit

GamesByEmail.Viktory2Unit(piece,
                          index,
                          color,
                          type,
                          attributes)
Parameters:
piece - 

index - 

color - 

type - 

attributes - 

Enum Detail

BOMBARDMENT_RANGE

static BOMBARDMENT_RANGE
Values:
a - 

al - 

f - 

fl - 


CARGO_CAPACITY

static CARGO_CAPACITY
Values:
f - 


CARGO_OFFSET

static CARGO_OFFSET

CARGO_STAGGER

static CARGO_STAGGER

CARGO_VALUE

static CARGO_VALUE
Values:
i - 

c - 

a - 


HIT_VALUE

static HIT_VALUE
Values:
i - 

c - 

a - 

f - 


MOVEMENT_ALLOWANCE

static MOVEMENT_ALLOWANCE
Values:
i - 

c - 

a - 

f - 


SORT_ORDER

static SORT_ORDER
Values:
i - 

c - 

a - 

f - 

t - 

y - 

m - 

C - 


TYPE

static TYPE
Values:
INFANTRY - 

CAVALRY - 

ARTILLERY - 

FRIGATE - 

DOOMSDAY_CLOCK - 

CAPITAL - 

TOWN - 

TOWN_RELOCATING - 

CITY - 

CITY_RELOCATING - 

METROPOLIS - 

METROPOLIS_RELOCATING - 

PENNANT - 

PILLAGE - 

BOMBARD - 

SUBJUGATION_FLAG - 

ROAD - 

FERRY - 

Constant Detail

COLOR_BLIND

static COLOR_BLIND

Method Detail

addBombardables

addBombardables(bombardables,
                x,
                y,
                range,
                distance)
Parameters:
bombardables - 

x - 

y - 

range - 

distance - 


addFrigateMovables

addFrigateMovables(movables,
                   x,
                   y,
                   allowance,
                   distance,
                   lastWasLand,
                   retreatIndex)
Parameters:
movables - 

x - 

y - 

allowance - 

distance - 

lastWasLand - 

retreatIndex - 


addLandMovables

addLandMovables(movables,
                x,
                y,
                allowance,
                distance,
                retreatIndex)
Parameters:
movables - 

x - 

y - 

allowance - 

distance - 

retreatIndex - 


addRelocatable

addRelocatable(relocatables,
               x,
               y)
Parameters:
relocatables - 

x - 

y - 


addTransportMoveable

addTransportMoveable(movables,
                     x,
                     y)
Parameters:
movables - 

x - 

y - 


addTransportMoveables

addTransportMoveables(movables)
Parameters:
movables - 


addUnloadMoveable

addUnloadMoveable(movables,
                  x,
                  y,
                  retreatIndex)
Parameters:
movables - 

x - 

y - 

retreatIndex - 


addUnloadMoveables

addUnloadMoveables(movables)
Parameters:
movables - 


calcSubjugation

calcSubjugation()

canBeAttackedBy

canBeAttackedBy(color,
                rulerColor)
Parameters:
color - 

rulerColor - 


canBombard

canBombard()

canMove

canMove()

canTakeReserveUnit

canTakeReserveUnit(unitType,
                   controlsCapital)
Parameters:
unitType - 

controlsCapital - 


carriesCargo

carriesCargo(cargoType)
Parameters:
cargoType - 


centerUnload

centerUnload(screenPoint,
             piece)
Parameters:
screenPoint - 

piece - 


couldUnload

couldUnload()

countMilitaryUnits

countMilitaryUnits(unitList,
                   property)
Parameters:
unitList - 

property - 


debug

debug()

dispose

dispose()
Overrides:
dispose in class Class

elementId

elementId(id)
Parameters:
id - 


eliminateCargo

eliminateCargo(cargoType,
               update)
Parameters:
cargoType - 

update - 


fromValue

static fromValue(piece,
                 index,
                 value)
Parameters:
piece - 

index - 

value - 


getActiveCargoType

getActiveCargoType()

getAttackFromHexHtml

getAttackFromHexHtml()

getAttackingFromIndex

getAttackingFromIndex()

getAttributes

getAttributes()

getBattleHtml

getBattleHtml()

getBombardRange

getBombardRange()

getBombardables

getBombardables()

getCargoClip

getCargoClip(unitType,
             hilite)
Parameters:
unitType - 

hilite - 


getCargoValue

getCargoValue()

getClipRect

getClipRect(hilite,
            piece,
            loaded)
Parameters:
hilite - 

piece - 

loaded - 


getElement

getElement(id)
Parameters:
id - 


getHitValue

getHitValue(unitList)
Parameters:
unitList - 


getHtml

getHtml(src,
        screenPoint,
        zIndex)
Parameters:
src - 

screenPoint - 

zIndex - 


getMovables

getMovables(forUndarkness)
Parameters:
forUndarkness - 


getName

getName()

getNextValue

static getNextValue(value)
Parameters:
value - 


getRelocatables

getRelocatables()

getRetreatables

getRetreatables()

getScore

getScore(color)
Parameters:
color - 


getValue

getValue()

hasUnloadables

hasUnloadables(cargoType)
Parameters:
cargoType - 


ignoresSlowTerrain

ignoresSlowTerrain()

isArtillery

isArtillery()

isBombarder

isBombarder()

isCapital

isCapital()

isCavalry

isCavalry()

isCity

isCity()

isCivilization

isCivilization()

isFrigate

isFrigate()

isHit

isHit()

isInAlliance

isInAlliance(color,
             rulerColor)
Parameters:
color - 

rulerColor - 


isInfantry

isInfantry()

isLandUnit

isLandUnit()

isLoadable

isLoadable(forRetreat)
Parameters:
forRetreat - 


isMetropolis

isMetropolis()

isMilitary

isMilitary()

isNewThisTurn

isNewThisTurn()

isOptionalHit

isOptionalHit()

isPennant

isPennant()

isRelocatable

isRelocatable()

isRelocating

isRelocating()

isRolling

isRolling()

isTown

isTown()

isUnloadableCargoAtIndex

isUnloadableCargoAtIndex(index,
                         cargoType)
Parameters:
index - 

cargoType - 


loadCargo

loadCargo(unit)
Parameters:
unit - 


moveTo

moveTo(destination,
       spacesNeeded,
       retreatIndex)
Parameters:
destination - 

spacesNeeded - 

retreatIndex - 


noteClosestCargoToScreenPoint

noteClosestCargoToScreenPoint(screenPoint,
                              cargoType)
Parameters:
screenPoint - 

cargoType - 


parseAttributes

parseAttributes(attributes)
Parameters:
attributes - 


remove

remove(update,
       orphanedPennantToo)
Parameters:
update - 

orphanedPennantToo - 


removedReserveUnit

removedReserveUnit(unitType)
Parameters:
unitType - 


resetAttributes

resetAttributes()

resetTurnAttributes

resetTurnAttributes()

retreatCargo

retreatCargo(unit)
Parameters:
unit - 


retreatTo

retreatTo(destination)
Parameters:
destination - 


saveScore

saveScore(cargoExpendability)
Parameters:
cargoExpendability - 


setActive

setActive()

setHilite

setHilite(hiliteOn)
Parameters:
hiliteOn - 


setHit

setHit(hit,
       isOptional)
Parameters:
hit - 

isOptional - 


setRelocating

setRelocating(relocating)
Parameters:
relocating - 


setSubjugation

setSubjugation(rulerColor)
Parameters:
rulerColor - 


setVisibility

setVisibility(visible)
Parameters:
visible - 


snapCargo

snapCargo(piece)
Parameters:
piece - 


snapUnload

snapUnload(boardPoint,
           piece)
Parameters:
boardPoint - 

piece - 


toString

toString()
Overrides:
toString in class Class

tookReserveUnit

tookReserveUnit(unitType)
Parameters:
unitType - 


unitSorter

static unitSorter(u1,
                  u2)
Parameters:
u1 - 

u2 - 


unloadCargo

unloadCargo(piece,
            update)
Parameters:
piece - 

update - 


upgradeToCity

upgradeToCity()

upgradeToMetropolis

upgradeToMetropolis()

whackAllUnits

whackAllUnits(unitType)
Parameters:
unitType -