ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

CanRetaliate: Difference between revisions

From ModEnc
Jump to navigation Jump to search
One more down.
No edit summary
 
Line 10: Line 10:
}}
}}


Specifies if this object may retaliate when hit by enemy fire. The object may NOT retaliate when:
Specifies if this object may retaliate when hit by enemy fire. Retaliation is only possible if '''none''' of the following conditions are met:


* The damage came from friendly troops.
* Friendly fire.
* The damage came from a special weapon.
* The victim...
* The damage does no harm to the object, or the damage is less than 1 after calculations.
** Is being attacked by a warhead with {{f|Temporal|yes|link}}.
* The retaliating object is paralyzed.
** Was hit by an {{f|EMPulseWarhead|link}} and is currently paralyzed.
* The retaliating object is currently being hit by a weapon whose warhead has {{f|Temporal|yes|link}}.
** Was destroyed by the attack.
* The retaliating object is destroyed
** Is currently following an order. That includes non-patrol waypoints.
* The target is Iron Curtain-ed.
* The aggressor...
* The target is [[Immune]].
** Is a special weapon such as a superweapon or a spawned projectile (V3 or Dreadnought missile).
* The target has set {{f|LegalTarget|no|link}}.
** Does less than 1 point of damage to the victim.
* The target is cloaked.
** Is shielded by an Iron Curtain.
* The target is already destroyed.
** Is an illegal target for the victim: {{f|Immune|yes|link}}, {{f|LegalTarget|no|link}}, is flying but the victim has no weapons with {{f|AA|yes|link}}, is a surface target but the victim's {{f|LandTargeting|link}}/{{f|NavalTargeting|link}} disallow an attack or has an armor type against which the victim's warheads have {{f|Verses|0%|link}}.
* The target is out of range, or the weapon used by the retaliating object's [[Range]] is less than the range from the object to the target.
** Has {{f|Cloak|yes|link}}, {{f|Cloakable|yes|link}} or is in range of a {{f|CloakGenerator|link}}.
** Is already destroyed.
* The aggressor is out of range for the victim while the victim is player-controlled and has {{f|PlayerReturnFire|no|link}}.


If the object has {{f|CanPassiveAquire|yes|link}} set, then it may attack the target before the target attacks it if the target has a [[ThreatPosed]] greater than 0 set, then the object will attack even if as above stated the damage is less than 1 after calculations, but remember that the object is not actually retaliating!
If the aggressor comes into the defender's weapons range with a {{f|ThreatPosed|link}} of non-zero value and the defender has {{f|CanPassiveAquire|yes|link}}, the value of ''CanRetaliate'' is irrelevant as the defender will initiate combat regardless of who hurt.
 
If the defender is a player-owned unit and {{f|PlayerReturnFire|yes|link}}, the defender will retaliate against attacks from outside weapons range by autonomously closing into range first (this is the default behavior for the AI's units). In this case, the defender behaves as if it received a force fire order on the aggressor and thus won't stop retaliating until further retaliation is impossible as per the conditions listed above, even if it means chasing the aggressor across the map.


== See Also ==
== See Also ==
* [[CanPassiveAquire]]
* [[CanPassiveAquire]]

Latest revision as of 00:47, 19 January 2012

Tiberian Dawn The Covert Operations Red Alert Counterstrike Aftermath Tiberian Sun Firestorm HyperPatch Red Alert 2 Yuri's Revenge Ares Generals Zero Hour Tiberium Wars Kane's Wrath
Flag: CanRetaliate
File(s): Rules(md).ini
Values: Boolean values: yes or no, true or false, 1 or 0
Default: yes
Applicable to: TechnoTypes


Specifies if this object may retaliate when hit by enemy fire. Retaliation is only possible if none of the following conditions are met:

  • Friendly fire.
  • The victim...
    • Is being attacked by a warhead with Temporal=yes.
    • Was hit by an EMPulseWarhead and is currently paralyzed.
    • Was destroyed by the attack.
    • Is currently following an order. That includes non-patrol waypoints.
  • The aggressor...
    • Is a special weapon such as a superweapon or a spawned projectile (V3 or Dreadnought missile).
    • Does less than 1 point of damage to the victim.
    • Is shielded by an Iron Curtain.
    • Is an illegal target for the victim: Immune=yes, LegalTarget=no, is flying but the victim has no weapons with AA=yes, is a surface target but the victim's LandTargeting/NavalTargeting disallow an attack or has an armor type against which the victim's warheads have Verses=0%.
    • Has Cloak=yes, Cloakable=yes or is in range of a CloakGenerator.
    • Is already destroyed.
  • The aggressor is out of range for the victim while the victim is player-controlled and has PlayerReturnFire=no.

If the aggressor comes into the defender's weapons range with a ThreatPosed of non-zero value and the defender has CanPassiveAquire=yes, the value of CanRetaliate is irrelevant as the defender will initiate combat regardless of who hurt.

If the defender is a player-owned unit and PlayerReturnFire=yes, the defender will retaliate against attacks from outside weapons range by autonomously closing into range first (this is the default behavior for the AI's units). In this case, the defender behaves as if it received a force fire order on the aggressor and thus won't stop retaliating until further retaliation is impossible as per the conditions listed above, even if it means chasing the aggressor across the map.

See Also