____ _ __
/ __ )____ _____ | | / /___ ___________
/ __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/
/ /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ )
/_____/\____/____/ |__/|__/\__,_/_/ /____/
A futuristic real-time strategy game.
This file is part of Bos Wars.
(C) Copyright 2001-2007 by the Bos Wars and Stratagus Project.
Distributed under the "GNU General Public License"#include <unittype.h>
Public Member Functions | |
| CUnitType () | |
| ~CUnitType () | |
| void | SetEnergyProductionRate (int v) |
| int | GetEnergyProductionRate () |
| void | SetMagmaProductionRate (int v) |
| int | GetMagmaProductionRate () |
| void | SetMaxEnergyUtilizationRate (int v) |
| int | GetMaxEnergyUtilizationRate () |
| void | SetMaxMagmaUtilizationRate (int v) |
| int | GetMaxMagmaUtilizationRate () |
| void | SetEnergyValue (int v) |
| int | GetEnergyValue () |
| void | SetMagmaValue (int v) |
| int | GetMagmaValue () |
| void | SetEnergyStorageCapacity (int v) |
| int | GetEnergyStorageCapacity () |
| void | SetMagmaStorageCapacity (int v) |
| int | GetMagmaStorageCapacity () |
Public Attributes | |
| std::string | Ident |
| Identifier. | |
| std::string | Name |
| Pretty name shown from the engine. | |
| int | Slot |
| Type as number. | |
| std::string | File |
| Sprite files. | |
| std::string | ShadowFile |
| Shadow file. | |
| int | Width |
| Sprite width. | |
| int | Height |
| Sprite height. | |
| int | OffsetX |
| Sprite horizontal offset. | |
| int | OffsetY |
| Sprite vertical offset. | |
| int | DrawLevel |
| Level to Draw UnitType at. | |
| int | ShadowWidth |
| Shadow sprite width. | |
| int | ShadowHeight |
| Shadow sprite height. | |
| int | ShadowOffsetX |
| Shadow horizontal offset. | |
| int | ShadowOffsetY |
| Shadow vertical offset. | |
| CAnimations * | Animations |
| Animation scripts. | |
| int | StillFrame |
| Still frame. | |
| IconConfig | Icon |
| Icon to display for this unit. | |
| MissileConfig | Missile |
| Missile weapon. | |
| MissileConfig | Explosion |
| Missile for unit explosion. | |
| LuaCallback * | DeathExplosion |
| std::string | CorpseName |
| Corpse type name. | |
| CUnitType * | CorpseType |
| Corpse unit-type. | |
| CConstruction * | Construction |
| What is shown in construction phase. | |
| int | RepairHP |
| Amount of HP per repair. | |
| int | TileWidth |
| Tile size on map width. | |
| int | TileHeight |
| Tile size on map height. | |
| int | BoxWidth |
| Selected box size width. | |
| int | BoxHeight |
| Selected box size height. | |
| int | NumDirections |
| Number of directions unit can face. | |
| int | MinAttackRange |
| Minimal attack range. | |
| int | ReactRangeComputer |
| Reacts on enemy for computer. | |
| int | ReactRangePerson |
| Reacts on enemy for person player. | |
| int | Priority |
| Priority value / AI Treatment. | |
| int | BurnPercent |
| Burning percent. | |
| int | BurnDamageRate |
| HP burn rate per sec. | |
| int | RepairRange |
| Units repair range. | |
| char * | CanCastSpell |
| Unit is able to use spells. | |
| char * | AutoCastActive |
| Default value for autocast. | |
| bool | CanTransport |
| Can transport units with this flag. | |
| int | MaxOnBoard |
| originally only visual effect, we do more with this! | |
| UnitTypeType | UnitType |
| Land / fly / naval. | |
| int | DecayRate |
| Decay rate in 1/6 seconds. | |
| int | AnnoyComputerFactor |
| How much this annoys the computer. | |
| int | MouseAction |
| Right click action. | |
| int | Points |
| How many points you get for unit. | |
| int | CanTarget |
| Which units can it attack. | |
| unsigned | Flip: 1 |
| Flip image when facing left. | |
| unsigned | Revealer: 1 |
| reveal the fog of war | |
| unsigned | LandUnit: 1 |
| Land animated. | |
| unsigned | AirUnit: 1 |
| Air animated. | |
| unsigned | SeaUnit: 1 |
| Sea animated. | |
| unsigned | ExplodeWhenKilled: 1 |
| Death explosion animated. | |
| unsigned | Building: 1 |
| Building. | |
| unsigned | VisibleUnderFog: 1 |
| Unit is visible under fog of war. | |
| unsigned | Coward: 1 |
| Unit will only attack if instructed. | |
| unsigned | AttackFromTransporter: 1 |
| Can attack from transporter. | |
| unsigned | Vanishes: 1 |
| Corpes & destroyed places. | |
| unsigned | GroundAttack: 1 |
| Can do command ground attack. | |
| unsigned | ShoreBuilding: 1 |
| Building must be build on coast. | |
| unsigned | CanAttack: 1 |
| Unit can attack. | |
| unsigned | BuilderOutside: 1 |
| The builder stays outside during the build. | |
| unsigned | BuilderLost: 1 |
| The builder is lost after the build. | |
| unsigned | CanHarvestFrom: 1 |
| Resource can be harvested. | |
| unsigned | Harvester: 1 |
| unit is a resource harvester. | |
| unsigned | Neutral: 1 |
| Unit is neutral, used by the editor. | |
| unsigned | SelectableByRectangle: 1 |
| Selectable with mouse rectangle. | |
| unsigned | IsNotSelectable: 1 |
| Unit should not be selected during game. | |
| unsigned | Decoration: 1 |
| Unit is a decoration (act as tile). | |
| unsigned | Indestructible: 1 |
| Unit is indestructible (take no damage). | |
| unsigned | Organic: 1 |
| Can be transported or healed by a medic. | |
| CVariable * | Variable |
| Array of user defined variables. | |
| std::vector< CBuildRestriction * > | BuildingRules |
| Rules list for building a building. | |
| SDL_Color | NeutralMinimapColorRGB |
| Minimap Color for Neutral Units. | |
| CUnitSound | Sound |
| Sounds for events. | |
| int | ProductionRate [MaxCosts] |
| Rate that resources are produced. | |
| int | MaxUtilizationRate [MaxCosts] |
| Max resource rate that can be used. | |
| int | ProductionCosts [MaxCosts] |
| Total cost to produce this type. | |
| int | StorageCapacity [MaxCosts] |
| Storage capacity of resources. | |
| unsigned | ProductionEfficiency: 8 |
| Production efficiency. | |
| unsigned | FieldFlags |
| Unit map field flags. | |
| unsigned | MovementMask |
| Unit check this map flags for move. | |
| CUnitStats | Stats [PlayerMax] |
| Unit status for each player. | |
| CPlayerColorGraphic * | Sprite |
| Sprite images. | |
| CGraphic * | ShadowSprite |
| Shadow sprite image. | |
This class contains the information that is shared between all units of the same type and determins if a unit is a building, a person, ...
The unit-type class members:
Unique identifier of the unit-type, used to reference it in config files and during startup. As convention they start with "unit-" fe. "unit-farm".
Pretty name shown by the engine. The name should be shorter than 17 characters and no word can be longer than 8 characters.
Path file name of the sprite file.
Path file name of shadow sprite file.
The Level/Order to draw this type of unit in. 0-255 usually.
CUnitType::Width CUnitType::Height
Size of a sprite frame in pixels. All frames of a sprite have the same size. Also all sprites (tilesets) must have the same size.
CUnitType::ShadowWidth CUnitType::ShadowHeight
Size of a shadow sprite frame in pixels. All frames of a sprite have the same size. Also all sprites (tilesets) must have the same size.
CUnitType::ShadowOffsetX CUnitType::ShadowOffsetY
Vertical offset to draw the shadow in pixels.
Animation scripts for the different actions. Currently the animations still, move, attack and die are supported.
Icon to display for this unit-type. Contains configuration and run time variable.
Configuration and run time variable of the missile weapon.
Configuration and run time variable of the missile explosion. This is the explosion that happens if unit is set to ExplodeWhenKilled
Corpse unit-type name, should only be used during setup.
Corpse unit-type pointer, only this should be used during run time. Many unit-types can share the same corpse.
What is shown in construction phase.
CUnitType::SightRange
Sight range
CUnitType::_HitPoints
Maximum hit points
The HP given to a unit each cycle it's repaired. If zero, unit cannot be repaired
Tile size on map width
Tile size on map height
Selected box size width
Selected box size height
Number of directions the unit can face
Minimal attack range
Reacts on enemy for computer
Reacts on enemy for person player
Priority value / AI Treatment
The burning limit in percents. If the unit has lees than this it will start to burn.
Burn rate in HP per second
Land / fly / naval
Decay rate in 1/6 seconds
CUnitType::AnnoyComputerFactor
How much this annoys the computer
Right click action
How many points you get for unit. Used in the final score table.
Which units can it attack
Unit::Revealer
A special unit used to reveal the map for a time. This unit has active sight even when Removed. It's used for Reveal map type of spells.
Land animated
Air animated
Sea animated
Death explosion animated
Unit is a Building
Unit is visible under fog of war.
Unit is a coward, and acts defensively. it will not attack at will and auto-casters will not buff it(bloodlust).
CUnitType::Transporter
Can transport units
CUnitType::AttackFromTransporter
Units inside this transporter can attack with missiles.
Maximum units on board (for transporters), and resources
Resource can be harvested from.
Unit is a resource worker.
CUnitType::NeutralMinimapColorRGB
Says what color a unit will have when it's neutral and is displayed on the minimap.
Corpes & destroyed places
Can do command ground attack
Building must be build on coast
Unit is able to use spells
Unit is able to attack.
Unit can repair buildings. It will use the actack animation. It will heal 4 points for every repair cycle, and cost 1 of each resource, alternatively(1 cycle wood, 1 cycle gold)
Only valid for buildings. When building the worker will remain outside inside the building.
BuilderOutside flag must have the CanRepair flag.
Only valid for buildings without the BuilderOutside flag. The worker is lost when the building is completed.
CUnitType::SelectableByRectangle
Selectable with mouse rectangle
Sounds for events
CUnitType::Weapon
Current sound for weapon
Flags that are set, if a unit enters a map field or cleared, if a unit leaves a map field.
Movement mask, this value is and'ed to the map field flags, to see if a unit can enter or placed on the map field.
Unit status for each player
Type as number
Sprite images
Shadow sprite images
CUnitType::PlayerColorSprite
Sprite images of the player colors. This image is drawn over CUnitType::Sprite. Used with OpenGL only.
Definition at line 580 of file unittype.h.
| CUnitType::CUnitType | ( | ) |
Definition at line 74 of file unittype.cpp.
References MaxUtilizationRate, NeutralMinimapColorRGB, ProductionCosts, ProductionRate, and StorageCapacity.
| CUnitType::~CUnitType | ( | ) |
Definition at line 105 of file unittype.cpp.
References AutoCastActive, BuildingRules, CanCastSpell, DeathExplosion, CGraphic::Free(), PlayerMax, ShadowSprite, Sprite, Stats, Variable, and CUnitStats::Variables.
| void CUnitType::SetEnergyProductionRate | ( | int | v | ) | [inline] |
Definition at line 691 of file unittype.h.
References EnergyCost, and ProductionRate.
Referenced by CclDefineUnitType().
| int CUnitType::GetEnergyProductionRate | ( | ) | [inline] |
| void CUnitType::SetMagmaProductionRate | ( | int | v | ) | [inline] |
Definition at line 693 of file unittype.h.
References MagmaCost, and ProductionRate.
Referenced by CclDefineUnitType().
| int CUnitType::GetMagmaProductionRate | ( | ) | [inline] |
| void CUnitType::SetMaxEnergyUtilizationRate | ( | int | v | ) | [inline] |
Definition at line 696 of file unittype.h.
References EnergyCost, and MaxUtilizationRate.
Referenced by CclDefineUnitType().
| int CUnitType::GetMaxEnergyUtilizationRate | ( | ) | [inline] |
| void CUnitType::SetMaxMagmaUtilizationRate | ( | int | v | ) | [inline] |
Definition at line 698 of file unittype.h.
References MagmaCost, and MaxUtilizationRate.
Referenced by CclDefineUnitType().
| int CUnitType::GetMaxMagmaUtilizationRate | ( | ) | [inline] |
| void CUnitType::SetEnergyValue | ( | int | v | ) | [inline] |
Definition at line 701 of file unittype.h.
References CYCLES_PER_SECOND, EnergyCost, and ProductionCosts.
Referenced by CclDefineUnitType().
| int CUnitType::GetEnergyValue | ( | ) | [inline] |
Definition at line 702 of file unittype.h.
References CYCLES_PER_SECOND, EnergyCost, and ProductionCosts.
| void CUnitType::SetMagmaValue | ( | int | v | ) | [inline] |
Definition at line 703 of file unittype.h.
References CYCLES_PER_SECOND, MagmaCost, and ProductionCosts.
Referenced by CclDefineUnitType().
| int CUnitType::GetMagmaValue | ( | ) | [inline] |
Definition at line 704 of file unittype.h.
References CYCLES_PER_SECOND, MagmaCost, and ProductionCosts.
| void CUnitType::SetEnergyStorageCapacity | ( | int | v | ) | [inline] |
Definition at line 706 of file unittype.h.
References CYCLES_PER_SECOND, EnergyCost, and StorageCapacity.
Referenced by CclDefineUnitType().
| int CUnitType::GetEnergyStorageCapacity | ( | ) | [inline] |
Definition at line 707 of file unittype.h.
References CYCLES_PER_SECOND, EnergyCost, and StorageCapacity.
| void CUnitType::SetMagmaStorageCapacity | ( | int | v | ) | [inline] |
Definition at line 708 of file unittype.h.
References CYCLES_PER_SECOND, MagmaCost, and StorageCapacity.
Referenced by CclDefineUnitType().
| int CUnitType::GetMagmaStorageCapacity | ( | ) | [inline] |
Definition at line 709 of file unittype.h.
References CYCLES_PER_SECOND, MagmaCost, and StorageCapacity.
| std::string CUnitType::Ident |
Identifier.
Definition at line 585 of file unittype.h.
Referenced by AiCanNotBuild(), AiCountUnitBuilders(), AiFindBuildingPlace(), AiHelpMe(), AiMakeUnit(), AiRepairUnit(), AiTrainingComplete(), AiUnitKilled(), AiWorkComplete(), CclAiDump(), CclAiWait(), CommandCancelTraining(), CommandLog(), DoNextReplay(), HandleActionNone(), InitUnitTypes(), NewUnitTypeSlot(), CUnit::Remove(), SaveAiPlayer(), SaveOrder(), SaveUnit(), SendCommandBuildBuilding(), SendCommandCancelTraining(), SendCommandTrainUnit(), UnitActions(), UnitLost(), UpdateButtonPanelSingleUnit(), and UpdateUnitVariables().
| std::string CUnitType::Name |
Pretty name shown from the engine.
Definition at line 586 of file unittype.h.
Referenced by AiFindBuildingPlace(), Summon::Cast(), CclDefineUnitType(), CheckCanBuild(), DrawPopup(), DrawUnitInfo(), HandleActionBuilt(), HandleActionSpellCast(), HandleActionTrain(), HitUnit(), LoadUnitTypes(), SendSpellCast(), ShowUnitInfo(), SpellCast(), StartBuilding(), and UIHandleButtonUp().
| int CUnitType::Slot |
Type as number.
Definition at line 587 of file unittype.h.
Referenced by AiCheckBelongsToForce(), AiCheckUnits(), AiCleanForce(), AiCountUnitBuilders(), AiFindUnitTypeEquiv(), AiMakeUnit(), AiNewUnitTypeEquiv(), AiReduceMadeInBuilt(), AiRepairUnit(), CUnit::AssignToPlayer(), CclAiForce(), CclAiWait(), CclDefineAiHelper(), CclUnit(), CUnit::ChangeOwner(), CPlayer::CheckLimits(), FindPlayerUnitsByType(), HandleActionBuilt(), CPlayer::HaveUnitTypeByIdent(), CPlayer::HaveUnitTypeByType(), InitAiHelper(), InitUnitTypes(), NetworkSendCommand(), NewUnitTypeSlot(), StartBuilding(), UIHandleButtonUp(), UnitLost(), and UnitTypeIdByIdent().
| std::string CUnitType::File |
Sprite files.
Definition at line 588 of file unittype.h.
Referenced by CclDefineUnitType(), and LoadUnitTypeSprite().
| std::string CUnitType::ShadowFile |
Shadow file.
Definition at line 589 of file unittype.h.
Referenced by CclDefineUnitType(), and LoadUnitTypeSprite().
| int CUnitType::Width |
Sprite width.
Definition at line 591 of file unittype.h.
Referenced by AreaAdjustVitals::Cast(), CclDefineUnitType(), DrawConstruction(), DrawUnitSelection(), DrawUnitType(), CUnit::IsVisibleInViewport(), LetUnitDie(), and LoadUnitTypeSprite().
Sprite height.
Definition at line 592 of file unittype.h.
Referenced by AreaAdjustVitals::Cast(), CclDefineUnitType(), DrawConstruction(), DrawLevelCompare(), DrawUnitSelection(), DrawUnitType(), CUnit::IsVisibleInViewport(), LetUnitDie(), and LoadUnitTypeSprite().
Sprite horizontal offset.
Definition at line 593 of file unittype.h.
Referenced by CclDefineUnitType(), DrawConstruction(), DrawConstructionShadow(), DrawShadow(), DrawUnitType(), CUnit::IsVisibleInViewport(), and SelectSpritesInsideRectangle().
Sprite vertical offset.
Definition at line 594 of file unittype.h.
Referenced by CclDefineUnitType(), DrawConstruction(), DrawConstructionShadow(), DrawShadow(), DrawUnitType(), CUnit::IsVisibleInViewport(), and SelectSpritesInsideRectangle().
Level to Draw UnitType at.
Definition at line 595 of file unittype.h.
Referenced by CclDefineUnitType(), DrawLevelCompare(), and UnitOnScreen().
Shadow sprite width.
Definition at line 596 of file unittype.h.
Referenced by CclDefineUnitType(), DrawConstructionShadow(), DrawShadow(), and LoadUnitTypeSprite().
Shadow sprite height.
Definition at line 597 of file unittype.h.
Referenced by CclDefineUnitType(), DrawConstructionShadow(), DrawShadow(), and LoadUnitTypeSprite().
Shadow horizontal offset.
Definition at line 598 of file unittype.h.
Referenced by CclDefineUnitType(), DrawConstructionShadow(), and DrawShadow().
Shadow vertical offset.
Definition at line 599 of file unittype.h.
Referenced by CclDefineUnitType(), DrawConstructionShadow(), and DrawShadow().
Animation scripts.
Definition at line 601 of file unittype.h.
Referenced by ActionStillGeneric(), AnimateActionAttack(), AnimateActionHarvest(), AnimateActionRepair(), CanMove(), CclDefineUnitType(), DoActionMove(), GetStillFrame(), HandleActionBoard(), HandleActionDie(), HandleActionSpellCast(), HandleActionTrain(), LetUnitDie(), and MapAnimSounds().
Still frame.
Definition at line 602 of file unittype.h.
Referenced by DoActionMove(), DrawBuildingCursor(), HandleActionBuilt(), HandleActionFollow(), CUnit::Init(), and InitUnitTypes().
Icon to display for this unit.
Definition at line 604 of file unittype.h.
Referenced by CalculateMaxIconSize(), CclDefineUnitType(), DrawEditorPanel(), DrawInfoPanelMultipleSelected(), DrawUnitInfo(), LoadUnitTypes(), UiDrawLifeBar(), and UiDrawManaBar().
Missile weapon.
Definition at line 606 of file unittype.h.
Referenced by ActionStillGeneric(), AttackUnitsInDistance(), CclDefineUnitType(), FindRangeAttack(), FireMissile(), and LoadUnitTypes().
Missile for unit explosion.
Definition at line 607 of file unittype.h.
Referenced by CclDefineUnitType(), LetUnitDie(), and LoadUnitTypes().
Definition at line 609 of file unittype.h.
Referenced by CclDefineUnitType(), LetUnitDie(), and ~CUnitType().
| std::string CUnitType::CorpseName |
Corpse type name.
Definition at line 611 of file unittype.h.
Referenced by CclDefineUnitType(), and LoadUnitTypes().
Corpse unit-type.
Definition at line 612 of file unittype.h.
Referenced by CclDefineUnitType(), DrawLevelCompare(), HandleActionDie(), LetUnitDie(), and LoadUnitTypes().
What is shown in construction phase.
Definition at line 614 of file unittype.h.
Referenced by CclDefineUnitType(), CclParseBuilt(), CclUnit(), DrawConstruction(), DrawConstructionShadow(), SaveUnit(), and UpdateConstructionFrame().
Amount of HP per repair.
Definition at line 616 of file unittype.h.
Referenced by AiCheckRepair(), CclDefineUnitType(), DoRightButton(), getReparableUnits(), and SendRepair().
Tile size on map width.
Definition at line 618 of file unittype.h.
Referenced by AiCheckSurrounding(), AiEnemyUnitsInDistance(), AiFindBuildingPlace2(), AiMoveUnitInTheWay(), AttackTarget(), AttackUnitsInDistance(), AutoAttack(), CalculateStereo(), CanBuildHere(), CanBuildUnitType(), Polymorph::Cast(), CclDefineUnitType(), CclIfNearUnit(), CclIfRescuedNearUnit(), CBuildRestrictionDistance::Check(), CheckForTargetInRange(), CommandAttack(), CommandBuildBuilding(), CommandFollow(), CommandRepair(), CostMoveTo(), CUnit::Draw(), DrawBuildingCursor(), DrawConstructionShadow(), DrawDecoration(), DrawInformations(), DrawShadow(), DrawUnitOn(), DrawUnitSelection(), DrawUnitType(), DropOutAll(), EnemyOnMapTile(), FindRangeAttack(), CUnit::GetMapArea(), GetOrderPosition(), HandleActionBuilt(), HandleActionDie(), HandleActionFollow(), HandleActionMove(), HandleActionTrain(), HitUnit(), CUnitCache::Insert(), CUnit::IsVisibleInViewport(), LetUnitDie(), MapDistanceBetweenTypes(), MapDistanceToType(), MapMarkUnitSight(), MapUnmarkUnitSight(), MarkUnitFieldFlags(), MoveToLocation(), MoveToTarget(), NearestOfUnit(), NewPath(), PlaceReachable(), CUnitCache::Remove(), RescueUnits(), SaveUnit(), SelectSpritesInsideRectangle(), SelectTargetUnitsOfAutoCast(), ShowOrder(), SpellMoveToTarget(), StartGathering(), TargetOnMap(), UIHandleButtonDown(), UnitCountSeen(), UnitOnScreen(), UnitReachable(), UnitsOnTileUnmarkSeen(), UnitToRepairInRange(), UnitTypeCanBeAt(), UnitVisibleOnRadar(), and UnmarkUnitFieldFlags().
Tile size on map height.
Definition at line 619 of file unittype.h.
Referenced by AiEnemyUnitsInDistance(), AiFindBuildingPlace2(), AiMoveUnitInTheWay(), AttackTarget(), AttackUnitsInDistance(), AutoAttack(), CanBuildHere(), CanBuildUnitType(), Polymorph::Cast(), CclDefineUnitType(), CclIfNearUnit(), CclIfRescuedNearUnit(), CBuildRestrictionDistance::Check(), CheckForTargetInRange(), CommandAttack(), CommandBuildBuilding(), CommandFollow(), CommandRepair(), CostMoveTo(), CUnit::Draw(), DrawBuildingCursor(), DrawConstructionShadow(), DrawDecoration(), DrawInformations(), DrawShadow(), DrawUnitOn(), DrawUnitSelection(), DrawUnitType(), DropOutAll(), EnemyOnMapTile(), FindRangeAttack(), CUnit::GetMapArea(), GetOrderPosition(), HandleActionBuilt(), HandleActionDie(), HandleActionFollow(), HandleActionMove(), HandleActionTrain(), HitUnit(), CUnitCache::Insert(), CUnit::IsVisibleInViewport(), LetUnitDie(), MapDistanceBetweenTypes(), MapDistanceToType(), MapMarkUnitSight(), MapUnmarkUnitSight(), MarkUnitFieldFlags(), MoveToLocation(), MoveToTarget(), NearestOfUnit(), NewPath(), PlaceReachable(), CUnitCache::Remove(), RescueUnits(), SaveUnit(), SelectSpritesInsideRectangle(), SelectTargetUnitsOfAutoCast(), ShowOrder(), SpellMoveToTarget(), StartGathering(), TargetOnMap(), UIHandleButtonDown(), UnitCountSeen(), UnitOnScreen(), UnitReachable(), UnitsOnTileUnmarkSeen(), UnitToRepairInRange(), UnitTypeCanBeAt(), UnitVisibleOnRadar(), and UnmarkUnitFieldFlags().
Selected box size width.
Definition at line 620 of file unittype.h.
Referenced by CclDefineUnitType(), DrawDecoration(), DrawUnitSelection(), SelectSpritesInsideRectangle(), ShowSingleOrder(), and UnitOnScreen().
Selected box size height.
Definition at line 621 of file unittype.h.
Referenced by CclDefineUnitType(), DrawDecoration(), DrawUnitSelection(), SelectSpritesInsideRectangle(), ShowSingleOrder(), and UnitOnScreen().
Number of directions unit can face.
Definition at line 622 of file unittype.h.
Referenced by CclDefineUnitType(), DrawShadow(), DrawUnitType(), GetStillFrame(), HandleActionBuilt(), CUnit::Init(), UnitRotate(), and UnitUpdateHeading().
Minimal attack range.
Definition at line 623 of file unittype.h.
Referenced by AttackTarget(), AttackUnitsInDistance(), CclDefineUnitType(), CheckForTargetInRange(), CommandAttack(), CommandAttackGround(), FireMissile(), and HandleActionAttack().
Reacts on enemy for computer.
Definition at line 624 of file unittype.h.
Referenced by AttackUnitsInReactRange(), CclDefineUnitType(), and DrawInformations().
Reacts on enemy for person player.
Definition at line 625 of file unittype.h.
Referenced by AttackUnitsInReactRange(), CclDefineUnitType(), and DrawInformations().
Priority value / AI Treatment.
Definition at line 626 of file unittype.h.
Referenced by AttackTarget(), AttackUnitsInDistance(), CclDefineUnitType(), CheckForTargetInRange(), EnemyOnMapTile(), FindRangeAttack(), and TargetOnMap().
HP burn rate per sec.
Definition at line 628 of file unittype.h.
Referenced by CclDefineUnitType(), and HandleRegenerations().
Units repair range.
Definition at line 629 of file unittype.h.
Referenced by AiRepairBuilding(), CclDefineUnitType(), CheckCanBuild(), CommandBuildBuilding(), CommandRepair(), DoRightButton(), HitUnit(), IsButtonAllowed(), MoveToLocation(), RepairUnit(), SendRepair(), and StartBuilding().
| char* CUnitType::CanCastSpell |
Unit is able to use spells.
Definition at line 630 of file unittype.h.
Referenced by AiCheckMagic(), CclDefineUnitType(), CommandSpellCast(), DoRightButton(), CUnit::Init(), SendSpellCast(), and ~CUnitType().
Default value for autocast.
Definition at line 631 of file unittype.h.
Referenced by CclDefineUnitType(), CUnit::Init(), and ~CUnitType().
Can transport units with this flag.
Definition at line 632 of file unittype.h.
Referenced by ActionStillGeneric(), AiPlanAttack(), CanTransport(), CclDefineUnitType(), DoActionMove(), DoRightButton(), DrawUnitInfo(), IsButtonAllowed(), SendMove(), and UpdateStats().
originally only visual effect, we do more with this!
Number of Transporter slots.
Definition at line 633 of file unittype.h.
Referenced by CanTransport(), CclDefineUnitType(), EnterTransporter(), and UpdateUnitVariables().
Land / fly / naval.
Definition at line 635 of file unittype.h.
Referenced by AddSelectedAirUnitsInRectangle(), AddSelectedGroundUnitsInRectangle(), AiCanNotMove(), AiHelpMe(), AiMoveUnitInTheWay(), AiPlanAttack(), AiSendExplorers(), CanHandleOrder(), CanTarget(), CanTransport(), CclDefineUnitType(), CclIfNearUnit(), CclIfRescuedNearUnit(), ClosestFreeDropZone(), CommandBuildBuilding(), CostMoveTo(), EditorRedoAction(), EditorUndoAction(), RescueUnits(), SelectAirUnitsInRectangle(), SelectGroundUnitsInRectangle(), and UpdateStats().
Decay rate in 1/6 seconds.
Definition at line 636 of file unittype.h.
Referenced by CclDefineUnitType(), and HandleActionTrain().
How much this annoys the computer.
Definition at line 638 of file unittype.h.
Referenced by CclDefineUnitType().
Right click action.
Definition at line 639 of file unittype.h.
Referenced by CclDefineUnitType(), and DoRightButton().
How many points you get for unit.
Definition at line 646 of file unittype.h.
Referenced by Capture::Cast(), Polymorph::Cast(), CclDefineUnitType(), and HitUnit().
Which units can it attack.
Definition at line 647 of file unittype.h.
Referenced by CanTarget(), and CclDefineUnitType().
| unsigned CUnitType::Flip |
Flip image when facing left.
Definition at line 652 of file unittype.h.
Referenced by CclDefineUnitType(), DrawShadow(), DrawUnitType(), and LoadUnitTypeSprite().
| unsigned CUnitType::Revealer |
reveal the fog of war
Definition at line 653 of file unittype.h.
Referenced by CclDefineUnitType(), CclUnit(), CUnit::Draw(), CUnitCache::Select(), and SelectUnit().
| unsigned CUnitType::LandUnit |
| unsigned CUnitType::AirUnit |
Air animated.
Definition at line 655 of file unittype.h.
Referenced by ActionStillGeneric(), and CclDefineUnitType().
| unsigned CUnitType::SeaUnit |
Sea animated.
Definition at line 656 of file unittype.h.
Referenced by ActionStillGeneric(), and CclDefineUnitType().
| unsigned CUnitType::ExplodeWhenKilled |
Death explosion animated.
Definition at line 657 of file unittype.h.
Referenced by CclDefineUnitType(), and LetUnitDie().
| unsigned CUnitType::Building |
Building.
Definition at line 658 of file unittype.h.
Referenced by AiCheckingWork(), AiCountUnitBuilders(), AiMakeUnit(), CUnit::AssignToPlayer(), Summon::Cast(), Capture::Cast(), Polymorph::Cast(), CclCreateUnit(), CclDefineUnitType(), CclGetNumUnitsAt(), CclIfNearUnit(), CclIfRescuedNearUnit(), CclKillUnit(), CclKillUnitAt(), CclOrderUnit(), CUnit::ChangeOwner(), CPlayer::CheckLimits(), CommandAttackGround(), CommandBoard(), CommandBuildBuilding(), CommandRepair(), CommandResource(), CommandStandGround(), DrawUnitSelection(), HitUnit(), CUnit::Init(), PassCondition(), SelectUnitsInRectangle(), UIHandleButtonUp(), UnitLost(), UnitUpdateHeading(), and UpdateStats().
| unsigned CUnitType::VisibleUnderFog |
Unit is visible under fog of war.
Definition at line 659 of file unittype.h.
Referenced by CclDefineUnitType(), CUnit::Draw(), CUnit::IsVisibleAsGoal(), CUnit::IsVisibleInViewport(), CUnit::IsVisibleOnMinimap(), UnitGoesOutOfFog(), and UnitGoesUnderFog().
| unsigned CUnitType::Coward |
Unit will only attack if instructed.
Definition at line 660 of file unittype.h.
Referenced by AutoAttack(), CclDefineUnitType(), HitUnit(), and SelectTargetUnitsOfAutoCast().
| unsigned CUnitType::AttackFromTransporter |
Can attack from transporter.
Definition at line 661 of file unittype.h.
Referenced by ActionStillGeneric(), and CclDefineUnitType().
| unsigned CUnitType::Vanishes |
Corpes & destroyed places.
Definition at line 662 of file unittype.h.
Referenced by CUnit::AssignToPlayer(), CclDefineUnitType(), CheckForTargetInRange(), HitUnit(), MoveToTarget(), SpellMoveToTarget(), and UnitLost().
| unsigned CUnitType::GroundAttack |
Can do command ground attack.
Definition at line 663 of file unittype.h.
Referenced by CclDefineUnitType(), and IsButtonAllowed().
| unsigned CUnitType::ShoreBuilding |
Building must be build on coast.
Definition at line 664 of file unittype.h.
Referenced by AiCheckSurrounding(), CanBuildHere(), CanTarget(), CclDefineUnitType(), CommandBuildBuilding(), and UpdateStats().
| unsigned CUnitType::CanAttack |
Unit can attack.
Definition at line 665 of file unittype.h.
Referenced by AiAttackWithForce(), AiAttackWithForceAt(), AiForceAttacks(), AiForceManager(), AiHelpMe(), AttackUnitsInRange(), AttackUnitsInReactRange(), AutoAttack(), ButtonCheckAttack(), CanHandleOrder(), CclDefineUnitType(), CommandAttack(), DrawInformations(), DrawPopup(), DrawUnitStats(), HandleActionFollow(), HandleActionPatrol(), HitUnit(), SendAttack(), and SendAttackGround().
| unsigned CUnitType::BuilderOutside |
The builder stays outside during the build.
Definition at line 666 of file unittype.h.
Referenced by CclDefineUnitType(), CommandBuildBuilding(), HandleActionBuilt(), CPlayer::RebuildUnitsConsumingResourcesList(), StartBuilding(), and UnitRemoveConsumingResources().
| unsigned CUnitType::BuilderLost |
The builder is lost after the build.
Definition at line 667 of file unittype.h.
Referenced by CclDefineUnitType(), and HandleActionBuilt().
| unsigned CUnitType::CanHarvestFrom |
Resource can be harvested.
Definition at line 668 of file unittype.h.
Referenced by CclDefineUnitType(), CUnit::ChangeOwner(), DoRightButton(), DrawUnitInfo(), LetUnitDie(), SelectUnitsInRectangle(), SendResource(), ShowUnitInfo(), UnitFindResource(), UnitLost(), and UpdateUnitVariables().
| unsigned CUnitType::Harvester |
unit is a resource harvester.
Definition at line 669 of file unittype.h.
Referenced by AiCollectResources(), CanHandleOrder(), CclDefineUnitType(), CommandResource(), DoRightButton(), FindIdleWorker(), HandleActionBuilt(), and SendResource().
| unsigned CUnitType::Neutral |
Unit is neutral, used by the editor.
Definition at line 670 of file unittype.h.
Referenced by CclDefineUnitType(), and EditorActionPlaceUnit().
| unsigned CUnitType::SelectableByRectangle |
Selectable with mouse rectangle.
Definition at line 672 of file unittype.h.
Referenced by AddSelectedAirUnitsInRectangle(), AddSelectedGroundUnitsInRectangle(), AddToGroup(), CclDefineUnitType(), SelectAirUnitsInRectangle(), SelectGroundUnitsInRectangle(), SelectOrganicUnitsInTable(), SelectUnitsByType(), and ToggleUnitsByType().
| unsigned CUnitType::IsNotSelectable |
Unit should not be selected during game.
Definition at line 673 of file unittype.h.
Referenced by CclDefineUnitType(), SelectUnit(), and SelectUnitsByType().
| unsigned CUnitType::Decoration |
Unit is a decoration (act as tile).
Definition at line 674 of file unittype.h.
Referenced by CclDefineUnitType(), DoRightButton(), SendAttack(), UIHandleButtonDown(), and UIHandleMouseMove().
| unsigned CUnitType::Indestructible |
Unit is indestructible (take no damage).
Definition at line 675 of file unittype.h.
Referenced by CclDefineUnitType(), and HitUnit().
| unsigned CUnitType::Organic |
Can be transported or healed by a medic.
Definition at line 676 of file unittype.h.
Referenced by CanTransport(), CclDefineUnitType(), HitUnit(), and PassCondition().
Array of user defined variables.
Definition at line 678 of file unittype.h.
Referenced by AutoRepair(), CclDefineUnitType(), DrawPopup(), DrawUnitStats(), CUnit::Init(), NewUnitTypeSlot(), UpdateStats(), UpdateUnitVariables(), and ~CUnitType().
| std::vector<CBuildRestriction *> CUnitType::BuildingRules |
Rules list for building a building.
Definition at line 680 of file unittype.h.
Referenced by CanBuildHere(), CclDefineUnitType(), InitUnitTypes(), OnTopDetails(), and ~CUnitType().
| SDL_Color CUnitType::NeutralMinimapColorRGB |
Minimap Color for Neutral Units.
Definition at line 681 of file unittype.h.
Referenced by CclDefineUnitType(), CUnitType(), and DrawUnitOn().
Sounds for events.
Definition at line 683 of file unittype.h.
Referenced by CclDefineUnitType(), ChooseUnitVoiceSound(), HandleActionBuilt(), and MapUnitSounds().
| int CUnitType::ProductionRate[MaxCosts] |
Rate that resources are produced.
Definition at line 685 of file unittype.h.
Referenced by CUnitType(), GetEnergyProductionRate(), GetMagmaProductionRate(), LetUnitDie(), SetEnergyProductionRate(), SetMagmaProductionRate(), and UpdateForNewUnit().
| int CUnitType::MaxUtilizationRate[MaxCosts] |
Max resource rate that can be used.
Definition at line 686 of file unittype.h.
Referenced by CalculateRequestedAmount(), CUnitType(), GetMaxEnergyUtilizationRate(), GetMaxMagmaUtilizationRate(), SetMaxEnergyUtilizationRate(), and SetMaxMagmaUtilizationRate().
| int CUnitType::ProductionCosts[MaxCosts] |
Total cost to produce this type.
Definition at line 687 of file unittype.h.
Referenced by AiCheckRepair(), AiCheckUnitTypeCosts(), CUnitType(), DoRepair(), DrawPopup(), GatherResource(), GetEnergyValue(), GetMagmaValue(), GetProductionCost(), CUnit::Init(), CPlayer::RebuildUnitsConsumingResourcesList(), SetEnergyValue(), SetMagmaValue(), ShowUnitInfo(), StartBuilding(), and UpdateUnitVariables().
| int CUnitType::StorageCapacity[MaxCosts] |
Storage capacity of resources.
Definition at line 688 of file unittype.h.
Referenced by CUnitType(), GetEnergyStorageCapacity(), GetMagmaStorageCapacity(), LetUnitDie(), SetEnergyStorageCapacity(), SetMagmaStorageCapacity(), and UpdateForNewUnit().
| unsigned CUnitType::ProductionEfficiency |
Production efficiency.
Definition at line 689 of file unittype.h.
Referenced by CclDefineUnitType(), and StartBuilding().
| unsigned CUnitType::FieldFlags |
Unit map field flags.
Definition at line 713 of file unittype.h.
Referenced by MapFogFilterFlags(), MarkUnitFieldFlags(), UnmarkUnitFieldFlags(), and UpdateStats().
| unsigned CUnitType::MovementMask |
Unit check this map flags for move.
Definition at line 714 of file unittype.h.
Referenced by AiFindBuildingPlace2(), AiFindTarget(), AiMarkWaterTransporter(), CanBuildUnitType(), CostMoveTo(), DrawBuildingCursor(), UnitFindResource(), UnitTypeCanBeAt(), UnloadUnit(), and UpdateStats().
| CUnitStats CUnitType::Stats[PlayerMax] |
Unit status for each player.
Definition at line 717 of file unittype.h.
Referenced by CUnit::AssignToPlayer(), CclUnit(), CUnit::ChangeOwner(), HandleActionDie(), LetUnitDie(), SaveUnit(), UpdateStats(), and ~CUnitType().
Sprite images.
Definition at line 719 of file unittype.h.
Referenced by CUnit::Draw(), DrawBuildingCursor(), DrawConstruction(), DrawStartLocations(), DrawUnitSelection(), CUnit::Init(), LetUnitDie(), LoadUnitTypes(), LoadUnitTypeSprite(), and ~CUnitType().
Shadow sprite image.
Definition at line 720 of file unittype.h.
Referenced by DrawConstructionShadow(), DrawShadow(), LoadUnitTypeSprite(), and ~CUnitType().
1.5.6