CnC_Remastered_Collection

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

RULES.CPP (6884B)


      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.CPP 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.CPP                                                    *
     24  *                                                                                             *
     25  *                   Programmer : Joe L. Bostic                                                *
     26  *                                                                                             *
     27  *                   Start Date : 05/12/96                                                     *
     28  *                                                                                             *
     29  *                  Last Update : September 10, 1996 [JLB]                                     *
     30  *                                                                                             *
     31  *---------------------------------------------------------------------------------------------*
     32  * Functions:                                                                                  *
     33  *   DifficultyClass::DifficultyClass -- Default constructor for difficulty class object.      *
     34  *   RulesClass::RulesClass -- Default constructor for rules class object.                     *
     35  * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
     36 
     37 
     38 #include	"function.h"
     39 
     40 
     41  /***********************************************************************************************
     42   * DifficultyClass::DifficultyClass -- Default constructor for difficulty class object.        *
     43   *                                                                                             *
     44   *    This is the default constructor for the difficulty class object. Although it initializes *
     45   *    the rule data with default values, it is expected that they will all be overridden by    *
     46   *    the rules control file.                                                                  *
     47   *                                                                                             *
     48   * INPUT:   none                                                                               *
     49   *                                                                                             *
     50   * OUTPUT:  none                                                                               *
     51   *                                                                                             *
     52   * WARNINGS:   none                                                                            *
     53   *                                                                                             *
     54   * HISTORY:                                                                                    *
     55   *   09/18/2019 SKY : Created.                                                                 *
     56   *=============================================================================================*/
     57 DifficultyClass::DifficultyClass(void) :
     58 	FirepowerBias(1),
     59 	GroundspeedBias(1),
     60 	AirspeedBias(1),
     61 	ArmorBias(1),
     62 	ROFBias(1),
     63 	CostBias(1),
     64 	BuildSpeedBias(1),
     65 	RepairDelay(0.02f),
     66 	BuildDelay(0.03f),
     67 	IsBuildSlowdown(false),
     68 	IsWallDestroyer(true),
     69 	IsContentScan(false)
     70 {
     71 }
     72 
     73 
     74 /***********************************************************************************************
     75  * RulesClass::RulesClass -- Default constructor for rules class object.                       *
     76  *                                                                                             *
     77  *    This is the default constructor for the rules class object. Although it initializes the  *
     78  *    rule data with default values, it is expected that they will all be overridden by the    *
     79  *    rules control file.                                                                      *
     80  *                                                                                             *
     81  * INPUT:   none                                                                               *
     82  *                                                                                             *
     83  * OUTPUT:  none                                                                               *
     84  *                                                                                             *
     85  * WARNINGS:   none                                                                            *
     86  *                                                                                             *
     87  * HISTORY:                                                                                    *
     88  *   06/17/1996 JLB : Created.                                                                 *
     89  *=============================================================================================*/
     90 RulesClass::RulesClass(void) :
     91 	AttackInterval(3),
     92 	BaseSizeAdd(3),
     93 	PowerSurplus(50),
     94 	AttackDelay(5),
     95 	PowerEmergencyFraction(0x00C0),
     96 	HelipadRatio(0x1E),
     97 	HelipadLimit(5),
     98 	AARatio(0x0024),
     99 	AALimit(10),
    100 	DefenseRatio(0x0066),
    101 	DefenseLimit(40),
    102 	WarRatio(0x0019),
    103 	WarLimit(2),
    104 	BarracksRatio(0x0028),
    105 	BarracksLimit(2),
    106 	RefineryLimit(4),
    107 	RefineryRatio(0x0028),
    108 	AirstripRatio(0x001E),
    109 	AirstripLimit(5),
    110 	MaxIQ(5),
    111 	IQSuperWeapons(4),
    112 	IQProduction(5),
    113 	IQGuardArea(4),
    114 	IQRepairSell(1),
    115 	IQCrush(2),
    116 	IQScatter(3),
    117 	IQContentScan(4),
    118 	IQAircraft(4),
    119 	IQHarvester(2),
    120 	IQSellBack(2),
    121 	InfantryReserve(3000),
    122 	InfantryBaseMult(1),
    123 	IsComputerParanoid(true),
    124 	AllowSuperWeapons(true)
    125 {
    126 }