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

Who crushes whom

From ModEnc
Revision as of 08:55, 27 November 2009 by EvilRenegade (talk | contribs) (Replacing Template:TTL with Template:F.)
Jump to navigation Jump to search

This page details how the crushing system works. The table shows whether a defender can be crushed by an attacker, depending on how the flags Crusher, Crushable, OmniCrusher and OmniCrushResistant are set, and for reference, also shows the effect of IsTrain=yes.

Can Defender be crushed by Attacker?
Defender
Crushable OmniCrushResistant
yes no yes no
  A  
t
t
a
c
k
e
r
Crusher yes
no
OmniCrusher yes
no
IsTrain yes
OmniCrusher and OmniCrushResistant are only available in Yuri's Revenge.
Please see below for certain side effects of IsTrain.

Empty cells signal that one property does not influence the other, specifically:

  • Crusher=yes checks for Crushable - it doesn't care whether the target can be crushed by OmniCrushers.
  • Just because a target is not an OmniCrusher, doesn't mean it can't crush a Crushable=yes - that's determined by Crusher.


The flags in detail:

  • Crusher determines if this VehicleType can crush objects.
  • Crushable determines if this object can be crushed by Crushers.
Only if the Attacker is Crusher=yes and the Defender is Crushable=yes, the crushing can happen.
  • OmniCrusher, if enabled, allows the VehicleType to crush objects who are set Crushable=no.
  • OmniCrushResistant, if enabled, prevents all crushing.
  • IsTrain, if enabled, basically nullifies all of the above, and has some additional effects, as detailed below.

IsTrain

  • A unit with IsTrain=yes will be able to crush anything regardless of Crushable, OmniCrushResistant or even Immune.
  • A unit with IsTrain=yes will also be able to "crush" any buildings that happen to occupy the same cell as the unit. This results in such a vehicle with this flag being unable to exit the War Factory that produced it, as it will destroy the building and itself upon creation.
  • IsTrain has no real effect when applied to InfantryTypes or AircraftTypes.
  • However, a unit with IsTrain=yes produces some interesting behavious when it comes into contact with walls:
    • When travelling through a single wall cell, the unit will pass through as if the wall was not there, and no damage will be done to the wall.
    • But, if it encounters another wall cell immediately after, the unit will become 'stuck' on that wall cell. The wall cannot be sold, and the unit will be unable to move. Basically, don't combine train units with walls.
    • A similar effect can happen with terrain objects such as trees and rocks. The IsTrain=yes unit will be able to move through these, however if it stops on them, or attempts to move through a several-cells-thick group of them, it will become stuck on said terrain object.