That's actually fairly easy. Just attach this to your engine:
Ability 1 Type                                  := Weapon Delivery Type Damage Received Modifier Percent
Ability 1 Description                           := Reduces damage from (weapon type) by 90%
Ability 1 Scope                                 := Space Object
Ability 1 Range Formula                         := 0
Ability 1 Amount 1 Formula                      := -90
Ability 1 Amount 2 Formula                      := "Energy Beam"
and change "Energy Beam" to the delivery type of your new weapon. You may need to make a new delivery type to prevent it from affecting other weapons, and I'm not sure if this affects shields/armor or just internals.
EDIT: fixed sign typo. 
