Spy Behavior


Yuri's Revenge only permits a Spy to achieve one effect on infiltrating,
which is determined by a hard-coded order of precedence. Spy infiltration logic
has been rewritten in Ares to be more flexible, including some new
effects that a Spy can achieve.

All of the following flags default to no or 0.

 0.1

[BuildingType]SpyEffect.Custom=boolean
  Whether or not to use the Ares spy infiltration logic instead of the
  original Yuri's Revenge logic.

 Must be set to yes for any of the following effects to
  work...

 Spy behaviour; Multiple effects can be achieved on a single building.


Radar


[BuildingType]SpyEffect.ResetRadar=boolean
  Whether or not spying this enemy building will cause the normal radar sabotage
  behavior (i.e. re-shrouding the enemy's map down to just the terrain that they
  can presently see).
[BuildingType]SpyEffect.RevealRadar=boolean
  **NEW EFFECT** Whether or not spying this enemy radar will reveal to you, the
  infiltrator, all of the terrain that they, the enemy, have thus far explored.
  The building must also have Radar=yes set.
[BuildingType]SpyEffect.KeepRadar=boolean
  **NEW EFFECT** If enabled, a player infiltrating this building will still have
  access to the owning player's radar even if the building is destroyed, sold or
  captured. Otherwise the spy effect is removed. Requires
  SpyEffect.RevealRadar=yes and a Radar=yes building.

.. index Spy behaviour; New effect: Reveal radar (shows you what the enemy can see).


Power


[BuildingType]SpyEffect.PowerOutageDuration=integer - frames
  The number of frames for which the enemy's power will be sabotaged (i.e.
  temporarily reduced to zero).

 Spy behaviour; Per-building power outage duration.



Money


[BuildingType]SpyEffect.StolenMoneyAmount=integer - credits
  **NEW EFFECT** The amount of credits that will be stolen from the enemy upon
  spying this enemy building.
  
  The amount of money ultimately stolen from the enemy is always capped by the
  amount of money they presently have (i.e. if
  SpyEffect.StolenMoneyAmount=500 but the enemy only has 200 credits then
  you will only gain 200 credits from spying the building).
[BuildingType]SpyEffect.StolenMoneyPercentage=float - multiplier
  The percentage of the enemy's current credits that will be stolen from the
  enemy upon spying this enemy building. Only has an effect if
  SpyEffect.StolenMoneyAmount=0.

 Spy behaviour; New effect: Steal money amount (steals a set amount of
  money rather than a percentage).
  
 Spy behaviour; Per-building steal money percentage.


Super Weapons


[BuildingType]SpyEffect.ResetSuperweapons=boolean
  Whether or not spying this enemy building will cause all super weapons
  attached to it (SuperWeapon, SuperWeapon2, SuperWeapons
  and all super weapons on attached upgrades) to have their countdown timers
  restarted.

 Spy behaviour; Reset all super weapons provided by a building


The following tags can be used to grant super weapons like the Sonar Pulse in
Red Alert when a spy infiltrates a Sub Pen.

[BuildingType]SpyEffect.SuperWeapon=SuperWeaponType
  **NEW EFFECT** Grants this super weapon when infiltrating an enemy building of
  this type.

   Not all super weapon types might be supported.

[BuildingType]SpyEffect.SuperWeaponPermanent=boolean
  Whether the granted super weapon will become available permanently. If
  yes, it will become available uncharged, and it won't be lost once
  fired. Otherwise, the super weapon will become available pre-charged but
  disappear again after being fired once. Defaults to no.

 0.B

 Spy behaviour; Grant one-time or permanent super weapon





Stolen Technology


[BuildingType]SpyEffect.StolenTechIndex= list of integers
  The stealable technology types that is stolen upon spying this enemy building.
  Only values from 0 to 31 (inclusive) are supported. Use -1 to
  disable the effect. Defaults to -1.

   Note that despite its singular name this tag takes a list of
    integers and it is thus possible to steal several technology types when
    infiltrating a single building.

[TechnoType]Prerequisite.StolenTechs=list of integers
  The list of stealable technology types that must be stolen before this object
  can be built. Only values from 0 to 31 (inclusive) are supported. Use
  -1 to disable this requirement. Defaults to -1.

In Yuri's Revenge, there were only three types of stealable technology
available and these were hard-coded to the first three buildings in the
[AI]►BuildTech list (game defaults given in parens):

+ Spying the first (GATECH) satisfies RequiresStolenAlliedTech=yes
+ Spying the second (NATECH) satisfies RequiresStolenSovietTech=yes
+ Spying the third (YATECH) satisfies RequiresStolenThirdTech=yes

In Ares, spying a building with SpyEffect.StolenTechIndex=2 (for
example) satisfies the stolen tech requirements for units that require stolen
tech 2.

 If you set SpyEffect.Custom=yes on buildings in the
  BuildTech list (like GATECH, NATECH or YATECH),
  then those buildings will no longer satisfy the old RequiresStolen*Tech
  flags.

 Spy behaviour; New effect: Stolen tech index (multiple new stolen techs).

 0.B



Veterancy


[BuildingType]SpyEffect.UnitVeterancy=boolean
  Whether or not spying this enemy factory will make all future units you build
  from your own factories of the same type start veteran. For example, spying an
  enemy barracks with SpyEffect.UnitVeterancy=yes set will cause all
  future InfantryTypes that you build to start veteran.
  
   This only works for VehicleType and InfantryType
    factories at present. Also note that infiltrating any VehicleType
    factory (i.e. War Factory or Naval Yard) will only make land vehicles start
    veteran - Naval vehicles cannot be made to start veteran through spy
    infiltration logic.





Intelligence


[BuildingType]SpyEffect.RevealProduction=boolean
  **NEW EFFECT** Whether or not spying this enemy building will allow you to see
  what the enemy is presently building from that factory, or the power output,
  or the owning player's money. Once the building has been spied, select the
  building and the information of the unit that is being produced will be
  displayed over the building.

  * Fake=yes buildings will show the text TXT_FAKE and reveal
    their true name in tooltips (see EnemyUIName)
  * Power greater than 0 buildings will reveal the power level
    (formatted using TXT_POWER_DRAIN2)
  * Storage greater than 0 buildings will see the player's
    credits (formatted using TXT_MONEY_FORMAT_1)
  * Factory buildings will reveal the cameo of the current production

   Observers have been enabled to always have access to this
    information.

 /images/production_spying.png
  :alt: Screenshot of a current production being revealed
  :align: center

 Spy behaviour; New effect: Reveal production, money or power

 0.B



Reverse Engineering


For a spy effect to reset a player's build options gained by reverse
engineering, see ....
