Magnetic shape-memory alloy