#49 Complex weapons

weapons (2)
Turbo Beholder

Add basic event handling by making weapons fire other "weapons", not necessarily of the same type - "onFired", "onHitSolid", "onHitShield", "onExpire" properties with lists of other weapons registered in weapons.XML would probably be enough.
Tis would allow to:
- Implement warhead-assised kinetic weapons.
Currently the only way to do it is to make a missile and have the overhead of creating full-on units (even if it's supposed to be an unguided shell). With "chained" weapons, making a flak shell, miniature conversion bomb (Reaper) or PESC bolt look and work exactly as its description implies would be trivial, and won't consume more resources than necessary. We'd only need to add an EXPLOSION "weapon" separate from missiles (see the previous ticket) and glue it on bolts.
-- Timed fuses. Take the predicted collision time from ITTS and use it for the currently fired flak ball's expiration time (instead of range / exit velocity). If it won't score a direct hit on a maneuverable target, it may still be close enough when it explodes.
- Expand the model, should we want so.
Very easily and in an unified way (i.e. without any hardcoded exclusions at all) with a few extra properties (like spread or recoil momentum): Tractor (secondary effect that appears only on hit applies force and possibly makes "loaded" sound), shrapnel (EXPLOSION -> N x BOLT) with "fair" extra chances of hitting something, etc.
- Add eye candy.
Make a weapon with no damage and sprite of a spark shower or color burst, and you have a reusable effect for AP shell hit or muzzle blast, easily given to weapons that should have it and omitted for all others. They may be excluded from hit checks by 0 damage or better by an extra property (much like "accessory" subunits); a single confvar could simply disable them all and save resources, if necessary.


Feature Requests: #48