| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901 |
- /*
- ** Command & Conquer(tm)
- ** Copyright 2025 Electronic Arts Inc.
- **
- ** This program is free software: you can redistribute it and/or modify
- ** it under the terms of the GNU General Public License as published by
- ** the Free Software Foundation, either version 3 of the License, or
- ** (at your option) any later version.
- **
- ** This program is distributed in the hope that it will be useful,
- ** but WITHOUT ANY WARRANTY; without even the implied warranty of
- ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- ** GNU General Public License for more details.
- **
- ** You should have received a copy of the GNU General Public License
- ** along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
- /* $Header: F:\projects\c&c\vcs\code\udata.cpv 2.17 16 Oct 1995 16:50:42 JOE_BOSTIC $ */
- /***********************************************************************************************
- *** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S ***
- ***********************************************************************************************
- * *
- * Project Name : Command & Conquer *
- * *
- * File Name : UDATA.CPP *
- * *
- * Programmer : Joe L. Bostic *
- * *
- * Start Date : September 10, 1993 *
- * *
- * Last Update : June 26, 1995 [JLB] *
- * *
- *---------------------------------------------------------------------------------------------*
- * Functions: *
- * UnitTypeClass::As_Reference -- Fetches a reference to the unit type class specified. *
- * UnitTypeClass::Create_And_Place -- Creates and places a unit object onto the map. *
- * UnitTypeClass::Create_One_Of -- Creates a unit in limbo. *
- * UnitTypeClass::Dimensions -- Determines the unit's pixel dimensions. *
- * UnitTypeClass::Display -- Displays a generic unit shape. *
- * UnitTypeClass::From_Name -- Fetch class pointer from specified name. *
- * UnitTypeClass::Max_Pips -- Fetches the maximum pips allowed for this unit. *
- * UnitTypeClass::Occupy_List -- Returns with unit occupation list. *
- * UnitTypeClass::One_Time -- Performs one time processing for unit type class objects. *
- * UnitTypeClass::Prep_For_Add -- Prepares scenario editor to add unit. *
- * UnitTypeClass::UnitTypeClass -- Constructor for unit types. *
- * UnitTypeClass::Who_Can_Build_Me -- Determines which factory can build this unit type. *
- * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
- #include "function.h"
- void const * UnitTypeClass::WakeShapes = 0;
- // Visceroid
- static UnitTypeClass const UnitVisceroid(
- UNIT_VICE,
- TXT_VISCEROID, // NAME: Text name of this unit type.
- "VICE", // NAME: Text name of this unit type.
- ANIM_NAPALM2, // EXPLOSION: Type of explosion when destroyed.
- 99, // Build level.
- STRUCTF_NONE, // Building prerequisite.
- false, // Can this be a goodie surprise from a crate?
- true, // Is a leader type?
- false, // Only has eight facings?
- true, // Always use the given name for the vehicle?
- false, // Is this a typical transport vehicle?
- false, // Can it be crushed by a heavy vehicle?
- true, // Can this unit squash infantry?
- false, // Does this unit harvest Tiberium?
- true, // Is invisible to radar?
- true, // Is selectable by player?
- true, // Can it be a target for attack or move?
- true, // Is it insignificant (won't be announced)?
- false, // Is it immune to normal combat damage?
- false, // Is it equipped with a combat turret?
- false, // Fires multiple shots in quick succession?
- false, // Can it be repaired in a repair facility?
- false, // Can the player construct or order this unit?
- false, // Is there a crew inside?
- false, // Does it have a rotating radar dish?
- false, // Is there an associated firing animation?
- false, // Must the turret be in a locked down position while moving?
- false, // Does it lay tracks while moving?
- false, // Is this a gigundo-rotund-enormous unit?
- false, // Is the unit's art as "chunky" cardinal facing only?
- false, // Is the unit capable of cloaking?
- true, // Does the unit have a constant animation?
- -1, // AMMO: Number of shots it has (default).
- 150, // STRENGTH: Strength (in damage points).
- 4, // SIGHTRANGE: Range of sighting.
- 800, // COST: Cost to build (Credits).
- 1, // SCENARIO: Starting availability scenario.
- 80,20, // RISK/RWRD: Risk/reward rating values.
- HOUSEF_MULTI1|
- HOUSEF_MULTI2|
- HOUSEF_MULTI3|
- HOUSEF_MULTI4|
- HOUSEF_MULTI5|
- HOUSEF_MULTI6|
- HOUSEF_GOOD|
- HOUSEF_BAD|
- HOUSEF_NEUTRAL|
- HOUSEF_JP, // OWNABLE: Ownable by house (bit field).
- WEAPON_CHEMSPRAY,WEAPON_NONE,
- ARMOR_WOOD, // ARMOR: Armor type
- SPEED_TRACK, // MOVE: Locomotion type.
- MPH_MEDIUM, // SPEED: Miles per hour.
- 5, // ROT: Rate of turn (degrees per tick).
- 0, // Turret center offset along body centerline.
- MISSION_HUNT // ORDERS: Default order to give new unit.
- );
- // Flame tank
- static UnitTypeClass const UnitFTank(
- UNIT_FTANK,
- TXT_FTANK, // NAME: Text name of this unit type.
- "FTNK", // NAME: Text name of this unit type.
- ANIM_NAPALM3, // EXPLOSION: Type of explosion when destroyed.
- 4, // Build level.
- STRUCTF_RADAR, // Building prerequisite.
- true, // Can this be a goodie surprise from a crate?
- true, // Is a leader type?
- false, // Only has eight facings?
- false, // Always use the given name for the vehicle?
- false, // Is this a typical transport vehicle?
- false, // Can it be crushed by a heavy vehicle?
- true, // Can this unit squash infantry?
- false, // Does this unit harvest Tiberium?
- false, // Is invisible to radar?
- true, // Is selectable by player?
- true, // Can it be a target for attack or move?
- false, // Is it insignificant (won't be announced)?
- false, // Is it immune to normal combat damage?
- false, // Is it equipped with a combat turret?
- true, // Fires multiple shots in quick succession?
- true, // Can it be repaired in a repair facility?
- true, // Can the player construct or order this unit?
- true, // Is there a crew inside?
- false, // Does it have a rotating radar dish?
- false, // Is there an associated firing animation?
- false, // Must the turret be in a locked down position while moving?
- true, // Does it lay tracks while moving?
- false, // Is this a gigundo-rotund-enormous unit?
- false, // Is the unit's art as "chunky" cardinal facing only?
- false, // Is the unit capable of cloaking?
- false, // Does the unit have a constant animation?
- -1, // AMMO: Number of shots it has (default).
- 300, // STRENGTH: Strength (in damage points).
- 4, // SIGHTRANGE: Range of sighting.
- 800, // COST: Cost to build (Credits).
- 9, // SCENARIO: Starting availability scenario.
- 80,66, // RISK/RWRD: Risk/reward rating values.
- HOUSEF_MULTI1|
- HOUSEF_MULTI2|
- HOUSEF_MULTI3|
- HOUSEF_MULTI4|
- HOUSEF_MULTI5|
- HOUSEF_MULTI6|
- HOUSEF_JP|
- HOUSEF_BAD, // OWNABLE: Ownable by house (bit field).
- WEAPON_FLAME_TONGUE,WEAPON_NONE,
- ARMOR_STEEL, // ARMOR: Armor type
- SPEED_TRACK, // MOVE: Locomotion type.
- MPH_MEDIUM, // SPEED: Miles per hour.
- 5, // ROT: Rate of turn (degrees per tick).
- 0, // Turret center offset along body centerline.
- MISSION_HUNT // ORDERS: Default order to give new unit.
- );
- // Stealth tank
- static UnitTypeClass const UnitSTank(
- UNIT_STANK,
- TXT_STANK, // NAME: Text name of this unit type.
- "STNK", // NAME: Text name of this unit type.
- ANIM_FRAG2, // EXPLOSION: Type of explosion when destroyed.
- 5, // Build level.
- STRUCTF_RADAR, // Building prerequisite.
- true, // Can this be a goodie surprise from a crate?
- true, // Is a leader type?
- false, // Only has eight facings?
- false, // Always use the given name for the vehicle?
- false, // Is this a typical transport vehicle?
- false, // Can it be crushed by a heavy vehicle?
- true, // Can this unit squash infantry?
- false, // Does this unit harvest Tiberium?
- true, // Is invisible to radar?
- true, // Is selectable by player?
- true, // Can it be a target for attack or move?
- false, // Is it insignificant (won't be announced)?
- false, // Is it immune to normal combat damage?
- false, // Is it equipped with a combat turret?
- true, // Fires multiple shots in quick succession?
- true, // Can it be repaired in a repair facility?
- true, // Can the player construct or order this unit?
- true, // Is there a crew inside?
- false, // Does it have a rotating radar dish?
- false, // Is there an associated firing animation?
- false, // Must the turret be in a locked down position while moving?
- true, // Does it lay tracks while moving?
- false, // Is this a gigundo-rotund-enormous unit?
- false, // Is the unit's art as "chunky" cardinal facing only?
- true, // Is the unit capable of cloaking?
- false, // Does the unit have a constant animation?
- -1, // AMMO: Number of shots it has (default).
- 110, // STRENGTH: Strength (in damage points).
- 4, // SIGHTRANGE: Range of sighting.
- 900, // COST: Cost to build (Credits).
- 12, // SCENARIO: Starting availability scenario.
- 80,81, // RISK/RWRD: Risk/reward rating values.
- HOUSEF_MULTI1|
- HOUSEF_MULTI2|
- HOUSEF_MULTI3|
- HOUSEF_MULTI4|
- HOUSEF_MULTI5|
- HOUSEF_MULTI6|
- HOUSEF_JP|
- HOUSEF_BAD, // OWNABLE: Ownable by house (bit field).
- WEAPON_DRAGON,WEAPON_NONE,
- ARMOR_ALUMINUM, // ARMOR: Armor type
- SPEED_TRACK, // MOVE: Locomotion type.
- MPH_MEDIUM_FAST, // SPEED: Miles per hour.
- 5, // ROT: Rate of turn (degrees per tick).
- 0, // Turret center offset along body centerline.
- MISSION_HUNT // ORDERS: Default order to give new unit.
- );
- // Light tank
- static UnitTypeClass const UnitLTank(
- UNIT_LTANK,
- TXT_LTANK, // NAME: Text name of this unit type.
- "LTNK", // NAME: Text name of this unit type.
- ANIM_FRAG1, // EXPLOSION: Type of explosion when destroyed.
- 3, // Build level.
- STRUCTF_NONE, // Building prerequisite.
- true, // Can this be a goodie surprise from a crate?
- true, // Is a leader type?
- false, // Only has eight facings?
- false, // Always use the given name for the vehicle?
- false, // Is this a typical transport vehicle?
- false, // Can it be crushed by a heavy vehicle?
- true, // Can this unit squash infantry?
- false, // Does this unit harvest Tiberium?
- false, // Is invisible to radar?
- true, // Is selectable by player?
- true, // Can it be a target for attack or move?
- false, // Is it insignificant (won't be announced)?
- false, // Is it immune to normal combat damage?
- true, // Is it equipped with a combat turret?
- false, // Fires multiple shots in quick succession?
- true, // Can it be repaired in a repair facility?
- true, // Can the player construct or order this unit?
- true, // Is there a crew inside?
- false, // Does it have a rotating radar dish?
- false, // Is there an associated firing animation?
- false, // Must the turret be in a locked down position while moving?
- true, // Does it lay tracks while moving?
- false, // Is this a gigundo-rotund-enormous unit?
- false, // Is the unit's art as "chunky" cardinal facing only?
- false, // Is the unit capable of cloaking?
- false, // Does the unit have a constant animation?
- -1, // AMMO: Number of shots it has (default).
- 300, // STRENGTH: Strength (in damage points).
- 3, // SIGHTRANGE: Range of sighting.
- 600, // COST: Cost to build (Credits).
- 5, // SCENARIO: Starting availability scenario.
- 80,56, // RISK/RWRD: Risk/reward rating values.
- HOUSEF_MULTI1|
- HOUSEF_MULTI2|
- HOUSEF_MULTI3|
- HOUSEF_MULTI4|
- HOUSEF_MULTI5|
- HOUSEF_MULTI6|
- HOUSEF_JP|
- HOUSEF_BAD, // OWNABLE: Ownable by house (bit field).
- WEAPON_75MM,WEAPON_NONE,
- ARMOR_STEEL, // ARMOR: Armor type
- SPEED_TRACK, // MOVE: Locomotion type.
- MPH_MEDIUM, // SPEED: Miles per hour.
- 5, // ROT: Rate of turn (degrees per tick).
- 0, // Turret center offset along body centerline.
- MISSION_HUNT // ORDERS: Default order to give new unit.
- );
- // Medium tank
- static UnitTypeClass const UnitMTank(
- UNIT_MTANK,
- TXT_MTANK, // NAME: Text name of this unit type.
- "MTNK", // NAME: Text name of this unit type.
- ANIM_FRAG2, // EXPLOSION: Type of explosion when destroyed.
- 3, // Build level.
- STRUCTF_NONE, // Building prerequisite.
- true, // Can this be a goodie surprise from a crate?
- true, // Is a leader type?
- false, // Only has eight facings?
- false, // Always use the given name for the vehicle?
- false, // Is this a typical transport vehicle?
- false, // Can it be crushed by a heavy vehicle?
- true, // Can this unit squash infantry?
- false, // Does this unit harvest Tiberium?
- false, // Is invisible to radar?
- true, // Is selectable by player?
- true, // Can it be a target for attack or move?
- false, // Is it insignificant (won't be announced)?
- false, // Is it immune to normal combat damage?
- true, // Is it equipped with a combat turret?
- false, // Fires multiple shots in quick succession?
- true, // Can it be repaired in a repair facility?
- true, // Can the player construct or order this unit?
- true, // Is there a crew inside?
- false, // Does it have a rotating radar dish?
- false, // Is there an associated firing animation?
- false, // Must the turret be in a locked down position while moving?
- true, // Does it lay tracks while moving?
- true, // Is this a gigundo-rotund-enormous unit?
- false, // Is the unit's art as "chunky" cardinal facing only?
- false, // Is the unit capable of cloaking?
- false, // Does the unit have a constant animation?
- -1, // AMMO: Number of shots it has (default).
- 400, // STRENGTH: Strength (in damage points).
- 3, // SIGHTRANGE: Range of sighting.
- 800, // COST: Cost to build (Credits).
- 7, // SCENARIO: Starting availability scenario.
- 80,62, // RISK/RWRD: Risk/reward rating values.
- HOUSEF_MULTI1|
- HOUSEF_MULTI2|
- HOUSEF_MULTI3|
- HOUSEF_MULTI4|
- HOUSEF_MULTI5|
- HOUSEF_MULTI6|
- HOUSEF_JP|
- HOUSEF_GOOD, // OWNABLE: Ownable by house (bit field).
- WEAPON_105MM,WEAPON_NONE,
- ARMOR_STEEL, // ARMOR: Armor type
- SPEED_TRACK, // MOVE: Locomotion type.
- MPH_MEDIUM, // SPEED: Miles per hour.
- 5, // ROT: Rate of turn (degrees per tick).
- 0, // Turret center offset along body centerline.
- MISSION_HUNT // ORDERS: Default order to give new unit.
- );
- // Mastadon tank
- static UnitTypeClass const UnitHTank(
- UNIT_HTANK,
- TXT_HTANK, // NAME: Text name of this unit type.
- "HTNK", // NAME: Text name of this unit type.
- ANIM_ART_EXP1, // EXPLOSION: Type of explosion when destroyed.
- 5, // Build level.
- STRUCTF_REPAIR, // Building prerequisite.
- true, // Can this be a goodie surprise from a crate?
- true, // Is a leader type?
- false, // Only has eight facings?
- false, // Always use the given name for the vehicle?
- false, // Is this a typical transport vehicle?
- false, // Can it be crushed by a heavy vehicle?
- true, // Can this unit squash infantry?
- false, // Does this unit harvest Tiberium?
- false, // Is invisible to radar?
- true, // Is selectable by player?
- true, // Can it be a target for attack or move?
- false, // Is it insignificant (won't be announced)?
- false, // Is it immune to normal combat damage?
- true, // Is it equipped with a combat turret?
- true, // Fires multiple shots in quick succession?
- true, // Can it be repaired in a repair facility?
- true, // Can the player construct or order this unit?
- true, // Is there a crew inside?
- false, // Does it have a rotating radar dish?
- false, // Is there an associated firing animation?
- false, // Must the turret be in a locked down position while moving?
- true, // Does it lay tracks while moving?
- true, // Is this a gigundo-rotund-enormous unit?
- false, // Is the unit's art as "chunky" cardinal facing only?
- false, // Is the unit capable of cloaking?
- false, // Does the unit have a constant animation?
- -1, // AMMO: Number of shots it has (default).
- 600, // STRENGTH: Strength (in damage points).
- 4, // SIGHTRANGE: Range of sighting.
- 1500, // COST: Cost to build (Credits).
- 13, // SCENARIO: Starting availability scenario.
- 80,80, // RISK/RWRD: Risk/reward rating values.
- HOUSEF_MULTI1|
- HOUSEF_MULTI2|
- HOUSEF_MULTI3|
- HOUSEF_MULTI4|
- HOUSEF_MULTI5|
- HOUSEF_MULTI6|
- HOUSEF_JP|
- HOUSEF_GOOD, // OWNABLE: Ownable by house (bit field).
- WEAPON_120MM,WEAPON_MAMMOTH_TUSK,
- ARMOR_STEEL, // ARMOR: Armor type
- SPEED_TRACK, // MOVE: Locomotion type.
- MPH_MEDIUM_SLOW, // SPEED: Miles per hour.
- 5, // ROT: Rate of turn (degrees per tick).
- 0, // Turret center offset along body centerline.
- MISSION_HUNT // ORDERS: Default order to give new unit.
- );
- // Mobile HQ
- static UnitTypeClass const UnitMHQ(
- UNIT_MHQ,
- TXT_MHQ, // NAME: Text name of this unit type.
- "MHQ", // NAME: Text name of this unit type.
- ANIM_FRAG2, // EXPLOSION: Type of explosion when destroyed.
- 99, // Build level.
- STRUCTF_NONE, // Building prerequisite.
- false, // Can this be a goodie surprise from a crate?
- false, // Is a leader type?
- false, // Only has eight facings?
- false, // Always use the given name for the vehicle?
- false, // Is this a typical transport vehicle?
- false, // Can it be crushed by a heavy vehicle?
- true, // Can this unit squash infantry?
- false, // Does this unit harvest Tiberium?
- false, // Is invisible to radar?
- true, // Is selectable by player?
- true, // Can it be a target for attack or move?
- false, // Is it insignificant (won't be announced)?
- false, // Is it immune to normal combat damage?
- false, // Is it equipped with a combat turret?
- false, // Fires multiple shots in quick succession?
- true, // Can it be repaired in a repair facility?
- true, // Can the player construct or order this unit?
- true, // Is there a crew inside?
- true, // Does it have a rotating radar dish?
- false, // Is there an associated firing animation?
- false, // Must the turret be in a locked down position while moving?
- true, // Does it lay tracks while moving?
- false, // Is this a gigundo-rotund-enormous unit?
- false, // Is the unit's art as "chunky" cardinal facing only?
- false, // Is the unit capable of cloaking?
- false, // Does the unit have a constant animation?
- -1, // AMMO: Number of shots it has (default).
- 110, // STRENGTH: Strength (in damage points).
- 5, // SIGHTRANGE: Range of sighting.
- 600, // COST: Cost to build (Credits).
- 99, // SCENARIO: Starting availability scenario.
- 80,100, // RISK/RWRD: Risk/reward rating values.
- HOUSEF_MULTI1|
- HOUSEF_MULTI2|
- HOUSEF_MULTI3|
- HOUSEF_MULTI4|
- HOUSEF_MULTI5|
- HOUSEF_MULTI6|
- HOUSEF_JP|
- HOUSEF_GOOD|
- HOUSEF_BAD, // OWNABLE: Ownable by house (bit field).
- WEAPON_NONE,WEAPON_NONE,
- ARMOR_ALUMINUM, // ARMOR: Armor type
- SPEED_TRACK, // MOVE: Locomotion type.
- MPH_MEDIUM, // SPEED: Miles per hour.
- 5, // ROT: Rate of turn (degrees per tick).
- 0, // Turret center offset along body centerline.
- MISSION_HUNT // ORDERS: Default order to give new unit.
- );
- // Landing craft
- static UnitTypeClass const UnitHover(
- UNIT_HOVER,
- TXT_HOVER, // NAME: Text name of this unit type.
- "LST", // NAME: Text name of this unit type.
- ANIM_FBALL1, // EXPLOSION: Type of explosion when destroyed.
- 99, // Build level.
- STRUCTF_NONE, // Building prerequisite.
- false, // Can this be a goodie surprise from a crate?
- false, // Is a leader type?
- false, // Only has eight facings?
- true, // Always use the given name for the vehicle?
- true, // Is this a typical transport vehicle?
- false, // Can it be crushed by a heavy vehicle?
- false, // Can this unit squash infantry?
- false, // Does this unit harvest Tiberium?
- false, // Is invisible to radar?
- // true, // Is selectable by player?
- false, // Is selectable by player?
- false, // Can it be a target for attack or move?
- true, // Is it insignificant (won't be announced)?
- true, // Is it immune to normal combat damage?
- false, // Is it equipped with a combat turret?
- false, // Fires multiple shots in quick succession?
- false, // Can it be repaired in a repair facility?
- false, // Can the player construct or order this unit?
- false, // Is there a crew inside?
- false, // Does it have a rotating radar dish?
- false, // Is there an associated firing animation?
- false, // Must the turret be in a locked down position while moving?
- false, // Does it lay tracks while moving?
- true, // Is this a gigundo-rotund-enormous unit?
- true, // Is the unit's art as "chunky" cardinal facing only?
- false, // Is the unit capable of cloaking?
- false, // Does the unit have a constant animation?
- -1, // AMMO: Number of shots it has (default).
- 400, // STRENGTH: Strength (in damage points).
- 3, // SIGHTRANGE: Range of sighting.
- 300, // COST: Cost to build (Credits).
- 99, // SCENARIO: Starting availability scenario.
- 80,40, // RISK/RWRD: Risk/reward rating values.
- HOUSEF_MULTI1|
- HOUSEF_MULTI2|
- HOUSEF_MULTI3|
- HOUSEF_MULTI4|
- HOUSEF_MULTI5|
- HOUSEF_MULTI6|
- HOUSEF_JP|
- HOUSEF_GOOD|
- HOUSEF_BAD, // OWNABLE: Ownable by house (bit field).
- WEAPON_NONE,WEAPON_NONE,
- ARMOR_ALUMINUM, // ARMOR: Armor type
- SPEED_HOVER, // MOVE: Locomotion type.
- MPH_MEDIUM_FAST, // SPEED: Miles per hour.
- 127, // ROT: Rate of turn (degrees per tick).
- 0, // Turret center offset along body centerline.
- MISSION_HUNT // ORDERS: Default order to give new unit.
- );
- // Mobile sam launcher
- static UnitTypeClass const UnitSAM(
- UNIT_MSAM,
- TXT_MSAM, // NAME: Text name of this unit type.
- "MLRS", // NAME: Text name of this unit type.
- ANIM_FRAG2, // EXPLOSION: Type of explosion when destroyed.
- 7, // Build level.
- STRUCTF_ATOWER, // Building prerequisite.
- true, // Can this be a goodie surprise from a crate?
- true, // Is a leader type?
- false, // Only has eight facings?
- false, // Always use the given name for the vehicle?
- false, // Is this a typical transport vehicle?
- false, // Can it be crushed by a heavy vehicle?
- false, // Can this unit squash infantry?
- false, // Does this unit harvest Tiberium?
- false, // Is invisible to radar?
- true, // Is selectable by player?
- true, // Can it be a target for attack or move?
- false, // Is it insignificant (won't be announced)?
- false, // Is it immune to normal combat damage?
- true, // Is it equipped with a combat turret?
- false, // Fires multiple shots in quick succession?
- true, // Can it be repaired in a repair facility?
- true, // Can the player construct or order this unit?
- true, // Is there a crew inside?
- false, // Does it have a rotating radar dish?
- false, // Is there an associated firing animation?
- true, // Must the turret be in a locked down position while moving?
- true, // Does it lay tracks while moving?
- true, // Is this a gigundo-rotund-enormous unit?
- false, // Is the unit's art as "chunky" cardinal facing only?
- false, // Is the unit capable of cloaking?
- false, // Does the unit have a constant animation?
- 2, // AMMO: Number of shots it has (default).
- 120, // STRENGTH: Strength (in damage points).
- 4, // SIGHTRANGE: Range of sighting.
- 750, // COST: Cost to build (Credits).
- 98, // SCENARIO: Starting availability scenario.
- 80,30, // RISK/RWRD: Risk/reward rating values.
- HOUSEF_MULTI1|
- HOUSEF_MULTI2|
- HOUSEF_MULTI3|
- HOUSEF_MULTI4|
- HOUSEF_MULTI5|
- HOUSEF_MULTI6|
- HOUSEF_JP|
- // HOUSEF_GOOD|
- HOUSEF_BAD, // OWNABLE: Ownable by house (bit field).
- WEAPON_HONEST_JOHN,WEAPON_NONE,
- ARMOR_ALUMINUM, // ARMOR: Armor type
- SPEED_TRACK, // MOVE: Locomotion type.
- MPH_MEDIUM, // SPEED: Miles per hour.
- 5, // ROT: Rate of turn (degrees per tick).
- 0, // Turret center offset along body centerline.
- MISSION_HUNT // ORDERS: Default order to give new unit.
- );
- // Artillery
- static UnitTypeClass const UnitArty(
- UNIT_ARTY,
- TXT_ARTY, // NAME: Text name of this unit type.
- "ARTY", // NAME: Text name of this unit type.
- ANIM_ART_EXP1, // EXPLOSION: Type of explosion when destroyed.
- 6, // Build level.
- STRUCTF_NONE, // Building prerequisite.
- true, // Can this be a goodie surprise from a crate?
- true, // Is a leader type?
- false, // Only has eight facings?
- false, // Always use the given name for the vehicle?
- false, // Is this a typical transport vehicle?
- false, // Can it be crushed by a heavy vehicle?
- false, // Can this unit squash infantry?
- false, // Does this unit harvest Tiberium?
- false, // Is invisible to radar?
- true, // Is selectable by player?
- true, // Can it be a target for attack or move?
- false, // Is it insignificant (won't be announced)?
- false, // Is it immune to normal combat damage?
- false, // Is it equipped with a combat turret?
- false, // Fires multiple shots in quick succession?
- true, // Can it be repaired in a repair facility?
- true, // Can the player construct or order this unit?
- true, // Is there a crew inside?
- false, // Does it have a rotating radar dish?
- false, // Is there an associated firing animation?
- false, // Must the turret be in a locked down position while moving?
- true, // Does it lay tracks while moving?
- false, // Is this a gigundo-rotund-enormous unit?
- false, // Is the unit's art as "chunky" cardinal facing only?
- false, // Is the unit capable of cloaking?
- false, // Does the unit have a constant animation?
- -1, // AMMO: Number of shots it has (default).
- 75, // STRENGTH: Strength (in damage points).
- 4, // SIGHTRANGE: Range of sighting.
- 450, // COST: Cost to build (Credits).
- 9, // SCENARIO: Starting availability scenario.
- 80,73, // RISK/RWRD: Risk/reward rating values.
- HOUSEF_MULTI1|
- HOUSEF_MULTI2|
- HOUSEF_MULTI3|
- HOUSEF_MULTI4|
- HOUSEF_MULTI5|
- HOUSEF_MULTI6|
- HOUSEF_JP|
- HOUSEF_BAD, // OWNABLE: Ownable by house (bit field).
- WEAPON_155MM,WEAPON_NONE,
- ARMOR_ALUMINUM, // ARMOR: Armor type
- SPEED_TRACK, // MOVE: Locomotion type.
- MPH_MEDIUM_SLOW, // SPEED: Miles per hour.
- 2, // ROT: Rate of turn (degrees per tick).
- 0, // Turret center offset along body centerline.
- MISSION_HUNT // ORDERS: Default order to give new unit.
- );
- // Harvester
- static UnitTypeClass const UnitHarvester(
- UNIT_HARVESTER,
- TXT_HARVESTER, // NAME: Text name of this unit type.
- "HARV", // NAME: Text name of this unit type.
- ANIM_FBALL1, // EXPLOSION: Type of explosion when destroyed.
- 2, // Build level.
- STRUCTF_REFINERY, // Building prerequisite.
- true, // Can this be a goodie surprise from a crate?
- false, // Is a leader type?
- false, // Only has eight facings?
- true, // Always use the given name for the vehicle?
- false, // Is this a typical transport vehicle?
- false, // Can it be crushed by a heavy vehicle?
- true, // Can this unit squash infantry?
- true, // Does this unit harvest Tiberium?
- false, // Is invisible to radar?
- true, // Is selectable by player?
- true, // Can it be a target for attack or move?
- false, // Is it insignificant (won't be announced)?
- false, // Is it immune to normal combat damage?
- false, // Is it equipped with a combat turret?
- false, // Fires multiple shots in quick succession?
- true, // Can it be repaired in a repair facility?
- true, // Can the player construct or order this unit?
- true, // Is there a crew inside?
- false, // Does it have a rotating radar dish?
- false, // Is there an associated firing animation?
- false, // Must the turret be in a locked down position while moving?
- true, // Does it lay tracks while moving?
- true, // Is this a gigundo-rotund-enormous unit?
- false, // Is the unit's art as "chunky" cardinal facing only?
- false, // Is the unit capable of cloaking?
- false, // Does the unit have a constant animation?
- -1, // AMMO: Number of shots it has (default).
- 600, // STRENGTH: Strength (in damage points).
- // 300, // STRENGTH: Strength (in damage points).
- 2, // SIGHTRANGE: Range of sighting.
- 1400, // COST: Cost to build (Credits).
- 7, // SCENARIO: Starting availability scenario.
- 80,85, // RISK/RWRD: Risk/reward rating values.
- HOUSEF_MULTI1|
- HOUSEF_MULTI2|
- HOUSEF_MULTI3|
- HOUSEF_MULTI4|
- HOUSEF_MULTI5|
- HOUSEF_MULTI6|
- HOUSEF_JP|
- HOUSEF_GOOD|
- HOUSEF_BAD, // OWNABLE: Ownable by house (bit field).
- WEAPON_NONE,WEAPON_NONE,
- ARMOR_ALUMINUM, // ARMOR: Armor type
- SPEED_WHEEL, // MOVE: Locomotion type.
- MPH_MEDIUM_SLOW, // SPEED: Miles per hour.
- 5, // ROT: Rate of turn (degrees per tick).
- 0, // Turret center offset along body centerline.
- MISSION_HARVEST // ORDERS: Default order to give new unit.
- );
- // Mobile construction vehicle
- static UnitTypeClass const UnitMCV(
- UNIT_MCV,
- TXT_MCV, // NAME: Text name of this unit type.
- "MCV", // NAME: Text name of this unit type.
- ANIM_FBALL1, // EXPLOSION: Type of explosion when destroyed.
- 7, // Build level.
- STRUCTF_EYE, // Building prerequisite.
- true, // Can this be a goodie surprise from a crate?
- false, // Is a leader type?
- false, // Only has eight facings?
- false, // Always use the given name for the vehicle?
- false, // Is this a typical transport vehicle?
- false, // Can it be crushed by a heavy vehicle?
- true, // Can this unit squash infantry?
- false, // Does this unit harvest Tiberium?
- false, // Is invisible to radar?
- true, // Is selectable by player?
- true, // Can it be a target for attack or move?
- false, // Is it insignificant (won't be announced)?
- false, // Is it immune to normal combat damage?
- false, // Is it equipped with a combat turret?
- false, // Fires multiple shots in quick succession?
- false, // Can it be repaired in a repair facility?
- true, // Can the player construct or order this unit?
- true, // Is there a crew inside?
- false, // Does it have a rotating radar dish?
- false, // Is there an associated firing animation?
- false, // Must the turret be in a locked down position while moving?
- true, // Does it lay tracks while moving?
- true, // Is this a gigundo-rotund-enormous unit?
- false, // Is the unit's art as "chunky" cardinal facing only?
- false, // Is the unit capable of cloaking?
- false, // Does the unit have a constant animation?
- -1, // AMMO: Number of shots it has (default).
- 600, // STRENGTH: Strength (in damage points).
- 2, // SIGHTRANGE: Range of sighting.
- 5000, // COST: Cost to build (Credits).
- 15, // SCENARIO: Starting availability scenario.
- 80,86, // RISK/RWRD: Risk/reward rating values.
- HOUSEF_MULTI1|
- HOUSEF_MULTI2|
- HOUSEF_MULTI3|
- HOUSEF_MULTI4|
- HOUSEF_MULTI5|
- HOUSEF_MULTI6|
- HOUSEF_JP|
- HOUSEF_GOOD|
- HOUSEF_BAD, // OWNABLE: Ownable by house (bit field).
- WEAPON_NONE,WEAPON_NONE,
- ARMOR_ALUMINUM, // ARMOR: Armor type
- SPEED_WHEEL, // MOVE: Locomotion type.
- MPH_MEDIUM_SLOW, // SPEED: Miles per hour.
- 5, // ROT: Rate of turn (degrees per tick).
- 0, // Turret center offset along body centerline.
- MISSION_HUNT // ORDERS: Default order to give new unit.
- );
- // Jeep (hummer)
- static UnitTypeClass const UnitJeep(
- UNIT_JEEP,
- TXT_JEEP, // NAME: Text name of this unit type.
- "JEEP", // NAME: Text name of this unit type.
- ANIM_FRAG1, // EXPLOSION: Type of explosion when destroyed.
- 2, // Build level.
- STRUCTF_NONE, // Building prerequisite.
- true, // Can this be a goodie surprise from a crate?
- true, // Is a leader type?
- false, // Only has eight facings?
- false, // Always use the given name for the vehicle?
- false, // Is this a typical transport vehicle?
- false, // Can it be crushed by a heavy vehicle?
- false, // Can this unit squash infantry?
- false, // Does this unit harvest Tiberium?
- false, // Is invisible to radar?
- true, // Is selectable by player?
- true, // Can it be a target for attack or move?
- false, // Is it insignificant (won't be announced)?
- false, // Is it immune to normal combat damage?
- true, // Is it equipped with a combat turret?
- false, // Fires multiple shots in quick succession?
- true, // Can it be repaired in a repair facility?
- true, // Can the player construct or order this unit?
- true, // Is there a crew inside?
- false, // Does it have a rotating radar dish?
- false, // Is there an associated firing animation?
- false, // Must the turret be in a locked down position while moving?
- true, // Does it lay tracks while moving?
- false, // Is this a gigundo-rotund-enormous unit?
- false, // Is the unit's art as "chunky" cardinal facing only?
- false, // Is the unit capable of cloaking?
- false, // Does the unit have a constant animation?
- -1, // AMMO: Number of shots it has (default).
- 150, // STRENGTH: Strength (in damage points).
- 2, // SIGHTRANGE: Range of sighting.
- 400, // COST: Cost to build (Credits).
- 5, // SCENARIO: Starting availability scenario.
- 80,41, // RISK/RWRD: Risk/reward rating values.
- HOUSEF_MULTI1|
- HOUSEF_MULTI2|
- HOUSEF_MULTI3|
- HOUSEF_MULTI4|
- HOUSEF_MULTI5|
- HOUSEF_MULTI6|
- HOUSEF_JP|
- HOUSEF_GOOD, // OWNABLE: Ownable by house (bit field).
- WEAPON_M60MG,WEAPON_NONE,
- ARMOR_ALUMINUM, // ARMOR: Armor type
- SPEED_WHEEL, // MOVE: Locomotion type.
- MPH_MEDIUM_FAST, // SPEED: Miles per hour.
- 10, // ROT: Rate of turn (degrees per tick).
- 0, // Turret center offset along body centerline.
- MISSION_HUNT // ORDERS: Default order to give new unit.
- );
- // Buggy
- static UnitTypeClass const UnitBuggy(
- UNIT_BUGGY,
- TXT_DUNE_BUGGY, // NAME: Text name of this unit type.
- "BGGY", // NAME: Text name of this unit type.
- ANIM_FRAG1, // EXPLOSION: Type of explosion when destroyed.
- 4, // Build level.
- STRUCTF_NONE, // Building prerequisite.
- true, // Can this be a goodie surprise from a crate?
- true, // Is a leader type?
- false, // Only has eight facings?
- false, // Always use the given name for the vehicle?
- false, // Is this a typical transport vehicle?
- false, // Can it be crushed by a heavy vehicle?
- false, // Can this unit squash infantry?
- false, // Does this unit harvest Tiberium?
- false, // Is invisible to radar?
- true, // Is selectable by player?
- true, // Can it be a target for attack or move?
- false, // Is it insignificant (won't be announced)?
- false, // Is it immune to normal combat damage?
- true, // Is it equipped with a combat turret?
- false, // Fires multiple shots in quick succession?
- true, // Can it be repaired in a repair facility?
- true, // Can the player construct or order this unit?
- true, // Is there a crew inside?
- false, // Does it have a rotating radar dish?
- false, // Is there an associated firing animation?
- false, // Must the turret be in a locked down position while moving?
- false, // Does it lay tracks while moving?
- false, // Is this a gigundo-rotund-enormous unit?
- false, // Is the unit's art as "chunky" cardinal facing only?
- false, // Is the unit capable of cloaking?
- false, // Does the unit have a constant animation?
- -1, // AMMO: Number of shots it has (default).
- 140, // STRENGTH: Strength (in damage points).
- 2, // SIGHTRANGE: Range of sighting.
- 300, // COST: Cost to build (Credits).
- 5, // SCENARIO: Starting availability scenario.
- 80,42, // RISK/RWRD: Risk/reward rating values.
- HOUSEF_MULTI1|
- HOUSEF_MULTI2|
- HOUSEF_MULTI3|
- HOUSEF_MULTI4|
- HOUSEF_MULTI5|
- HOUSEF_MULTI6|
- HOUSEF_JP|
- HOUSEF_BAD, // OWNABLE: Ownable by house (bit field).
- WEAPON_M60MG,WEAPON_NONE,
- ARMOR_ALUMINUM, // ARMOR: Armor type
- SPEED_WHEEL, // MOVE: Locomotion type.
- MPH_MEDIUM_FAST, // SPEED: Miles per hour.
- 10, // ROT: Rate of turn (degrees per tick).
- 0, // Turret center offset along body centerline.
- MISSION_HUNT // ORDERS: Default order to give new unit.
- );
- // Attack cycle
- static UnitTypeClass const UnitBike(
- UNIT_BIKE,
- TXT_BIKE, // NAME: Text name of this unit type.
- "BIKE", // NAME: Text name of this unit type.
- ANIM_FRAG1, // EXPLOSION: Type of explosion when destroyed.
- 2, // Build level.
- STRUCTF_NONE, // Building prerequisite.
- true, // Can this be a goodie surprise from a crate?
- true, // Is a leader type?
- false, // Only has eight facings?
- false, // Always use the given name for the vehicle?
- false, // Is this a typical transport vehicle?
- true, // Can it be crushed by a heavy vehicle?
- false, // Can this unit squash infantry?
- false, // Does this unit harvest Tiberium?
- false, // Is invisible to radar?
- true, // Is selectable by player?
- true, // Can it be a target for attack or move?
- false, // Is it insignificant (won't be announced)?
- false, // Is it immune to normal combat damage?
- false, // Is it equipped with a combat turret?
- false, // Fires multiple shots in quick succession?
- true, // Can it be repaired in a repair facility?
- true, // Can the player construct or order this unit?
- true, // Is there a crew inside?
- false, // Does it have a rotating radar dish?
- false, // Is there an associated firing animation?
- false, // Must the turret be in a locked down position while moving?
- false, // Does it lay tracks while moving?
- false, // Is this a gigundo-rotund-enormous unit?
- false, // Is the unit's art as "chunky" cardinal facing only?
- false, // Is the unit capable of cloaking?
- false, // Does the unit have a constant animation?
- -1, // AMMO: Number of shots it has (default).
- #ifdef ADVANCED
- 90, // STRENGTH: Strength (in damage points).
- #else
- 160, // STRENGTH: Strength (in damage points).
- #endif
- 2, // SIGHTRANGE: Range of sighting.
- 500, // COST: Cost to build (Credits).
- 5, // SCENARIO: Starting availability scenario.
- 80,45, // RISK/RWRD: Risk/reward rating values.
- HOUSEF_MULTI1|
- HOUSEF_MULTI2|
- HOUSEF_MULTI3|
- HOUSEF_MULTI4|
- HOUSEF_MULTI5|
- HOUSEF_MULTI6|
- HOUSEF_JP|
- HOUSEF_BAD, // OWNABLE: Ownable by house (bit field).
- WEAPON_DRAGON,WEAPON_NONE,
- ARMOR_WOOD, // ARMOR: Armor type
- SPEED_WHEEL, // MOVE: Locomotion type.
- MPH_FAST, // SPEED: Miles per hour.
- 10, // ROT: Rate of turn (degrees per tick).
- 0, // Turret center offset along body centerline.
- MISSION_HUNT // ORDERS: Default order to give new unit.
- );
- // Rocket launcher
- static UnitTypeClass const UnitMLRS(
- UNIT_MLRS,
- TXT_MLRS, // NAME: Text name of this unit type.
- "MSAM", // NAME: Text name of this unit type.
- ANIM_ART_EXP1, // EXPLOSION: Type of explosion when destroyed.
- 7, // Build level.
- STRUCTF_EYE, // Building prerequisite.
- true, // Can this be a goodie surprise from a crate?
- true, // Is a leader type?
- false, // Only has eight facings?
- false, // Always use the given name for the vehicle?
- false, // Is this a typical transport vehicle?
- false, // Can it be crushed by a heavy vehicle?
- false, // Can this unit squash infantry?
- false, // Does this unit harvest Tiberium?
- false, // Is invisible to radar?
- true, // Is selectable by player?
- true, // Can it be a target for attack or move?
- false, // Is it insignificant (won't be announced)?
- false, // Is it immune to normal combat damage?
- true, // Is it equipped with a combat turret?
- true, // Fires multiple shots in quick succession?
- true, // Can it be repaired in a repair facility?
- true, // Can the player construct or order this unit?
- true, // Is there a crew inside?
- false, // Does it have a rotating radar dish?
- false, // Is there an associated firing animation?
- true, // Must the turret be in a locked down position while moving?
- true, // Does it lay tracks while moving?
- false, // Is this a gigundo-rotund-enormous unit?
- false, // Is the unit's art as "chunky" cardinal facing only?
- false, // Is the unit capable of cloaking?
- false, // Does the unit have a constant animation?
- -1, // AMMO: Number of shots it has (default).
- 100, // STRENGTH: Strength (in damage points).
- 4, // SIGHTRANGE: Range of sighting.
- 800, // COST: Cost to build (Credits).
- 11, // SCENARIO: Starting availability scenario.
- 80,72, // RISK/RWRD: Risk/reward rating values.
- HOUSEF_MULTI1|
- HOUSEF_MULTI2|
- HOUSEF_MULTI3|
- HOUSEF_MULTI4|
- HOUSEF_MULTI5|
- HOUSEF_MULTI6|
- HOUSEF_JP|
- HOUSEF_BAD|
- HOUSEF_GOOD, // OWNABLE: Ownable by house (bit field).
- WEAPON_MLRS,WEAPON_NONE,
- ARMOR_ALUMINUM, // ARMOR: Armor type
- SPEED_TRACK, // MOVE: Locomotion type.
- MPH_MEDIUM, // SPEED: Miles per hour.
- 5, // ROT: Rate of turn (degrees per tick).
- 0, // Turret center offset along body centerline.
- MISSION_GUARD // ORDERS: Default order to give new unit.
- );
- // Armored personnel carrier
- static UnitTypeClass const UnitAPC(
- UNIT_APC,
- TXT_APC, // NAME: Text name of this unit type.
- "APC", // NAME: Text name of this unit type.
- ANIM_FRAG2, // EXPLOSION: Type of explosion when destroyed.
- 4, // Build level.
- STRUCTF_BARRACKS, // Building prerequisite.
- true, // Can this be a goodie surprise from a crate?
- true, // Is a leader type?
- false, // Only has eight facings?
- false, // Always use the given name for the vehicle?
- true, // Is this a typical transport vehicle?
- false, // Can it be crushed by a heavy vehicle?
- true, // Can this unit squash infantry?
- false, // Does this unit harvest Tiberium?
- false, // Is invisible to radar?
- true, // Is selectable by player?
- true, // Can it be a target for attack or move?
- false, // Is it insignificant (won't be announced)?
- false, // Is it immune to normal combat damage?
- false, // Is it equipped with a combat turret?
- false, // Fires multiple shots in quick succession?
- true, // Can it be repaired in a repair facility?
- true, // Can the player construct or order this unit?
- false, // Is there a crew inside?
- false, // Does it have a rotating radar dish?
- false, // Is there an associated firing animation?
- false, // Must the turret be in a locked down position while moving?
- true, // Does it lay tracks while moving?
- false, // Is this a gigundo-rotund-enormous unit?
- false, // Is the unit's art as "chunky" cardinal facing only?
- false, // Is the unit capable of cloaking?
- false, // Does the unit have a constant animation?
- -1, // AMMO: Number of shots it has (default).
- 200, // STRENGTH: Strength (in damage points).
- 4, // SIGHTRANGE: Range of sighting.
- 700, // COST: Cost to build (Credits).
- 5, // SCENARIO: Starting availability scenario.
- 80,15, // RISK/RWRD: Risk/reward rating values.
- HOUSEF_MULTI1|
- HOUSEF_MULTI2|
- HOUSEF_MULTI3|
- HOUSEF_MULTI4|
- HOUSEF_MULTI5|
- HOUSEF_MULTI6|
- HOUSEF_BAD|
- HOUSEF_JP|
- HOUSEF_GOOD, // OWNABLE: Ownable by house (bit field).
- WEAPON_M60MG,WEAPON_NONE,
- ARMOR_STEEL, // ARMOR: Armor type
- SPEED_TRACK, // MOVE: Locomotion type.
- MPH_MEDIUM_FASTER, // SPEED: Miles per hour.
- 5, // ROT: Rate of turn (degrees per tick).
- 0, // Turret center offset along body centerline.
- MISSION_HUNT // ORDERS: Default order to give new unit.
- );
- // Gunboat
- static UnitTypeClass const UnitGunBoat(
- UNIT_GUNBOAT,
- TXT_GUNBOAT, // NAME: Text name of this unit type.
- "BOAT", // NAME: Text name of this unit type.
- ANIM_FBALL1, // EXPLOSION: Type of explosion when destroyed.
- 99, // Build level.
- STRUCTF_NONE, // Building prerequisite.
- false, // Can this be a goodie surprise from a crate?
- true, // Is a leader type?
- false, // Only has eight facings?
- true, // Always use the given name for the vehicle?
- false, // Is this a typical transport vehicle?
- false, // Can it be crushed by a heavy vehicle?
- false, // Can this unit squash infantry?
- false, // Does this unit harvest Tiberium?
- false, // Is invisible to radar?
- true, // Is selectable by player?
- true, // Can it be a target for attack or move?
- true, // Is it insignificant (won't be announced)?
- false, // Is it immune to normal combat damage?
- true, // Is it equipped with a combat turret?
- true, // Fires multiple shots in quick succession?
- false, // Can it be repaired in a repair facility?
- false, // Can the player construct or order this unit?
- true, // Is there a crew inside?
- false, // Does it have a rotating radar dish?
- false, // Is there an associated firing animation?
- false, // Must the turret be in a locked down position while moving?
- false, // Does it lay tracks while moving?
- true, // Is this a gigundo-rotund-enormous unit?
- true, // Is the unit's art as "chunky" cardinal facing only?
- false, // Is the unit capable of cloaking?
- false, // Does the unit have a constant animation?
- -1, // AMMO: Number of shots it has (default).
- 700, // STRENGTH: Strength (in damage points).
- 5, // SIGHTRANGE: Range of sighting.
- 300, // COST: Cost to build (Credits).
- 99, // SCENARIO: Starting availability scenario.
- 80,40, // RISK/RWRD: Risk/reward rating values.
- HOUSEF_MULTI1|
- HOUSEF_MULTI2|
- HOUSEF_MULTI3|
- HOUSEF_MULTI4|
- HOUSEF_MULTI5|
- HOUSEF_MULTI6|
- HOUSEF_JP|
- HOUSEF_GOOD|
- HOUSEF_BAD, // OWNABLE: Ownable by house (bit field).
- WEAPON_TOMAHAWK,WEAPON_NONE,
- ARMOR_STEEL, // ARMOR: Armor type
- SPEED_FLOAT, // MOVE: Locomotion type.
- MPH_SLOW, // SPEED: Miles per hour.
- 1, // ROT: Rate of turn (degrees per tick).
- 14, // Turret center offset along body centerline.
- MISSION_GUARD // ORDERS: Default order to give new unit.
- );
- // Triceratops
- static UnitTypeClass const UnitTric(
- UNIT_TRIC,
- TXT_TRIC, // NAME: Text name of this unit type.
- "TRIC", // NAME: Text name of this unit type.
- ANIM_TRIC_DIE, // EXPLOSION: Type of explosion when destroyed.
- 99, // Build level.
- STRUCTF_NONE, // Building prerequisite.
- false, // Can this be a goodie surprise from a crate?
- true, // Is a leader type?
- true, // Only has eight facings?
- true, // Always use the given name for the vehicle?
- false, // Is this a typical transport vehicle?
- false, // Can it be crushed by a heavy vehicle?
- true, // Can this unit squash infantry?
- false, // Does this unit harvest Tiberium?
- true, // Is invisible to radar?
- true, // Is selectable by player?
- true, // Can it be a target for attack or move?
- false, // Is it insignificant (won't be announced)?
- false, // Is it immune to normal combat damage?
- false, // Is it equipped with a combat turret?
- false, // Fires multiple shots in quick succession?
- false, // Can it be repaired in a repair facility?
- false, // Can the player construct or order this unit?
- false, // Is there a crew inside?
- false, // Does it have a rotating radar dish?
- true, // Is there an associated firing animation?
- false, // Must the turret be in a locked down position while moving?
- false, // Does it lay tracks while moving?
- true, // Is this a gigundo-rotund-enormous unit?
- false, // Is the unit's art as "chunky" cardinal facing only?
- false, // Is the unit capable of cloaking?
- false, // Does the unit have a constant animation?
- -1, // AMMO: Number of shots it has (default).
- 700, // STRENGTH: Strength (in damage points).
- 5, // SIGHTRANGE: Range of sighting.
- 0, // COST: Cost to build (Credits).
- 99, // SCENARIO: Starting availability scenario.
- 50,50, // RISK/RWRD: Risk/reward rating values.
- HOUSEF_JP, // OWNABLE: Ownable by house (bit field).
- WEAPON_STEG,WEAPON_NONE,
- ARMOR_STEEL, // ARMOR: Armor type
- SPEED_TRACK, // MOVE: Locomotion type.
- MPH_SLOW, // SPEED: Miles per hour.
- 5, // ROT: Rate of turn (degrees per tick).
- 0, // Turret center offset along body centerline.
- MISSION_GUARD // ORDERS: Default order to give new unit.
- );
- // Tyrannosaurus Rex
- static UnitTypeClass const UnitTrex(
- UNIT_TREX,
- TXT_TREX, // NAME: Text name of this unit type.
- "TREX", // NAME: Text name of this unit type.
- ANIM_TREX_DIE, // EXPLOSION: Type of explosion when destroyed.
- 99, // Build level.
- STRUCTF_NONE, // Building prerequisite.
- false, // Can this be a goodie surprise from a crate?
- true, // Is a leader type?
- true, // Only has eight facings?
- true, // Always use the given name for the vehicle?
- false, // Is this a typical transport vehicle?
- false, // Can it be crushed by a heavy vehicle?
- true, // Can this unit squash infantry?
- false, // Does this unit harvest Tiberium?
- true, // Is invisible to radar?
- true, // Is selectable by player?
- true, // Can it be a target for attack or move?
- false, // Is it insignificant (won't be announced)?
- false, // Is it immune to normal combat damage?
- false, // Is it equipped with a combat turret?
- false, // Fires multiple shots in quick succession?
- false, // Can it be repaired in a repair facility?
- false, // Can the player construct or order this unit?
- false, // Is there a crew inside?
- false, // Does it have a rotating radar dish?
- true, // Is there an associated firing animation?
- false, // Must the turret be in a locked down position while moving?
- false, // Does it lay tracks while moving?
- true, // Is this a gigundo-rotund-enormous unit?
- false, // Is the unit's art as "chunky" cardinal facing only?
- false, // Is the unit capable of cloaking?
- false, // Does the unit have a constant animation?
- -1, // AMMO: Number of shots it has (default).
- 750, // STRENGTH: Strength (in damage points).
- 5, // SIGHTRANGE: Range of sighting.
- 0, // COST: Cost to build (Credits).
- 99, // SCENARIO: Starting availability scenario.
- 50,50, // RISK/RWRD: Risk/reward rating values.
- HOUSEF_JP, // OWNABLE: Ownable by house (bit field).
- WEAPON_TREX,WEAPON_NONE,
- ARMOR_STEEL, // ARMOR: Armor type
- SPEED_TRACK, // MOVE: Locomotion type.
- MPH_MEDIUM, // SPEED: Miles per hour.
- 5, // ROT: Rate of turn (degrees per tick).
- 0, // Turret center offset along body centerline.
- MISSION_GUARD // ORDERS: Default order to give new unit.
- );
- // Velociraptor
- static UnitTypeClass const UnitRapt(
- UNIT_RAPT,
- TXT_RAPT, // NAME: Text name of this unit type.
- "RAPT", // NAME: Text name of this unit type.
- ANIM_RAPT_DIE, // EXPLOSION: Type of explosion when destroyed.
- 99, // Build level.
- STRUCTF_NONE, // Building prerequisite.
- false, // Can this be a goodie surprise from a crate?
- true, // Is a leader type?
- true, // Only has eight facings?
- true, // Always use the given name for the vehicle?
- false, // Is this a typical transport vehicle?
- true, // Can it be crushed by a heavy vehicle?
- false, // Can this unit squash infantry?
- false, // Does this unit harvest Tiberium?
- true, // Is invisible to radar?
- true, // Is selectable by player?
- true, // Can it be a target for attack or move?
- false, // Is it insignificant (won't be announced)?
- false, // Is it immune to normal combat damage?
- false, // Is it equipped with a combat turret?
- false, // Fires multiple shots in quick succession?
- false, // Can it be repaired in a repair facility?
- false, // Can the player construct or order this unit?
- false, // Is there a crew inside?
- false, // Does it have a rotating radar dish?
- true, // Is there an associated firing animation?
- false, // Must the turret be in a locked down position while moving?
- false, // Does it lay tracks while moving?
- true, // Is this a gigundo-rotund-enormous unit?
- false, // Is the unit's art as "chunky" cardinal facing only?
- false, // Is the unit capable of cloaking?
- false, // Does the unit have a constant animation?
- -1, // AMMO: Number of shots it has (default).
- 180, // STRENGTH: Strength (in damage points).
- 5, // SIGHTRANGE: Range of sighting.
- 0, // COST: Cost to build (Credits).
- 99, // SCENARIO: Starting availability scenario.
- 50,50, // RISK/RWRD: Risk/reward rating values.
- HOUSEF_JP, // OWNABLE: Ownable by house (bit field).
- WEAPON_TREX,WEAPON_NONE,
- ARMOR_STEEL, // ARMOR: Armor type
- SPEED_TRACK, // MOVE: Locomotion type.
- MPH_FAST, // SPEED: Miles per hour.
- 5, // ROT: Rate of turn (degrees per tick).
- 0, // Turret center offset along body centerline.
- MISSION_GUARD // ORDERS: Default order to give new unit.
- );
- // Stegosaurus
- static UnitTypeClass const UnitSteg(
- UNIT_STEG,
- TXT_STEG, // NAME: Text name of this unit type.
- "STEG", // NAME: Text name of this unit type.
- ANIM_STEG_DIE, // EXPLOSION: Type of explosion when destroyed.
- 99, // Build level.
- STRUCTF_NONE, // Building prerequisite.
- false, // Can this be a goodie surprise from a crate?
- true, // Is a leader type?
- true, // Only has eight facings?
- true, // Always use the given name for the vehicle?
- false, // Is this a typical transport vehicle?
- false, // Can it be crushed by a heavy vehicle?
- true, // Can this unit squash infantry?
- false, // Does this unit harvest Tiberium?
- true, // Is invisible to radar?
- true, // Is selectable by player?
- true, // Can it be a target for attack or move?
- false, // Is it insignificant (won't be announced)?
- false, // Is it immune to normal combat damage?
- false, // Is it equipped with a combat turret?
- false, // Fires multiple shots in quick succession?
- false, // Can it be repaired in a repair facility?
- false, // Can the player construct or order this unit?
- false, // Is there a crew inside?
- false, // Does it have a rotating radar dish?
- true, // Is there an associated firing animation?
- false, // Must the turret be in a locked down position while moving?
- false, // Does it lay tracks while moving?
- true, // Is this a gigundo-rotund-enormous unit?
- false, // Is the unit's art as "chunky" cardinal facing only?
- false, // Is the unit capable of cloaking?
- false, // Does the unit have a constant animation?
- -1, // AMMO: Number of shots it has (default).
- 600, // STRENGTH: Strength (in damage points).
- 5, // SIGHTRANGE: Range of sighting.
- 0, // COST: Cost to build (Credits).
- 99, // SCENARIO: Starting availability scenario.
- 50,50, // RISK/RWRD: Risk/reward rating values.
- HOUSEF_JP, // OWNABLE: Ownable by house (bit field).
- WEAPON_STEG,WEAPON_NONE,
- ARMOR_STEEL, // ARMOR: Armor type
- SPEED_TRACK, // MOVE: Locomotion type.
- MPH_SLOW, // SPEED: Miles per hour.
- 5, // ROT: Rate of turn (degrees per tick).
- 0, // Turret center offset along body centerline.
- MISSION_GUARD // ORDERS: Default order to give new unit.
- );
- /*
- ** This is the array of pointers to the static data associated with each
- ** vehicle type.
- */
- UnitTypeClass const * const UnitTypeClass::Pointers[UNIT_COUNT] = {
- &UnitHTank, // UNIT_HTANK
- &UnitMTank, // UNIT_MTANK
- &UnitLTank, // UNIT_LTANK
- &UnitSTank, // UNIT_STANK
- &UnitFTank, // UNIT_FTANK
- &UnitVisceroid, // UNIT_VICE
- &UnitAPC, // UNIT_APC
- &UnitMLRS, // UNIT_MLRS
- &UnitJeep, // UNIT_JEEP
- &UnitBuggy, // UNIT_BUGGY
- &UnitHarvester, // UNIT_HARVESTER
- &UnitArty, // UNIT_ARTY
- &UnitSAM, // UNIT_MSAM
- &UnitHover, // UNIT_HOVER
- &UnitMHQ, // UNIT_MHQ
- &UnitGunBoat, // UNIT_GUNBOAT
- &UnitMCV, // UNIT_MCV
- &UnitBike, // UNIT_BIKE
- &UnitTric, // UNIT_TRIC
- &UnitTrex, // UNIT_TREX
- &UnitRapt, // UNIT_RAPT
- &UnitSteg, // UNIT_STEG
- };
- /***********************************************************************************************
- * UnitTypeClass::UnitTypeClass -- Constructor for unit types. *
- * *
- * This is the constructor for the unit types. It is used to initialize the unit type class *
- * structure. The unit type class is used to control the behavior of the various types *
- * of units in the game. This constructor is called for every unique unit type as it *
- * exists in the array of unit types. *
- * *
- * INPUT: bla bla bla... see below *
- * *
- * OUTPUT: none *
- * *
- * WARNINGS: none *
- * *
- * HISTORY: *
- * 06/20/1994 JLB : Created. *
- *=============================================================================================*/
- UnitTypeClass::UnitTypeClass(UnitType type,
- int name,
- char const *ininame,
- AnimType exp,
- unsigned char level,
- long pre,
- bool is_goodie,
- bool is_leader,
- bool is_eight,
- bool is_nominal,
- bool is_transporter,
- bool is_crushable,
- bool is_crusher,
- bool is_harvest,
- bool is_stealthy,
- bool is_selectable,
- bool is_legal_target,
- bool is_insignificant,
- bool is_immune,
- bool is_turret_equipped,
- bool is_twoshooter,
- bool is_repairable,
- bool is_buildable,
- bool is_crew,
- bool is_radar_equipped,
- bool is_fire_anim,
- bool is_lock_turret,
- bool is_tracked,
- bool is_gigundo,
- bool is_chunky,
- bool is_cloakable,
- bool is_animating,
- int ammo,
- unsigned short strength,
- int sightrange,
- int cost,
- int scenario,
- int risk,
- int reward,
- int ownable,
- WeaponType primary, WeaponType secondary,
- ArmorType armor,
- SpeedType speed,
- MPHType maxSpeed,
- unsigned rot,
- int toffset,
- MissionType order) :
- TechnoTypeClass(name,
- ininame,
- level,
- pre,
- is_leader,
- false,
- is_nominal,
- is_transporter,
- false,
- is_crushable,
- is_stealthy,
- is_selectable,
- is_legal_target,
- is_insignificant,
- is_immune,
- false,
- is_twoshooter,
- is_turret_equipped,
- is_repairable,
- is_buildable,
- is_crew,
- ammo,
- strength,
- maxSpeed,
- sightrange,
- cost,
- scenario,
- risk,
- reward,
- ownable,
- primary,secondary,
- armor)
- {
- Explosion = exp;
- IsCrateGoodie = is_goodie;
- IsPieceOfEight = is_eight;
- IsCloakable = is_cloakable;
- IsChunkyShape = is_chunky;
- IsCrusher = is_crusher;
- IsFireAnim = is_fire_anim;
- IsGigundo = is_gigundo;
- IsLockTurret = is_lock_turret;
- IsRadarEquipped = is_radar_equipped;
- IsToHarvest = is_harvest;
- IsTracked = is_tracked;
- IsAnimating = is_animating;
- Mission = order;
- ROT = rot;
- Speed = speed;
- TurretOffset = toffset;
- Type = type;
- }
- /***********************************************************************************************
- * UnitTypeClass::Occupy_List -- Returns with unit occupation list. *
- * *
- * This routine returns with an occupation list for the unit type. *
- * The unit occupation list is used for placing units. *
- * *
- * INPUT: placement -- Is this for placement legality checking only? The normal condition *
- * is for marking occupation flags. *
- * *
- * OUTPUT: Returns with a pointer to the unit occupation list. *
- * *
- * WARNINGS: none *
- * *
- * HISTORY: *
- * 05/14/1994 JLB : Created. *
- *=============================================================================================*/
- short const * UnitTypeClass::Occupy_List(bool ) const
- {
- static short const _simple[] = {0, REFRESH_EOL};
- static short const _gun[] = {0, -1, 1, REFRESH_EOL};
- if (Type == UNIT_GUNBOAT) {
- return(&_gun[0]);
- }
- return(&_simple[0]);
- }
- /***********************************************************************************************
- * UnitTypeClass::From_Name -- Fetch class pointer from specified name. *
- * *
- * This routine converts an ASCII representation of a unit class and *
- * converts it into a real unit class number. *
- * *
- * INPUT: name -- ASCII name representing a unit class. *
- * *
- * OUTPUT: Returns with the actual unit class number that the string *
- * represents. *
- * *
- * WARNINGS: none *
- * *
- * HISTORY: *
- * 10/07/1992 JLB : Created. *
- * 05/02/1994 JLB : Converted to member function. *
- *=============================================================================================*/
- UnitType UnitTypeClass::From_Name(char const *name)
- {
- if (name) {
- for (UnitType classid = UNIT_FIRST; classid < UNIT_COUNT; classid++) {
- if (stricmp(Pointers[classid]->IniName, name) == 0) {
- return(classid);
- }
- }
- }
- return(UNIT_NONE);
- }
- #ifdef SCENARIO_EDITOR
- /***********************************************************************************************
- * UnitTypeClass::Display -- Displays a generic unit shape. *
- * *
- * This routine displays a generic representation of a unit of this *
- * type. Typically, it is used when adding objects to the game map. *
- * *
- * INPUT: x,y -- Coordinate to render the unit shape. *
- * *
- * window-- Window to render within. *
- * *
- * house -- House to render the unit colors. *
- * *
- * OUTPUT: none *
- * *
- * WARNINGS: none *
- * *
- * HISTORY: *
- * 05/14/1994 JLB : Created. *
- * 11/08/1994 JLB : Handles chunky type vehicles now. *
- *=============================================================================================*/
- void UnitTypeClass::Display(int x, int y, WindowNumberType window, HousesType house) const
- {
- int shape = 0;
- void const * ptr = Get_Cameo_Data();
- if (!ptr) {
- ptr = Get_Image_Data();
- shape = IsChunkyShape ? 0 : 5;
- }
- CC_Draw_Shape(ptr, shape, x, y, window, SHAPE_FADING|SHAPE_CENTER|SHAPE_WIN_REL, HouseTypeClass::As_Reference(house).RemapTable);
- }
- /***********************************************************************************************
- * UnitTypeClass::Prep_For_Add -- Prepares scenario editor to add unit. *
- * *
- * This routine is used to prepare the generic object adder dialog *
- * box so that it will be able to add a unit object. *
- * *
- * INPUT: none *
- * *
- * OUTPUT: none *
- * *
- * WARNINGS: none *
- * *
- * HISTORY: *
- * 05/23/1994 JLB : Created. *
- * 06/04/1994 JLB : Uses map editing interface functions. *
- *=============================================================================================*/
- void UnitTypeClass::Prep_For_Add(void)
- {
- for (UnitType index = UNIT_FIRST; index < UNIT_COUNT; index++) {
- if (As_Reference(index).Get_Image_Data() != NULL) {
- Map.Add_To_List(&As_Reference(index));
- }
- }
- }
- #endif
- /***********************************************************************************************
- * UnitTypeClass::One_Time -- Performs one time processing for unit type class objects. *
- * *
- * This routine is used to perform the action necessary only once for the unit type class. *
- * It loads unit shapes and brain files. This routine should only be called once. *
- * *
- * INPUT: none *
- * *
- * OUTPUT: none *
- * *
- * WARNINGS: Only call this routine once. *
- * *
- * HISTORY: *
- * 05/28/1994 JLB : Created. *
- *=============================================================================================*/
- void UnitTypeClass::One_Time(void)
- {
- for (UnitType index = UNIT_FIRST; index < UNIT_COUNT; index++) {
- char fullname[_MAX_FNAME+_MAX_EXT];
- char buffer[_MAX_FNAME];
- UnitTypeClass const & uclass = As_Reference(index);
- CCFileClass file;
- int largest; // Largest dimension of shape (so far).
- void const *ptr; // Shape pointer and set pointer.
- largest = 0;
- if (uclass.IsBuildable) {
- /*
- ** Fetch the supporting data files for the unit.
- */
- if ( Get_Resolution_Factor() ) {
- sprintf(buffer, "%sICNH", uclass.IniName);
- } else {
- sprintf(buffer, "%sICON", uclass.IniName);
- }
- _makepath(fullname, NULL, NULL, buffer, ".SHP");
- ((void const *&)uclass.CameoData) = MixFileClass::Retrieve(fullname);
- }
- /*
- ** Fetch a pointer to the unit's shape data.
- */
- if (!uclass.IsPieceOfEight || (Special.IsJurassic && AreThingiesEnabled) ) {
- _makepath(fullname, NULL, NULL, uclass.IniName, ".SHP");
- ptr = MixFileClass::Retrieve(fullname);
- } else {
- ptr = NULL;
- }
- ((void const *&)uclass.ImageData) = ptr;
- if (ptr) {
- if (index == UNIT_MLRS || index == UNIT_MSAM) {
- largest = 26;
- } else {
- largest = MAX(largest, (int)Get_Build_Frame_Width(ptr));
- largest = MAX(largest, (int)Get_Build_Frame_Height(ptr));
- }
- }
- ((int &)uclass.MaxSize) = MAX(largest, 8);
- }
- /*
- ** Load the wake shapes in at this time.
- */
- if (!WakeShapes) {
- WakeShapes = MixFileClass::Retrieve("WAKE.SHP");
- }
- }
- /***********************************************************************************************
- * UTC::Init -- fetches the sidebar icons for the unittypeclass objects *
- * *
- * *
- * *
- * INPUT: theater type *
- * *
- * OUTPUT: Nothing *
- * *
- * WARNINGS: None *
- * *
- * HISTORY: *
- * 4/26/96 4:07PM ST : Created *
- *=============================================================================================*/
- void UnitTypeClass::Init(TheaterType theater)
- {
- if (Get_Resolution_Factor()){
- if (theater != LastTheater){
- void const * cameo_ptr;
- char fullname[_MAX_FNAME+_MAX_EXT];
- char buffer[_MAX_FNAME];
- for (UnitType index = UNIT_FIRST; index < UNIT_COUNT; index++) {
- UnitTypeClass const & uclass = As_Reference(index);
- ((void const *&)uclass.CameoData) = NULL;
- if (uclass.IsBuildable) {
- sprintf(buffer, "%sICNH", uclass.IniName);
- _makepath(fullname, NULL, NULL, buffer, Theaters[theater].Suffix);
- cameo_ptr = MixFileClass::Retrieve(fullname);
- if (cameo_ptr){
- ((void const *&)uclass.CameoData) = cameo_ptr;
- }
- }
- }
- }
- }
- }
- /***********************************************************************************************
- * UnitTypeClass::Create_And_Place -- Creates and places a unit object onto the map. *
- * *
- * This routine is used by the scenario editor to create and place a unit object of this *
- * type onto the map. *
- * *
- * INPUT: cell -- The cell that the unit is to be placed into. *
- * *
- * house -- The house that the unit belongs to. *
- * *
- * OUTPUT: bool; Was the unit created and placed successfully? *
- * *
- * WARNINGS: none *
- * *
- * HISTORY: *
- * 05/28/1994 JLB : Created. *
- *=============================================================================================*/
- bool UnitTypeClass::Create_And_Place(CELL cell, HousesType house) const
- {
- UnitClass * unit = new UnitClass(Type, house);
- if (unit) {
- return(unit->Unlimbo(Cell_Coord(cell), Random_Pick(DIR_N, DIR_MAX)));
- }
- return(false);
- }
- /***********************************************************************************************
- * UnitTypeClass::Create_One_Of -- Creates a unit in limbo. *
- * *
- * This function creates a unit of this type and keeps it in limbo. A pointer to the *
- * created unit object is returned. It is presumed that this object will later be *
- * unlimboed at the correct time and place. *
- * *
- * INPUT: house -- Pointer to the house that is to own the unit. *
- * *
- * OUTPUT: Returns with a pointer to the created unit object. If the unit object *
- * could not be created, then NULL is returned. *
- * *
- * WARNINGS: none *
- * *
- * HISTORY: *
- * 06/07/1994 JLB : Created. *
- *=============================================================================================*/
- ObjectClass * UnitTypeClass::Create_One_Of(HouseClass * house) const
- {
- return(new UnitClass(Type, house->Class->House));
- }
- /***********************************************************************************************
- * UnitTypeClass::Who_Can_Build_Me -- Determines which factory can build this unit type. *
- * *
- * Use this routine to examine the buildings on the map in order to determine which one *
- * can build the unit type. *
- * *
- * INPUT: intheory -- If this parameter is true, then no examination of whether the factory *
- * is currently busy is performed. It just checks to see if the unit *
- * could be produced "in theory". *
- * *
- * legal -- Should building prerequisite legality checks be performed as well? *
- * For building placements, this is usually false. For sidebar button *
- * adding, this is usually true. *
- * *
- * house -- The owner of the unit to be produced. *
- * *
- * OUTPUT: Returns with pointer to the factory that can produce the unit. If no suitable *
- * factory could be found then NULL is returned. *
- * *
- * WARNINGS: none *
- * *
- * HISTORY: *
- * 12/12/1994 JLB : Created. *
- *=============================================================================================*/
- BuildingClass * UnitTypeClass::Who_Can_Build_Me(bool intheory, bool legal, HousesType house) const
- {
- BuildingClass * anybuilding = NULL;
- for (int index = 0; index < Buildings.Count(); index++) {
- BuildingClass * building = Buildings.Ptr(index);
- if (building &&
- !building->IsInLimbo &&
- building->House->Class->House == house &&
- building->Class->ToBuild == RTTI_UNITTYPE &&
- building->Mission != MISSION_DECONSTRUCTION &&
- ((1L << building->ActLike) & Ownable) &&
- (!legal || building->House->Can_Build(Type, building->ActLike)) &&
- (intheory || !building->In_Radio_Contact())) {
- if (building->IsLeader) return(building);
- anybuilding = building;
- }
- }
- return(anybuilding);
- }
- /***********************************************************************************************
- * UnitTypeClass::As_Reference -- Fetches a reference to the unit type class specified. *
- * *
- * Use this routine to return a reference to the UnitTypeClass object as indicated by *
- * the unit type number speicified. *
- * *
- * INPUT: type -- The unit type number to convert into a UnitTypeClass object reference. *
- * *
- * OUTPUT: Returns with a reference to the unit type class object specified. *
- * *
- * WARNINGS: none *
- * *
- * HISTORY: *
- * 01/23/1995 JLB : Created. *
- *=============================================================================================*/
- UnitTypeClass const & UnitTypeClass::As_Reference(UnitType type)
- {
- return(*Pointers[type]);
- }
- /***********************************************************************************************
- * UnitTypeClass::Dimensions -- Determines the unit's pixel dimensions. *
- * *
- * This routine will fill in the width and height for this unit type. This width and *
- * height are used to render the selection rectangle and the positioning of the health *
- * bargraph. *
- * *
- * INPUT: width -- Reference to the width of the unit (to be filled in). *
- * *
- * height -- Reference to the height of the unit (to be filled in). *
- * *
- * OUTPUT: none *
- * *
- * WARNINGS: none *
- * *
- * HISTORY: *
- * 01/23/1995 JLB : Created. *
- *=============================================================================================*/
- void UnitTypeClass::Dimensions(int &width, int &height) const
- {
- if (Type == UNIT_GUNBOAT) {
- width = 46;
- height = 18;
- } else {
- width = MaxSize-(MaxSize/4);
- height = MaxSize-(MaxSize/4);
- }
- }
- /***********************************************************************************************
- * UnitTypeClass::Repair_Cost -- Determines cost per "step" of repair. *
- * *
- * Use this routine to determine how much it will cost to repair the unit one *
- * step. A step is defined as the number of hit points returned from the Repair_Step() *
- * function. *
- * *
- * INPUT: none *
- * *
- * OUTPUT: Returns with the credit cost to repair this unit one step. *
- * *
- * WARNINGS: none *
- * *
- * HISTORY: *
- * 04/03/1995 BWG : Created. *
- *=============================================================================================*/
- int UnitTypeClass::Repair_Cost(void) const
- {
- return(Fixed_To_Cardinal(Cost/(MaxStrength/REPAIR_STEP), REPAIR_PERCENT));
- }
- /***********************************************************************************************
- * UnitTypeClass::Repair_Step -- Determines the repair step rate. *
- * *
- * This routine will determine how many strength points get healed for each "step". The *
- * cost to repair one step is determine from the Repair_Cost() function. *
- * *
- * INPUT: none *
- * *
- * OUTPUT: Returns with the number of health points repaired for each "step". *
- * *
- * WARNINGS: none *
- * *
- * HISTORY: *
- * 04/03/1995 BWG : Created. *
- *=============================================================================================*/
- int UnitTypeClass::Repair_Step(void) const
- {
- return(REPAIR_STEP);
- }
- /***********************************************************************************************
- * UnitTypeClass::Max_Pips -- Fetches the maximum pips allowed for this unit. *
- * *
- * This routine will determine the number of pips (maximum) allowed for this unit type. *
- * Typically, this is the number of passengers allowed, but for harvesters, it is the *
- * number of credits it holds divided by 100. *
- * *
- * INPUT: none *
- * *
- * OUTPUT: Returns with the maximum number of pips allowed for this unit type. *
- * *
- * WARNINGS: none *
- * *
- * HISTORY: *
- * 06/26/1995 JLB : Created. *
- *=============================================================================================*/
- int UnitTypeClass::Max_Pips(void) const
- {
- if (Type == UNIT_HARVESTER) {
- return(FULL_LOAD_CREDITS/100);
- }
- if (IsTransporter) {
- return(Max_Passengers());
- }
- return(0);
- }
|