Added.
You can use the "Target_Type/SpecialType" MCD attribute (byte #59) to mark a tile part as a death trap.
Any value between 200 and 254 will work.
255 will also work, but please don't use it.
See attached screenshots from MCDView1 and MCDView2.
The tile part must be used as a FLOOR part in the map editor.
Walls and objects don't do anything.
If a unit walks into a tile with death trap floor, or if a unit falls into such a tile, the game will generate a death trap and activate it.
The death trap is an item with type "STR_DEATH_TRAP_XXX", where XXX is the number you have used as "SpecialType" in the MCD.
For 2x2 units, all 4 tiles are checked for death traps, but only 1 will trigger.
There are two types of death traps:
1. proximity grenades: work as classic proxy grenades, create AOE damage
2. melee items: highly experimental, create non-AOE damage
Examples:
1. proxy (battle type = 5)
items:
- type: STR_DEATH_TRAP_250
battleType: 5 # proxy
damageType: 3
power: 50
damageAlter:
FixRadius: 1 # minimum for nice explosion animation
RandomType: 3
ArmorEffectiveness: 0.0
ToHealth: 20.0
ToTile: 0.0
weight: 3
bigSprite: 21
floorSprite: 21
size: 0.1
costSell: 400
2. melee (battle type = 3)
items:
- type: STR_DEATH_TRAP_251
battleType: 3 # melee
damageType: 7
power: 50
damageAlter:
RandomType: 3
ArmorEffectiveness: 0.0
ToHealth: 10.0
ToTile: 0.0
invWidth: 0 # hidden
invHeight: 0 # hidden
recover: false # don't recover!
hiddenOnMinimap: true # hidden
weight: 6
bigSprite: 26
floorSprite: 26 # use a blank sprite here
handSprite: 80
meleeSound: 54
accuracyMelee: 100
tuMelee: 30
clipSize: -1
size: 0.1
costSell: 945