ShrapnelWeapon
| Flag: | ShrapnelWeapon |
| File(s): | rules(md).ini |
| Values: | Strings: Normal text. (Limited to: Weapons) |
| Default: | none |
| Applicable to: | Projectiles |
If set, the warhead will fire this weapon upon detonation, from the impact point, if the impact point is not inside a structure. The amount of shots to fire is set by ShrapnelCount=.
This is used for the Prism Tank reflection effect.
The working mechanism of ShrapnelWeapon is as follows: When there are InfantryTypes, VehicleTypes, AircraftTypes and TerrainTypes on the ground of the cell where the explosion occurs (meaning that attacks against aerial units or units on elevated bridges are actually judged based on the situation in the cell directly below), it generates the quantity determined by ShrapnelCount. If the weapon's Range >1.0, it uses the same method as CellSpread to search for available non-ally house targets (including BuildingTypes in addition to the aforementioned items) within Range according to the lookup table order (ignoring target's Immune=bool and Armor attributes). If there are remaining shrapnel after assigning one shrapnel to each target, the excess shrapnel will randomly select cells within a 2-cell radius (5x5 area) around the explosion point (without checking for ally objects on the cells at this stage).
Notes
Like with AirburstWeapon, this weapon has to be attached to some (potentially dummy) unit, so that the game loads this weapon at startup time. Failing to do so will result in Internal Errors whenever the shrapnel effect is supposed to fire.
Unlike AirburstWeapon, these weapon is specifically support the rendering of two visual effects: Laser and EBolt (include IsAlternateColor).
When the warhead of the parent weapon has any of the following flags:
- MindControl=yes
- IvanBomb=yes
- BombDisarm=yes
- ElectricAssault=yes
- DirectRocker=yes (only when the target is VehicleType)
- Parasite=yes
- Temporal=yes
- IsLocomotor=yes
- Airstrike=yes
- MakesDisguise=yes
- NukeMaker=yes
It will not trigger the ShrapnelWeapon.
Bugs/Side-Effects/Unexpected Limitations
Due to the program's processing method, paratroopers in descent and units falling from destroyed bridges are also recognized as valid targets.