CnC_Remastered_Collection

Command and Conquer: Red Alert
Log | Files | Refs | README | LICENSE

RULES.H (7950B)


      1 //
      2 // Copyright 2020 Electronic Arts Inc.
      3 //
      4 // TiberianDawn.DLL and RedAlert.dll and corresponding source code is free 
      5 // software: you can redistribute it and/or modify it under the terms of 
      6 // the GNU General Public License as published by the Free Software Foundation, 
      7 // either version 3 of the License, or (at your option) any later version.
      8 
      9 // TiberianDawn.DLL and RedAlert.dll and corresponding source code is distributed 
     10 // in the hope that it will be useful, but with permitted additional restrictions 
     11 // under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT 
     12 // distributed with this program. You should have received a copy of the 
     13 // GNU General Public License along with permitted additional restrictions 
     14 // with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
     15 
     16 /* $Header: /CounterStrike/RULES.H 1     3/03/97 10:25a Joe_bostic $ */
     17 /***********************************************************************************************
     18  ***              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               ***
     19  ***********************************************************************************************
     20  *                                                                                             *
     21  *                 Project Name : Command & Conquer                                            *
     22  *                                                                                             *
     23  *                    File Name : RULES.H                                                      *
     24  *                                                                                             *
     25  *                   Programmer : Joe L. Bostic                                                *
     26  *                                                                                             *
     27  *                   Start Date : 05/12/96                                                     *
     28  *                                                                                             *
     29  *                  Last Update : May 12, 1996 [JLB]                                           *
     30  *                                                                                             *
     31  *---------------------------------------------------------------------------------------------*
     32  * Functions:                                                                                  *
     33  * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
     34 
     35 
     36 #ifndef RULES_H
     37 #define RULES_H
     38 
     39 class DifficultyClass
     40 {
     41 	public:
     42 		DifficultyClass(void);
     43 
     44 		float FirepowerBias;
     45 		float GroundspeedBias;
     46 		float AirspeedBias;
     47 		float ArmorBias;
     48 		float ROFBias;
     49 		float CostBias;
     50 		float BuildSpeedBias;
     51 
     52 		float RepairDelay;
     53 		float BuildDelay;
     54 
     55 		unsigned IsBuildSlowdown:1;
     56 		unsigned IsWallDestroyer:1;
     57 		unsigned IsContentScan:1;
     58 };
     59 
     60 class RulesClass {
     61 	public:
     62 
     63 		RulesClass(void);
     64 
     65 		/*
     66 		**	The computer is limited in the size of the base it can build. It is limited to the
     67 		**	size of the largest human opponent base plus this surplus count.
     68 		*/
     69 		int BaseSizeAdd;
     70 
     71 		/*
     72 		**	If the power surplus is less than this amount, then the computer will
     73 		**	build power plants.
     74 		*/
     75 		int PowerSurplus;
     76 
     77 		/*
     78 		**	This specifies the average number of minutes between each computer attack.
     79 		*/
     80 		int AttackInterval;
     81 
     82 		/*
     83 		**	This specifies the average minutes delay before the computer will begin
     84 		**	its first attack upon the player. The duration is also modified by the
     85 		**	difficulty level.
     86 		*/
     87 		int AttackDelay;
     88 
     89 		/*
     90 		**	If the power ratio falls below this percentage, then a power emergency is
     91 		**	in effect. At such times, the computer might decide to sell off some
     92 		**	power hungry buildings in order to alleviate the situation.
     93 		*/
     94 		unsigned short PowerEmergencyFraction;
     95 
     96 		/*
     97 		**	This specifies the percentage of the base (by building quantity) that should
     98 		**	be composed of helipads.
     99 		*/
    100 		unsigned short HelipadRatio;
    101 
    102 		/*
    103 		**	Limit the number of helipads to this amount.
    104 		*/
    105 		int HelipadLimit;
    106 
    107 		/*
    108 		**	This specifies the percentage of the base (by building quantity) that should
    109 		**	be composed of Tesla Coils.
    110 		*/
    111 		unsigned short TeslaRatio;
    112 
    113 		/*
    114 		**	Limit tesla coil production to this maximum.
    115 		*/
    116 		int TeslaLimit;
    117 
    118 		/*
    119 		**	This specifies the percentage of the base (by building quantity) that should
    120 		**	be composed of anti-aircraft defense.
    121 		*/
    122 		unsigned short AARatio;
    123 
    124 		/*
    125 		**	Limit anti-aircraft building quantity to this amount.
    126 		*/
    127 		int AALimit;
    128 
    129 		/*
    130 		**	This specifies the percentage of the base (by building quantity) that should
    131 		**	be composed of defensive structures.
    132 		*/
    133 		unsigned short DefenseRatio;
    134 
    135 		/*
    136 		**	This is the limit to the number of defensive building that can be built.
    137 		*/
    138 		int DefenseLimit;
    139 
    140 		/*
    141 		**	This specifies the percentage of the base (by building quantity) that should
    142 		**	be composed of war factories.
    143 		*/
    144 		unsigned short WarRatio;
    145 
    146 		/*
    147 		**	War factories are limited to this quantity for the computer controlled player.
    148 		*/
    149 		int WarLimit;
    150 
    151 		/*
    152 		**	This specifies the percentage of the base (by building quantity) that should
    153 		**	be composed of infantry producing structures.
    154 		*/
    155 		unsigned short BarracksRatio;
    156 
    157 		/*
    158 		**	No more than this many barracks can be built.
    159 		*/
    160 		int BarracksLimit;
    161 
    162 		/*
    163 		**	Refinery building is limited to this many refineries.
    164 		*/
    165 		int RefineryLimit;
    166 
    167 		/*
    168 		**	This specifies the percentage of the base (by building quantity) that should
    169 		**	be composed of refineries.
    170 		*/
    171 		unsigned short RefineryRatio;
    172 
    173 		/*
    174 		**	This specifies the percentage of the base (by building quantity) that should
    175 		**	be composed of airstrips.
    176 		*/
    177 		unsigned short AirstripRatio;
    178 
    179 		/*
    180 		**	Limit the number of airstrips to this amount.
    181 		*/
    182 		int AirstripLimit;
    183 
    184 		/*
    185 		**	This is the maximum number of IQ settings available. The human player is
    186 		**	presumed to be at IQ level zero.
    187 		*/
    188 		int MaxIQ;
    189 
    190 		/*
    191 		**	The IQ level at which super weapons will be automatically fired by the computer.
    192 		*/
    193 		int IQSuperWeapons;
    194 
    195 		/*
    196 		**	The IQ level at which production is automatically controlled by the computer.
    197 		*/
    198 		int IQProduction;
    199 
    200 		/*
    201 		**	The IQ level at which newly produced units start out in guard area mode instead
    202 		**	of normal guard mode.
    203 		*/
    204 		int IQGuardArea;
    205 
    206 		/*
    207 		**	The IQ level at which the computer will be able to decide what gets repaired
    208 		**	or sold.
    209 		*/
    210 		int IQRepairSell;
    211 
    212 		/*
    213 		**	At this IQ level or higher, a unit is allowed to automatically try to crush
    214 		**	an atagonist if possible.
    215 		*/
    216 		int IQCrush;
    217 
    218 		/*
    219 		**	The unit/infantry will try to scatter if an incoming threat
    220 		**	is detected.
    221 		*/
    222 		int IQScatter;
    223 
    224 		/*
    225 		**	Tech level at which the computer will scan the contents of a transport
    226 		**	in order to pick the best target to fire upon.
    227 		*/
    228 		int IQContentScan;
    229 
    230 		/*
    231 		**	Aircraft replacement production occurs at this IQ level or higher.
    232 		*/
    233 		int IQAircraft;
    234 
    235 		/*
    236 		**	Checks for and replaces lost harvesters.
    237 		*/
    238 		int IQHarvester;
    239 
    240 		/*
    241 		**	Is allowed to sell a structure being damaged.
    242 		*/
    243 		int IQSellBack;
    244 
    245 		/*
    246 		**	The computer will build infantry if their cash reserve is greater than this amount.
    247 		*/
    248 		int InfantryReserve;
    249 
    250 		/*
    251 		**	This factor is multiplied by the number of buildings in the computer's base and infantry
    252 		**	are always built until it matches that number.
    253 		*/
    254 		int InfantryBaseMult;
    255 
    256 		/*
    257 		**	Is the computer paranoid? If so, then it will band together with other computer
    258 		**	paranoid players when the situation looks rough.
    259 		*/
    260 		bool IsComputerParanoid;
    261 
    262 		/*
    263 		**	Are superweapons allowed?
    264 		*/
    265 		bool AllowSuperWeapons;
    266 
    267 		/*
    268 		**	This array controls the difficulty affects on the game. There is one
    269 		**	difficulty class object for each difficulty level.
    270 		*/
    271 		DifficultyClass Diff[DIFF_COUNT];
    272 };
    273 
    274 
    275 #endif