A bug in unit promotion system
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ares |
Fix Released
|
Low
|
AlexB |
Bug Description
First, let's make a definition of "cost factor":
The "cost factor" of a UnitType for one house in the game, equals to the amount of money that house actually needed to build ANY unit in thay UnitType, divided by the original cost defined in RulesMD.ini.
For example:
In original YR, all houses in a game start with the cost factor of 1. If a house builds an Industrial Plant, which provides -25% cost bonus to all VehicleTypes, then the cost factor of VehicleType for that house, is 0.75.
A unit's promation is determined by cost, that a unit must destroy triple his self-value to become a veteran, and sextuple his self-value to become an elite.
However in original YR, the costs are not calcuated correctly. When a unit kills another one, the engine always takes the cost factor from the owner of the killed unit.
For example:
Normally, when you destroys an enemy nuke silo with a kirov, the engine would think, "a unit worth $2000 has just killed a unit worth $5000", and your kirov cannot gain veteran. However, if the owner of the nuke silo also owns a Industrial Plant, then in the above situation, the engine will think, "a unit worth $2000*0.75=$1500 has just killed a unit worth $5000", so your kirov will become veteran at once.
The conclusion:
1. Your Industrial Plant doesn't affect your units' promotion;
2. An enemy Industrial Plant will:
a) speed up your vehicles' promotion by killing enemy non-vehicle units;
(since your vehicles' prices are discounted.)
b) slow down your non-vehicle units' promotion by killing enemy vehicles;
(since enemy vehicles' prices are discounted.)
c) not affect other situations.
(since both houses' units' prices are discounted, or not.)
That is pretty interesting and although makes sense from a game logic point of view is damn odd from a player point of view.